From e1be87443d6d7c463f1751678fe1c556d1ba9092 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 28 Jun 2017 00:24:44 +0300 Subject: Fix packet SMSG_VENDING_ITEMS_LIST for version 20160921. --- src/net/eathena/packetsin.inc | 1 + src/net/eathena/vendingrecv.cpp | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src/net') 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, -- cgit v1.2.3-70-g09d2