fix(Core/Creatures): Fixed loading transform auras from DB. (#13489)
Fixes #13472
This commit is contained in:
@@ -1139,8 +1139,6 @@ bool Creature::Create(ObjectGuid::LowType guidlow, Map* map, uint32 phaseMask, u
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadCreaturesAddon();
|
|
||||||
|
|
||||||
uint32 displayID = GetNativeDisplayId();
|
uint32 displayID = GetNativeDisplayId();
|
||||||
if (sObjectMgr->GetCreatureModelRandomGender(&displayID) && !IsTotem()) // Cancel load if no model defined or if totem
|
if (sObjectMgr->GetCreatureModelRandomGender(&displayID) && !IsTotem()) // Cancel load if no model defined or if totem
|
||||||
{
|
{
|
||||||
@@ -1148,6 +1146,8 @@ bool Creature::Create(ObjectGuid::LowType guidlow, Map* map, uint32 phaseMask, u
|
|||||||
SetNativeDisplayId(displayID);
|
SetNativeDisplayId(displayID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LoadCreaturesAddon();
|
||||||
|
|
||||||
//! Need to be called after LoadCreaturesAddon - MOVEMENTFLAG_HOVER is set there
|
//! Need to be called after LoadCreaturesAddon - MOVEMENTFLAG_HOVER is set there
|
||||||
m_positionZ += GetHoverHeight();
|
m_positionZ += GetHoverHeight();
|
||||||
|
|
||||||
@@ -2031,12 +2031,16 @@ void Creature::Respawn(bool force)
|
|||||||
setDeathState(JUST_RESPAWNED);
|
setDeathState(JUST_RESPAWNED);
|
||||||
|
|
||||||
// MDic - Acidmanifesto
|
// MDic - Acidmanifesto
|
||||||
|
// Do not override transform auras
|
||||||
|
if (GetAuraEffectsByType(SPELL_AURA_TRANSFORM).empty())
|
||||||
|
{
|
||||||
uint32 displayID = GetNativeDisplayId();
|
uint32 displayID = GetNativeDisplayId();
|
||||||
if (sObjectMgr->GetCreatureModelRandomGender(&displayID)) // Cancel load if no model defined
|
if (sObjectMgr->GetCreatureModelRandomGender(&displayID)) // Cancel load if no model defined
|
||||||
{
|
{
|
||||||
SetDisplayId(displayID);
|
SetDisplayId(displayID);
|
||||||
SetNativeDisplayId(displayID);
|
SetNativeDisplayId(displayID);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GetMotionMaster()->InitDefault();
|
GetMotionMaster()->InitDefault();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user