diff options
author | ariel- <ariel-@users.noreply.github.com> | 2016-12-01 02:14:29 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2016-12-01 02:14:29 -0300 |
commit | 343419ab992ca3b8dd93e87e8a16a1ee097447bf (patch) | |
tree | c42ac85b74d02c840c128a5716829b49b946ba53 | |
parent | 80073bc3681213c5036dad577c2dd52689a8df01 (diff) |
Core/Spells: fix a pretty edge case of creatures being put in combat by evaded spells
Closes #18369
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index c082c0a7584..a50129f4aaf 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2503,7 +2503,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()); |