diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-04 19:45:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 01:18:57 +0300 |
commit | 69a7f70797b3433bfdaf510fb997469b8bf7ba4d (patch) | |
tree | d1a3c84bd486a59ae411c267085d02b5619c547b | |
parent | 549d21c0c9995c2120ea539cfb3551817df214a2 (diff) | |
download | mv-69a7f70797b3433bfdaf510fb997469b8bf7ba4d.tar.gz mv-69a7f70797b3433bfdaf510fb997469b8bf7ba4d.tar.bz2 mv-69a7f70797b3433bfdaf510fb997469b8bf7ba4d.tar.xz mv-69a7f70797b3433bfdaf510fb997469b8bf7ba4d.zip |
eathena; fix packet SMSG_TRADE_ITEM_ADD 0x080f.
-rw-r--r-- | src/net/eathena/packets.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 2 | ||||
-rw-r--r-- | src/net/eathena/tradehandler.cpp | 16 |
3 files changed, 12 insertions, 8 deletions
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 7609bb265..16f507403 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -215,7 +215,7 @@ int16_t packet_lengths[] = //0 1 2 3 4 5 6 7 8 9 a b c d e f //0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // #0x0800 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 12381a15e..527d8b99e 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -129,7 +129,7 @@ #define SMSG_TRADE_REQUEST 0x01f4 #define SMSG_TRADE_RESPONSE 0x00e7 #define SMSG_TRADE_RESPONSE2 0x01f5 -#define SMSG_TRADE_ITEM_ADD 0x00e9 +#define SMSG_TRADE_ITEM_ADD 0x080f #define SMSG_TRADE_ITEM_ADD_RESPONSE 0x01b1 /**< Not standard eAthena! */ #define SMSG_TRADE_OK 0x00ec #define SMSG_TRADE_CANCEL 0x00ee diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp index 4de0ee779..f81d80e24 100644 --- a/src/net/eathena/tradehandler.cpp +++ b/src/net/eathena/tradehandler.cpp @@ -170,12 +170,16 @@ void TradeHandler::processTradeResponse2(Net::MessageIn &msg) const void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) { - const int amount = msg.readInt32(); - const int type = msg.readInt16(); - const uint8_t identify = msg.readUInt8(); // identified flag - msg.readUInt8(); // attribute - const uint8_t refine = msg.readUInt8(); // refine - msg.skip(8); // card (4 shorts) + const int type = msg.readInt16("type"); + msg.readUInt8("item type"); + const int amount = msg.readInt32("amount"); + const uint8_t identify = msg.readUInt8("identify"); + msg.readUInt8("attribute"); + const uint8_t refine = msg.readUInt8("refine"); + msg.readInt16("card 0"); + msg.readInt16("card 1"); + msg.readInt16("card 2"); + msg.readInt16("card 3"); if (tradeWindow) { |