summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-10 01:34:40 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-10 01:34:40 +0300
commitb89bb9d7233acad1cefda6c393a930456a1f74da (patch)
treeeb98bf2d7f7589158083b41cc1e3f0754a3b77b4
parentcbefa4969b51ec75c0ca6efd89e86ef71496f75f (diff)
downloadplus-b89bb9d7233acad1cefda6c393a930456a1f74da.tar.gz
plus-b89bb9d7233acad1cefda6c393a930456a1f74da.tar.bz2
plus-b89bb9d7233acad1cefda6c393a930456a1f74da.tar.xz
plus-b89bb9d7233acad1cefda6c393a930456a1f74da.zip
eathena: add packet CMSG_PLAYER_INSERT_CARD 0x017c.
-rw-r--r--src/net/eathena/inventoryhandler.cpp8
-rw-r--r--src/net/eathena/inventoryhandler.h3
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/inventoryhandler.h3
-rw-r--r--src/net/tmwa/inventoryhandler.cpp5
-rw-r--r--src/net/tmwa/inventoryhandler.h3
6 files changed, 23 insertions, 0 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 86dd7ac02..9dc644fd5 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -237,6 +237,14 @@ void InventoryHandler::useCard(const int index) const
outMsg.writeInt16(index + INVENTORY_OFFSET, "index");
}
+void InventoryHandler::insertCard(const int cardIndex,
+ const int itemIndex) const
+{
+ MessageOut outMsg(CMSG_PLAYER_INSERT_CARD);
+ outMsg.writeInt16(cardIndex + INVENTORY_OFFSET, "card index");
+ outMsg.writeInt16(itemIndex + INVENTORY_OFFSET, "item index");
+}
+
void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg)
{
BLOCK_START("InventoryHandler::processPlayerEquipment")
diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h
index 11227cff0..a35293aa4 100644
--- a/src/net/eathena/inventoryhandler.h
+++ b/src/net/eathena/inventoryhandler.h
@@ -60,6 +60,9 @@ class InventoryHandler final : public MessageHandler,
void useCard(const int index) const override final;
+ void insertCard(const int cardIndex,
+ const int itemIndex) const override final;
+
protected:
void processPlayerEquipment(Net::MessageIn &msg);
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 82a2486a8..bb50a69cd 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -241,6 +241,7 @@
#define CMSG_PLAYER_EQUIP 0x0998
#define CMSG_PLAYER_UNEQUIP 0x00ab
#define CMSG_PLAYER_USE_CARD 0x017a
+#define CMSG_PLAYER_INSERT_CARD 0x017c
#define CMSG_ITEM_PICKUP 0x07e4
#define CMSG_PLAYER_CHANGE_DIR 0x0202
diff --git a/src/net/inventoryhandler.h b/src/net/inventoryhandler.h
index f615e0886..4eab4d24b 100644
--- a/src/net/inventoryhandler.h
+++ b/src/net/inventoryhandler.h
@@ -76,6 +76,9 @@ class InventoryHandler notfinal
virtual int convertFromServerSlot(const int eAthenaSlot) const = 0;
virtual void useCard(const int index) const = 0;
+
+ virtual void insertCard(const int cardIndex,
+ const int itemIndex) const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index c7f76b6b0..7e5bf3946 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -218,6 +218,11 @@ void InventoryHandler::useCard(const int index A_UNUSED) const
{
}
+void InventoryHandler::insertCard(const int cardIndex A_UNUSED,
+ const int itemIndex A_UNUSED) const
+{
+}
+
void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg)
{
BLOCK_START("InventoryHandler::processPlayerEquipment")
diff --git a/src/net/tmwa/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h
index 09e6f1027..f6ca9aa00 100644
--- a/src/net/tmwa/inventoryhandler.h
+++ b/src/net/tmwa/inventoryhandler.h
@@ -60,6 +60,9 @@ class InventoryHandler final : public MessageHandler,
void useCard(const int index) const override final;
+ void insertCard(const int cardIndex,
+ const int itemIndex) const override final;
+
protected:
void processPlayerEquipment(Net::MessageIn &msg);