Core/Unit: improve SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL immunities

Port From (https://github.com/TrinityCore/TrinityCore/commit/9b7c55921f521d1de2d19d39fc56e9cdeca5b138)
This commit is contained in:
hondacrx
2022-05-29 20:57:34 -04:00
parent 694896f4d4
commit f7130656aa
+4 -4
View File
@@ -1333,14 +1333,15 @@ namespace Game.Entities
return true; return true;
} }
if (!spellInfo.HasAttribute(SpellAttr3.IgnoreHitResult)) AuraType aura = spellEffectInfo.ApplyAuraName;
{
uint aura = (uint)spellEffectInfo.ApplyAuraName;
if (aura != 0) if (aura != 0)
{
if (!spellInfo.HasAttribute(SpellAttr3.IgnoreHitResult))
{ {
var list = m_spellImmune[(int)SpellImmunity.State]; var list = m_spellImmune[(int)SpellImmunity.State];
if (list.ContainsKey(aura)) if (list.ContainsKey(aura))
return true; return true;
}
if (!spellInfo.HasAttribute(SpellAttr2.UnaffectedByAuraSchoolImmune)) if (!spellInfo.HasAttribute(SpellAttr2.UnaffectedByAuraSchoolImmune))
{ {
@@ -1352,7 +1353,6 @@ namespace Game.Entities
return true; return true;
} }
} }
}
return false; return false;
} }