Core/Auras: Improve aura interactions with immunities on spell effect level

Port From (https://github.com/TrinityCore/TrinityCore/commit/66b03acc47665cd79646096e13aa8c6b513675aa)
This commit is contained in:
hondacrx
2022-09-07 15:22:28 -04:00
parent 9abe7f8ad6
commit 7357a98adc
7 changed files with 140 additions and 89 deletions
+2 -2
View File
@@ -2075,12 +2075,12 @@ namespace Game.Entities
ApplySpellImmune(placeholderSpellId, SpellImmunity.School, 1u << i, true);
}
public override bool IsImmunedToSpellEffect(SpellInfo spellInfo, SpellEffectInfo spellEffectInfo, WorldObject caster)
public override bool IsImmunedToSpellEffect(SpellInfo spellInfo, SpellEffectInfo spellEffectInfo, WorldObject caster, bool requireImmunityPurgesEffectAttribute = false)
{
if (GetCreatureTemplate().CreatureType == CreatureType.Mechanical && spellEffectInfo.IsEffect(SpellEffectName.Heal))
return true;
return base.IsImmunedToSpellEffect(spellInfo, spellEffectInfo, caster);
return base.IsImmunedToSpellEffect(spellInfo, spellEffectInfo, caster, requireImmunityPurgesEffectAttribute);
}
public bool IsElite()