From 7c360d2887216099ca8cc767f15a34fcf302803b Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Mon, 23 Mar 2009 07:02:32 -0600 Subject: Merge eA's command handling into CommandHandler Also drop Aethyra's custom magic code --- src/game.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index ac18b7ce..aefefd29 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -28,9 +28,7 @@ #include "beingmanager.h" #include "channelmanager.h" -#ifdef TMWSERV_SUPPORT #include "commandhandler.h" -#endif #include "configuration.h" #include "effectmanager.h" #include "emoteshortcut.h" @@ -45,6 +43,9 @@ #include "log.h" #include "npc.h" #include "particle.h" +#ifdef EATHENA_SUPPORT +#include "party.h" +#endif #include "player_relations.h" #include "gui/buy.h" @@ -165,12 +166,14 @@ ShortcutWindow *emoteShortcutWindow; BeingManager *beingManager = NULL; FloorItemManager *floorItemManager = NULL; ChannelManager *channelManager = NULL; -#ifdef TMWSERV_SUPPORT CommandHandler *commandHandler = NULL; -#endif Particle* particleEngine = NULL; EffectManager *effectManager = NULL; +#ifdef EATHENA_SUPPORT +Party *playerParty = NULL; +#endif + const int MAX_TIME = 10000; /** @@ -362,18 +365,17 @@ Game::Game(Network *network): engine = new Engine; beingManager = new BeingManager; + commandHandler = new CommandHandler(); #else createGuiWindows(network); engine = new Engine(network); beingManager = new BeingManager(network); + commandHandler = new CommandHandler(network); #endif floorItemManager = new FloorItemManager; channelManager = new ChannelManager(); -#ifdef TMWSERV_SUPPORT - commandHandler = new CommandHandler(); -#endif effectManager = new EffectManager; particleEngine = new Particle(NULL); @@ -392,6 +394,7 @@ Game::Game(Network *network): beingManager->setPlayer(player_node); #ifdef EATHENA_SUPPORT player_node->setNetwork(network); + playerParty = new Party(network); #endif Joystick::init(); @@ -445,6 +448,8 @@ Game::~Game() { #ifdef TMWSERV_SUPPORT Net::clearHandlers(); +#else + delete playerParty; #endif delete player_node; @@ -453,9 +458,7 @@ Game::~Game() delete beingManager; delete floorItemManager; delete channelManager; -#ifdef TMWSERV_SUPPORT delete commandHandler; -#endif delete joystick; delete particleEngine; delete engine; -- cgit v1.2.3-70-g09d2