summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-16 13:13:48 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-16 13:13:48 +0300
commit5b8f189276b3883253de31d5e7bbbf897d34c85b (patch)
treec3e6028d800e4caf4acb7ca3f45ba2e63e8df26b /src/game.cpp
parent47d811c90a4655b69f1846c16150efebbfa4ccfa (diff)
downloadmanaverse-5b8f189276b3883253de31d5e7bbbf897d34c85b.tar.gz
manaverse-5b8f189276b3883253de31d5e7bbbf897d34c85b.tar.bz2
manaverse-5b8f189276b3883253de31d5e7bbbf897d34c85b.tar.xz
manaverse-5b8f189276b3883253de31d5e7bbbf897d34c85b.zip
Use guildmanager only if build with tmwa support.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp
index df582af9f..1b67f6d90 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -141,7 +141,9 @@ static void initEngines()
{
actorManager = new ActorManager;
effectManager = new EffectManager;
+#ifdef TMWA_SUPPORT
GuildManager::init();
+#endif
particleEngine = new Particle();
particleEngine->setMap(nullptr);
@@ -305,9 +307,10 @@ static void destroyGuiWindows()
if (whoIsOnline)
whoIsOnline->setAllowUpdate(false);
+#ifdef TMWA_SUPPORT
if (guildManager)
guildManager->clear();
-
+#endif
delete2(windowMenu);
delete2(localChatTab) // Need to do this first, so it can remove itself
delete2(debugChatTab)
@@ -344,8 +347,10 @@ static void destroyGuiWindows()
delete2(whoIsOnline);
delete2(killStats);
+#ifdef TMWA_SUPPORT
if (guildManager && GuildManager::getEnableGuildBot())
guildManager->reload();
+#endif
}
Game *Game::mInstance = nullptr;
@@ -409,8 +414,10 @@ Game::Game() :
setupWindow->setInGame(true);
clearKeysArray();
+#ifdef TMWA_SUPPORT
if (guildManager && GuildManager::getEnableGuildBot())
guildManager->requestGuildInfo();
+#endif
if (localPlayer)
localPlayer->updatePets();
@@ -437,7 +444,9 @@ Game::~Game()
delete2(particleEngine)
delete2(viewport)
delete2(mCurrentMap)
+#ifdef TMWA_SUPPORT
delete2(guildManager)
+#endif
#ifdef USE_MUMBLE
delete2(mumbleManager)
#endif
@@ -616,8 +625,10 @@ void Game::slowLogic()
shopWindow->updateTimes();
if (mainGraphics->getOpenGL())
DelayedManager::delayedLoad();
+#ifdef TMWA_SUPPORT
if (guildManager)
guildManager->slowLogic();
+#endif
if (skillDialog)
skillDialog->slowLogic();