summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-30 01:57:05 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-30 02:32:13 +0300
commit9f752d5431364c052b364045015d3574da2c320c (patch)
tree9278797f892129e42fde74656db032dc480c4490 /src/game.cpp
parent8158669fde4f4a32191d6b052586e7cf0889ab7e (diff)
downloadplus-9f752d5431364c052b364045015d3574da2c320c.tar.gz
plus-9f752d5431364c052b364045015d3574da2c320c.tar.bz2
plus-9f752d5431364c052b364045015d3574da2c320c.tar.xz
plus-9f752d5431364c052b364045015d3574da2c320c.zip
Dont create guild manager instance if guild bot support not enabled.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 8df48b775..303c59edb 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -177,11 +177,7 @@ static void initEngines()
commandHandler = new CommandHandler;
channelManager = new ChannelManager;
effectManager = new EffectManager;
- if (!guildManager)
- {
- guildManager = new GuildManager;
- guildManager->init();
- }
+ GuildManager::init();
particleEngine = new Particle(NULL);
particleEngine->setupEngine();
@@ -338,7 +334,7 @@ static void destroyGuiWindows()
Mana::Event::trigger(CHANNEL_GAME, Mana::Event(EVENT_GUIWINDOWSUNLOADED));
- if (guildManager && guildManager->getEnableGuildBot())
+ if (guildManager && GuildManager::getEnableGuildBot())
guildManager->reload();
}
@@ -406,7 +402,7 @@ Game::Game():
setupWindow->setInGame(true);
clearKeysArray();
- if (guildManager && guildManager->getEnableGuildBot())
+ if (guildManager && GuildManager::getEnableGuildBot())
guildManager->requestGuildInfo();
Mana::Event::trigger(CHANNEL_GAME, Mana::Event(EVENT_CONSTRUCTED));
@@ -437,6 +433,7 @@ Game::~Game()
del_0(mCurrentMap)
del_0(spellManager)
del_0(spellShortcut)
+ del_0(guildManager)
del_0(mumbleManager)
Being::clearCache();