From 20e25a820de38ced1e1dfa8376d7c5434f100be8 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Tue, 2 Oct 2018 00:42:43 -0300 Subject: Fixed duplicated 'Skill Failed' message on Asura Strike --- src/map/skill.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/map') diff --git a/src/map/skill.c b/src/map/skill.c index 4579b2ea7..c623cb8d9 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -5882,7 +5882,8 @@ static int skill_castend_id(int tid, int64 tick, int id, intptr_t data) clif->slide(src,src->x,src->y); clif->spiritball(src); } - clif->skill_fail(sd, ud->skill_id, USESKILL_FAIL_LEVEL, 0, 0); + // "Skill Failed" message was already shown when checking that target is invalid + //clif->skill_fail(sd, ud->skill_id, USESKILL_FAIL_LEVEL, 0, 0); } } -- cgit v1.2.3-60-g2f50 From d38c436a04b8ad65ece34272dfb49622e6cdd8b5 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Tue, 2 Oct 2018 01:05:19 -0300 Subject: Makes Asura Strike caster not change look direction at the end of the skill --- src/map/skill.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/map') diff --git a/src/map/skill.c b/src/map/skill.c index c623cb8d9..867555aa6 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -5613,6 +5613,8 @@ static int skill_castend_id(int tid, int64 tick, int id, intptr_t data) // Use a do so that you can break out of it when the skill fails. do { + bool is_asura = (ud->skill_id == MO_EXTREMITYFIST); + if(!target || target->prev==NULL) break; if(src->m != target->m || status->isdead(src)) break; @@ -5845,7 +5847,8 @@ static int skill_castend_id(int tid, int64 tick, int id, intptr_t data) ud->skill_lv = ud->skilltarget = 0; } - if (src->id != target->id) + // Asura Strike caster doesn't look to their target in the end + if (src->id != target->id && !is_asura) unit->setdir(src, map->calc_dir(src, target->x, target->y)); map->freeblock_unlock(); -- cgit v1.2.3-60-g2f50 From ed5d9b62be788d7b25fbf93c77f8495888fbbe39 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Tue, 2 Oct 2018 11:22:22 -0300 Subject: Fixed the number of cells that 'Asura Strike' caster walks when it fails --- src/map/skill.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'src/map') diff --git a/src/map/skill.c b/src/map/skill.c index 867555aa6..b490a66c3 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -5873,16 +5873,26 @@ static int skill_castend_id(int tid, int64 tick, int id, intptr_t data) if (target && target->m == src->m) { //Move character to target anyway. int dir, x, y; + int dist = 3; // number of cells that asura caster will walk + 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)) { + if (dir > 0 && dir < 4) + x = -dist; + else if (dir > 4) + x = dist; + else + x = 0; + + if (dir > 2 && dir < 6) + y = -dist; + else if (dir == 7 || dir < 2) + y = dist; + else + y = 0; + + if (unit->movepos(src, src->x + x, src->y + y, 1, 1) == 1) { //Display movement + animation. - clif->slide(src,src->x,src->y); + clif->slide(src, src->x, src->y); clif->spiritball(src); } // "Skill Failed" message was already shown when checking that target is invalid -- cgit v1.2.3-60-g2f50