From eb9976cd08c1d6d56dfaa5247acc78f5b3b72381 Mon Sep 17 00:00:00 2001 From: Alan Deutscher Date: Sun, 10 Jul 2022 10:28:54 -0700 Subject: Core/Auras: Do not remove auras unaffected by invincibility (#28100) * Mark WSG's Focused Assault and Brutal Assault as unaffected by immunities (cherry picked from commit b484b7e9270bef8bf6347c75a4c71b25bb750b11) --- src/server/game/Spells/SpellInfo.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 0eb0246b746..e63e452e14f 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -3570,7 +3570,11 @@ void SpellInfo::ApplyAllSpellImmunitiesTo(Unit* target, SpellEffectInfo const& s { target->ApplySpellImmune(Id, IMMUNITY_STATE, auraType, apply); if (apply && HasAttribute(SPELL_ATTR1_IMMUNITY_PURGES_EFFECT)) - target->RemoveAurasByType(auraType); + target->RemoveAurasByType(auraType, [](AuraApplication const* aurApp) -> bool + { + // if the aura has SPELL_ATTR0_NO_IMMUNITIES, then it cannot be removed by immunity + return !aurApp->GetBase()->GetSpellInfo()->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES); + }); } for (SpellEffectName effectType : immuneInfo.SpellEffectImmune) -- cgit v1.2.3