aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Globals/ObjectMgr.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-11-26 00:20:13 +0100
committerShauren <shauren.trinity@gmail.com>2023-11-26 00:20:13 +0100
commit7cafeb46b3b1f3eea3c966c20f9ef1efe68dfbdc (patch)
tree2cefd8a1424bb4b3a46b73d5c36f9fb1cb86616d /src/server/game/Globals/ObjectMgr.cpp
parentece5570c10e51e16fe65403c051dd1286d12a14d (diff)
Core/Creatures: Don't require `creature`.`modelid` to be one of linked `creature_template` models
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 4aa8e3b7304..5dc45d50536 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -1627,9 +1627,8 @@ CreatureSummonedData const* ObjectMgr::GetCreatureSummonedData(uint32 entryId) c
CreatureModel const* ObjectMgr::ChooseDisplayId(CreatureTemplate const* cinfo, CreatureData const* data /*= nullptr*/)
{
// Load creature model (display id)
- if (data && data->displayid)
- if (CreatureModel const* model = cinfo->GetModelWithDisplayId(data->displayid))
- return model;
+ if (data && data->display)
+ return &*data->display;
if (!(cinfo->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER))
if (CreatureModel const* model = cinfo->GetRandomValidModel())
@@ -2171,7 +2170,8 @@ void ObjectMgr::LoadCreatures()
data.id = entry;
data.mapId = fields[2].GetUInt16();
data.spawnPoint.Relocate(fields[3].GetFloat(), fields[4].GetFloat(), fields[5].GetFloat(), fields[6].GetFloat());
- data.displayid = fields[7].GetUInt32();
+ if (uint32 displayId = fields[7].GetUInt32())
+ data.display.emplace(displayId, DEFAULT_PLAYER_DISPLAY_SCALE, 1.0f);
data.equipmentId = fields[8].GetInt8();
data.spawntimesecs = fields[9].GetUInt32();
data.wander_distance = fields[10].GetFloat();