summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-28 00:24:44 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-28 01:59:05 +0300
commite1be87443d6d7c463f1751678fe1c556d1ba9092 (patch)
tree83c893ecccfe5410bb9d563e901d179d6108e92e
parentc1f88822164bd9f19af7ea6b344a18cb1da8a493 (diff)
downloadplus-e1be87443d6d7c463f1751678fe1c556d1ba9092.tar.gz
plus-e1be87443d6d7c463f1751678fe1c556d1ba9092.tar.bz2
plus-e1be87443d6d7c463f1751678fe1c556d1ba9092.tar.xz
plus-e1be87443d6d7c463f1751678fe1c556d1ba9092.zip
Fix packet SMSG_VENDING_ITEMS_LIST for version 20160921.
-rw-r--r--src/net/eathena/packetsin.inc1
-rw-r--r--src/net/eathena/vendingrecv.cpp11
2 files changed, 10 insertions, 2 deletions
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index c49b1a23c..11276f899 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -891,6 +891,7 @@ if (packetVersion >= 20160330)
if (packetVersion >= 20160921)
{
packet(SMSG_PLAYER_INVENTORY_ADD, 0x0a37, 59, &InventoryRecv::processPlayerInventoryAdd, 20160921);
+ packet(SMSG_VENDING_ITEMS_LIST, 0x0800, -1, &VendingRecv::processItemsList, 20160921);
}
// 20170315
diff --git a/src/net/eathena/vendingrecv.cpp b/src/net/eathena/vendingrecv.cpp
index 23d4843f1..33494fd33 100644
--- a/src/net/eathena/vendingrecv.cpp
+++ b/src/net/eathena/vendingrecv.cpp
@@ -97,8 +97,10 @@ void VendingRecv::processHideBoard(Net::MessageIn &msg)
void VendingRecv::processItemsList(Net::MessageIn &msg)
{
int packetLen = 22;
- if (msg.getVersion() >= 20150226)
- packetLen += 25;
+ if (msg.getVersion() >= 20160921)
+ packetLen = 53;
+ else if (msg.getVersion() >= 20150226)
+ packetLen = 47;
int offset = 8;
if (msg.getVersion() >= 20100105)
offset += 4;
@@ -138,6 +140,11 @@ void VendingRecv::processItemsList(Net::MessageIn &msg)
options->add(idx, val);
}
}
+ if (msg.getVersion() >= 20160921)
+ {
+ msg.readInt32("equip type?");
+ msg.readInt16("look");
+ }
const ItemColor color = ItemColorManager::getColorFromCards(&cards[0]);
ShopItem *const item = mBuyDialog->addItem(itemId, type,