diff options
author | skyleo <skyleo@skyleo.de> | 2019-10-03 03:16:15 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2020-03-08 20:59:34 +0100 |
commit | 63b3f95389e56437fc630e7f6051f1a419322fee (patch) | |
tree | 2494cb61b45e04edb781e23770d3192b323215bb /src/map | |
parent | 665855f460eb454d028f9f81c6779539bef7e494 (diff) | |
download | hercules-63b3f95389e56437fc630e7f6051f1a419322fee.tar.gz hercules-63b3f95389e56437fc630e7f6051f1a419322fee.tar.bz2 hercules-63b3f95389e56437fc630e7f6051f1a419322fee.tar.xz hercules-63b3f95389e56437fc630e7f6051f1a419322fee.zip |
Rename unit->walktobl_sub to unit->walktobl_timer
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/unit.c | 12 | ||||
-rw-r--r-- | src/map/unit.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index bff75d6bd..644fd47bb 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -615,7 +615,7 @@ static inline void set_mobstate(struct block_list *bl, int flag) } } -static int unit_walktobl_sub(int tid, int64 tick, int id, intptr_t data) +static int unit_walktobl_timer(int tid, int64 tick, int id, intptr_t data) { struct block_list *bl = map->id2bl(id); if (bl == NULL) @@ -626,7 +626,7 @@ static int unit_walktobl_sub(int tid, int64 tick, int id, intptr_t data) if (ud->walktimer == INVALID_TIMER && ud->target == data) { if (DIFF_TICK(ud->canmove_tick, tick) > 0) // Keep waiting? - timer->add(ud->canmove_tick + 1, unit->walktobl_sub, id, data); + timer->add(ud->canmove_tick + 1, unit->walktobl_timer, id, data); else if (unit->can_move(bl) != 0 && unit->walktoxy_sub(bl) == 0) set_mobstate(bl, ud->state.attack_continue); } @@ -678,7 +678,7 @@ static int unit_walktobl(struct block_list *bl, struct block_list *tbl, int rang if (DIFF_TICK(ud->canmove_tick, timer->gettick()) > 0) { //Can't move, wait a bit before invoking the movement. - timer->add(ud->canmove_tick+1, unit->walktobl_sub, bl->id, ud->target); + timer->add(ud->canmove_tick + 1, unit->walktobl_timer, bl->id, ud->target); return 1; } @@ -1291,7 +1291,7 @@ static int unit_set_walkdelay(struct block_list *bl, int64 tick, int delay, int } else { unit->stop_walking(bl, STOPWALKING_FLAG_NEXTCELL); if (ud->target) - timer->add(ud->canmove_tick+1, unit->walktobl_sub, bl->id, ud->target); + timer->add(ud->canmove_tick + 1, unit->walktobl_timer, bl->id, ud->target); } } } @@ -3025,7 +3025,7 @@ static int do_init_unit(bool minimal) timer->add_func_list(unit->attack_timer, "unit_attack_timer"); timer->add_func_list(unit->walktoxy_timer,"unit_walktoxy_timer"); - timer->add_func_list(unit->walktobl_sub, "unit_walktobl_sub"); + timer->add_func_list(unit->walktobl_timer, "unit_walktobl_timer"); timer->add_func_list(unit->delay_walktoxy_timer,"unit_delay_walktoxy_timer"); timer->add_func_list(unit->step_timer,"unit_step_timer"); return 0; @@ -3052,7 +3052,7 @@ void unit_defaults(void) unit->walktoxy_sub = unit_walktoxy_sub; unit->delay_walktoxy_timer = unit_delay_walktoxy_timer; unit->walktoxy = unit_walktoxy; - unit->walktobl_sub = unit_walktobl_sub; + unit->walktobl_timer = unit_walktobl_timer; unit->walktobl = unit_walktobl; unit->run = unit_run; unit->run_hit = unit_run_hit; diff --git a/src/map/unit.h b/src/map/unit.h index 7c9dc1095..dd338d076 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -110,7 +110,7 @@ struct unit_interface { int (*walktoxy_sub) (struct block_list *bl); int (*delay_walktoxy_timer) (int tid, int64 tick, int id, intptr_t data); int (*walktoxy) (struct block_list *bl, short x, short y, int flag); - int (*walktobl_sub) (int tid, int64 tick, int id, intptr_t data); + int (*walktobl_timer) (int tid, int64 tick, int id, intptr_t data); int (*walktobl) (struct block_list *bl, struct block_list *tbl, int range, int flag); bool (*run) (struct block_list *bl, struct map_session_data *sd, enum sc_type type); void (*run_hit) (struct block_list *bl, struct status_change *sc, struct map_session_data *sd, enum sc_type type); |