summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-09 18:30:32 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-09 18:30:32 +0300
commit659ceeecb82c3c8cc617be93d0d45e15965435ae (patch)
tree4253b96f87aac328a73634daedbc37329996bc0e /src
parent841273fbd5361765b39c7fe8309aa7447b8e79de (diff)
downloadmv-659ceeecb82c3c8cc617be93d0d45e15965435ae.tar.gz
mv-659ceeecb82c3c8cc617be93d0d45e15965435ae.tar.bz2
mv-659ceeecb82c3c8cc617be93d0d45e15965435ae.tar.xz
mv-659ceeecb82c3c8cc617be93d0d45e15965435ae.zip
eathena: add partial support for packet SMSG_TRADE_UNDO 0x00f1.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/eathena/tradehandler.cpp10
-rw-r--r--src/net/eathena/tradehandler.h2
3 files changed, 13 insertions, 0 deletions
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);