[10226] Fixed GO_JUST_DEACTIVATED for despawned by default gameobject.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Lutik 2010-07-19 11:41:24 +04:00 committed by VladimirMangos
parent e9e7aff5bb
commit c4c21d3fb6
2 changed files with 2 additions and 8 deletions

View file

@ -417,14 +417,8 @@ void GameObject::Update(uint32 /*p_time*/)
if(!m_respawnDelayTime)
return;
if(!m_spawnedByDefault)
{
m_respawnTime = 0;
return;
}
// since pool system can fail to roll unspawned object, this one can remain spawned, so must set respawn nevertheless
m_respawnTime = time(NULL) + m_respawnDelayTime;
m_respawnTime = m_spawnedByDefault ? time(NULL) + m_respawnDelayTime : 0;
// if option not set then object will be saved at grid unload
if(sWorld.getConfig(CONFIG_BOOL_SAVE_RESPAWN_TIME_IMMEDIATLY))