diff options
author | cookiecrumbs <cookiecrumbs@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-08-22 06:58:56 +0000 |
---|---|---|
committer | cookiecrumbs <cookiecrumbs@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-08-22 06:58:56 +0000 |
commit | 506df9e958689dac8ffc07e2504a5c17a12c8b89 (patch) | |
tree | 95476bb60fac6d20e5f947e96ecd24c5f1a8915a /src/map/skill.c | |
parent | ff57948aea3191bb3fa06eb53476ccc473fae125 (diff) | |
download | hercules-506df9e958689dac8ffc07e2504a5c17a12c8b89.tar.gz hercules-506df9e958689dac8ffc07e2504a5c17a12c8b89.tar.bz2 hercules-506df9e958689dac8ffc07e2504a5c17a12c8b89.tar.xz hercules-506df9e958689dac8ffc07e2504a5c17a12c8b89.zip |
Fixed a bug where Flying Kick could be used (outside of PVE/PVP/etc) to actually move to a character (by stalkers and TKs).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16678 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 89cb49e1a..59c88ca75 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -5137,11 +5137,17 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in break; case TK_JUMPKICK: - if( unit_movepos(src, bl->x, bl->y, 1, 1) ) { - if( battle_check_target(src, bl, BCT_ENEMY) > 0 ) + /* Check if the target is an enemy; if not, skill should fail so the character doesn't unit_movepos (exploitable) */ + if( battle_check_target(src, bl, BCT_ENEMY) > 0 ) + { + if( unit_movepos(src, bl->x, bl->y, 1, 1) ) + { skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag); - clif_slide(src,bl->x,bl->y); + clif_slide(src,bl->x,bl->y); + } } + else + clif_skill_fail(sd,skillid,USESKILL_FAIL,0); break; case AL_INCAGI: |