summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp11
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)