From b7addc0a9a519cf9dcc3e804d9918ce4934a3e83 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 19 Sep 2014 17:33:16 +0300 Subject: Add comments for all output packets header. --- src/net/tmwa/inventoryhandler.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/net/tmwa/inventoryhandler.cpp') diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index 359326e31..f222b3349 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -158,7 +158,7 @@ void InventoryHandler::equipItem(const Item *const item) const if (!item) return; - MessageOut outMsg(CMSG_PLAYER_EQUIP); + createOutPacket(CMSG_PLAYER_EQUIP); outMsg.writeInt16(static_cast( item->getInvIndex() + INVENTORY_OFFSET)); outMsg.writeInt16(0); @@ -169,7 +169,7 @@ void InventoryHandler::unequipItem(const Item *const item) const if (!item) return; - MessageOut outMsg(CMSG_PLAYER_UNEQUIP); + createOutPacket(CMSG_PLAYER_UNEQUIP); outMsg.writeInt16(static_cast( item->getInvIndex() + INVENTORY_OFFSET)); } @@ -179,7 +179,7 @@ void InventoryHandler::useItem(const Item *const item) const if (!item) return; - MessageOut outMsg(CMSG_PLAYER_INVENTORY_USE); + createOutPacket(CMSG_PLAYER_INVENTORY_USE); outMsg.writeInt16(static_cast( item->getInvIndex() + INVENTORY_OFFSET)); outMsg.writeInt32(item->getId()); // unused @@ -190,7 +190,7 @@ void InventoryHandler::dropItem(const Item *const item, const int amount) const if (!item) return; - MessageOut outMsg(CMSG_PLAYER_INVENTORY_DROP); + createOutPacket(CMSG_PLAYER_INVENTORY_DROP); outMsg.writeInt16(static_cast( item->getInvIndex() + INVENTORY_OFFSET)); outMsg.writeInt16(static_cast(amount)); @@ -198,7 +198,7 @@ void InventoryHandler::dropItem(const Item *const item, const int amount) const void InventoryHandler::closeStorage(const int type A_UNUSED) const { - MessageOut outMsg(CMSG_CLOSE_STORAGE); + createOutPacket(CMSG_CLOSE_STORAGE); } void InventoryHandler::moveItem2(const int source, const int slot, @@ -206,14 +206,14 @@ void InventoryHandler::moveItem2(const int source, const int slot, { if (source == Inventory::INVENTORY && destination == Inventory::STORAGE) { - MessageOut outMsg(CMSG_MOVE_TO_STORAGE); + createOutPacket(CMSG_MOVE_TO_STORAGE); outMsg.writeInt16(static_cast(slot + INVENTORY_OFFSET)); outMsg.writeInt32(amount); } else if (source == Inventory::STORAGE && destination == Inventory::INVENTORY) { - MessageOut outMsg(CSMG_MOVE_FROM_STORAGE); + createOutPacket(CSMG_MOVE_FROM_STORAGE); outMsg.writeInt16(static_cast(slot + STORAGE_OFFSET)); outMsg.writeInt32(amount); } -- cgit v1.2.3-70-g09d2