From 659ceeecb82c3c8cc617be93d0d45e15965435ae Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 9 Oct 2014 18:30:32 +0300 Subject: eathena: add partial support for packet SMSG_TRADE_UNDO 0x00f1. --- src/net/eathena/protocol.h | 1 + src/net/eathena/tradehandler.cpp | 10 ++++++++++ src/net/eathena/tradehandler.h | 2 ++ 3 files changed, 13 insertions(+) (limited to 'src') diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index aaf75daf6..d94c8c036 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -164,6 +164,7 @@ #define SMSG_TRADE_OK 0x00ec #define SMSG_TRADE_CANCEL 0x00ee #define SMSG_TRADE_COMPLETE 0x00f0 +#define SMSG_TRADE_UNDO 0x00f1 #define SMSG_PARTY_CREATE 0x00fa #define SMSG_PARTY_INFO 0x00fb diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp index da97b7a0a..7a4cb4e9f 100644 --- a/src/net/eathena/tradehandler.cpp +++ b/src/net/eathena/tradehandler.cpp @@ -60,6 +60,7 @@ TradeHandler::TradeHandler() : SMSG_TRADE_OK, SMSG_TRADE_CANCEL, SMSG_TRADE_COMPLETE, + SMSG_TRADE_UNDO, 0 }; handledMessages = _messages; @@ -103,6 +104,10 @@ void TradeHandler::handleMessage(Net::MessageIn &msg) processTradeComplete(msg); break; + case SMSG_TRADE_UNDO: + processTradeUndo(msg); + break; + default: break; } @@ -235,4 +240,9 @@ void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg) } } +void TradeHandler::processTradeUndo(Net::MessageIn &msg A_UNUSED) const +{ + // +++ here need clear trade window from partner side? +} + } // namespace EAthena diff --git a/src/net/eathena/tradehandler.h b/src/net/eathena/tradehandler.h index 334366f7f..bdeebc91e 100644 --- a/src/net/eathena/tradehandler.h +++ b/src/net/eathena/tradehandler.h @@ -59,6 +59,8 @@ class TradeHandler final : public MessageHandler, public Ea::TradeHandler void processTradeResponse2(Net::MessageIn &msg) const; + void processTradeUndo(Net::MessageIn &msg) const; + static void processTradeItemAdd(Net::MessageIn &msg); static void processTradeItemAddResponse(Net::MessageIn &msg); -- cgit v1.2.3-70-g09d2