diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-08-26 16:57:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-08-27 05:37:27 +0300 |
commit | 12bf548533867a2eb3a1c354b778ef7f9157322a (patch) | |
tree | 3cb6f61396f00a5d3fa280ecd9d99f309f06f4ca /src/game.cpp | |
parent | 2e7bfc350d38e16b3d340f8e4ea69e6ff6748f5c (diff) | |
download | manaplus-12bf548533867a2eb3a1c354b778ef7f9157322a.tar.gz manaplus-12bf548533867a2eb3a1c354b778ef7f9157322a.tar.bz2 manaplus-12bf548533867a2eb3a1c354b778ef7f9157322a.tar.xz manaplus-12bf548533867a2eb3a1c354b778ef7f9157322a.zip |
Basic support for guild bot integration.
Not working context menu actions, chat commands, auto complete.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/game.cpp b/src/game.cpp index 82f919976..c933378e6 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -31,14 +31,13 @@ #include "client.h" #include "commandhandler.h" #include "configuration.h" +#include "dropshortcut.h" #include "effectmanager.h" -#include "event.h" -#include "spellmanager.h" #include "emoteshortcut.h" +#include "event.h" +#include "guildmanager.h" #include "graphics.h" #include "itemshortcut.h" -#include "dropshortcut.h" -#include "spellshortcut.h" #include "joystick.h" #include "keyboardconfig.h" #include "localplayer.h" @@ -47,6 +46,8 @@ #include "particle.h" #include "playerrelations.h" #include "sound.h" +#include "spellmanager.h" +#include "spellshortcut.h" #include "gui/botcheckerwindow.h" #include "gui/buyselldialog.h" @@ -156,6 +157,7 @@ Particle *particleEngine = NULL; EffectManager *effectManager = NULL; SpellManager *spellManager = NULL; Viewport *viewport = NULL; /**< Viewport on the map. */ +GuildManager *guildManager = NULL; ChatTab *localChatTab = NULL; ChatTab *debugChatTab = NULL; @@ -175,6 +177,8 @@ static void initEngines() commandHandler = new CommandHandler; channelManager = new ChannelManager; effectManager = new EffectManager; + if (!guildManager) + guildManager = new GuildManager; particleEngine = new Particle(NULL); particleEngine->setupEngine(); @@ -393,6 +397,9 @@ Game::Game(): setupWindow->setInGame(true); clearKeysArray(); + if (guildManager && guildManager->getEnableGuildBot()) + guildManager->requestGuildInfo(); + Mana::Event::trigger(CHANNEL_GAME, Mana::Event(EVENT_CONSTRUCTED)); } @@ -411,16 +418,17 @@ 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); + del_0(effectManager) del_0(joystick) del_0(particleEngine) del_0(viewport) del_0(mCurrentMap) - del_0(spellManager); - del_0(spellShortcut); - del_0(mumbleManager); + del_0(spellManager) + del_0(spellShortcut) + del_0(mumbleManager) Being::clearCache(); |