Skip to content

Commit

Permalink
Merge pull request #16 from csnv/fix/walkdelay-damage-delay
Browse files Browse the repository at this point in the history
Fixed walkdelay delay time and some code styling
  • Loading branch information
csnv committed Apr 17, 2024
2 parents 6392c68 + 9743228 commit a1d6984
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/map/battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ static int battle_delay_damage(int64 tick, int amotion, struct block_list *src,
delay = skill_id == 0 ? mob_delay : 0; // Skills have 0 delay?

if (damage > 0)
timer->add(timer->gettick() + delay, unit->set_walkdelay_timer, target->id, MakeDWord(delay, skill_id != 0));
timer->add(timer->gettick() + delay, unit->set_walkdelay_timer, target->id, MakeDWord(ddelay, skill_id != 0));
#endif

if ( !battle_config.delay_battle_damage || amotion <= 1 ) {
Expand Down
4 changes: 2 additions & 2 deletions src/map/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ static int status_damage(struct block_list *src, struct block_list *target, int6
if (st->hp || (flag&8)) {
//Still lives or has been dead before this damage.
#ifndef WALKDELAY_SYNC
if (walkdelay)
unit->set_walkdelay(target, timer->gettick(), walkdelay, 0);
if (walkdelay)
unit->set_walkdelay(target, timer->gettick(), walkdelay, 0);
#endif
return (int)(hp+sp);
}
Expand Down

0 comments on commit a1d6984

Please sign in to comment.