summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/manaserv/chathandler.cpp8
-rw-r--r--src/net/manaserv/guildhandler.cpp2
-rw-r--r--src/net/manaserv/npchandler.cpp20
-rw-r--r--src/net/manaserv/partyhandler.cpp2
-rw-r--r--src/net/manaserv/playerhandler.cpp4
-rw-r--r--src/net/manaserv/tradehandler.cpp2
-rw-r--r--src/net/tmwa/adminhandler.cpp2
-rw-r--r--src/net/tmwa/buysellhandler.cpp2
-rw-r--r--src/net/tmwa/chathandler.cpp14
-rw-r--r--src/net/tmwa/gamehandler.cpp2
-rw-r--r--src/net/tmwa/guildhandler.cpp2
-rw-r--r--src/net/tmwa/inventoryhandler.cpp2
-rw-r--r--src/net/tmwa/npchandler.cpp16
-rw-r--r--src/net/tmwa/partyhandler.cpp2
-rw-r--r--src/net/tmwa/playerhandler.cpp4
-rw-r--r--src/net/tmwa/specialhandler.cpp2
-rw-r--r--src/net/tmwa/tradehandler.cpp2
17 files changed, 44 insertions, 44 deletions
diff --git a/src/net/manaserv/chathandler.cpp b/src/net/manaserv/chathandler.cpp
index 71e4efde..147bab0a 100644
--- a/src/net/manaserv/chathandler.cpp
+++ b/src/net/manaserv/chathandler.cpp
@@ -26,7 +26,7 @@
#include "client.h"
#include "channel.h"
#include "channelmanager.h"
-#include "eventmanager.h"
+#include "event.h"
#include "playerrelations.h"
#include "gui/widgets/channeltab.h"
@@ -171,7 +171,7 @@ void ChatHandler::handleGameChatMessage(Net::MessageIn &msg)
event.setInt("permissions", player_relations
.checkPermissionSilently(being->getName(),
PlayerRelation::SPEECH_LOG | PlayerRelation::SPEECH_FLOAT));
- Mana::EventManager::trigger("Chat", event);
+ event.trigger("Chat");
}
void ChatHandler::handleEnterChannelResponse(Net::MessageIn &msg)
@@ -234,7 +234,7 @@ void ChatHandler::handlePrivateMessage(Net::MessageIn &msg)
Mana::Event event("Whisper");
event.setString("nick", userNick);
event.setString("message", chatMsg);
- Mana::EventManager::trigger("Chat", event);
+ event.trigger("Chat");
}
void ChatHandler::handleAnnouncement(Net::MessageIn &msg)
@@ -242,7 +242,7 @@ void ChatHandler::handleAnnouncement(Net::MessageIn &msg)
std::string chatMsg = msg.readString();
Mana::Event event("Announcement");
event.setString("message", chatMsg);
- Mana::EventManager::trigger("Chat", event);
+ event.trigger("Chat");
}
void ChatHandler::handleChatMessage(Net::MessageIn &msg)
diff --git a/src/net/manaserv/guildhandler.cpp b/src/net/manaserv/guildhandler.cpp
index 750fadda..821d70bd 100644
--- a/src/net/manaserv/guildhandler.cpp
+++ b/src/net/manaserv/guildhandler.cpp
@@ -21,7 +21,7 @@
#include "net/manaserv/guildhandler.h"
-#include "eventmanager.h"
+#include "event.h"
#include "guild.h"
#include "log.h"
#include "localplayer.h"
diff --git a/src/net/manaserv/npchandler.cpp b/src/net/manaserv/npchandler.cpp
index 9f63c837..f7e04c1b 100644
--- a/src/net/manaserv/npchandler.cpp
+++ b/src/net/manaserv/npchandler.cpp
@@ -22,7 +22,7 @@
#include "net/manaserv/npchandler.h"
#include "actorspritemanager.h"
-#include "eventmanager.h"
+#include "event.h"
#include "net/manaserv/connection.h"
#include "net/manaserv/messagein.h"
@@ -52,7 +52,7 @@ NpcHandler::NpcHandler()
handledMessages = _messages;
npcHandler = this;
- Mana::EventManager::bind(this, "NPC");
+ listen("NPC");
}
void NpcHandler::handleMessage(Net::MessageIn &msg)
@@ -77,7 +77,7 @@ void NpcHandler::handleMessage(Net::MessageIn &msg)
event->setString("choice" + toString(count), msg.readString());
}
event->setInt("choiceCount", count);
- Mana::EventManager::trigger("NPC", *event);
+ event->trigger("NPC");
break;
case GPMSG_NPC_NUMBER:
@@ -86,43 +86,43 @@ void NpcHandler::handleMessage(Net::MessageIn &msg)
event->setInt("min", msg.readInt32());
event->setInt("max", msg.readInt32());
event->setInt("default", msg.readInt32());
- Mana::EventManager::trigger("NPC", *event);
+ event->trigger("NPC");
break;
case GPMSG_NPC_STRING:
event = new Mana::Event("StringInput");
event->setInt("id", npcId);
- Mana::EventManager::trigger("NPC", *event);
+ event->trigger("NPC");
break;
case GPMSG_NPC_POST:
event = new Mana::Event("Post");
event->setInt("id", npcId);
- Mana::EventManager::trigger("NPC", *event);
+ event->trigger("NPC");
break;
case GPMSG_NPC_ERROR:
event = new Mana::Event("End");
event->setInt("id", npcId);
- Mana::EventManager::trigger("NPC", *event);
+ event->trigger("NPC");
break;
case GPMSG_NPC_MESSAGE:
event = new Mana::Event("Message");
event->setInt("id", npcId);
event->setString("text", msg.readString(msg.getUnreadLength()));
- Mana::EventManager::trigger("NPC", *event);
+ event->trigger("NPC");
delete event;
event = new Mana::Event("Next");
event->setInt("id", npcId);
- Mana::EventManager::trigger("NPC", *event);
+ event->trigger("NPC");
break;
case GPMSG_NPC_CLOSE:
event = new Mana::Event("Close");
event->setInt("id", npcId);
- Mana::EventManager::trigger("NPC", *event);
+ event->trigger("NPC");
break;
}
diff --git a/src/net/manaserv/partyhandler.cpp b/src/net/manaserv/partyhandler.cpp
index 00bb0fae..370d6496 100644
--- a/src/net/manaserv/partyhandler.cpp
+++ b/src/net/manaserv/partyhandler.cpp
@@ -21,7 +21,7 @@
#include "net/manaserv/partyhandler.h"
-#include "eventmanager.h"
+#include "event.h"
#include "log.h"
#include "localplayer.h"
diff --git a/src/net/manaserv/playerhandler.cpp b/src/net/manaserv/playerhandler.cpp
index 2028afd9..4957bbbc 100644
--- a/src/net/manaserv/playerhandler.cpp
+++ b/src/net/manaserv/playerhandler.cpp
@@ -24,7 +24,7 @@
#include "client.h"
#include "effectmanager.h"
-#include "eventmanager.h"
+#include "event.h"
#include "game.h"
#include "localplayer.h"
#include "log.h"
@@ -60,7 +60,7 @@ void RespawnRequestListener::action(const gcn::ActionEvent &event)
{
Net::getPlayerHandler()->respawn();
- Mana::EventManager::trigger("NPC", Mana::Event("CloseAll"));
+ Mana::Event::trigger("NPC", "CloseAll");
}
extern Connection *gameServerConnection;
diff --git a/src/net/manaserv/tradehandler.cpp b/src/net/manaserv/tradehandler.cpp
index a80fc6e6..30ff6890 100644
--- a/src/net/manaserv/tradehandler.cpp
+++ b/src/net/manaserv/tradehandler.cpp
@@ -22,7 +22,7 @@
#include "net/manaserv/tradehandler.h"
#include "actorspritemanager.h"
-#include "eventmanager.h"
+#include "event.h"
#include "item.h"
#include "localplayer.h"
#include "playerinfo.h"
diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp
index feaf7efd..b72c2a13 100644
--- a/src/net/tmwa/adminhandler.cpp
+++ b/src/net/tmwa/adminhandler.cpp
@@ -23,7 +23,7 @@
#include "actorspritemanager.h"
#include "being.h"
-#include "eventmanager.h"
+#include "event.h"
#include "game.h"
#include "playerrelations.h"
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp
index 3e9156a1..5368ba9d 100644
--- a/src/net/tmwa/buysellhandler.cpp
+++ b/src/net/tmwa/buysellhandler.cpp
@@ -22,7 +22,7 @@
#include "net/tmwa/buysellhandler.h"
#include "actorspritemanager.h"
-#include "eventmanager.h"
+#include "event.h"
#include "inventory.h"
#include "item.h"
#include "localplayer.h"
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;
}
diff --git a/src/net/tmwa/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp
index 03d27b47..2a9508d3 100644
--- a/src/net/tmwa/gamehandler.cpp
+++ b/src/net/tmwa/gamehandler.cpp
@@ -22,7 +22,7 @@
#include "net/tmwa/gamehandler.h"
#include "client.h"
-#include "eventmanager.h"
+#include "event.h"
#include "game.h"
#include "localplayer.h"
#include "log.h"
diff --git a/src/net/tmwa/guildhandler.cpp b/src/net/tmwa/guildhandler.cpp
index a09f2dfe..67fe5d98 100644
--- a/src/net/tmwa/guildhandler.cpp
+++ b/src/net/tmwa/guildhandler.cpp
@@ -21,7 +21,7 @@
#include "net/tmwa/guildhandler.h"
#include "guild.h"
-#include "eventmanager.h"
+#include "event.h"
#include "localplayer.h"
#include "log.h"
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index ae9731ba..c1a96788 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -23,7 +23,7 @@
#include "configuration.h"
#include "equipment.h"
-#include "eventmanager.h"
+#include "event.h"
#include "inventory.h"
#include "item.h"
#include "itemshortcut.h"
diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp
index b61dc520..e1615fec 100644
--- a/src/net/tmwa/npchandler.cpp
+++ b/src/net/tmwa/npchandler.cpp
@@ -22,7 +22,7 @@
#include "net/tmwa/npchandler.h"
#include "actorspritemanager.h"
-#include "eventmanager.h"
+#include "event.h"
#include "localplayer.h"
#include "net/messagein.h"
@@ -69,7 +69,7 @@ NpcHandler::NpcHandler()
handledMessages = _messages;
npcHandler = this;
- Mana::EventManager::bind(this, "NPC");
+ listen("NPC");
}
void NpcHandler::handleMessage(Net::MessageIn &msg)
@@ -88,42 +88,42 @@ void NpcHandler::handleMessage(Net::MessageIn &msg)
event = new Mana::Event("Menu");
event->setInt("id", npcId);
parseMenu(event, msg.readString(msg.getLength() - 8));
- Mana::EventManager::trigger("NPC", *event);
+ event->trigger("NPC");
break;
case SMSG_NPC_MESSAGE:
event = new Mana::Event("Message");
event->setInt("id", npcId);
event->setString("text", msg.readString(msg.getLength() - 8));
- Mana::EventManager::trigger("NPC", *event);
+ event->trigger("NPC");
break;
case SMSG_NPC_CLOSE:
// Show the close button
event = new Mana::Event("Close");
event->setInt("id", npcId);
- Mana::EventManager::trigger("NPC", *event);
+ event->trigger("NPC");
break;
case SMSG_NPC_NEXT:
// Show the next button
event = new Mana::Event("Next");
event->setInt("id", npcId);
- Mana::EventManager::trigger("NPC", *event);
+ event->trigger("NPC");
break;
case SMSG_NPC_INT_INPUT:
// Request for an integer
event = new Mana::Event("IntegerInput");
event->setInt("id", npcId);
- Mana::EventManager::trigger("NPC", *event);
+ event->trigger("NPC");
break;
case SMSG_NPC_STR_INPUT:
// Request for a string
event = new Mana::Event("StringInput");
event->setInt("id", npcId);
- Mana::EventManager::trigger("NPC", *event);
+ event->trigger("NPC");
break;
}
diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp
index fa3d63f1..3d7aa263 100644
--- a/src/net/tmwa/partyhandler.cpp
+++ b/src/net/tmwa/partyhandler.cpp
@@ -21,7 +21,7 @@
#include "net/tmwa/partyhandler.h"
#include "actorspritemanager.h"
-#include "eventmanager.h"
+#include "event.h"
#include "localplayer.h"
#include "log.h"
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 98cbc8fb..0079aedc 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -21,7 +21,7 @@
#include "net/tmwa/playerhandler.h"
-#include "eventmanager.h"
+#include "event.h"
#include "game.h"
#include "localplayer.h"
#include "log.h"
@@ -81,7 +81,7 @@ namespace {
viewport->closePopupMenu();
- Mana::EventManager::trigger("NPC", Mana::Event("CloseAll"));
+ Mana::Event::trigger("NPC", "CloseAll");
}
} deathListener;
diff --git a/src/net/tmwa/specialhandler.cpp b/src/net/tmwa/specialhandler.cpp
index 09d83cbe..577bda7e 100644
--- a/src/net/tmwa/specialhandler.cpp
+++ b/src/net/tmwa/specialhandler.cpp
@@ -21,7 +21,7 @@
#include "net/tmwa/specialhandler.h"
-#include "eventmanager.h"
+#include "event.h"
#include "log.h"
#include "playerinfo.h"
diff --git a/src/net/tmwa/tradehandler.cpp b/src/net/tmwa/tradehandler.cpp
index e9712d5e..ee7931bd 100644
--- a/src/net/tmwa/tradehandler.cpp
+++ b/src/net/tmwa/tradehandler.cpp
@@ -21,7 +21,7 @@
#include "net/tmwa/tradehandler.h"
-#include "eventmanager.h"
+#include "event.h"
#include "inventory.h"
#include "item.h"
#include "localplayer.h"