mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
*Store creatureData and goData for creatures and gos.
--HG-- branch : trunk
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user