summaryrefslogtreecommitdiff
path: root/src/net/tmwa/inventoryhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa/inventoryhandler.cpp')
-rw-r--r--src/net/tmwa/inventoryhandler.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index e87b748c7..7afbf746e 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -98,6 +98,18 @@ void InventoryHandler::useItem(const Item *const item) const
outMsg.writeInt32(item->getId(), "item id");
}
+void InventoryHandler::useItem(const Item *const item,
+ const int16_t useType A_UNUSED) const
+{
+ if (item == nullptr)
+ return;
+
+ createOutPacket(CMSG_PLAYER_INVENTORY_USE);
+ outMsg.writeInt16(CAST_S16(
+ item->getInvIndex() + INVENTORY_OFFSET), "index");
+ outMsg.writeInt32(item->getId(), "item id");
+}
+
void InventoryHandler::dropItem(const Item *const item, const int amount) const
{
if (item == nullptr)