fix(Core/Spells): Restricted aura application prevention when immune to banish effects (e.g cyclone) (#20060)

This commit is contained in:
Andrew
2024-10-01 06:47:44 -03:00
committed by GitHub
parent 003eda6db3
commit ee870ff3b3
+3 -2
View File
@@ -3158,8 +3158,9 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
if (m_spellAura) if (m_spellAura)
{ {
// Prevent aura application if target is immuned // Prevent aura application if target is banished and immuned
if (m_targets.GetUnitTarget() && m_targets.GetUnitTarget()->IsImmunedToDamageOrSchool(m_spellAura->GetSpellInfo())) if (m_targets.GetUnitTarget() && m_targets.GetUnitTarget()->IsImmunedToDamageOrSchool(m_spellAura->GetSpellInfo())
&& m_targets.GetUnitTarget()->HasUnitState(UNIT_STATE_ISOLATED))
{ {
m_spellAura->Remove(); m_spellAura->Remove();
return SPELL_MISS_IMMUNE; return SPELL_MISS_IMMUNE;