Core/Creature: restore previous behavior of random gender on respawn
Port From (https://github.com/TrinityCore/TrinityCore/commit/c0b5e074c47bd8722b76e582336278bc55aa9320)
This commit is contained in:
@@ -1635,7 +1635,11 @@ namespace Game.Entities
|
|||||||
setDeathState(DeathState.JustRespawned);
|
setDeathState(DeathState.JustRespawned);
|
||||||
|
|
||||||
CreatureModel display = new CreatureModel(GetNativeDisplayId(), GetNativeDisplayScale(), 1.0f);
|
CreatureModel display = new CreatureModel(GetNativeDisplayId(), GetNativeDisplayScale(), 1.0f);
|
||||||
SetDisplayId(display.CreatureDisplayID, display.DisplayScale);
|
if (Global.ObjectMgr.GetCreatureModelRandomGender(ref display, GetCreatureTemplate()) != null)
|
||||||
|
{
|
||||||
|
SetDisplayId(display.CreatureDisplayID, display.DisplayScale);
|
||||||
|
SetNativeDisplayId(display.CreatureDisplayID, display.DisplayScale);
|
||||||
|
}
|
||||||
|
|
||||||
GetMotionMaster().InitDefault();
|
GetMotionMaster().InitDefault();
|
||||||
//Re-initialize reactstate that could be altered by movementgenerators
|
//Re-initialize reactstate that could be altered by movementgenerators
|
||||||
|
|||||||
Reference in New Issue
Block a user