Преглед изворни кода

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.
Nova пре 9 година
родитељ
комит
09e91d4cd4
1 измењених фајлова са 18 додато и 0 уклоњено
  1. 18 0
      src/map/skill.c

+ 18 - 0
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] ) {