Core/Auras: Do not remove auras unaffected by invincibility

Port From (https://github.com/TrinityCore/TrinityCore/commit/eb9976cd08c1d6d56dfaa5247acc78f5b3b72381)
This commit is contained in:
hondacrx
2022-09-05 22:27:09 -04:00
parent a2fbbdc4dc
commit 536ee1625b
+7 -1
View File
@@ -2480,7 +2480,13 @@ namespace Game.Spells
{
target.ApplySpellImmune(Id, SpellImmunity.State, auraType, apply);
if (apply && HasAttribute(SpellAttr1.ImmunityPurgesEffect))
target.RemoveAurasByType(auraType);
{
target.RemoveAurasByType(auraType, aurApp =>
{
// if the aura has SPELL_ATTR0_NO_IMMUNITIES, then it cannot be removed by immunity
return !aurApp.GetBase().GetSpellInfo().HasAttribute(SpellAttr0.NoImmunities);
});
}
}
foreach (SpellEffectName effectType in immuneInfo.SpellEffectImmune)