feat(Core/Unit): NPCFlags helpers (#11286)

* cherry-pick commit (TrinityCore/TrinityCore@d611925)
Co-Authored-By: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
Kitzunu
2022-04-05 13:52:42 +02:00
committed by GitHub
parent e2370446a5
commit edb7cac19b
75 changed files with 293 additions and 285 deletions

View File

@@ -523,7 +523,7 @@ public:
return false;
}
creature->SetUInt32Value(UNIT_NPC_FLAGS, NPCFlags(npcFlags));
creature->ReplaceAllNpcFlags(NPCFlags(npcFlags));
WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_NPCFLAG);
@@ -588,7 +588,7 @@ public:
CreatureTemplate const* cInfo = target->GetCreatureTemplate();
uint32 faction = target->GetFaction();
uint32 npcflags = target->GetUInt32Value(UNIT_NPC_FLAGS);
uint32 npcflags = target->GetNpcFlags();
uint32 mechanicImmuneMask = cInfo->MechanicImmuneMask;
uint32 spellSchoolImmuneMask = cInfo->SpellSchoolImmuneMask;
uint32 displayid = target->GetDisplayId();