summaryrefslogtreecommitdiff
path: root/src/net/tmwa/chathandler.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-08-12 21:47:59 -0600
committerJared Adams <jaxad0127@gmail.com>2010-08-12 22:01:57 -0600
commiteb2c0cae1cb7a02b72c15de0f4e8f4a68a9fa53a (patch)
tree8b1fab9acbd0eb568d7f7e0b31f8fd4ac02b18a4 /src/net/tmwa/chathandler.cpp
parent2293b1c5ef0bb7378140bf73f1fef03a4504bdd2 (diff)
downloadmana-eb2c0cae1cb7a02b72c15de0f4e8f4a68a9fa53a.tar.gz
mana-eb2c0cae1cb7a02b72c15de0f4e8f4a68a9fa53a.tar.bz2
mana-eb2c0cae1cb7a02b72c15de0f4e8f4a68a9fa53a.tar.xz
mana-eb2c0cae1cb7a02b72c15de0f4e8f4a68a9fa53a.zip
Simplify working with the event system
EventManager has been merged into Event, with some new convinience methods added. Reviewed-by: Chuck Miller
Diffstat (limited to 'src/net/tmwa/chathandler.cpp')
-rw-r--r--src/net/tmwa/chathandler.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp
index a5d7f337..2b647f68 100644
--- a/src/net/tmwa/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -23,7 +23,7 @@
#include "actorspritemanager.h"
#include "being.h"
-#include "eventmanager.h"
+#include "event.h"
#include "game.h"
#include "localplayer.h"
#include "playerrelations.h"
@@ -86,7 +86,7 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
event.setString("nick", nick);
event.setString("error", strprintf(_("Whisper could "
"not be sent, %s is offline."), nick.c_str()));
- Mana::EventManager::trigger("Chat", event);
+ event.trigger("Chat");
}
break;
case 0x02:
@@ -95,7 +95,7 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
event.setString("nick", nick);
event.setString("error", strprintf(_("Whisper could "
"not be sent, ignored by %s."), nick.c_str()));
- Mana::EventManager::trigger("Chat", event);
+ event.Event::trigger("Chat");
}
break;
}
@@ -118,7 +118,7 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
Mana::Event event("Whisper");
event.setString("nick", nick);
event.setString("message", chatMsg);
- Mana::EventManager::trigger("Chat", event);
+ event.trigger("Chat");
}
}
else
@@ -180,7 +180,7 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
event.setString("nick", sender_name);
event.setInt("beingId", beingId);
event.setInt("permissions", perms);
- Mana::EventManager::trigger("Chat", event);
+ event.trigger("Chat");
break;
}
@@ -213,13 +213,13 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
event.setInt("permissions", player_relations.getDefault()
& (PlayerRelation::SPEECH_LOG
| PlayerRelation::SPEECH_FLOAT));
- Mana::EventManager::trigger("Chat", event);
+ event.trigger("Chat");
}
else
{
Mana::Event event("Announcement");
event.setString("message", chatMsg);
- Mana::EventManager::trigger("Chat", event);
+ event.trigger("Chat");
}
break;
}