summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-06 00:04:10 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-06 00:04:10 +0300
commit8d19c3ed8e0c03f162e022dd0f09fff53f2bc055 (patch)
tree94af8b27eb20355e0714f4789359fb75fcc4380f /src/net/eathena
parent4598f298e22f5e7bd0da0f59743ec32ab6dd8add (diff)
downloadplus-8d19c3ed8e0c03f162e022dd0f09fff53f2bc055.tar.gz
plus-8d19c3ed8e0c03f162e022dd0f09fff53f2bc055.tar.bz2
plus-8d19c3ed8e0c03f162e022dd0f09fff53f2bc055.tar.xz
plus-8d19c3ed8e0c03f162e022dd0f09fff53f2bc055.zip
Impliment packet CMSG_MERGE_ITEM_ACK 0x096e.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/inventoryhandler.cpp13
-rw-r--r--src/net/eathena/inventoryhandler.h2
-rw-r--r--src/net/eathena/packetsout.inc2
3 files changed, 17 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);