From 6b59adabfcf909cb02075e2fab2d715b4e34af95 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Wed, 15 Apr 2009 20:49:17 -0600 Subject: Merge the trade dialog --- src/net/tmwserv/tradehandler.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/net/tmwserv') diff --git a/src/net/tmwserv/tradehandler.cpp b/src/net/tmwserv/tradehandler.cpp index 4528988b..2b10bac1 100644 --- a/src/net/tmwserv/tradehandler.cpp +++ b/src/net/tmwserv/tradehandler.cpp @@ -128,7 +128,7 @@ void TradeHandler::handleMessage(MessageIn &msg) break; case GPMSG_TRADE_ACCEPT: - tradeWindow->receivedOk(); + tradeWindow->receivedOk(false); break; case GPMSG_TRADE_CANCEL: @@ -180,7 +180,9 @@ void TradeHandler::removeItem(int slotNum, int amount) void TradeHandler::setMoney(int amount) { - // TODO + MessageOut msg(PGMSG_TRADE_SET_MONEY); + msg.writeInt32(amount); + Net::GameServer::connection->send(msg); } void TradeHandler::confirm() @@ -190,7 +192,8 @@ void TradeHandler::confirm() void TradeHandler::finish() { - // TODO + MessageOut msg(PGMSG_TRADE_ACCEPT); + Net::GameServer::connection->send(msg); } void TradeHandler::cancel() -- cgit v1.2.3-70-g09d2