diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-03-07 20:15:30 -0300 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2019-08-17 20:04:14 +0200 |
commit | 5f2790815a7eadd0e1781488a4d4442f1dc08228 (patch) | |
tree | 6e02f91c85af827280e70159648ca75735c6ce6c | |
parent | 590009b0849f5b71cc21d479d19f4d02a6843709 (diff) |
Core/Creature: don't override display id if addon tables load a morph aura
Ref #7337
(cherrypicked from c3a2bd32cf675d00081ffd447c93d31d48456ca2)
-rw-r--r-- | src/server/game/Entities/Creature/Creature.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 5e7df4ab3c1..b1fa769ae99 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -1050,9 +1050,12 @@ bool Creature::Create(ObjectGuid::LowType guidlow, Map* map, uint32 entry, float CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelRandomGender(&display, cinfo); if (minfo && !IsTotem()) // Cancel load if no model defined or if totem { - SetDisplayId(display.CreatureDisplayID, display.DisplayScale); SetNativeDisplayId(display.CreatureDisplayID, display.DisplayScale); - SetGender(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(display.CreatureDisplayID, display.DisplayScale); } LastUsedScriptID = GetScriptId(); |