Core/Spells: corrected another case of sending the too close spell error message when trying to cast a destination based spell

This commit is contained in:
Ovahlord
2019-12-13 23:22:49 +01:00
parent 108316ba28
commit ffeb6002b5

View File

@@ -6510,7 +6510,7 @@ SpellCastResult Spell::CheckRange(bool strict) const
if (m_caster->GetExactDistSq(m_targets.GetDstPos()) > maxRange)
return SPELL_FAILED_OUT_OF_RANGE;
if (minRange > 0.0f && m_caster->GetExactDistSq(m_targets.GetDstPos()) < minRange)
return SPELL_FAILED_OUT_OF_RANGE;
return SPELL_FAILED_TOO_CLOSE;
}
return SPELL_CAST_OK;