diff options
author | malufett <malufett.eat.my.binaries@gmail.com> | 2015-05-26 02:19:46 +0800 |
---|---|---|
committer | malufett <malufett.eat.my.binaries@gmail.com> | 2015-05-26 02:19:46 +0800 |
commit | 450c36259a94257d30d1382c61080e85d546dea8 (patch) | |
tree | 2204e68fec73efe5ed46459708a628f5446b92a3 | |
parent | 4fd10b2406b092d42d3e485950ba68bddd90cdc3 (diff) | |
parent | 958f7027636f9af722a1e0e060c765fd310e45eb (diff) | |
download | hercules-450c36259a94257d30d1382c61080e85d546dea8.tar.gz hercules-450c36259a94257d30d1382c61080e85d546dea8.tar.bz2 hercules-450c36259a94257d30d1382c61080e85d546dea8.tar.xz hercules-450c36259a94257d30d1382c61080e85d546dea8.zip |
Merge pull request #524 from csnv/fixes2
Fixes ninja skill Final Strike sliding. Bug report 8618
-http://hercules.ws/board/tracker/issue-8618-final-strike/?gopid=24952#entry24952
-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); |