Core/Creatures: Move immunities to separate table and implemented setting immunties to dispel, spell effects, aura types, aoe and chain targeting

Port From (https://github.com/TrinityCore/TrinityCore/commit/f70a5817e1c07891185d716611d45f50b1c73b78)
This commit is contained in:
hondacrx
2024-02-06 17:21:07 -05:00
parent f3993521bc
commit 7c812ae904
15 changed files with 216 additions and 98 deletions
+2 -2
View File
@@ -562,8 +562,8 @@ namespace Game.Entities
Creature creature1 = ToCreature();
if (creature1 != null)
{
ulong immuneMask = creature1.GetCreatureTemplate().MechanicImmuneMask;
if (Convert.ToBoolean(immuneMask & (1 << ((int)Mechanics.Snare - 1))) || Convert.ToBoolean(immuneMask & (1 << ((int)Mechanics.Daze - 1))))
CreatureImmunities immunities = Global.SpellMgr.GetCreatureImmunities(creature1.GetCreatureTemplate().CreatureImmunitiesId);
if (immunities != null && (immunities.Mechanic[(int)Mechanics.Snare] || immunities.Mechanic[(int)Mechanics.Daze]))
break;
}