summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/skill.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index ecd1ff8ac..448f54406 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1,4 +1,4 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#include "../common/cbasetypes.h"
@@ -9373,7 +9373,15 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data)
}
if (target && target->m == src->m)
{ //Move character to target anyway.
- if (unit_movepos(src, src->x+3, src->y+3, 1, 1))
+ int dir, x, y;
+ dir = map_calc_dir(src,target->x,target->y);
+ if( dir > 0 && dir < 4) x = -2;
+ else if( dir > 4 ) x = 2;
+ else x = 0;
+ if( dir > 2 && dir < 6 ) y = -2;
+ else if( dir == 7 || dir < 2 ) y = 2;
+ else y = 0;
+ if (unit_movepos(src, src->x+x, src->y+y, 1, 1))
{ //Display movement + animation.
clif_slide(src,src->x,src->y);
clif_skill_damage(src,target,tick,sd->battle_status.amotion,0,0,1,ud->skill_id, ud->skill_lv, 5);