Core/Spells: Rename SpellAttr4 to use official attribute names

Port From (https://github.com/TrinityCore/TrinityCore/commit/8d16a79dea4c0100d36e13b068c42499a3a48154)
This commit is contained in:
hondacrx
2022-06-01 13:37:39 -04:00
parent c5ed815f84
commit 62c2d34f1a
12 changed files with 154 additions and 134 deletions
-24
View File
@@ -2088,30 +2088,6 @@ namespace Game.Entities
ApplySpellImmune(placeholderSpellId, SpellImmunity.School, 1u << i, true);
}
public override bool IsImmunedToSpell(SpellInfo spellInfo, WorldObject caster)
{
if (spellInfo == null)
return false;
bool immunedToAllEffects = true;
foreach (var spellEffectInfo in spellInfo.GetEffects())
{
if (!spellEffectInfo.IsEffect())
continue;
if (!IsImmunedToSpellEffect(spellInfo, spellEffectInfo, caster))
{
immunedToAllEffects = false;
break;
}
}
if (immunedToAllEffects)
return true;
return base.IsImmunedToSpell(spellInfo, caster);
}
public override bool IsImmunedToSpellEffect(SpellInfo spellInfo, SpellEffectInfo spellEffectInfo, WorldObject caster)
{
if (GetCreatureTemplate().CreatureType == CreatureType.Mechanical && spellEffectInfo.IsEffect(SpellEffectName.Heal))