diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-17 10:55:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-17 10:55:20 +0300 |
commit | fd050698f74b5dc7a9867bc93ba6b7c65ef2462f (patch) | |
tree | 246017e7d1b399e60a5d7b97a7106cd75587b88f /src/gui/windows | |
parent | 4228763829f71ec4db50ed185483d7707c5e47eb (diff) | |
download | mv-fd050698f74b5dc7a9867bc93ba6b7c65ef2462f.tar.gz mv-fd050698f74b5dc7a9867bc93ba6b7c65ef2462f.tar.bz2 mv-fd050698f74b5dc7a9867bc93ba6b7c65ef2462f.tar.xz mv-fd050698f74b5dc7a9867bc93ba6b7c65ef2462f.zip |
Remove getter for inventoryHandler.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/inventorywindow.cpp | 16 | ||||
-rw-r--r-- | src/gui/windows/itemamountwindow.cpp | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index c1bdafe7b..e44f9e087 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -369,7 +369,7 @@ void InventoryWindow::action(const ActionEvent &event) { if (isStorageActive()) { - Net::getInventoryHandler()->moveItem2(Inventory::INVENTORY, + inventoryHandler->moveItem2(Inventory::INVENTORY, item->getInvIndex(), item->getQuantity(), Inventory::STORAGE); } @@ -474,7 +474,7 @@ void InventoryWindow::mouseClicked(MouseEvent &event) } else { - Net::getInventoryHandler()->moveItem2(Inventory::INVENTORY, + inventoryHandler->moveItem2(Inventory::INVENTORY, item->getInvIndex(), item->getQuantity(), Inventory::STORAGE); } @@ -488,7 +488,7 @@ void InventoryWindow::mouseClicked(MouseEvent &event) } else { - Net::getInventoryHandler()->moveItem2(Inventory::STORAGE, + inventoryHandler->moveItem2(Inventory::STORAGE, item->getInvIndex(), item->getQuantity(), Inventory::INVENTORY); } @@ -588,7 +588,7 @@ void InventoryWindow::valueChanged(const SelectionEvent &event A_UNUSED) Item *const item = mItems->getSelectedItem(); - if (mSplit && item && Net::getInventoryHandler()-> + if (mSplit && item && inventoryHandler-> canSplit(mItems->getSelectedItem())) { ItemAmountWindow::showWindow(ItemAmountWindow::ItemSplit, @@ -642,7 +642,7 @@ void InventoryWindow::updateButtons(const Item *item) if (mSplitButton) { - if (Net::getInventoryHandler()->canSplit(item)) + if (inventoryHandler->canSplit(item)) mSplitButton->setEnabled(true); else mSplitButton->setEnabled(false); @@ -663,10 +663,10 @@ void InventoryWindow::close() } else { - if (Net::getInventoryHandler()) + if (inventoryHandler) { - Net::getInventoryHandler()->closeStorage(Inventory::STORAGE); - Net::getInventoryHandler()->forgotStorage(); + inventoryHandler->closeStorage(Inventory::STORAGE); + inventoryHandler->forgotStorage(); } scheduleDelete(); } diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index d7760444a..86cfd973c 100644 --- a/src/gui/windows/itemamountwindow.cpp +++ b/src/gui/windows/itemamountwindow.cpp @@ -67,14 +67,14 @@ void ItemAmountWindow::finish(const Item *const item, PlayerInfo::dropItem(item, amount, true); break; case ItemSplit: - Net::getInventoryHandler()->splitItem(item, amount); + inventoryHandler->splitItem(item, amount); break; case StoreAdd: - Net::getInventoryHandler()->moveItem2(Inventory::INVENTORY, + inventoryHandler->moveItem2(Inventory::INVENTORY, item->getInvIndex(), amount, Inventory::STORAGE); break; case StoreRemove: - Net::getInventoryHandler()->moveItem2(Inventory::STORAGE, + inventoryHandler->moveItem2(Inventory::STORAGE, item->getInvIndex(), amount, Inventory::INVENTORY); break; case ShopBuyAdd: |