diff options
author | csnv <ctt@csnv.es> | 2015-05-24 19:39:31 +0200 |
---|---|---|
committer | csnv <ctt@csnv.es> | 2015-05-24 19:39:31 +0200 |
commit | 958f7027636f9af722a1e0e060c765fd310e45eb (patch) | |
tree | 068962b0b97ff376a8eea91cbaa512291a7a14dc /src | |
parent | b2e53cca3b50f8daef0cb1f9f44d3d8989ea8d4a (diff) | |
download | hercules-958f7027636f9af722a1e0e060c765fd310e45eb.tar.gz hercules-958f7027636f9af722a1e0e060c765fd310e45eb.tar.bz2 hercules-958f7027636f9af722a1e0e060c765fd310e45eb.tar.xz hercules-958f7027636f9af722a1e0e060c765fd310e45eb.zip |
Fixes ninja skill Final Strike sliding. Bug report 8618: http://hercules.ws/board/tracker/issue-8618-final-strike/
Diffstat (limited to 'src')
-rw-r--r-- | src/map/skill.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 58dbe2472..3db83fb6f 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -3833,9 +3833,16 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 if( dir > 2 && dir < 6 ) y = -i; else if( dir == 7 || dir < 2 ) y = i; else y = 0; - if( (mbl == src || (!map_flag_gvg2(src->m) && !map->list[src->m].flag.battleground) ) // only NJ_ISSEN don't have slide effect in GVG - && unit->movepos(src, mbl->x+x, mbl->y+y, 1, 1) - ) { + if ((mbl == src || (!map_flag_gvg2(src->m) && !map->list[src->m].flag.battleground))) { // only NJ_ISSEN don't have slide effect in GVG + if (!(unit->movepos(src, mbl->x+x, mbl->y+y, 1, 1))) { + // The cell is not reachable (wall, object, ...), move next to the target + if (x > 0) x = -1; + else if (x < 0) x = 1; + if (y > 0) y = -1; + else if (y < 0) y = 1; + + unit->movepos(src, bl->x+x, bl->y+y, 1, 1); + } clif->slide(src, src->x, src->y); clif->fixpos(src); clif->spiritball(src); |