*Move addcre/go functions from opvp to objmgr.

*Do not save respawn time for internally added cre/go.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-31 14:26:57 -05:00
parent 8d1f4f9ea0
commit da871e2fc0
10 changed files with 130 additions and 120 deletions

View File

@@ -628,6 +628,9 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)
}
}
if(!data->dbData)
SetInternallyAdded();
return true;
}
@@ -707,7 +710,7 @@ Unit* GameObject::GetOwner() const
void GameObject::SaveRespawnTime()
{
if(m_respawnTime > time(NULL) && m_spawnedByDefault)
if(!m_isInternallyAdded && m_respawnTime > time(NULL) && m_spawnedByDefault)
objmgr.SaveGORespawnTime(m_DBTableGuid,GetInstanceId(),m_respawnTime);
}