From f08d73feaf8ff09b9a7eb3caceeea8e8b1f93ee6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 24 Jan 2019 03:27:03 +0300 Subject: Add packet SMSG_INVENTORY_EXPANSION_INFO 0x0b18 --- src/net/eathena/inventoryrecv.cpp | 12 ++++++++++++ src/net/eathena/inventoryrecv.h | 1 + src/net/eathena/packetsin.inc | 18 ++++++++++++++++++ 3 files changed, 31 insertions(+) (limited to 'src/net') diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp index ddf4a5925..388a8fe10 100644 --- a/src/net/eathena/inventoryrecv.cpp +++ b/src/net/eathena/inventoryrecv.cpp @@ -1672,4 +1672,16 @@ void InventoryRecv::processShowItemPreview2(Net::MessageIn &msg) } } +void InventoryRecv::processInventoryExpansionInfo(Net::MessageIn &msg) +{ + UNIMPLEMENTEDPACKET; + const int newSize = msg.readInt16("expansion size") + + settings.fixedInventorySize; + Inventory *const inv = PlayerInfo::getInventory(); + if (inv != nullptr) + { + inv->resize(newSize); + } +} + } // namespace EAthena diff --git a/src/net/eathena/inventoryrecv.h b/src/net/eathena/inventoryrecv.h index 0c2cc98fe..72f6ffbe2 100644 --- a/src/net/eathena/inventoryrecv.h +++ b/src/net/eathena/inventoryrecv.h @@ -98,6 +98,7 @@ namespace EAthena A_UNUSED); void processShowItemPreview1(Net::MessageIn &msg); void processShowItemPreview2(Net::MessageIn &msg); + void processInventoryExpansionInfo(Net::MessageIn &msg); } // namespace InventoryRecv } // namespace EAthena diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index b85d5a901..b9dc5c645 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -1495,6 +1495,24 @@ if (packetVersionMain >= 20181128) packet(SMSG_PLAYER_SKILL_AUTO_SPELLS, 0x0afb, -1, &SkillRecv::processSkillAutoSpells2, 20181128); } +// 20181212 zero +if (packetVersionZero >= 20181212) +{ + packet(SMSG_INVENTORY_EXPANSION_INFO, 0x0b18, 4, &InventoryRecv::processInventoryExpansionInfo, 20181212); +} + +// 20181219 main +if (packetVersionMain >= 20181219) +{ + packet(SMSG_INVENTORY_EXPANSION_INFO, 0x0b18, 4, &InventoryRecv::processInventoryExpansionInfo, 20181219); +} + +// 20181219 re +if (packetVersionRe >= 20181219) +{ + packet(SMSG_INVENTORY_EXPANSION_INFO, 0x0b18, 4, &InventoryRecv::processInventoryExpansionInfo, 20181219); +} + // 0 // evol always packets packet(SMSG_SERVER_VERSION_RESPONSE, 0x7531, -1, &LoginRecv::processServerVersion, 0); -- cgit v1.2.3-60-g2f50