mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 07:37:02 +00:00
[11123] Move respawn data to InstanceSave.
This make prev commit more useful. In future InstanceSave also planned store local pools state.
This commit is contained in:
parent
852c4ddf32
commit
6cfa64db97
13 changed files with 258 additions and 191 deletions
|
|
@ -21,6 +21,7 @@
|
|||
#include "ObjectGuid.h"
|
||||
#include "ProgressBar.h"
|
||||
#include "Log.h"
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "MapManager.h"
|
||||
#include "World.h"
|
||||
#include "Policies/SingletonImp.h"
|
||||
|
|
@ -400,7 +401,7 @@ void PoolGroup<Creature>::Spawn1Object(PoolObject* obj, bool instantly)
|
|||
// for not loaded grid just update respawn time (avoid work for instances until implemented support)
|
||||
else if(!instantly)
|
||||
{
|
||||
sObjectMgr.SaveCreatureRespawnTime(obj->guid, 0 /*map->GetInstanceId()*/, time(NULL) + data->spawntimesecs);
|
||||
map->GetInstanceSave()->SaveCreatureRespawnTime(obj->guid, time(NULL) + data->spawntimesecs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -452,7 +453,7 @@ void PoolGroup<GameObject>::Spawn1Object(PoolObject* obj, bool instantly)
|
|||
{
|
||||
// for spawned by default object only
|
||||
if (data->spawntimesecs >= 0)
|
||||
sObjectMgr.SaveGORespawnTime(obj->guid, 0 /*map->GetInstanceId()*/, time(NULL) + data->spawntimesecs);
|
||||
map->GetInstanceSave()->SaveGORespawnTime(obj->guid, time(NULL) + data->spawntimesecs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue