From ca2c1a3e20d9cf16fd77649bfd48a26b2f7d9390 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 25 Jan 2019 03:29:47 +0300 Subject: Add packet CMSG_INVENTORY_EXPAND_REJECT 0x0b19 --- src/net/eathena/inventoryhandler.cpp | 11 +++++++++++ src/net/eathena/inventoryhandler.h | 2 ++ src/net/eathena/packetsout.inc | 4 ++++ src/net/inventoryhandler.h | 2 ++ src/net/tmwa/inventoryhandler.cpp | 4 ++++ src/net/tmwa/inventoryhandler.h | 2 ++ 6 files changed, 25 insertions(+) diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index f484afac9..67a91edfb 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -625,4 +625,15 @@ void InventoryHandler::expandInventoryConfirm() const createOutPacket(CMSG_INVENTORY_EXPAND_CONFIRM); } +void InventoryHandler::expandInventoryReject() const +{ + if (packetVersionMain < 20181031 && + packetVersionRe < 20181031 && + packetVersionZero < 20181114) + { + return; + } + createOutPacket(CMSG_INVENTORY_EXPAND_REJECT); +} + } // namespace EAthena diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h index 3494cd6c1..ce230e67d 100644 --- a/src/net/eathena/inventoryhandler.h +++ b/src/net/eathena/inventoryhandler.h @@ -86,6 +86,8 @@ class InventoryHandler final : public Ea::InventoryHandler void expandInventoryConfirm() const override final; + void expandInventoryReject() const override final; + int getProjectileSlot() const override final { return 10; } diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc index ef2358500..8811c8a4a 100644 --- a/src/net/eathena/packetsout.inc +++ b/src/net/eathena/packetsout.inc @@ -346,6 +346,7 @@ packet(CMSG_LOGIN_MOBILE_OTP, 0x0000, 0, nullptr); packet(CMSG_LOGIN_OTP_CODE, 0x0000, 0, nullptr); packet(CMSG_INVENTORY_EXPAND, 0x0000, 0, nullptr); packet(CMSG_INVENTORY_EXPAND_CONFIRM, 0x0000, 0, nullptr); +packet(CMSG_INVENTORY_EXPAND_REJECT, 0x0000, 0, nullptr); #else // 20040713 if (packetVersion >= 20040713) @@ -1471,6 +1472,7 @@ if (packetVersionMain >= 20181031) { packet(CMSG_INVENTORY_EXPAND, 0x0b14, 2, clif->pInventoryExpansion); packet(CMSG_INVENTORY_EXPAND_CONFIRM, 0x0b16, 2, clif->pInventoryExpansionConfirm); + packet(CMSG_INVENTORY_EXPAND_REJECT, 0x0b19, 2, clif->pInventoryExpansionReject); } // 20181031 re @@ -1478,6 +1480,7 @@ if (packetVersionRe >= 20181031) { packet(CMSG_INVENTORY_EXPAND, 0x0b14, 2, clif->pInventoryExpansion); packet(CMSG_INVENTORY_EXPAND_CONFIRM, 0x0b16, 2, clif->pInventoryExpansionConfirm); + packet(CMSG_INVENTORY_EXPAND_REJECT, 0x0b19, 2, clif->pInventoryExpansionReject); } // 20181114 main @@ -1499,6 +1502,7 @@ if (packetVersionZero >= 20181114) { packet(CMSG_INVENTORY_EXPAND, 0x0b14, 2, clif->pInventoryExpansion); packet(CMSG_INVENTORY_EXPAND_CONFIRM, 0x0b16, 2, clif->pInventoryExpansionConfirm); + packet(CMSG_INVENTORY_EXPAND_REJECT, 0x0b19, 2, clif->pInventoryExpansionReject); } #endif diff --git a/src/net/inventoryhandler.h b/src/net/inventoryhandler.h index 3fa58f93f..b7bd313a9 100644 --- a/src/net/inventoryhandler.h +++ b/src/net/inventoryhandler.h @@ -109,6 +109,8 @@ class InventoryHandler notfinal virtual void expandInventory() const = 0; virtual void expandInventoryConfirm() const = 0; + + virtual void expandInventoryReject() const = 0; }; } // namespace Net diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index 3f5e93d75..ab8f45ecf 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -201,4 +201,8 @@ void InventoryHandler::expandInventoryConfirm() const { } +void InventoryHandler::expandInventoryReject() const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h index 5dfa2d230..be0427462 100644 --- a/src/net/tmwa/inventoryhandler.h +++ b/src/net/tmwa/inventoryhandler.h @@ -83,6 +83,8 @@ class InventoryHandler final : public Ea::InventoryHandler void expandInventoryConfirm() const override final; + void expandInventoryReject() const override final; + int getProjectileSlot() const override final { return 10; } -- cgit v1.2.3-70-g09d2