- Changed Extremity Fist's code to make you actually walk past your target, which displays a much more correct "animation" for the skill. Thanks to HiddenDragon for the information and code.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8765 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-09-15 01:57:23 +00:00
parent ae631dda54
commit b3d74eb0ad
2 changed files with 23 additions and 21 deletions

View File

@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/09/14 2006/09/14
* Changed Extremity Fist's code to make you actually walk past your target,
which displays a much more correct "animation" for the skill. Thanks to
HiddenDragon for the information and code. [Skotlex]
* Updated the item_db search functions so that when returning the * Updated the item_db search functions so that when returning the
dummy-item, it first updates the nameid to match the requested one, this dummy-item, it first updates the nameid to match the requested one, this
prevents pc_additem later on giving you an item with ID 500 instead of the prevents pc_additem later on giving you an item with ID 500 instead of the

View File

@ -2788,6 +2788,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
BF_WEAPON, src, src, skillid, skilllv, tick, flag, BCT_ENEMY); BF_WEAPON, src, src, skillid, skilllv, tick, flag, BCT_ENEMY);
break; break;
case KN_CHARGEATK:
flag = distance_bl(src, bl);
case TK_JUMPKICK: case TK_JUMPKICK:
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag); skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
if (unit_movepos(src, bl->x, bl->y, 0, 0)) if (unit_movepos(src, bl->x, bl->y, 0, 0))
@ -2850,28 +2852,25 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
if (sc->data[SC_BLADESTOP].timer != -1) if (sc->data[SC_BLADESTOP].timer != -1)
status_change_end(src,SC_BLADESTOP,-1); status_change_end(src,SC_BLADESTOP,-1);
} }
case KN_CHARGEATK: //Client expects you to move to target regardless
if(!check_distance_bl(src, bl, 2)) { //Need to move to target. if(unit_walktobl(src, bl, 1, 1)) {
int dx,dy; struct unit_data *ud = unit_bl2ud(src);
int i,speed;
dx = bl->x - src->x;
dy = bl->y - src->y;
if(dx > 0) dx++;
else if(dx < 0) dx--;
if (dy > 0) dy++;
else if(dy < 0) dy--;
if (skillid == KN_CHARGEATK) //Store distance in flag [Skotlex]
flag = distance_bl(src, bl);
if (!unit_movepos(src, src->x+dx, src->y+dy, 1, 1)) {
if (sd) clif_skill_fail(sd,skillid,0,0);
break;
}
clif_slide(src,src->x,src->y);
} else //Assume minimum distance of 1 for Charge.
flag = 1;
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag); skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
if (ud) {
ud->target = 0; //Clear target, as you shouldn't be chasing it if you can't get there on time.
//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; break;
//Splash attack skills. //Splash attack skills.