static int clif_calc_walkdelay(struct block_list *bl,int delay, int type, int damage, int div_)
{
if (type == 4 || type == 9 || damage <=0)
return 0;
if (bl->type == BL_PC)
{
if (battle_config.pc_walk_delay_rate != 100)
delay = delay*battle_config.pc_walk_delay_rate/100;
}
//else if (bl->type == BL_MOB && status_get_mode(bl)&MD_BOSS)
//{
// delay = delay * 10/100;
//}
else if (battle_config.walk_delay_rate != 100)
delay = delay*battle_config.walk_delay_rate/100;
if (div_ > 1) //Multi-hit skills mean higher delays.
delay += battle_config.multihit_delay*(div_-1);
if (bl->type == BL_PC)
{
TBL_PC *sd = BL_CAST(BL_PC, bl);
nullpo_retr(delay>0?delay:1, sd);
sd->hit_tick = gettick();
}
return delay>0?delay:1; //Return 1 to specify there should be no noticeable delay, but you should stop walking.
}