mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/Creatures: skip model gender randomization for creatures that have their display ID overriden in creature table
This commit is contained in:
@@ -513,7 +513,12 @@ bool Creature::InitEntry(uint32 entry, CreatureData const* data /*= nullptr*/)
|
||||
}
|
||||
|
||||
uint32 displayID = ObjectMgr::ChooseDisplayId(GetCreatureTemplate(), data);
|
||||
CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID);
|
||||
CreatureModelInfo const* minfo = nullptr;
|
||||
if (!data || !data->displayid)
|
||||
minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID);
|
||||
else
|
||||
minfo = sObjectMgr->GetCreatureModelInfo(displayID);
|
||||
|
||||
if (!minfo) // Cancel load if no model defined
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has invalid model %u defined in table `creature_template`, can't load.", entry, displayID);
|
||||
|
||||
Reference in New Issue
Block a user