mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[11126] Rewrite InstanceSaveMgr related code.
* For better fit name to related map type class InstanceMap renamed -> DungeonMap. This clarify usage Instanceable()/IsDungeon() because BG/Arenas maps also instanceable maps. * InstanceSave have many code related to only DungeonMap case, so it replaced by 3 new classes: - MapPersistentState as base class, used for non-instanceable maps (continents and some other) (!Instenceable()) - DungeonPersistentState subclass of MapPersistentState, used for DungeonMap states (IsDungoen()) - BattlegroundPersistentState subclass of MapPersistentState, used for BattlegroundMap states (IsBattleGroundOrArena()) Now all dungeon resets code moved to subclass and all player/gpoup bound functions/structures also use it. * Map::GetInstanceSave renamed to Map::GetPersistentState and DungeonMap have specialized version return DungeonPersistentState (same pointer in fact with proper subcalss type) * InstanceResetScheduler renamed to DungeonResetScheduler
This commit is contained in:
parent
0d16b0bdc7
commit
dde16bc48c
22 changed files with 683 additions and 550 deletions
|
|
@ -942,10 +942,10 @@ void World::SetInitialWorldSettings()
|
|||
|
||||
///- Clean up and pack instances
|
||||
sLog.outString( "Cleaning up instances..." );
|
||||
sInstanceSaveMgr.CleanupInstances(); // must be called before `creature_respawn`/`gameobject_respawn` tables
|
||||
sMapPersistentStateMgr.CleanupInstances(); // must be called before `creature_respawn`/`gameobject_respawn` tables
|
||||
|
||||
sLog.outString( "Packing instances..." );
|
||||
sInstanceSaveMgr.PackInstances();
|
||||
sMapPersistentStateMgr.PackInstances();
|
||||
|
||||
sLog.outString( "Packing groups..." );
|
||||
sObjectMgr.PackGroupIds(); // must be after CleanupInstances
|
||||
|
|
@ -1042,13 +1042,13 @@ void World::SetInitialWorldSettings()
|
|||
sLog.outString();
|
||||
|
||||
sLog.outString( "Loading Creature Respawn Data..." ); // must be after PackInstances()
|
||||
sInstanceSaveMgr.LoadCreatureRespawnTimes();
|
||||
sMapPersistentStateMgr.LoadCreatureRespawnTimes();
|
||||
|
||||
sLog.outString( "Loading Gameobject Data..." );
|
||||
sObjectMgr.LoadGameobjects();
|
||||
|
||||
sLog.outString( "Loading Gameobject Respawn Data..." ); // must be after PackInstances()
|
||||
sInstanceSaveMgr.LoadGameobjectRespawnTimes();
|
||||
sMapPersistentStateMgr.LoadGameobjectRespawnTimes();
|
||||
|
||||
sLog.outString( "Loading Objects Pooling Data...");
|
||||
sPoolMgr.LoadFromDB();
|
||||
|
|
@ -1524,7 +1524,7 @@ void World::Update(uint32 diff)
|
|||
sMapMgr.RemoveAllObjectsInRemoveList();
|
||||
|
||||
// update the instance reset times
|
||||
sInstanceSaveMgr.Update();
|
||||
sMapPersistentStateMgr.Update();
|
||||
|
||||
// And last, but not least handle the issued cli commands
|
||||
ProcessCliCommands();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue