summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/eathena/inventoryhandler.cpp14
-rw-r--r--src/net/eathena/inventoryhandler.h2
-rw-r--r--src/net/eathena/packetsout.inc19
-rw-r--r--src/net/inventoryhandler.h2
-rw-r--r--src/net/tmwa/inventoryhandler.cpp4
-rw-r--r--src/net/tmwa/inventoryhandler.h2
6 files changed, 43 insertions, 0 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 0cc248936..b9391bd31 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -38,6 +38,9 @@
#include "debug.h"
extern int packetVersion;
+extern int packetVersionMain;
+extern int packetVersionRe;
+extern int packetVersionZero;
extern int serverVersion;
// this conversion from bit corrupted LOOK_* to EquipSlot
@@ -600,4 +603,15 @@ void InventoryHandler::mergetItemsCancel() const
createOutPacket(CMSG_MERGE_ITEM_CANCEL);
}
+void InventoryHandler::expandInventory() const
+{
+ if (packetVersionMain < 20181031 &&
+ packetVersionRe < 20181031 &&
+ packetVersionZero < 20181114)
+ {
+ return;
+ }
+ createOutPacket(CMSG_INVENTORY_EXPAND);
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h
index 5da0262e0..179402a39 100644
--- a/src/net/eathena/inventoryhandler.h
+++ b/src/net/eathena/inventoryhandler.h
@@ -82,6 +82,8 @@ class InventoryHandler final : public Ea::InventoryHandler
void mergetItemsCancel() const override final;
+ void expandInventory() 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 b1a41e4d2..7ba401f84 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -344,6 +344,7 @@ packet(CMSG_INSTANCE_COMMAND, 0x0000, 0, nullptr);
packet(CMSG_ACHIEVEMENT_GET_REWARD, 0x0000, 0, nullptr);
packet(CMSG_LOGIN_MOBILE_OTP, 0x0000, 0, nullptr);
packet(CMSG_LOGIN_OTP_CODE, 0x0000, 0, nullptr);
+packet(CMSG_INVENTORY_EXPAND, 0x0000, 0, nullptr);
#else
// 20040713
if (packetVersion >= 20040713)
@@ -1464,6 +1465,18 @@ if (packetVersionRe >= 20180718)
packet(CMSG_PLAYER_SELECT_STYLE, 0x0afc, 16, clif->pReqStyleChange);
}
+// 20181031 main
+if (packetVersionMain >= 20181031)
+{
+ packet(CMSG_INVENTORY_EXPAND, 0x0b14, 2, clif->pInventoryExpansion);
+}
+
+// 20181031 re
+if (packetVersionRe >= 20181031)
+{
+ packet(CMSG_INVENTORY_EXPAND, 0x0b14, 2, clif->pInventoryExpansion);
+}
+
// 20181114 main
if (packetVersionMain >= 20181114)
{
@@ -1478,4 +1491,10 @@ if (packetVersionRe >= 20181114)
packet(CMSG_LOGIN_OTP_CODE, 0x0ad0, 11, lclif->p->parse_CA_OTP_CODE);
}
+// 20181114 zero
+if (packetVersionZero >= 20181114)
+{
+ packet(CMSG_INVENTORY_EXPAND, 0x0b14, 2, clif->pInventoryExpansion);
+}
+
#endif
diff --git a/src/net/inventoryhandler.h b/src/net/inventoryhandler.h
index 85e819648..18e4d3eed 100644
--- a/src/net/inventoryhandler.h
+++ b/src/net/inventoryhandler.h
@@ -105,6 +105,8 @@ class InventoryHandler notfinal
virtual void mergeItemsAck(const STD_VECTOR<Item*> &items) const = 0;
virtual void mergetItemsCancel() const = 0;
+
+ virtual void expandInventory() const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index 0c2b56e9e..ee60e399c 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -193,4 +193,8 @@ void InventoryHandler::mergetItemsCancel() const
{
}
+void InventoryHandler::expandInventory() const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h
index 5d1a54d7f..a7e5a4b30 100644
--- a/src/net/tmwa/inventoryhandler.h
+++ b/src/net/tmwa/inventoryhandler.h
@@ -79,6 +79,8 @@ class InventoryHandler final : public Ea::InventoryHandler
void mergetItemsCancel() const override final;
+ void expandInventory() const override final;
+
int getProjectileSlot() const override final
{ return 10; }