Core/Spells: implement SpellInfo helper to filter for relevant mechanic immunities in spell_start packet

Port From (https://github.com/TrinityCore/TrinityCore/commit/60119ba8503e1b8e17d7163baf990022b2d25d41)
This commit is contained in:
hondacrx
2022-05-26 16:30:18 -04:00
parent 3cacc1ff68
commit 80fb973080
2 changed files with 22 additions and 5 deletions
+2 -2
View File
@@ -3644,8 +3644,8 @@ namespace Game.Spells
Unit unitCaster = m_caster.ToUnit();
if (unitCaster != null)
{
schoolImmunityMask = unitCaster.GetSchoolImmunityMask();
mechanicImmunityMask = unitCaster.GetMechanicImmunityMask();
schoolImmunityMask = m_timer != 0 ? unitCaster.GetSchoolImmunityMask() : 0;
mechanicImmunityMask = m_timer != 0 ? m_spellInfo.GetMechanicImmunityMask(unitCaster) : 0;
}
if (schoolImmunityMask != 0 || mechanicImmunityMask != 0)