Core/Spells: Fixed spell with SPELL_AURA_MECHANIC_IMMUNITY_MASK failing to cast if they were supposed to purge effect they are granting immunity to (CreatureImmunities was not checked)
Port From (https://github.com/TrinityCore/TrinityCore/commit/e1e4aa7980a6e91a330d615467b2c25b60dcbcc1)
This commit is contained in:
@@ -2772,6 +2772,13 @@ namespace Game.Spells
|
||||
targets.Add(target, targetPair.Value);
|
||||
}
|
||||
|
||||
// skip area update if owner is not in world!
|
||||
if (!GetUnitOwner().IsInWorld)
|
||||
return;
|
||||
|
||||
if (GetUnitOwner().HasAuraState(AuraStateType.Banished, GetSpellInfo(), caster))
|
||||
return;
|
||||
|
||||
foreach (var spellEffectInfo in GetSpellInfo().GetEffects())
|
||||
{
|
||||
if (!HasEffect(spellEffectInfo.EffectIndex))
|
||||
@@ -2781,13 +2788,6 @@ namespace Game.Spells
|
||||
if (spellEffectInfo.Effect == SpellEffectName.ApplyAura)
|
||||
continue;
|
||||
|
||||
// skip area update if owner is not in world!
|
||||
if (!GetUnitOwner().IsInWorld)
|
||||
continue;
|
||||
|
||||
if (GetUnitOwner().HasAuraState(AuraStateType.Banished, GetSpellInfo(), caster))
|
||||
continue;
|
||||
|
||||
List<WorldObject> units = new();
|
||||
var condList = spellEffectInfo.ImplicitTargetConditions;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user