summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/HPM.c10
-rw-r--r--src/common/socket.c8
-rw-r--r--src/map/atcommand.c10
-rw-r--r--src/map/atcommand.h5
-rw-r--r--src/map/clif.c4
-rw-r--r--src/map/clif.h4
-rw-r--r--src/map/irc-bot.h6
-rw-r--r--src/map/itemdb.c4
-rw-r--r--src/map/pc.c8
-rw-r--r--src/map/skill.c36
-rw-r--r--src/map/status.c2
-rw-r--r--src/tool/mapcache.c5
12 files changed, 49 insertions, 53 deletions
diff --git a/src/common/HPM.c b/src/common/HPM.c
index 02b675704..8e0bbe992 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -389,12 +389,12 @@ bool hpm_add_arg(unsigned int pluginID, char *name, bool has_param, CmdlineExecF
ARR_FIND(0, VECTOR_LENGTH(cmdline->args_data), i, strcmp(VECTOR_INDEX(cmdline->args_data, i).name, name) == 0);
- if (i != VECTOR_LENGTH(cmdline->args_data)) {
- ShowError("HPM:add_arg:%s duplicate! (from %s)\n",name,HPM->pid2name(pluginID));
- return false;
- }
+ if (i != VECTOR_LENGTH(cmdline->args_data)) {
+ ShowError("HPM:add_arg:%s duplicate! (from %s)\n",name,HPM->pid2name(pluginID));
+ return false;
+ }
- return cmdline->arg_add(pluginID, name, '\0', func, help, has_param ? CMDLINE_OPT_PARAM : CMDLINE_OPT_NORMAL);
+ return cmdline->arg_add(pluginID, name, '\0', func, help, has_param ? CMDLINE_OPT_PARAM : CMDLINE_OPT_NORMAL);
}
/**
diff --git a/src/common/socket.c b/src/common/socket.c
index 5d4ea06a0..75b6128b6 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -380,12 +380,12 @@ void setsocketopts(int fd, struct hSockOpt *opt)
ShowWarning("setsocketopts: Unable to set SO_LINGER mode for connection #%d!\n", fd);
#ifdef TCP_THIN_LINEAR_TIMEOUTS
- if (sSetsockopt(fd, IPPROTO_TCP, TCP_THIN_LINEAR_TIMEOUTS, (char *)&yes, sizeof(yes)))
- ShowWarning("setsocketopts: Unable to set TCP_THIN_LINEAR_TIMEOUTS mode for connection #%d!\n", fd);
+ if (sSetsockopt(fd, IPPROTO_TCP, TCP_THIN_LINEAR_TIMEOUTS, (char *)&yes, sizeof(yes)))
+ ShowWarning("setsocketopts: Unable to set TCP_THIN_LINEAR_TIMEOUTS mode for connection #%d!\n", fd);
#endif
#ifdef TCP_THIN_DUPACK
- if (sSetsockopt(fd, IPPROTO_TCP, TCP_THIN_DUPACK, (char *)&yes, sizeof(yes)))
- ShowWarning("setsocketopts: Unable to set TCP_THIN_DUPACK mode for connection #%d!\n", fd);
+ if (sSetsockopt(fd, IPPROTO_TCP, TCP_THIN_DUPACK, (char *)&yes, sizeof(yes)))
+ ShowWarning("setsocketopts: Unable to set TCP_THIN_DUPACK mode for connection #%d!\n", fd);
#endif
}
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 858bfea1b..eef67189a 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -250,22 +250,22 @@ ACMD(send)
clif->message(fd, atcmd_output);
return false;
}
-
+
if (len) {
// show packet length
safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,904), type, clif->packet(type)->len); // Packet 0x%x length: %d
clif->message(fd, atcmd_output);
return true;
}
-
+
len = clif->packet(type)->len;
-
+
if (len == -1) {
// dynamic packet
len = SHRT_MAX-4; // maximum length
off = 4;
}
-
+
WFIFOHEAD(sd->fd, len);
WFIFOW(sd->fd,0)=TOW(type);
@@ -3732,7 +3732,7 @@ ACMD(reloadscript) {
* 1 = Show users in that map and their location
* 2 = Shows NPCs in that map
* 3 = Shows the chats in that map
- TODO# add the missing mapflags e.g. adjust_skill_damage to display
+ * TODO# add the missing mapflags e.g. adjust_skill_damage to display
*------------------------------------------*/
ACMD(mapinfo)
{
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index 0e7895825..ef8be7807 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -152,7 +152,8 @@ void atcommand_defaults(void);
HPShared struct atcommand_interface *atcommand;
/* stay here */
-#define ACMD(x) static bool atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message, struct AtCommandInfo *info) __attribute__((nonnull (2, 3, 4, 5))); \
- static bool atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message, struct AtCommandInfo *info)
+#define ACMD(x) \
+ static bool atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message, struct AtCommandInfo *info) __attribute__((nonnull (2, 3, 4, 5))); \
+ static bool atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message, struct AtCommandInfo *info)
#endif /* MAP_ATCOMMAND_H */
diff --git a/src/map/clif.c b/src/map/clif.c
index afd98aedb..8aa225878 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11566,10 +11566,10 @@ void clif_parse_OneClick_ItemIdentify(int fd, struct map_session_data *sd)
int cmd = RFIFOW(fd,0);
short idx = RFIFOW(fd, packet_db[cmd].pos[0]) - 2;
int n;
-
+
if (idx < 0 || idx >= MAX_INVENTORY || sd->inventory_data[idx] == NULL || sd->status.inventory[idx].nameid <= 0)
return;
-
+
if ((n = pc->have_magnifier(sd) ) != INDEX_NOT_FOUND &&
pc->delitem(sd, n, 1, 0, DELITEM_NORMAL, LOG_TYPE_CONSUME) == 0)
skill->identify(sd, idx);
diff --git a/src/map/clif.h b/src/map/clif.h
index da0f2e21d..9dd8e35f0 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -580,8 +580,8 @@ struct cdelayed_damage {
};
struct merge_item {
- int16 position;
- int16 nameid;
+ int16 position;
+ int16 nameid;
};
/**
diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h
index f73426693..54f462e35 100644
--- a/src/map/irc-bot.h
+++ b/src/map/irc-bot.h
@@ -83,7 +83,7 @@ struct irc_bot_interface {
* @see do_sockets
*/
int (*parse) (int fd);
-
+
/**
* Parse a received message from the irc server, and do the appropriate action
* for the detected command
@@ -135,7 +135,7 @@ struct irc_bot_interface {
* @see timer_interface::do_timer
*/
int (*queue_timer) (int tid, int64 tick, int id, intptr_t data);
-
+
/**
* Decides if an IRC Command should be queued or not, based on the flood protection settings.
*
@@ -155,7 +155,7 @@ struct irc_bot_interface {
* @param msg Message text
*/
void (*relay) (const char *name, const char *msg);
-
+
/**
* Handler for the PING IRC command (send back a PONG)
* @see irc_bot_interface::parse_sub
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index c59f627cc..350697a08 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -342,7 +342,7 @@ const char* itemdb_typename(int type)
return "Unknown Type";
}
- /**
+/**
* Converts the JobID to the format used by map-server to check item
* restriction as per job.
*
@@ -1658,7 +1658,7 @@ int itemdb_validate_entry(struct item_data *entry, int n, const char *source) {
void itemdb_readdb_additional_fields(int itemid, struct config_setting_t *it, int n, const char *source)
{
- // do nothing. plugins can do own work
+ // do nothing. plugins can do own work
}
/**
diff --git a/src/map/pc.c b/src/map/pc.c
index 22a820b13..2206dbb80 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4131,7 +4131,7 @@ bool pc_can_insert_card_into(struct map_session_data* sd, int idx_card, int idx_
ARR_FIND( 0, sd->inventory_data[idx_equip]->slot, i, sd->status.inventory[idx_equip].card[i] == 0);
if (i == sd->inventory_data[idx_equip]->slot)
return false; // no free slots
- return true;
+ return true;
}
/**
@@ -4151,7 +4151,7 @@ bool pc_can_insert_card(struct map_session_data* sd, int idx_card)
return false; // target card missing
if (sd->inventory_data[idx_card]->type != IT_CARD)
return false; // must be a card
- return true;
+ return true;
}
/*==========================================
@@ -6751,7 +6751,7 @@ bool pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned in
if (pc_has_permission(sd,PC_PERM_DISABLE_EXP))
return false;
- if (src)
+ if (src)
pc->calcexp(sd, &base_exp, &job_exp, src);
if (sd->status.guild_id > 0)
@@ -12110,6 +12110,6 @@ void pc_defaults(void) {
pc->check_job_name = pc_check_job_name;
pc->update_idle_time = pc_update_idle_time;
-
+
pc->have_magnifier = pc_have_magnifier;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 6c62e88dd..cf5a786b5 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2068,12 +2068,12 @@ int skill_strip_equip(struct block_list *bl, unsigned short where, int rate, int
return where?1:0;
}
/*=========================================================================
- Used to knock back players, monsters, traps, etc
- - 'count' is the number of squares to knock back
- - 'direction' indicates the way OPPOSITE to the knockback direction (or -1 for default behavior)
- - if 'flag&0x1', position update packets must not be sent.
- - if 'flag&0x2', skill blown ignores players' special_state.no_knockback
- -------------------------------------------------------------------------*/
+ * Used to knock back players, monsters, traps, etc
+ * 'count' is the number of squares to knock back
+ * 'direction' indicates the way OPPOSITE to the knockback direction (or -1 for default behavior)
+ * if 'flag&0x1', position update packets must not be sent.
+ * if 'flag&0x2', skill blown ignores players' special_state.no_knockback
+ */
int skill_blown(struct block_list* src, struct block_list* target, int count, int8 dir, int flag)
{
int dx = 0, dy = 0;
@@ -2890,11 +2890,11 @@ void skill_attack_display_unknown(int *attack_type, struct block_list* src, stru
}
int skill_attack_copy_unknown(int *attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) {
- return *skill_id;
+ return *skill_id;
}
int skill_attack_dir_unknown(int *attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) {
- return -1;
+ return -1;
}
void skill_attack_blow_unknown(int *attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir) {
@@ -5219,7 +5219,7 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) {
bool skill_castend_id_unknown(struct unit_data *ud, struct block_list *src, struct block_list *target)
{
- return false;
+ return false;
}
/*==========================================
@@ -9899,17 +9899,17 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
bool skill_castend_nodamage_id_dead_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag)
{
- return true;
+ return true;
}
bool skill_castend_nodamage_id_undead_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag)
{
- return true;
+ return true;
}
bool skill_castend_nodamage_id_mado_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag)
{
- return false;
+ return false;
}
bool skill_castend_nodamage_id_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag)
@@ -14063,22 +14063,22 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
int skill_check_condition_castbegin_off_unknown(struct status_change *sc, uint16 *skill_id)
{
- return -1;
+ return -1;
}
int skill_check_condition_castbegin_mount_unknown(struct status_change *sc, uint16 *skill_id)
{
- return 0;
+ return 0;
}
int skill_check_condition_castbegin_madogear_unknown(struct status_change *sc, uint16 *skill_id)
{
- return 0;
+ return 0;
}
int skill_check_condition_castbegin_unknown(struct status_change *sc, uint16 *skill_id)
{
- return -1;
+ return -1;
}
int skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id, uint16 skill_lv) {
@@ -14701,12 +14701,12 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
bool skill_get_requirement_off_unknown(struct status_change *sc, uint16 *skill_id)
{
- return false;
+ return false;
}
bool skill_get_requirement_item_unknown(struct status_change *sc, struct map_session_data* sd, uint16 *skill_id, uint16 *skill_lv, uint16 *idx, int *i)
{
- return false;
+ return false;
}
void skill_get_requirement_unknown(struct status_change *sc, struct map_session_data* sd, uint16 *skill_id, uint16 *skill_lv, struct skill_condition *req)
diff --git a/src/map/status.c b/src/map/status.c
index 34bfd06b5..59dd40ae9 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3540,7 +3540,7 @@ void status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, str
#endif
regen->rate.sp += 1;
}
-
+
if (sc->data[SC_GDSKILL_REGENERATION]) {
const struct status_change_entry *sce = sc->data[SC_GDSKILL_REGENERATION];
if (!sce->val4) {
diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c
index ec735e4e6..41dfcf022 100644
--- a/src/tool/mapcache.c
+++ b/src/tool/mapcache.c
@@ -67,11 +67,6 @@ struct map_info {
int32 len;
};
- /*************************************
- * Big-endian compatibility functions *
- * Moved to utils.h *
- *************************************/
-
// Reads a map from GRF's GAT and RSW files
int read_map(char *name, struct map_data *m)
{