diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/chrif.c | 2 | ||||
-rw-r--r-- | src/map/mercenary.h | 2 | ||||
-rw-r--r-- | src/map/mob.c | 2 | ||||
-rw-r--r-- | src/map/mob.h | 6 | ||||
-rw-r--r-- | src/map/pc.h | 4 | ||||
-rw-r--r-- | src/map/pet.h | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c index a29987a6d..0ea1e06a9 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -1019,7 +1019,7 @@ int chrif_save_scdata(struct map_session_data *sd) int i, count=0; unsigned int tick; struct status_change_data data; - struct TimerData *timer; + const struct TimerData *timer; if (sd->state.finalsave) //Character was already saved? return -1; diff --git a/src/map/mercenary.h b/src/map/mercenary.h index 06378d8f9..ba5db0ba8 100644 --- a/src/map/mercenary.h +++ b/src/map/mercenary.h @@ -54,7 +54,7 @@ int merc_hom_food(struct map_session_data *sd, struct homun_data *hd); int merc_hom_hungry_timer_delete(struct homun_data *hd); int merc_hom_change_name(struct map_session_data *sd,char *name); int merc_hom_change_name_ack(struct map_session_data *sd, char* name, int flag); -#define merc_stop_walking(hd, type) { if((hd)->ud.walktimer != -1) unit_stop_walking(&(hd)->bl, type); } +#define merc_stop_walking(hd, type) unit_stop_walking(&(hd)->bl, type) #define merc_stop_attack(hd) { if((hd)->ud.attacktimer != -1) unit_stop_attack(&(hd)->bl); hd->ud.target = 0; } int merc_hom_increase_intimacy(struct homun_data * hd, unsigned int value); int merc_hom_decrease_intimacy(struct homun_data * hd, unsigned int value); diff --git a/src/map/mob.c b/src/map/mob.c index 88fad163f..ed25d4198 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -995,7 +995,7 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick) * when trying to pick new targets when the current chosen target is * unreachable. *------------------------------------------*/ -int mob_unlocktarget(struct mob_data *md,int tick) +int mob_unlocktarget(struct mob_data *md, unsigned int tick) { nullpo_retr(0, md); diff --git a/src/map/mob.h b/src/map/mob.h index 5d2296d47..a731df847 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -166,7 +166,7 @@ int mob_guardian_guildchange(struct block_list *bl,va_list ap); //Change Guardia int mob_randomwalk(struct mob_data *md,unsigned int tick); int mob_warpchase(struct mob_data *md, struct block_list *target); int mob_target(struct mob_data *md,struct block_list *bl,int dist); -int mob_unlocktarget(struct mob_data *md,int tick); +int mob_unlocktarget(struct mob_data *md, unsigned int tick); struct mob_data* mob_spawn_dataset(struct spawn_data *data); int mob_spawn(struct mob_data *md); int mob_setdelayspawn(struct mob_data *md); @@ -177,8 +177,8 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type); void mob_revive(struct mob_data *md, unsigned int hp); void mob_heal(struct mob_data *md,unsigned int heal); -#define mob_stop_walking(md, type) { if (md->ud.walktimer != -1) unit_stop_walking(&md->bl, type); } -#define mob_stop_attack(md) { if (md->ud.attacktimer != -1) unit_stop_attack(&md->bl); } +#define mob_stop_walking(md, type) unit_stop_walking(&(md)->bl, type) +#define mob_stop_attack(md) { if((md)->ud.attacktimer != -1) unit_stop_attack(&(md)->bl); } void mob_clear_spawninfo(); int do_init_mob(void); diff --git a/src/map/pc.h b/src/map/pc.h index 59bfbea53..de220d54c 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -110,8 +110,8 @@ enum { #define pc_is90overweight(sd) ( (sd)->weight*10 >= (sd)->max_weight*9 ) #define pc_maxparameter(sd) ( (sd)->class_&JOBL_BABY ? battle_config.max_baby_parameter : battle_config.max_parameter ) -#define pc_stop_attack(sd) { if( (sd)->ud.attacktimer != -1 ) { unit_stop_attack(&(sd)->bl); (sd)->ud.target = 0; } } -#define pc_stop_walking(sd, type) { if( (sd)->ud.walktimer != -1 ) unit_stop_walking(&(sd)->bl, type); } +#define pc_stop_walking(sd, type) unit_stop_walking(&(sd)->bl, type) +#define pc_stop_attack(sd) { if((sd)->ud.attacktimer != -1) { unit_stop_attack(&(sd)->bl); (sd)->ud.target = 0; } } //Weapon check considering dual wielding. #define pc_check_weapontype(sd, type) ((type)&((sd)->status.weapon < MAX_WEAPON_TYPE? \ diff --git a/src/map/pet.h b/src/map/pet.h index c1c27b105..835d8a04d 100644 --- a/src/map/pet.h +++ b/src/map/pet.h @@ -58,7 +58,7 @@ int pet_skill_bonus_timer(int tid,unsigned int tick,int id,int data); // [Valari int pet_recovery_timer(int tid,unsigned int tick,int id,int data); // [Valaris] int pet_heal_timer(int tid,unsigned int tick,int id,int data); // [Valaris] -#define pet_stop_walking(pd, type) { if((pd)->ud.walktimer != -1) unit_stop_walking(&(pd)->bl, type); } +#define pet_stop_walking(pd, type) unit_stop_walking(&(pd)->bl, type) #define pet_stop_attack(pd) { if((pd)->ud.attacktimer != -1) unit_stop_attack(&(pd)->bl); } int read_petdb(void); |