mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
*Fix the bug that sometimes vehicle is not usable after respawn.
--HG-- branch : trunk
This commit is contained in:
@@ -1794,9 +1794,7 @@ void Creature::setDeathState(DeathState s)
|
||||
SetHealth(GetMaxHealth());
|
||||
SetLootRecipient(NULL);
|
||||
ResetPlayerDamageReq();
|
||||
Unit::setDeathState(ALIVE);
|
||||
CreatureInfo const *cinfo = GetCreatureInfo();
|
||||
RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
|
||||
AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag);
|
||||
clearUnitState(UNIT_STAT_ALL_STATE);
|
||||
@@ -1805,6 +1803,7 @@ void Creature::setDeathState(DeathState s)
|
||||
Motion_Initialize();
|
||||
if(GetCreatureData() && GetPhaseMask() != GetCreatureData()->phaseMask)
|
||||
SetPhaseMask(GetCreatureData()->phaseMask, false);
|
||||
Unit::setDeathState(ALIVE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user