Core/PacketIO: updated update fields to 4.4.1

This commit is contained in:
funjoker
2024-11-01 08:00:24 +01:00
committed by Ovahlord
parent 31949d05c9
commit c641cbeb55
20 changed files with 1162 additions and 729 deletions

View File

@@ -227,7 +227,7 @@ public:
flag = target->m_unitData->Flags;
if (!npcflag)
memcpy(&npcflag.emplace(), target->m_unitData->NpcFlags.begin(), sizeof(uint64));
npcflag = (uint64(target->GetNpcFlags2()) << 32) | target->GetNpcFlags();
if (!dyflag)
dyflag = target->m_objectData->DynamicFlags;

View File

@@ -481,8 +481,7 @@ public:
CreatureTemplate const* cInfo = target->GetCreatureTemplate();
uint32 faction = target->GetFaction();
uint64 npcflags;
memcpy(&npcflags, target->m_unitData->NpcFlags.begin(), sizeof(npcflags));
uint64 npcflags = (uint64(target->GetNpcFlags2()) << 32) | target->GetNpcFlags();
uint64 mechanicImmuneMask = 0;
if (CreatureImmunities const* immunities = SpellMgr::GetCreatureImmunities(cInfo->CreatureImmunitiesId))
mechanicImmuneMask = immunities->Mechanic.to_ullong();
@@ -551,7 +550,7 @@ public:
if (cInfo->flags_extra & flag)
handler->PSendSysMessage("%s (0x%X)", EnumUtils::ToTitle(flag), flag);
handler->PSendSysMessage(LANG_NPCINFO_NPC_FLAGS, target->m_unitData->NpcFlags[0]);
handler->PSendSysMessage(LANG_NPCINFO_NPC_FLAGS, uint32(target->GetNpcFlags()));
for (NPCFlags flag : EnumUtils::Iterate<NPCFlags>())
if (target->HasNpcFlag(flag))
handler->PSendSysMessage("* %s (0x%X)", EnumUtils::ToTitle(flag), flag);