summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-10-25 23:47:10 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-10-25 23:47:10 +0000
commit4f49eb94ddf9d2f0f3c59560c761188d101bd5f8 (patch)
tree0563c0c07469313bd73818216efdf3c70a83e598 /src
parent156cae78d97776ab3ca8589c69d817ceec22b5cd (diff)
downloadmana-client-4f49eb94ddf9d2f0f3c59560c761188d101bd5f8.tar.gz
mana-client-4f49eb94ddf9d2f0f3c59560c761188d101bd5f8.tar.bz2
mana-client-4f49eb94ddf9d2f0f3c59560c761188d101bd5f8.tar.xz
mana-client-4f49eb94ddf9d2f0f3c59560c761188d101bd5f8.zip
Item amount dialog is now skipped when there is only one item on the stack.
Diffstat (limited to 'src')
-rw-r--r--src/gui/item_amount.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp
index f72462f9..801a9ce8 100644
--- a/src/gui/item_amount.cpp
+++ b/src/gui/item_amount.cpp
@@ -35,6 +35,14 @@ ItemAmountWindow::ItemAmountWindow(int usage, Window *parent, Item *item):
Window("Select amount of items to drop.", true, parent),
mItem(item)
{
+ //when there is only one item on the stack skip the dialog
+ if (mItem->getQuantity() == 1)
+ {
+ player_node->dropItem(mItem, 1);
+ scheduleDelete();
+ return;
+ };
+
// New labels
mItemAmountTextBox = new IntTextBox(1);