diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-04-09 19:49:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-04-09 19:49:14 +0300 |
commit | 7e3bd20e9675202e30fac741f3d3acb4f19b109d (patch) | |
tree | 9e12ab198b68e8f6ed0dd2121a72066c7b7053ba /src/event.h | |
parent | b9d66c41246fef56e41f600b5523a5ff1a29a1c8 (diff) | |
download | plus-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/event.h')
-rw-r--r-- | src/event.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/event.h b/src/event.h index 7c5863ec8..8634a654c 100644 --- a/src/event.h +++ b/src/event.h @@ -26,6 +26,10 @@ #include <set> #include <string> + +namespace Mana +{ + enum Channels { CHANNEL_ACTORSPRITE = 0, @@ -95,9 +99,6 @@ enum Events EVENT_WHISPERERROR }; -namespace Mana -{ - // Possible exception that can be thrown enum BadEvent { @@ -114,9 +115,9 @@ typedef std::set<Listener *> ListenerSet; typedef std::map<Channels, ListenerSet > ListenMap; #define SERVER_NOTICE(message) { \ -Mana::Event event(EVENT_SERVERNOTICE); \ +Mana::Event event(Mana::EVENT_SERVERNOTICE); \ event.setString("message", message); \ -Mana::Event::trigger(CHANNEL_NOTICES, event); } +Mana::Event::trigger(Mana::CHANNEL_NOTICES, event); } class Event { |