From 1bfa2fef834bf52155b25e79bc4742363ae1ceac Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 23 Oct 2014 12:43:12 +0300 Subject: Add packet fields comments in inventoryhandler. --- src/net/eathena/inventoryhandler.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/net/eathena/inventoryhandler.cpp') diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 74b8072c8..a7315c506 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -197,7 +197,7 @@ void InventoryHandler::unequipItem(const Item *const item) const createOutPacket(CMSG_PLAYER_UNEQUIP); outMsg.writeInt16(static_cast( - item->getInvIndex() + INVENTORY_OFFSET)); + item->getInvIndex() + INVENTORY_OFFSET), "index"); } void InventoryHandler::useItem(const Item *const item) const @@ -207,8 +207,8 @@ void InventoryHandler::useItem(const Item *const item) const createOutPacket(CMSG_PLAYER_INVENTORY_USE); outMsg.writeInt16(static_cast( - item->getInvIndex() + INVENTORY_OFFSET)); - outMsg.writeInt32(item->getId()); // unused + item->getInvIndex() + INVENTORY_OFFSET), "index"); + outMsg.writeInt32(item->getId(), "unused"); } void InventoryHandler::dropItem(const Item *const item, const int amount) const @@ -218,8 +218,8 @@ void InventoryHandler::dropItem(const Item *const item, const int amount) const createOutPacket(CMSG_PLAYER_INVENTORY_DROP); outMsg.writeInt16(static_cast( - item->getInvIndex() + INVENTORY_OFFSET)); - outMsg.writeInt16(static_cast(amount)); + item->getInvIndex() + INVENTORY_OFFSET), "index"); + outMsg.writeInt16(static_cast(amount), "amount"); } void InventoryHandler::closeStorage(const int type A_UNUSED) const @@ -260,8 +260,8 @@ void InventoryHandler::moveItem2(const int source, if (packet) { createOutPacket(packet); - outMsg.writeInt16(static_cast(slot + offset)); - outMsg.writeInt32(amount); + outMsg.writeInt16(static_cast(slot + offset), "index"); + outMsg.writeInt32(amount, "amount"); } } -- cgit v1.2.3-70-g09d2