mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Spells: fix a pretty edge case of creatures being put in combat by evaded spells
Closes #18369
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user