summaryrefslogtreecommitdiff
path: root/src/net/manaserv
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-09 19:49:14 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-09 19:49:14 +0300
commit7e3bd20e9675202e30fac741f3d3acb4f19b109d (patch)
tree9e12ab198b68e8f6ed0dd2121a72066c7b7053ba /src/net/manaserv
parentb9d66c41246fef56e41f600b5523a5ff1a29a1c8 (diff)
downloadplus-7e3bd20e9675202e30fac741f3d3acb4f19b109d.tar.gz
plus-7e3bd20e9675202e30fac741f3d3acb4f19b109d.tar.bz2
plus-7e3bd20e9675202e30fac741f3d3acb4f19b109d.tar.xz
plus-7e3bd20e9675202e30fac741f3d3acb4f19b109d.zip
Small refactoring based on idea from mana commit 30d4b0adf4f17f05d1d62fc3428c896ef1079b6b
Diffstat (limited to 'src/net/manaserv')
-rw-r--r--src/net/manaserv/generalhandler.cpp12
-rw-r--r--src/net/manaserv/generalhandler.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/net/manaserv/generalhandler.cpp b/src/net/manaserv/generalhandler.cpp
index 3683187fe..8b38deb21 100644
--- a/src/net/manaserv/generalhandler.cpp
+++ b/src/net/manaserv/generalhandler.cpp
@@ -176,28 +176,28 @@ void GeneralHandler::clearHandlers()
clearNetworkHandlers();
}
-void GeneralHandler::event(Channels channel,
+void GeneralHandler::event(Mana::Channels channel,
const Mana::Event &event)
{
- if (channel == CHANNEL_CLIENT)
+ if (channel == Mana::CHANNEL_CLIENT)
{
int newState = event.getInt("newState");
- if (newState == STATE_GAME)
+ if (newState == Mana::STATE_GAME)
{
GameHandler *game = static_cast<GameHandler*>(
Net::getGameHandler());
game->gameLoading();
}
- else if (newState == STATE_LOAD_DATA)
+ else if (newState == Mana::STATE_LOAD_DATA)
{
Attributes::load();
Attributes::informItemDB();
}
}
- else if (channel == CHANNEL_GAME)
+ else if (channel == Mana::CHANNEL_GAME)
{
- if (event.getName() == EVENT_GUIWINDOWSLOADED)
+ if (event.getName() == Mana::EVENT_GUIWINDOWSLOADED)
{
inventoryWindow->setSplitAllowed(true);
skillDialog->loadSkills("mana-skills.xml");
diff --git a/src/net/manaserv/generalhandler.h b/src/net/manaserv/generalhandler.h
index d5636127f..946f7d631 100644
--- a/src/net/manaserv/generalhandler.h
+++ b/src/net/manaserv/generalhandler.h
@@ -54,7 +54,7 @@ class GeneralHandler : public Net::GeneralHandler, public Mana::Listener
void clearHandlers();
- void event(Channels channel, const Mana::Event &event);
+ void event(Mana::Channels channel, const Mana::Event &event);
protected:
MessageHandlerPtr mBeingHandler;