summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/inventoryhandler.cpp13
-rw-r--r--src/net/eathena/inventoryhandler.h2
-rw-r--r--src/net/eathena/packetsout.inc2
-rw-r--r--src/net/inventoryhandler.h4
-rw-r--r--src/net/tmwa/inventoryhandler.cpp5
-rw-r--r--src/net/tmwa/inventoryhandler.h2
6 files changed, 28 insertions, 0 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 49a0b39fb..4ad6e409e 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -231,4 +231,17 @@ void InventoryHandler::identifyItem(const Item *const item) const
"item index");
}
+void InventoryHandler::mergeItemsAck(const std::vector<Item*> &items) const
+{
+ createOutPacket(CMSG_MERGE_ITEM_ACK);
+ const size_t sz = items.size();
+ outMsg.writeInt16(CAST_S16(sz * 2 + 4),
+ "len");
+ FOR_EACH (std::vector<Item*>::const_iterator, it, items)
+ {
+ outMsg.writeInt16((*it)->getInvIndex() + 2,
+ "item index");
+ }
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h
index e54704cfb..53e801934 100644
--- a/src/net/eathena/inventoryhandler.h
+++ b/src/net/eathena/inventoryhandler.h
@@ -71,6 +71,8 @@ class InventoryHandler final : public Ea::InventoryHandler
void identifyItem(const Item *const item) const override final;
+ void mergeItemsAck(const std::vector<Item*> &items) const override final;
+
int getProjectileSlot() const override final
{ return 23; }
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc
index 5a9fdd4c6..44ea8785f 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -264,6 +264,8 @@ packet(CMSG_SEARCHSTORE_NEXT_PAGE, 0x0940);
packet(CMSG_SEARCHSTORE_CLOSE, 0x083b);
packet(CMSG_SEARCHSTORE_CLICK, 0x0835);
+packet(CMSG_MERGE_ITEM_ACK, 0x096e);
+
packet(CMSG_SET_STATUS, 0x0b0e);
packet(CMSG_ONLINE_LIST, 0x0b0f);
diff --git a/src/net/inventoryhandler.h b/src/net/inventoryhandler.h
index d47b32097..851f0ba84 100644
--- a/src/net/inventoryhandler.h
+++ b/src/net/inventoryhandler.h
@@ -27,6 +27,8 @@
#include "resources/inventory/inventory.h"
+#include <vector>
+
namespace Net
{
@@ -91,6 +93,8 @@ class InventoryHandler notfinal
const int type) const = 0;
virtual void identifyItem(const Item *const item) const = 0;
+
+ virtual void mergeItemsAck(const std::vector<Item*> &items) const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index fa71484e6..6fa3b9b5c 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -173,4 +173,9 @@ void InventoryHandler::identifyItem(const Item *const item A_UNUSED) const
{
}
+void InventoryHandler::mergeItemsAck(const std::vector<Item*> &items A_UNUSED)
+ const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h
index f818a875b..435e87805 100644
--- a/src/net/tmwa/inventoryhandler.h
+++ b/src/net/tmwa/inventoryhandler.h
@@ -71,6 +71,8 @@ class InventoryHandler final : public Ea::InventoryHandler
void identifyItem(const Item *const item) const override final;
+ void mergeItemsAck(const std::vector<Item*> &items) const override final;
+
int getProjectileSlot() const override final
{ return 10; }