Skip to content

Commit

Permalink
Clean up unused function set_walkdelay_timer
Browse files Browse the repository at this point in the history
  • Loading branch information
csnv committed Feb 24, 2024
1 parent ae22e2a commit 9202ea0
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 49 deletions.
14 changes: 0 additions & 14 deletions src/map/unit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1345,19 +1345,6 @@ static int unit_resume_running(int tid, int64 tick, int id, intptr_t data)

}

/*==========================================
* Apply walk delay timer
*------------------------------------------*/
static int unit_set_walkdelay_timer(int tid, int64 tick, int id, intptr_t data)
{
struct block_list* bl = map->id2bl(id);
if (bl == NULL)
return 1;

unit->set_walkdelay(bl, tick, (int)data, 0);
return 0;
}

/*==========================================
* Applies walk delay to character, considering that
* if type is 0, this is a damage induced delay: if previous delay is active, do not change it.
Expand Down Expand Up @@ -3249,7 +3236,6 @@ void unit_defaults(void)
unit->is_walking = unit_is_walking;
unit->can_move = unit_can_move;
unit->resume_running = unit_resume_running;
unit->set_walkdelay_timer = unit_set_walkdelay_timer;
unit->set_walkdelay = unit_set_walkdelay;
unit->skilluse_id2 = unit_skilluse_id2;
unit->skilluse_pos = unit_skilluse_pos;
Expand Down
1 change: 0 additions & 1 deletion src/map/unit.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ struct unit_interface {
int (*is_walking) (struct block_list *bl);
int (*can_move) (struct block_list *bl);
int (*resume_running) (int tid, int64 tick, int id, intptr_t data);
int (*set_walkdelay_timer) (int tid, int64 tick, int id, intptr_t data);
int (*set_walkdelay) (struct block_list *bl, int64 tick, int delay, int type);
int (*skilluse_id2) (struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv, int casttime, int castcancel);
int (*skilluse_pos) (struct block_list *src, short skill_x, short skill_y, uint16 skill_id, uint16 skill_lv);
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/HPMHooking/HPMHooking.Defs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -9622,8 +9622,6 @@ typedef int (*HPMHOOK_pre_unit_can_move) (struct block_list **bl);
typedef int (*HPMHOOK_post_unit_can_move) (int retVal___, struct block_list *bl);
typedef int (*HPMHOOK_pre_unit_resume_running) (int *tid, int64 *tick, int *id, intptr_t *data);
typedef int (*HPMHOOK_post_unit_resume_running) (int retVal___, int tid, int64 tick, int id, intptr_t data);
typedef int (*HPMHOOK_pre_unit_set_walkdelay_timer) (int *tid, int64 *tick, int *id, intptr_t *data);
typedef int (*HPMHOOK_post_unit_set_walkdelay_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data);
typedef int (*HPMHOOK_pre_unit_set_walkdelay) (struct block_list **bl, int64 *tick, int *delay, int *type);
typedef int (*HPMHOOK_post_unit_set_walkdelay) (int retVal___, struct block_list *bl, int64 tick, int delay, int type);
typedef int (*HPMHOOK_pre_unit_skilluse_id2) (struct block_list **src, int *target_id, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel);
Expand Down
4 changes: 0 additions & 4 deletions src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7518,8 +7518,6 @@ struct {
struct HPMHookPoint *HP_unit_can_move_post;
struct HPMHookPoint *HP_unit_resume_running_pre;
struct HPMHookPoint *HP_unit_resume_running_post;
struct HPMHookPoint *HP_unit_set_walkdelay_timer_pre;
struct HPMHookPoint *HP_unit_set_walkdelay_timer_post;
struct HPMHookPoint *HP_unit_set_walkdelay_pre;
struct HPMHookPoint *HP_unit_set_walkdelay_post;
struct HPMHookPoint *HP_unit_skilluse_id2_pre;
Expand Down Expand Up @@ -15075,8 +15073,6 @@ struct {
int HP_unit_can_move_post;
int HP_unit_resume_running_pre;
int HP_unit_resume_running_post;
int HP_unit_set_walkdelay_timer_pre;
int HP_unit_set_walkdelay_timer_post;
int HP_unit_set_walkdelay_pre;
int HP_unit_set_walkdelay_post;
int HP_unit_skilluse_id2_pre;
Expand Down
1 change: 0 additions & 1 deletion src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3848,7 +3848,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(unit->is_walking, HP_unit_is_walking) },
{ HP_POP(unit->can_move, HP_unit_can_move) },
{ HP_POP(unit->resume_running, HP_unit_resume_running) },
{ HP_POP(unit->set_walkdelay_timer, HP_unit_set_walkdelay_timer) },
{ HP_POP(unit->set_walkdelay, HP_unit_set_walkdelay) },
{ HP_POP(unit->skilluse_id2, HP_unit_skilluse_id2) },
{ HP_POP(unit->skilluse_pos, HP_unit_skilluse_pos) },
Expand Down
27 changes: 0 additions & 27 deletions src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
Original file line number Diff line number Diff line change
Expand Up @@ -100518,33 +100518,6 @@ int HP_unit_resume_running(int tid, int64 tick, int id, intptr_t data) {
}
return retVal___;
}
int HP_unit_set_walkdelay_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_unit_set_walkdelay_timer_pre > 0) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_walkdelay_timer_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_unit_set_walkdelay_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
}
if (*HPMforce_return) {
*HPMforce_return = false;
return retVal___;
}
}
{
retVal___ = HPMHooks.source.unit.set_walkdelay_timer(tid, tick, id, data);
}
if (HPMHooks.count.HP_unit_set_walkdelay_timer_post > 0) {
int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data);
for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_walkdelay_timer_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_unit_set_walkdelay_timer_post[hIndex].func;
retVal___ = postHookFunc(retVal___, tid, tick, id, data);
}
}
return retVal___;
}
int HP_unit_set_walkdelay(struct block_list *bl, int64 tick, int delay, int type) {
int hIndex = 0;
int retVal___ = 0;
Expand Down

0 comments on commit 9202ea0

Please sign in to comment.