viewing paste MO_EXTREMITYFIST | 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 30 31 32 33 34 35 36 37 38 39 40 41 42
case MO_EXTREMITYFIST:
        if( skillid == MO_EXTREMITYFIST )
        {
            status_change_end(src, SC_EXPLOSIONSPIRITS, INVALID_TIMER);
            status_change_end(src, SC_BLADESTOP, INVALID_TIMER);
        }
        //Client expects you to move to target regardless of distance
        {
            struct unit_data *ud = unit_bl2ud(src);
            short dx,dy;
            int i,speed;
                        
                        if(ud)
                        {
                            dx = dirx[ud->dir]*2;
                            dy = diry[ud->dir]*2;
                        }
            if (map_getcell(src->m, src->x+dx, src->y+dy, CELL_CHKNOPASS))
            {
                dx = src->x;
                dy = src->y;
            } else {
                dx = src->x + dx;
                dy = src->y + dy;
            }
 
            skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
 
            if(unit_walktoxy(src, dx, dy, 2) && ud) {
                //Increase can't walk delay to not alter your walk path
                ud->canmove_tick = tick;
                speed = status_get_speed(src);
                for (i = 0; i < ud->walkpath.path_len; i ++)
                {
                    if(ud->walkpath.path[i]&1)
                        ud->canmove_tick+=7*speed/5;
                    else
                        ud->canmove_tick+=speed;
                }
            }
        }
        break;
Viewed 1441 times, submitted by lighta.