diff options
author | Nay <dnpd.dd@gmail.com> | 2012-09-23 07:49:18 -0700 |
---|---|---|
committer | Nay <dnpd.dd@gmail.com> | 2012-09-23 07:49:18 -0700 |
commit | 91fd408446e411fad364fa46919adb9bd93dbddd (patch) | |
tree | ff1ba04891b1d766868a4dd5cbbf3c3a3835d08e | |
parent | e4d08c118656f4b2e12aac62975f4fc08b3f0b4a (diff) | |
parent | d45a768810edbf6f3cc6c4fc2eb34a1c8db88b3f (diff) |
Merge pull request #7842 from Elron103/pull-requests2
Core/GameObject: Implement method GetDisplayId, use it for GameObjectModels
-rw-r--r-- | src/server/collision/Models/GameObjectModel.cpp | 2 | ||||
-rwxr-xr-x | src/server/game/Entities/GameObject/GameObject.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/server/collision/Models/GameObjectModel.cpp b/src/server/collision/Models/GameObjectModel.cpp index 6cb0f90d98e..d8c39925dc6 100644 --- a/src/server/collision/Models/GameObjectModel.cpp +++ b/src/server/collision/Models/GameObjectModel.cpp @@ -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; diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index eb2fa8f1a0e..8fb81a0e021 100755 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -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: |