/*==========================================
* Estimates walk delay based on the damage criteria. [Skotlex]
*------------------------------------------*/
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 )
{
if( battle_config.walk_delay_rate_boss != 100 )
delay = delay * battle_config.walk_delay_rate_boss / 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);
return delay>0?delay:1; //Return 1 to specify there should be no noticeable delay, but you should stop walking.
}