aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Deutscher <adeutscher@gmail.com>2022-07-10 10:28:54 -0700
committerShauren <shauren.trinity@gmail.com>2022-09-05 19:52:20 +0200
commiteb9976cd08c1d6d56dfaa5247acc78f5b3b72381 (patch)
treebdf82c0c567d77b34389f9082e435ee002b35e27 /src
parent8edee30a62f74d8e13efe7a52bc9e73ef43955d5 (diff)
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)
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)