Core/Auras: Allow SPELL_AURA_MECHANIC_IMMUNITY_MASK to apply aoe/chain targeting immunity
Port From (https://github.com/TrinityCore/TrinityCore/commit/ed0b621d1569a14174a9802027b68dbe4329da69)
This commit is contained in:
@@ -2218,6 +2218,9 @@ namespace Game.Entities
|
||||
|
||||
foreach (AuraType aura in immunities.Aura)
|
||||
ApplySpellImmune(placeholderSpellId, SpellImmunity.State, aura, apply);
|
||||
|
||||
if (immunities.Other != SpellOtherImmunity.None)
|
||||
ApplySpellImmune(placeholderSpellId, SpellImmunity.Other, (byte)immunities.Other, apply);
|
||||
}
|
||||
|
||||
// unapply template immunities (in case we're updating entry)
|
||||
|
||||
@@ -1384,6 +1384,16 @@ namespace Game.Entities
|
||||
return mask;
|
||||
}
|
||||
|
||||
public SpellOtherImmunity GetSpellOtherImmunityMask()
|
||||
{
|
||||
SpellOtherImmunity mask = 0;
|
||||
var damageList = m_spellImmune[(int)SpellImmunity.Other];
|
||||
foreach (var pair in damageList)
|
||||
mask |= (SpellOtherImmunity)pair.Key;
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
||||
public virtual bool IsImmunedToSpellEffect(SpellInfo spellInfo, SpellEffectInfo spellEffectInfo, WorldObject caster, bool requireImmunityPurgesEffectAttribute = false)
|
||||
{
|
||||
if (spellInfo == null)
|
||||
|
||||
Reference in New Issue
Block a user