summaryrefslogtreecommitdiff
path: root/src/net/tmwa/partyhandler.cpp
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2010-07-18 23:02:25 -0400
committerChuck Miller <shadowmil@gmail.com>2010-07-18 23:10:02 -0400
commit41a23cb4511e9ba3985990e2703fb3d680a23d14 (patch)
tree2bf03217e3c3b0f28aed5649e2e43cf2b965bd1d /src/net/tmwa/partyhandler.cpp
parent782158dfd719fb6d196f79075f275fb8599d393c (diff)
downloadmana-client-41a23cb4511e9ba3985990e2703fb3d680a23d14.tar.gz
mana-client-41a23cb4511e9ba3985990e2703fb3d680a23d14.tar.bz2
mana-client-41a23cb4511e9ba3985990e2703fb3d680a23d14.tar.xz
mana-client-41a23cb4511e9ba3985990e2703fb3d680a23d14.zip
Move the majority of the netcode's server messages to the event system
There is still a good way to go, but this should get us started Reviewed-by: Jared Adams
Diffstat (limited to 'src/net/tmwa/partyhandler.cpp')
-rw-r--r--src/net/tmwa/partyhandler.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp
index 820331e8..7f8dca0f 100644
--- a/src/net/tmwa/partyhandler.cpp
+++ b/src/net/tmwa/partyhandler.cpp
@@ -21,6 +21,8 @@
#include "net/tmwa/partyhandler.h"
#include "actorspritemanager.h"
+#include "event.h"
+#include "eventmanager.h"
#include "localplayer.h"
#include "log.h"
@@ -78,12 +80,9 @@ void PartyHandler::handleMessage(Net::MessageIn &msg)
{
case SMSG_PARTY_CREATE:
if (msg.readInt8())
- localChatTab->chatLog(_("Could not create party."), BY_SERVER);
+ SERVER_NOTICE(_("Could not create party."))
else
- {
- localChatTab->chatLog(_("Party successfully created."),
- BY_SERVER);
- }
+ SERVER_NOTICE(_("Party successfully created."))
break;
case SMSG_PARTY_INFO:
{
@@ -235,8 +234,7 @@ void PartyHandler::handleMessage(Net::MessageIn &msg)
{
taParty->removeFromMembers();
taParty->clearMembers();
- localChatTab->chatLog(_("You have left the party."),
- BY_SERVER);
+ SERVER_NOTICE(_("You have left the party."))
if (partyTab)
{
delete partyTab;
@@ -330,8 +328,7 @@ void PartyHandler::invite(const std::string &name)
}
else
{
- localChatTab->chatLog(_("You can only inivte when you are in a party!"),
- BY_SERVER);
+ SERVER_NOTICE(_("You can only inivte when you are in a party!"))
}
// TODO?