diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-07-26 03:02:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-07-26 22:01:35 +0300 |
commit | de90520de303659fe639794544c2e19d462b3907 (patch) | |
tree | 36b306a26e2c9dd422aede36f2f9ca3158ffbae2 /src/net/eathena/traderecv.cpp | |
parent | 45527f8597dfac68e914a798184282faeb1493f2 (diff) | |
download | manaverse-de90520de303659fe639794544c2e19d462b3907.tar.gz manaverse-de90520de303659fe639794544c2e19d462b3907.tar.bz2 manaverse-de90520de303659fe639794544c2e19d462b3907.tar.xz manaverse-de90520de303659fe639794544c2e19d462b3907.zip |
Add support for changed item id size in packets.
From some packet version hercules support item id fields as int32.
Diffstat (limited to 'src/net/eathena/traderecv.cpp')
-rw-r--r-- | src/net/eathena/traderecv.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/eathena/traderecv.cpp b/src/net/eathena/traderecv.cpp index 69b215620..72f6dc583 100644 --- a/src/net/eathena/traderecv.cpp +++ b/src/net/eathena/traderecv.cpp @@ -74,7 +74,7 @@ void TradeRecv::processTradeResponse(Net::MessageIn &msg) void TradeRecv::processTradeItemAdd(Net::MessageIn &msg) { - const int type = msg.readInt16("type"); + const int type = msg.readItemId("item id"); ItemTypeT itemType = ItemType::Unknown; if (msg.getVersion() >= 20100223) { @@ -87,7 +87,7 @@ void TradeRecv::processTradeItemAdd(Net::MessageIn &msg) const uint8_t refine = msg.readUInt8("refine"); int cards[maxCards]; for (int f = 0; f < maxCards; f++) - cards[f] = msg.readUInt16("card"); + cards[f] = msg.readItemId("card"); ItemOptionsList *options = nullptr; if (msg.getVersion() >= 20150226) { |