summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-01-24 03:27:03 +0300
committerAndrei Karas <akaras@inbox.ru>2019-01-25 02:39:13 +0300
commitf08d73feaf8ff09b9a7eb3caceeea8e8b1f93ee6 (patch)
tree871afc399c9ee41bee3a4f989f038b132865a96b /src/net/eathena
parentb8d7c1f17c3c4f2ce951652c0763fccf44b2f1c4 (diff)
downloadmanaplus-f08d73feaf8ff09b9a7eb3caceeea8e8b1f93ee6.tar.gz
manaplus-f08d73feaf8ff09b9a7eb3caceeea8e8b1f93ee6.tar.bz2
manaplus-f08d73feaf8ff09b9a7eb3caceeea8e8b1f93ee6.tar.xz
manaplus-f08d73feaf8ff09b9a7eb3caceeea8e8b1f93ee6.zip
Add packet SMSG_INVENTORY_EXPANSION_INFO 0x0b18
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/inventoryrecv.cpp12
-rw-r--r--src/net/eathena/inventoryrecv.h1
-rw-r--r--src/net/eathena/packetsin.inc18
3 files changed, 31 insertions, 0 deletions
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);