mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[c12616] Simplify use of CombatReach
This commit is contained in:
parent
e478b27dcc
commit
dc3de04d62
6 changed files with 36 additions and 22 deletions
|
|
@ -6554,7 +6554,7 @@ SpellCastResult Spell::CheckRange(bool strict)
|
|||
if (target && target != m_caster)
|
||||
{
|
||||
// distance from target in checks
|
||||
float dist = m_caster->GetCombatDistance(target);
|
||||
float dist = m_caster->GetCombatDistance(target, m_spellInfo->rangeIndex == SPELL_RANGE_IDX_COMBAT);
|
||||
|
||||
if (dist > max_range)
|
||||
return SPELL_FAILED_OUT_OF_RANGE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue