viewing paste Unknown #5012 | C

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 27 28 29
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.
}
Viewed 270 times, submitted by unknown.