Core/Spells: Extended mechanic mask to uint64

Port From (https://github.com/TrinityCore/TrinityCore/commit/de7c03c8385780f05530c2b3cf952a712d5f8f00)
This commit is contained in:
hondacrx
2022-12-17 17:37:07 -05:00
parent 3f3ea5bb89
commit 2dc12dbb69
16 changed files with 83 additions and 74 deletions
+2 -2
View File
@@ -97,7 +97,7 @@ namespace Game.Chat
uint faction = target.GetFaction();
ulong npcflags = (ulong)target.m_unitData.NpcFlags[1] << 32 | target.m_unitData.NpcFlags[0];
uint mechanicImmuneMask = cInfo.MechanicImmuneMask;
ulong mechanicImmuneMask = cInfo.MechanicImmuneMask;
uint displayid = target.GetDisplayId();
uint nativeid = target.GetNativeDisplayId();
uint entry = target.GetEntry();
@@ -166,7 +166,7 @@ namespace Game.Chat
handler.SendSysMessage(CypherStrings.NpcinfoMechanicImmune, mechanicImmuneMask);
foreach (int value in Enum.GetValues(typeof(Mechanics)))
if (Convert.ToBoolean(mechanicImmuneMask & (1 << (value - 1))))
if (Convert.ToBoolean(mechanicImmuneMask & (1ul << (value - 1))))
handler.SendSysMessage("{0} (0x{1:X})", (Mechanics)value, value);
return true;