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)
This commit is contained in:
Alan Deutscher
2022-09-05 19:52:20 +02:00
committed by Shauren
parent 8edee30a62
commit eb9976cd08
+5 -1
View File
@@ -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)