diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-08-30 03:26:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-08-30 03:26:00 +0300 |
commit | 84941829031cbd707ab28802c7423ce19bfba32e (patch) | |
tree | d1e066e36fa66e9d925cc101acb9fa3e38089113 /src/game.cpp | |
parent | 9f752d5431364c052b364045015d3574da2c320c (diff) | |
download | manaplus-84941829031cbd707ab28802c7423ce19bfba32e.tar.gz manaplus-84941829031cbd707ab28802c7423ce19bfba32e.tar.bz2 manaplus-84941829031cbd707ab28802c7423ce19bfba32e.tar.xz manaplus-84941829031cbd707ab28802c7423ce19bfba32e.zip |
Add auction bot support switch.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp index 303c59edb..5a372a6bd 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -26,6 +26,7 @@ #include "actorspritemanager.h" #include "actorsprite.h" +#include "auctionmanager.h" #include "being.h" #include "channelmanager.h" #include "client.h" @@ -158,6 +159,7 @@ EffectManager *effectManager = NULL; SpellManager *spellManager = NULL; Viewport *viewport = NULL; /**< Viewport on the map. */ GuildManager *guildManager = NULL; +AuctionManager *auctionManager = NULL; ChatTab *localChatTab = NULL; ChatTab *debugChatTab = NULL; @@ -177,6 +179,7 @@ static void initEngines() commandHandler = new CommandHandler; channelManager = new ChannelManager; effectManager = new EffectManager; + AuctionManager::init(); GuildManager::init(); particleEngine = new Particle(NULL); @@ -298,6 +301,9 @@ static void destroyGuiWindows() if (whoIsOnline) whoIsOnline->setAllowUpdate(false); + if (auctionManager) + auctionManager->clear(); + if (guildManager) guildManager->clear(); @@ -334,6 +340,9 @@ static void destroyGuiWindows() Mana::Event::trigger(CHANNEL_GAME, Mana::Event(EVENT_GUIWINDOWSUNLOADED)); + if (auctionManager && AuctionManager::getEnableAuctionBot()) + auctionManager->reload(); + if (guildManager && GuildManager::getEnableGuildBot()) guildManager->reload(); } @@ -423,7 +432,6 @@ Game::~Game() del_0(actorSpriteManager) if (Client::getState() != STATE_CHANGE_MAP) del_0(player_node) - del_0(guildManager) del_0(channelManager) del_0(commandHandler) del_0(effectManager) @@ -433,6 +441,7 @@ Game::~Game() del_0(mCurrentMap) del_0(spellManager) del_0(spellShortcut) + del_0(auctionManager) del_0(guildManager) del_0(mumbleManager) |