From c2efedab22275302f0a10cc197424d345a021d18 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 17 Jun 2012 20:13:48 +0300 Subject: Replace SDL int types to C++ types. --- src/net/tmwa/inventoryhandler.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/net/tmwa/inventoryhandler.cpp') diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index db670a17b..9977df34d 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -39,7 +39,7 @@ namespace TmwAthena InventoryHandler::InventoryHandler() { - static const Uint16 _messages[] = + static const uint16_t _messages[] = { SMSG_PLAYER_INVENTORY, SMSG_PLAYER_INVENTORY_ADD, @@ -143,7 +143,7 @@ void InventoryHandler::equipItem(const Item *item) return; MessageOut outMsg(CMSG_PLAYER_EQUIP); - outMsg.writeInt16(static_cast( + outMsg.writeInt16(static_cast( item->getInvIndex() + INVENTORY_OFFSET)); outMsg.writeInt16(0); } @@ -154,7 +154,7 @@ void InventoryHandler::unequipItem(const Item *item) return; MessageOut outMsg(CMSG_PLAYER_UNEQUIP); - outMsg.writeInt16(static_cast( + outMsg.writeInt16(static_cast( item->getInvIndex() + INVENTORY_OFFSET)); } @@ -164,7 +164,7 @@ void InventoryHandler::useItem(const Item *item) return; MessageOut outMsg(CMSG_PLAYER_INVENTORY_USE); - outMsg.writeInt16(static_cast( + outMsg.writeInt16(static_cast( item->getInvIndex() + INVENTORY_OFFSET)); outMsg.writeInt32(item->getId()); // unused } @@ -176,9 +176,9 @@ void InventoryHandler::dropItem(const Item *item, int amount) // TODO: Fix wrong coordinates of drops, serverside? (what's wrong here?) MessageOut outMsg(CMSG_PLAYER_INVENTORY_DROP); - outMsg.writeInt16(static_cast( + outMsg.writeInt16(static_cast( item->getInvIndex() + INVENTORY_OFFSET)); - outMsg.writeInt16(static_cast(amount)); + outMsg.writeInt16(static_cast(amount)); } void InventoryHandler::closeStorage(int type A_UNUSED) @@ -192,14 +192,14 @@ void InventoryHandler::moveItem2(int source, int slot, int amount, if (source == Inventory::INVENTORY && destination == Inventory::STORAGE) { MessageOut outMsg(CMSG_MOVE_TO_STORAGE); - outMsg.writeInt16(static_cast(slot + INVENTORY_OFFSET)); + outMsg.writeInt16(static_cast(slot + INVENTORY_OFFSET)); outMsg.writeInt32(amount); } else if (source == Inventory::STORAGE && destination == Inventory::INVENTORY) { MessageOut outMsg(CSMG_MOVE_FROM_STORAGE); - outMsg.writeInt16(static_cast(slot + STORAGE_OFFSET)); + outMsg.writeInt16(static_cast(slot + STORAGE_OFFSET)); outMsg.writeInt32(amount); } } -- cgit v1.2.3-60-g2f50