summaryrefslogtreecommitdiff
path: root/src/net/manaserv/generalhandler.cpp
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2010-11-11 21:55:25 -0500
committerChuck Miller <shadowmil@gmail.com>2010-11-11 22:45:58 -0500
commit5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e (patch)
tree994cdeb1187a94996ca38c5e274aabaa5f1fec76 /src/net/manaserv/generalhandler.cpp
parent3dd1baab3fb00a3aa99447430f16a431a205c614 (diff)
downloadmana-client-5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e.tar.gz
mana-client-5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e.tar.bz2
mana-client-5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e.tar.xz
mana-client-5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e.zip
Have the event system channels use enums instead of strings
Reviewed-by: Freeyorp
Diffstat (limited to 'src/net/manaserv/generalhandler.cpp')
-rw-r--r--src/net/manaserv/generalhandler.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/manaserv/generalhandler.cpp b/src/net/manaserv/generalhandler.cpp
index 7bff8a30..178e0c48 100644
--- a/src/net/manaserv/generalhandler.cpp
+++ b/src/net/manaserv/generalhandler.cpp
@@ -91,8 +91,8 @@ GeneralHandler::GeneralHandler():
generalHandler = this;
- listen("Client");
- listen("Game");
+ listen(CHANNEL_CLIENT);
+ listen(CHANNEL_GAME);
}
void GeneralHandler::load()
@@ -171,10 +171,10 @@ void GeneralHandler::clearHandlers()
clearNetworkHandlers();
}
-void GeneralHandler::event(const std::string &channel,
+void GeneralHandler::event(Channels channel,
const Mana::Event &event)
{
- if (channel == "Client")
+ if (channel == CHANNEL_CLIENT)
{
if (event.getName() == "StateChange")
{
@@ -192,7 +192,7 @@ void GeneralHandler::event(const std::string &channel,
Attributes::informItemDB();
}
}
- else if (channel == "Game")
+ else if (channel == CHANNEL_GAME)
{
if (event.getName() == "GuiWindowsLoaded")
{