Core/Auras: Do not remove auras unaffected by invincibility
Port From (https://github.com/TrinityCore/TrinityCore/commit/eb9976cd08c1d6d56dfaa5247acc78f5b3b72381)
This commit is contained in:
@@ -2480,7 +2480,13 @@ namespace Game.Spells
|
|||||||
{
|
{
|
||||||
target.ApplySpellImmune(Id, SpellImmunity.State, auraType, apply);
|
target.ApplySpellImmune(Id, SpellImmunity.State, auraType, apply);
|
||||||
if (apply && HasAttribute(SpellAttr1.ImmunityPurgesEffect))
|
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)
|
foreach (SpellEffectName effectType in immuneInfo.SpellEffectImmune)
|
||||||
|
|||||||
Reference in New Issue
Block a user