From fd050698f74b5dc7a9867bc93ba6b7c65ef2462f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 17 Sep 2014 10:55:20 +0300 Subject: Remove getter for inventoryHandler. --- src/gui/popups/popupmenu.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/gui/popups/popupmenu.cpp') diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 8e9939991..1c4722419 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -1191,25 +1191,25 @@ void PopupMenu::handleLink(const std::string &link, int cnt = 10; if (cnt > mItem->getQuantity()) cnt = mItem->getQuantity(); - Net::getInventoryHandler()->moveItem2(Inventory::INVENTORY, + inventoryHandler->moveItem2(Inventory::INVENTORY, mItem->getInvIndex(), cnt, Inventory::STORAGE); } else if (link == "store half" && mItem) { - Net::getInventoryHandler()->moveItem2(Inventory::INVENTORY, + inventoryHandler->moveItem2(Inventory::INVENTORY, mItem->getInvIndex(), mItem->getQuantity() / 2, Inventory::STORAGE); } else if (link == "store all-1" && mItem) { - Net::getInventoryHandler()->moveItem2(Inventory::INVENTORY, + inventoryHandler->moveItem2(Inventory::INVENTORY, mItem->getInvIndex(), mItem->getQuantity() - 1, Inventory::STORAGE); } else if (link == "store all" && mItem) { - Net::getInventoryHandler()->moveItem2(Inventory::INVENTORY, + inventoryHandler->moveItem2(Inventory::INVENTORY, mItem->getInvIndex(), mItem->getQuantity(), Inventory::STORAGE); } @@ -1259,25 +1259,25 @@ void PopupMenu::handleLink(const std::string &link, int cnt = 10; if (cnt > mItem->getQuantity()) cnt = mItem->getQuantity(); - Net::getInventoryHandler()->moveItem2(Inventory::STORAGE, + inventoryHandler->moveItem2(Inventory::STORAGE, mItem->getInvIndex(), cnt, Inventory::INVENTORY); } else if (link == "retrieve half" && mItem) { - Net::getInventoryHandler()->moveItem2(Inventory::STORAGE, + inventoryHandler->moveItem2(Inventory::STORAGE, mItem->getInvIndex(), mItem->getQuantity() / 2, Inventory::INVENTORY); } else if (link == "retrieve all-1" && mItem) { - Net::getInventoryHandler()->moveItem2(Inventory::STORAGE, + inventoryHandler->moveItem2(Inventory::STORAGE, mItem->getInvIndex(), mItem->getQuantity() - 1, Inventory::INVENTORY); } else if (link == "retrieve all" && mItem) { - Net::getInventoryHandler()->moveItem2(Inventory::STORAGE, + inventoryHandler->moveItem2(Inventory::STORAGE, mItem->getInvIndex(), mItem->getQuantity(), Inventory::INVENTORY); } @@ -2856,7 +2856,7 @@ void PopupMenu::addUseDrop(const Item *const item, const bool isProtected) } } - if (Net::getInventoryHandler()->canSplit(item)) + if (inventoryHandler->canSplit(item)) { // TRANSLATORS: popup menu item // TRANSLATORS: split items -- cgit v1.2.3-70-g09d2