summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/eathena/inventoryhandler.cpp6
-rw-r--r--src/net/eathena/inventoryhandler.h2
-rw-r--r--src/net/eathena/protocol.h1
-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, 17 insertions, 0 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 74fcb920b..86dd7ac02 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -231,6 +231,12 @@ void InventoryHandler::moveItem2(const int source, const int slot,
}
}
+void InventoryHandler::useCard(const int index) const
+{
+ MessageOut outMsg(CMSG_PLAYER_USE_CARD);
+ outMsg.writeInt16(index + INVENTORY_OFFSET, "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 15aaa85f3..11227cff0 100644
--- a/src/net/eathena/inventoryhandler.h
+++ b/src/net/eathena/inventoryhandler.h
@@ -58,6 +58,8 @@ class InventoryHandler final : public MessageHandler,
const int amount,
const int destination) const override final;
+ void useCard(const int index) const override final;
+
protected:
void processPlayerEquipment(Net::MessageIn &msg);
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index cbcf45488..82a2486a8 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -240,6 +240,7 @@
#define CMSG_PLAYER_INVENTORY_DROP 0x0362
#define CMSG_PLAYER_EQUIP 0x0998
#define CMSG_PLAYER_UNEQUIP 0x00ab
+#define CMSG_PLAYER_USE_CARD 0x017a
#define CMSG_ITEM_PICKUP 0x07e4
#define CMSG_PLAYER_CHANGE_DIR 0x0202
diff --git a/src/net/inventoryhandler.h b/src/net/inventoryhandler.h
index c40cb5b54..f615e0886 100644
--- a/src/net/inventoryhandler.h
+++ b/src/net/inventoryhandler.h
@@ -74,6 +74,8 @@ class InventoryHandler notfinal
virtual void forgotStorage() = 0;
virtual int convertFromServerSlot(const int eAthenaSlot) const = 0;
+
+ virtual void useCard(const int index) const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index ccf4e6074..c7f76b6b0 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -214,6 +214,10 @@ void InventoryHandler::moveItem2(const int source, const int slot,
}
}
+void InventoryHandler::useCard(const int index 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 b19e388ac..09e6f1027 100644
--- a/src/net/tmwa/inventoryhandler.h
+++ b/src/net/tmwa/inventoryhandler.h
@@ -58,6 +58,8 @@ class InventoryHandler final : public MessageHandler,
const int amount,
const int destination) const override final;
+ void useCard(const int index) const override final;
+
protected:
void processPlayerEquipment(Net::MessageIn &msg);