aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Groups/Group.cpp2
-rw-r--r--src/server/game/Instances/InstanceSaveMgr.cpp6
-rw-r--r--src/server/game/Instances/InstanceSaveMgr.h2
-rw-r--r--src/server/worldserver/Main.cpp4
4 files changed, 9 insertions, 5 deletions
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index 2e7633091f3..8068e82f676 100644
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -80,8 +80,6 @@ Group::~Group()
delete(r);
}
- // it is undefined whether objectmgr (which stores the groups) or instancesavemgr
- // will be unloaded first so we must be prepared for both cases
// this may unload some instance saves
for (uint8 i = 0; i < MAX_DIFFICULTY; ++i)
for (BoundInstancesMap::iterator itr2 = m_boundInstances[i].begin(); itr2 != m_boundInstances[i].end(); ++itr2)
diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp
index c46d9002604..370d02631ba 100644
--- a/src/server/game/Instances/InstanceSaveMgr.cpp
+++ b/src/server/game/Instances/InstanceSaveMgr.cpp
@@ -39,8 +39,10 @@ uint16 InstanceSaveManager::ResetTimeDelay[] = {3600, 900, 300, 60};
InstanceSaveManager::~InstanceSaveManager()
{
- // it is undefined whether this or objectmgr will be unloaded first
- // so we must be prepared for both cases
+}
+
+void InstanceSaveManager::Unload()
+{
lock_instLists = true;
for (InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end(); ++itr)
{
diff --git a/src/server/game/Instances/InstanceSaveMgr.h b/src/server/game/Instances/InstanceSaveMgr.h
index 0a2af4b73ee..1bab66be1b8 100644
--- a/src/server/game/Instances/InstanceSaveMgr.h
+++ b/src/server/game/Instances/InstanceSaveMgr.h
@@ -164,6 +164,8 @@ class InstanceSaveManager
return &instance;
}
+ void Unload();
+
/* resetTime is a global propery of each (raid/heroic) map
all instances of that map reset at the same time */
struct InstResetEvent
diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp
index 206103608a4..02e6268cd26 100644
--- a/src/server/worldserver/Main.cpp
+++ b/src/server/worldserver/Main.cpp
@@ -37,6 +37,7 @@
#include "RealmList.h"
#include "World.h"
#include "MapManager.h"
+#include "InstanceSaveMgr.h"
#include "ObjectAccessor.h"
#include "ScriptMgr.h"
#include "OutdoorPvP/OutdoorPvPMgr.h"
@@ -251,6 +252,7 @@ extern int main(int argc, char** argv)
// unload battleground templates before different singletons destroyed
sBattlegroundMgr->DeleteAllBattlegrounds();
+ sInstanceSaveMgr->Unload();
sMapMgr->UnloadAll(); // unload all grids (including locked in memory)
sObjectAccessor->UnloadAll(); // unload 'i_player2corpse' storage and remove from world
sScriptMgr->Unload();
@@ -537,7 +539,7 @@ variables_map GetConsoleArguments(int argc, char** argv, std::string& configFile
{
// Silences warning about configService not be used if the OS is not Windows
(void)configService;
-
+
options_description all("Allowed options");
all.add_options()
("help,h", "print usage message")