diff options
-rw-r--r-- | src/map/clif.c | 8 | ||||
-rw-r--r-- | src/map/clif.h | 10 | ||||
-rw-r--r-- | src/map/pc.c | 6 | ||||
-rw-r--r-- | src/map/pc.h | 6 | ||||
-rw-r--r-- | src/map/unit.c | 8 | ||||
-rw-r--r-- | src/map/unit.h | 8 |
6 files changed, 23 insertions, 23 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 9f56e0136..e76e9f852 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -890,7 +890,7 @@ static void clif_clearflooritem(struct flooritem_data *fitem, int fd) /// 2 = logged out /// 3 = teleport /// 4 = trickdead -static void clif_clearunit_single(int id, clr_type type, int fd) +static void clif_clearunit_single(int id, enum clr_type type, int fd) { WFIFOHEAD(fd, packet_len(0x80)); WFIFOW(fd,0) = 0x80; @@ -907,7 +907,7 @@ static void clif_clearunit_single(int id, clr_type type, int fd) /// 2 = logged out /// 3 = teleport /// 4 = trickdead -static void clif_clearunit_area(struct block_list *bl, clr_type type) +static void clif_clearunit_area(struct block_list *bl, enum clr_type type) { unsigned char buf[8]; @@ -936,12 +936,12 @@ static void clif_clearunit_area(struct block_list *bl, clr_type type) static int clif_clearunit_delayed_sub(int tid, int64 tick, int id, intptr_t data) { struct block_list *bl = (struct block_list *)data; - clif->clearunit_area(bl, (clr_type) id); + clif->clearunit_area(bl, (enum clr_type) id); ers_free(clif->delay_clearunit_ers,bl); return 0; } -static void clif_clearunit_delayed(struct block_list *bl, clr_type type, int64 tick) +static void clif_clearunit_delayed(struct block_list *bl, enum clr_type type, int64 tick) { struct block_list *tbl; diff --git a/src/map/clif.h b/src/map/clif.h index be127a54f..446abe8e3 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -237,13 +237,13 @@ typedef enum emotion_type { E_MAX } emotion_type; -typedef enum clr_type { +enum clr_type { CLR_OUTSIGHT = 0, CLR_DEAD, CLR_RESPAWN, CLR_TELEPORT, CLR_TRICKDEAD, -} clr_type; +}; enum map_property { // clif_map_property MAPPROPERTY_NOTHING = 0, @@ -756,9 +756,9 @@ struct clif_interface { void (*package_announce) (struct map_session_data *sd, int nameid, int containerid); void (*item_drop_announce) (struct map_session_data *sd, int nameid, char *monsterName); /* unit-related */ - void (*clearunit_single) (int id, clr_type type, int fd); - void (*clearunit_area) (struct block_list* bl, clr_type type); - void (*clearunit_delayed) (struct block_list* bl, clr_type type, int64 tick); + void (*clearunit_single) (int id, enum clr_type type, int fd); + void (*clearunit_area) (struct block_list* bl, enum clr_type type); + void (*clearunit_delayed) (struct block_list* bl, enum clr_type type, int64 tick); void (*walkok) (struct map_session_data *sd); void (*move) (struct unit_data *ud); void (*move2) (struct block_list *bl, struct view_data *vd, struct unit_data *ud); diff --git a/src/map/pc.c b/src/map/pc.c index 0a2508f29..d9e297e84 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5707,7 +5707,7 @@ static int pc_steal_coin(struct map_session_data *sd, struct block_list *target, * 1 - Invalid map index. * 2 - Map not in this map-server, and failed to locate alternate map-server. *------------------------------------------*/ -static int pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, int y, clr_type clrtype) +static int pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, int y, enum clr_type clrtype) { int16 m; @@ -5947,7 +5947,7 @@ static int pc_setpos(struct map_session_data *sd, unsigned short map_index, int * 0 = fail or FIXME success (from pc->setpos) * x(1|2) = fail *------------------------------------------*/ -static int pc_randomwarp(struct map_session_data *sd, clr_type type) +static int pc_randomwarp(struct map_session_data *sd, enum clr_type type) { int x,y,i=0; int16 m; @@ -7946,7 +7946,7 @@ static int pc_skillheal2_bonus(struct map_session_data *sd, uint16 skill_id) return bonus; } -static void pc_respawn(struct map_session_data *sd, clr_type clrtype) +static void pc_respawn(struct map_session_data *sd, enum clr_type clrtype) { if( !pc_isdead(sd) ) return; // not applicable diff --git a/src/map/pc.h b/src/map/pc.h index 8302279b1..cca15e829 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -905,7 +905,7 @@ END_ZEROED_BLOCK; /* End */ int (*setrestartvalue) (struct map_session_data *sd,int type); int (*makesavestatus) (struct map_session_data *sd); - void (*respawn) (struct map_session_data* sd, clr_type clrtype); + void (*respawn) (struct map_session_data* sd, enum clr_type clrtype); int (*setnewpc) (struct map_session_data *sd, int account_id, int char_id, int login_id1, unsigned int client_tick, int sex, int fd); bool (*authok) (struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, const struct mmo_charstatus *st, bool changing_mapservers); void (*authfail) (struct map_session_data *sd); @@ -927,9 +927,9 @@ END_ZEROED_BLOCK; /* End */ int (*calc_skilltree_normalize_job) (struct map_session_data *sd); int (*clean_skilltree) (struct map_session_data *sd); - int (*setpos) (struct map_session_data* sd, unsigned short map_index, int x, int y, clr_type clrtype); + int (*setpos) (struct map_session_data* sd, unsigned short map_index, int x, int y, enum clr_type clrtype); int (*setsavepoint) (struct map_session_data *sd, short map_index, int x, int y); - int (*randomwarp) (struct map_session_data *sd,clr_type type); + int (*randomwarp) (struct map_session_data *sd, enum clr_type type); int (*memo) (struct map_session_data* sd, int pos); int (*checkadditem) (struct map_session_data *sd,int nameid,int amount); diff --git a/src/map/unit.c b/src/map/unit.c index ee856cb76..68e6aeec1 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -918,7 +918,7 @@ static int unit_blown(struct block_list *bl, int dx, int dy, int count, int flag //Warps a unit/ud to a given map/position. //In the case of players, pc->setpos is used. //it respects the no warp flags, so it is safe to call this without doing nowarpto/nowarp checks. -static int unit_warp(struct block_list *bl, short m, short x, short y, clr_type type) +static int unit_warp(struct block_list *bl, short m, short x, short y, enum clr_type type) { struct unit_data *ud; nullpo_ret(bl); @@ -2419,7 +2419,7 @@ static int unit_changeviewsize(struct block_list *bl, short size) * Otherwise it is assumed bl is being warped. * On-Kill specific stuff is not performed here, look at status->damage for that. *------------------------------------------*/ -static int unit_remove_map(struct block_list *bl, clr_type clrtype, const char *file, int line, const char *func) +static int unit_remove_map(struct block_list *bl, enum clr_type clrtype, const char *file, int line, const char *func) { struct unit_data *ud = unit->bl2ud(bl); struct status_change *sc = status->get_sc(bl); @@ -2665,7 +2665,7 @@ static int unit_remove_map(struct block_list *bl, clr_type clrtype, const char * return 1; } -static void unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype) +static void unit_remove_map_pc(struct map_session_data *sd, enum clr_type clrtype) { nullpo_retv(sd); unit->remove_map(&sd->bl,clrtype,ALC_MARK); @@ -2697,7 +2697,7 @@ static void unit_free_pc(struct map_session_data *sd) * Function to free all related resources to the bl * if unit is on map, it is removed using the clrtype specified *------------------------------------------*/ -static int unit_free(struct block_list *bl, clr_type clrtype) +static int unit_free(struct block_list *bl, enum clr_type clrtype) { struct unit_data *ud = unit->bl2ud( bl ); nullpo_ret(bl); diff --git a/src/map/unit.h b/src/map/unit.h index 0c1c2405c..5c01cdc2e 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -116,7 +116,7 @@ struct unit_interface { int (*setdir) (struct block_list *bl, unsigned char dir); uint8 (*getdir) (struct block_list *bl); int (*blown) (struct block_list *bl, int dx, int dy, int count, int flag); - int (*warp) (struct block_list *bl, short m, short x, short y, clr_type type); + int (*warp) (struct block_list *bl, short m, short x, short y, enum clr_type type); int (*stop_walking) (struct block_list *bl, int type); int (*skilluse_id) (struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv); int (*step_timer) (int tid, int64 tick, int id, intptr_t data); @@ -142,10 +142,10 @@ struct unit_interface { int (*counttargeted) (struct block_list *bl); int (*fixdamage) (struct block_list *src, struct block_list *target, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2); int (*changeviewsize) (struct block_list *bl, short size); - int (*remove_map) (struct block_list *bl, clr_type clrtype, const char *file, int line, const char *func); - void (*remove_map_pc) (struct map_session_data *sd, clr_type clrtype); + int (*remove_map) (struct block_list *bl, enum clr_type clrtype, const char *file, int line, const char *func); + void (*remove_map_pc) (struct map_session_data *sd, enum clr_type clrtype); void (*free_pc) (struct map_session_data *sd); - int (*free) (struct block_list *bl, clr_type clrtype); + int (*free) (struct block_list *bl, enum clr_type clrtype); }; #ifdef HERCULES_CORE |