diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 3 | ||||
-rw-r--r-- | src/gui/windows/inventorywindow.cpp | 3 | ||||
-rw-r--r-- | src/gui/windows/itemamountwindow.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 63da24ccf..2539ab1b8 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -1122,8 +1122,7 @@ void PopupMenu::handleLink(const std::string &link, } else if (link == "drop all" && mItem) { - if (!PlayerInfo::isItemProtected(mItem->getId())) - Net::getInventoryHandler()->dropItem(mItem, mItem->getQuantity()); + PlayerInfo::dropItem(mItem, mItem->getQuantity(), true); } else if (link == "store" && mItem) { diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index 0cc9b4e0e..64d9347af 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -379,8 +379,7 @@ void InventoryWindow::action(const gcn::ActionEvent &event) { if (inputManager.isActionActive(static_cast<int>(Input::KEY_MOD))) { - Net::getInventoryHandler()->dropItem( - item, item->getQuantity()); + PlayerInfo::dropItem(item, item->getQuantity(), true); } else { diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index 1eba131c1..8816be8dc 100644 --- a/src/gui/windows/itemamountwindow.cpp +++ b/src/gui/windows/itemamountwindow.cpp @@ -25,6 +25,8 @@ #include "inventory.h" #include "item.h" +#include "being/playerinfo.h" + #include "input/keyboardconfig.h" #include "net/inventoryhandler.h" @@ -109,7 +111,7 @@ void ItemAmountWindow::finish(Item *const item, const int amount, tradeWindow->tradeItem(item, amount); break; case ItemDrop: - Net::getInventoryHandler()->dropItem(item, amount); + PlayerInfo::dropItem(item, amount, true); break; case ItemSplit: Net::getInventoryHandler()->splitItem(item, amount); |