mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core/Creature: don't override display id if addon tables load a morph aura
Ref #7337
This commit is contained in:
@@ -1022,9 +1022,12 @@ bool Creature::Create(ObjectGuid::LowType guidlow, Map* map, uint32 phaseMask, u
|
||||
CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID);
|
||||
if (minfo && !IsTotem()) // Cancel load if no model defined or if totem
|
||||
{
|
||||
SetDisplayId(displayID);
|
||||
SetNativeDisplayId(displayID);
|
||||
SetByteValue(UNIT_FIELD_BYTES_0, UNIT_BYTES_0_OFFSET_GENDER, minfo->gender);
|
||||
|
||||
Unit::AuraEffectList const& transformAuras = GetAuraEffectsByType(SPELL_AURA_TRANSFORM);
|
||||
Unit::AuraEffectList const& shapeshiftAuras = GetAuraEffectsByType(SPELL_AURA_MOD_SHAPESHIFT);
|
||||
if (transformAuras.empty() && shapeshiftAuras.empty())
|
||||
SetDisplayId(displayID);
|
||||
}
|
||||
|
||||
LastUsedScriptID = GetCreatureTemplate()->ScriptID;
|
||||
|
||||
Reference in New Issue
Block a user