Core/Spells: fix a pretty edge case of creatures being put in combat by evaded spells

Closes #18369
This commit is contained in:
ariel- authored and Aokromes committed 2016-12-06 11:07:15 +01:00
1 parent c59f8c0693
commit bb8068febb
1 file changed
+2 -1
+2 -1
View File
@@ -2488,7 +2488,8 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
}
}
if (missInfo != SPELL_MISS_EVADE && !m_caster->IsFriendlyTo(unit) && (!m_spellInfo->IsPositive() || m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL)))
// spellHitTarget can be null if spell is missed in DoSpellHitOnUnit
if (missInfo != SPELL_MISS_EVADE && spellHitTarget && !m_caster->IsFriendlyTo(unit) && (!m_spellInfo->IsPositive() || m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL)))
{
m_caster->CombatStart(unit, m_spellInfo->HasInitialAggro());