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
+6 -9
View File
@@ -3636,19 +3636,16 @@ namespace Game.Entities
return false;
}
public override bool IsImmunedToSpellEffect(SpellInfo spellInfo, uint index, WorldObject caster)
public override bool IsImmunedToSpellEffect(SpellInfo spellInfo, SpellEffectInfo spellEffectInfo, WorldObject caster)
{
SpellEffectInfo effect = spellInfo.GetEffect(index);
if (effect == null || !effect.IsEffect())
return false;
// players are immune to taunt (the aura and the spell effect).
if (effect.IsAura(AuraType.ModTaunt))
return true;
if (effect.IsEffect(SpellEffectName.AttackMe))
if (spellEffectInfo.IsAura(AuraType.ModTaunt))
return true;
return base.IsImmunedToSpellEffect(spellInfo, index, caster);
if (spellEffectInfo.IsEffect(SpellEffectName.AttackMe))
return true;
return base.IsImmunedToSpellEffect(spellInfo, spellEffectInfo, caster);
}
void RegenerateAll()