Core/Spells: Cleanup spell effects

Port From (https://github.com/TrinityCore/TrinityCore/commit/8a4e1119ac21e2d1112d1717337597fe073e495f)
This commit is contained in:
hondacrx
2021-09-08 17:40:50 -04:00
parent 2af5cad79f
commit 5c4a7511ff
41 changed files with 2378 additions and 1987 deletions
+4 -5
View File
@@ -143,17 +143,16 @@ namespace Game.Entities
AddObjectToRemoveList();
}
public override bool IsImmunedToSpellEffect(SpellInfo spellInfo, uint index, WorldObject caster)
public override bool IsImmunedToSpellEffect(SpellInfo spellInfo, SpellEffectInfo spellEffectInfo, WorldObject caster)
{
// @todo possibly all negative auras immune?
if (GetEntry() == 5925)
return false;
SpellEffectInfo effect = spellInfo.GetEffect(index);
if (effect == null)
if (spellEffectInfo == null)
return true;
switch (effect.ApplyAuraName)
switch (spellEffectInfo.ApplyAuraName)
{
case AuraType.PeriodicDamage:
case AuraType.PeriodicLeech:
@@ -164,7 +163,7 @@ namespace Game.Entities
break;
}
return base.IsImmunedToSpellEffect(spellInfo, index, caster);
return base.IsImmunedToSpellEffect(spellInfo, spellEffectInfo, caster);
}
public uint GetSpell(byte slot = 0) { return m_spells[slot]; }