summaryrefslogtreecommitdiff
path: root/src/net/tmwa/buysellhandler.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/buysellhandler.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/buysellhandler.cpp')
-rw-r--r--src/net/tmwa/buysellhandler.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp
index d0c8fd40..03480e45 100644
--- a/src/net/tmwa/buysellhandler.cpp
+++ b/src/net/tmwa/buysellhandler.cpp
@@ -22,6 +22,8 @@
#include "net/tmwa/buysellhandler.h"
#include "actorspritemanager.h"
+#include "event.h"
+#include "eventmanager.h"
#include "inventory.h"
#include "item.h"
#include "localplayer.h"
@@ -31,8 +33,6 @@
#include "gui/buysell.h"
#include "gui/sell.h"
-#include "gui/widgets/chattab.h"
-
#include "net/messagein.h"
#include "net/tmwa/protocol.h"
@@ -107,29 +107,29 @@ void BuySellHandler::handleMessage(Net::MessageIn &msg)
}
else
{
- localChatTab->chatLog(_("Nothing to sell."), BY_SERVER);
+ SERVER_NOTICE(_("Nothing to sell."))
}
break;
case SMSG_NPC_BUY_RESPONSE:
if (msg.readInt8() == 0)
{
- localChatTab->chatLog(_("Thanks for buying."), BY_SERVER);
+ SERVER_NOTICE(_("Thanks for buying."))
}
else
{
// Reset player money since buy dialog already assumed purchase
// would go fine
mBuyDialog->setMoney(PlayerInfo::getAttribute(MONEY));
- localChatTab->chatLog(_("Unable to buy."), BY_SERVER);
+ SERVER_NOTICE(_("Unable to buy."))
}
break;
case SMSG_NPC_SELL_RESPONSE:
if (msg.readInt8() == 0)
- localChatTab->chatLog(_("Thanks for selling."), BY_SERVER);
+ SERVER_NOTICE(_("Thanks for selling."))
else
- localChatTab->chatLog(_("Unable to sell."), BY_SERVER);
+ SERVER_NOTICE(_("Unable to sell."))
break;
}