viewing paste Unknown #5011 | Text

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
/*==========================================
 * 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.
}
Viewed 660 times, submitted by Guest.