diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index ff8880ad0..7cfc9f7d2 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -5737,6 +5737,7 @@ namespace Game.Spells maxRange += Math.Min(3.0f, maxRange * 0.1f); // 10% but no more than 3.0f // save the original values before squaring them + float origMinRange = minRange; float origMaxRange = maxRange; // get square values for sqr distance checks @@ -5761,6 +5762,9 @@ namespace Game.Spells GameObject goTarget = m_targets.GetGOTarget(); if (goTarget != null) { + if (origMinRange > 0.0f && goTarget.IsInRange(m_caster.GetPositionX(), m_caster.GetPositionY(), m_caster.GetPositionZ(), origMinRange)) + return SpellCastResult.OutOfRange; + if (!goTarget.IsInRange(m_caster.GetPositionX(), m_caster.GetPositionY(), m_caster.GetPositionZ(), origMaxRange)) return SpellCastResult.OutOfRange; }