aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp6
1 files changed, 5 insertions, 1 deletions
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)