diff options
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r-- | src/gui/inventorywindow.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index 35cdde93..7b888212 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -122,8 +122,13 @@ void InventoryWindow::action(const gcn::ActionEvent &event) } else if (event.getId() == "drop") { - // Choose amount of items to drop - new ItemAmountWindow(AMOUNT_ITEM_DROP, this, item); + if (item->getQuantity() == 1) { + player_node->dropItem(item, 1); + } + else { + // Choose amount of items to drop + new ItemAmountWindow(AMOUNT_ITEM_DROP, this, item); + } } } |