Core/Spells: Spells with the self-cast range should not have a range check. This range used for many triggered spells.
Fixes #3358
This commit is contained in:
@@ -5639,7 +5639,16 @@ SpellCastResult Spell::CheckRange(bool strict)
|
|||||||
if (!strict && m_casttime == 0)
|
if (!strict && m_casttime == 0)
|
||||||
return SPELL_CAST_OK;
|
return SPELL_CAST_OK;
|
||||||
|
|
||||||
uint32 range_type = m_spellInfo->RangeEntry ? m_spellInfo->RangeEntry->type : 0;
|
uint32 range_type = 0;
|
||||||
|
|
||||||
|
if (m_spellInfo->RangeEntry)
|
||||||
|
{
|
||||||
|
// self cast is used for triggered spells, no range checking needed
|
||||||
|
if (m_spellInfo->RangeEntry->ID == 1)
|
||||||
|
return SPELL_CAST_OK;
|
||||||
|
|
||||||
|
range_type = m_spellInfo->RangeEntry->type;
|
||||||
|
}
|
||||||
|
|
||||||
Unit* target = m_targets.GetUnitTarget();
|
Unit* target = m_targets.GetUnitTarget();
|
||||||
float max_range = m_caster->GetSpellMaxRangeForTarget(target, m_spellInfo);
|
float max_range = m_caster->GetSpellMaxRangeForTarget(target, m_spellInfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user