aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2018-04-10 23:49:19 +0200
committerShauren <shauren.trinity@gmail.com>2018-04-10 23:49:19 +0200
commita51cd47f809158c4178997569956285e48ef0271 (patch)
tree94d5e9fab406a8bb973d5c3e183e1dafed476b7a /src
parent3c08c9c894098733ba4ee96d91f1556ac27adfaf (diff)
Core/GameObjects: Set GO_FLAG_MAP_OBJECT for gameobjects that use a WMO model
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 23724c04aeb..09dcddf1649 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -284,6 +284,8 @@ bool GameObject::Create(uint32 entry, Map* map, Position const& pos, QuaternionD
SetDisplayId(goInfo->displayId);
m_model = CreateModel();
+ if (m_model && m_model->isMapObject())
+ SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_MAP_OBJECT);
// GAMEOBJECT_BYTES_1, index at 0, 1, 2 and 3
SetGoType(GameobjectTypes(goInfo->type));
m_prevGoState = goState;
@@ -2406,6 +2408,8 @@ void GameObject::UpdateModel()
m_model = CreateModel();
if (m_model)
GetMap()->InsertGameObjectModel(*m_model);
+
+ ApplyModFlag(GAMEOBJECT_FLAGS, GO_FLAG_MAP_OBJECT, m_model && m_model->isMapObject());
}
Player* GameObject::GetLootRecipient() const