mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Core/GameObject: Implement method GetDisplayId, use it for GameObjectModels
This commit is contained in:
@@ -148,7 +148,7 @@ bool GameObjectModel::initialize(const GameObject& go, const GameObjectDisplayIn
|
||||
|
||||
GameObjectModel* GameObjectModel::Create(const GameObject& go)
|
||||
{
|
||||
const GameObjectDisplayInfoEntry* info = sGameObjectDisplayInfoStore.LookupEntry(go.GetGOInfo()->displayId);
|
||||
const GameObjectDisplayInfoEntry* info = sGameObjectDisplayInfoStore.LookupEntry(go.GetDisplayId());
|
||||
if (!info)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -802,6 +802,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>
|
||||
|
||||
std::string GetAIName() const;
|
||||
void SetDisplayId(uint32 displayid);
|
||||
uint32 GetDisplayId() const { return GetUInt32Value(GAMEOBJECT_DISPLAYID); }
|
||||
|
||||
GameObjectModel * m_model;
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user