From 09e91d4cd4508e81666f49daa787b8a8644211b8 Mon Sep 17 00:00:00 2001 From: Nova Date: Mon, 26 Oct 2015 10:50:39 -0700 Subject: [PATCH] Warg Dash Bug Fix Fixes a bug where you're able to spam Warg Dash while next to a mob based on your ASPD. Tested the skill live on iRO, and the skill does not cast if a unit is right in front of your facing direction. --- src/map/skill.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/map/skill.c b/src/map/skill.c index f945b0570b..f0597a2d01 100755 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -14775,6 +14775,24 @@ bool skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_i clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return false; } + + int16 sx = sd->bl.x; + int16 sy = sd->bl.y; + uint8 dir = (unit_getdir(&sd->bl)) % 8; + + switch (dir) { + case 0: case 8: sy++; break; + case 1: sx--; sy++; break; + case 2: sx--; break; + case 3: sx--; sy--; break; + case 4: sy--; break; + case 5: sx++; sy--; break; + case 6: sx++; break; + case 7: sx++; sy++; break; + } + if (map_count_oncell(sd->bl.m, sx, sy, BL_CHAR | BL_MOB, 1) > 0) { + return false; + } break; case LG_BANDING: if( sc && sc->data[SC_INSPIRATION] ) {