mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-06 17:08:23 +01:00
Core/Creature: fixed loading of creature auras on respawn, deathState needs to be set to ALIVE before trying to AddAuras (which fails with different deathState than ALIVE)
Closes https://github.com/TrinityCore/TrinityCore/issues/4150
(cherry picked from commit 530074f453)
This commit is contained in:
@@ -1507,11 +1507,11 @@ void Creature::setDeathState(DeathState s)
|
||||
SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag);
|
||||
ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~UNIT_STATE_IGNORE_PATHFINDING));
|
||||
SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool));
|
||||
LoadCreaturesAddon(true);
|
||||
Motion_Initialize();
|
||||
if (GetCreatureData() && GetPhaseMask() != GetCreatureData()->phaseMask)
|
||||
SetPhaseMask(GetCreatureData()->phaseMask, false);
|
||||
Unit::setDeathState(ALIVE);
|
||||
LoadCreaturesAddon(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user