diff options
Diffstat (limited to 'src/game/GameObject.cpp')
-rw-r--r-- | src/game/GameObject.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index ea848e95a52..da6ab1ef12d 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -57,6 +57,7 @@ GameObject::GameObject() : WorldObject(), m_goValue(new GameObjectValue) m_charges = 5; m_cooldownTime = 0; m_goInfo = NULL; + m_goData = NULL; m_DBTableGuid = 0; } @@ -628,8 +629,7 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map) } } - if(!data->dbData) - SetInternallyAdded(); + m_goData = data; return true; } @@ -647,11 +647,6 @@ GameObject* GameObject::GetGameObject(WorldObject& object, uint64 guid) return object.GetMap()->GetGameObject(guid); } -GameObjectInfo const *GameObject::GetGOInfo() const -{ - return m_goInfo; -} - uint32 GameObject::GetLootId(GameObjectInfo const* ginfo) { if (!ginfo) @@ -710,7 +705,7 @@ Unit* GameObject::GetOwner() const void GameObject::SaveRespawnTime() { - if(!m_isInternallyAdded && m_respawnTime > time(NULL) && m_spawnedByDefault) + if(m_goData && m_goData->dbData && m_respawnTime > time(NULL) && m_spawnedByDefault) objmgr.SaveGORespawnTime(m_DBTableGuid,GetInstanceId(),m_respawnTime); } |