summaryrefslogtreecommitdiff
path: root/src/localplayer.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/localplayer.cpp
parent3dd1baab3fb00a3aa99447430f16a431a205c614 (diff)
downloadmana-5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e.tar.gz
mana-5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e.tar.bz2
mana-5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e.tar.xz
mana-5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e.zip
Have the event system channels use enums instead of strings
Reviewed-by: Freeyorp
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index b60ee6f7..a0e7184d 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -87,14 +87,14 @@ LocalPlayer::LocalPlayer(int id, int subtype):
mMessageTime(0),
mShowIp(false)
{
- listen("Attributes");
+ listen(CHANNEL_ATTRIBUTES);
mUpdateName = true;
config.addListener("showownname", this);
setShowName(config.getValue("showownname", 1));
- listen("ActorSprite");
+ listen(CHANNEL_ACTORSPRITE);
}
LocalPlayer::~LocalPlayer()
@@ -1084,9 +1084,9 @@ void LocalPlayer::optionChanged(const std::string &value)
}
}
-void LocalPlayer::event(const std::string &channel, const Mana::Event &event)
+void LocalPlayer::event(Channels channel, const Mana::Event &event)
{
- if (channel == "ActorSprite")
+ if (channel == CHANNEL_ACTORSPRITE)
{
if (event.getName() == "Destroyed")
{
@@ -1099,7 +1099,7 @@ void LocalPlayer::event(const std::string &channel, const Mana::Event &event)
mTarget = 0;
}
}
- else if (channel == "Attributes")
+ else if (channel == CHANNEL_ATTRIBUTES)
{
if (event.getName() == "UpdateAttribute")
{