diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-04-03 00:01:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-04-03 00:01:34 +0300 |
commit | 1eea3f1102b7d8f87b076a5a8380fd71fc00d773 (patch) | |
tree | c6c993c12631ff2e9f9d9784e83497caf87edbf6 /src/net/tmwa/inventoryhandler.cpp | |
parent | 2f6f5950605e3ffe8054f3a2675f10032ca0aaf6 (diff) | |
download | mv-1eea3f1102b7d8f87b076a5a8380fd71fc00d773.tar.gz mv-1eea3f1102b7d8f87b076a5a8380fd71fc00d773.tar.bz2 mv-1eea3f1102b7d8f87b076a5a8380fd71fc00d773.tar.xz mv-1eea3f1102b7d8f87b076a5a8380fd71fc00d773.zip |
improve inventoryhandler class.
Diffstat (limited to 'src/net/tmwa/inventoryhandler.cpp')
-rw-r--r-- | src/net/tmwa/inventoryhandler.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index 42e6ee9d2..59aa6f69a 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -137,7 +137,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) BLOCK_END("InventoryHandler::handleMessage") } -void InventoryHandler::equipItem(const Item *item) +void InventoryHandler::equipItem(const Item *const item) const { if (!item) return; @@ -148,7 +148,7 @@ void InventoryHandler::equipItem(const Item *item) outMsg.writeInt16(0); } -void InventoryHandler::unequipItem(const Item *item) +void InventoryHandler::unequipItem(const Item *const item) const { if (!item) return; @@ -158,7 +158,7 @@ void InventoryHandler::unequipItem(const Item *item) item->getInvIndex() + INVENTORY_OFFSET)); } -void InventoryHandler::useItem(const Item *item) +void InventoryHandler::useItem(const Item *const item) const { if (!item) return; @@ -169,7 +169,7 @@ void InventoryHandler::useItem(const Item *item) outMsg.writeInt32(item->getId()); // unused } -void InventoryHandler::dropItem(const Item *item, int amount) +void InventoryHandler::dropItem(const Item *const item, const int amount) const { if (!item) return; @@ -181,13 +181,13 @@ void InventoryHandler::dropItem(const Item *item, int amount) outMsg.writeInt16(static_cast<int16_t>(amount)); } -void InventoryHandler::closeStorage(int type A_UNUSED) +void InventoryHandler::closeStorage(const int type A_UNUSED) const { MessageOut outMsg(CMSG_CLOSE_STORAGE); } -void InventoryHandler::moveItem2(int source, int slot, int amount, - int destination) +void InventoryHandler::moveItem2(const int source, const int slot, + const int amount, const int destination) const { if (source == Inventory::INVENTORY && destination == Inventory::STORAGE) { |