diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index 069c1d0eb..d2fbb5409 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -6557,6 +6557,12 @@ namespace Game.Spells return SpellCastResult.SpellCastOk; } + public static bool CanIncreaseRangeByMovement(Unit unit) + { + // forward running only + return unit.HasUnitMovementFlag(MovementFlag.Forward | MovementFlag.StrafeLeft | MovementFlag.StrafeRight | MovementFlag.Falling) && !unit.IsWalking(); + } + (float minRange, float maxRange) GetMinMaxRange(bool strict) { float rangeMod = 0.0f; @@ -6598,7 +6604,7 @@ namespace Game.Spells } } - if (target != null && unitCaster != null && unitCaster.IsMoving() && target.IsMoving() && !unitCaster.IsWalking() && !target.IsWalking() && + if (target != null && unitCaster != null && CanIncreaseRangeByMovement(target) && CanIncreaseRangeByMovement(unitCaster) && (m_spellInfo.RangeEntry.HasFlag(SpellRangeFlag.Melee) || target.IsPlayer())) rangeMod += 8.0f / 3.0f; } diff --git a/Source/Game/Spells/SpellInfo.cs b/Source/Game/Spells/SpellInfo.cs index c9c28ebea..a418a4799 100644 --- a/Source/Game/Spells/SpellInfo.cs +++ b/Source/Game/Spells/SpellInfo.cs @@ -4275,7 +4275,7 @@ namespace Game.Spells modOwner.ApplySpellMod(_spellInfo, SpellModOp.Radius, ref radius, spell); if (!_spellInfo.HasAttribute(SpellAttr9.NoMovementRadiusBonus)) - if (casterUnit != null && casterUnit.IsMoving() && !casterUnit.IsWalking()) + if (casterUnit != null && Spell.CanIncreaseRangeByMovement(casterUnit)) radius += 2.0f; }