Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2022-04-07 08:55:50 -06:00
committed by GitHub
143 changed files with 665 additions and 546 deletions

View File

@@ -492,9 +492,9 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele
ObjectMgr::ChooseCreatureFlags(cInfo, npcflag, unit_flags, dynamicflags, data);
if (cInfo->flags_extra & CREATURE_FLAG_EXTRA_WORLDEVENT)
SetUInt32Value(UNIT_NPC_FLAGS, npcflag | sGameEventMgr->GetNPCFlag(this));
ReplaceAllNpcFlags(NPCFlags(npcflag | sGameEventMgr->GetNPCFlag(this)));
else
SetUInt32Value(UNIT_NPC_FLAGS, npcflag);
ReplaceAllNpcFlags(NPCFlags(npcflag));
// Xinef: NPC is in combat, keep this flag!
unit_flags &= ~UNIT_FLAG_IN_COMBAT;
@@ -1302,7 +1302,7 @@ void Creature::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask)
data.spawnId = m_spawnId;
uint32 displayId = GetNativeDisplayId();
uint32 npcflag = GetUInt32Value(UNIT_NPC_FLAGS);
uint32 npcflag = GetNpcFlags();
uint32 unit_flags = GetUnitFlags();
uint32 dynamicflags = GetDynamicFlags();
@@ -1847,7 +1847,7 @@ void Creature::setDeathState(DeathState s, bool despawn)
SaveRespawnTime();
SetTarget(); // remove target selection in any cases (can be set at aura remove in Unit::setDeathState)
SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE);
Dismount(); // if creature is mounted on a virtual mount, remove it at death
@@ -1889,7 +1889,7 @@ void Creature::setDeathState(DeathState s, bool despawn)
UpdateMovementFlags();
SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag);
ReplaceAllNpcFlags(NPCFlags(cinfo->npcflag));
ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~(UNIT_STATE_IGNORE_PATHFINDING | UNIT_STATE_NO_ENVIRONMENT_UPD)));
SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool));