summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-27 22:30:26 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-27 22:30:26 +0300
commit679ab7c8151b70bc9659c3ef4f16350702560a07 (patch)
treec4b0a62d7b5b4e1c971d74c3c6a988a161fcee9e /src/gui/windows
parentc5bd488ce7a9b515cb5ea5008e9438cae65745f4 (diff)
downloadplus-679ab7c8151b70bc9659c3ef4f16350702560a07.tar.gz
plus-679ab7c8151b70bc9659c3ef4f16350702560a07.tar.bz2
plus-679ab7c8151b70bc9659c3ef4f16350702560a07.tar.xz
plus-679ab7c8151b70bc9659c3ef4f16350702560a07.zip
Dont allow buy items with amount 0 from markets.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/buydialog.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp
index a6a369e28..cc4cf4699 100644
--- a/src/gui/windows/buydialog.cpp
+++ b/src/gui/windows/buydialog.cpp
@@ -734,8 +734,16 @@ void BuyDialog::updateButtonsAndLabels()
else
mMaxItems = 1;
- if (item->getQuantity() > 0 && mMaxItems > item->getQuantity())
+ if (mNpcId == fromInt(Market, BeingId))
+ {
+ if (mMaxItems > item->getQuantity())
+ mMaxItems = item->getQuantity();
+ }
+ else if (item->getQuantity() > 0 &&
+ mMaxItems > item->getQuantity())
+ {
mMaxItems = item->getQuantity();
+ }
if (mAmountItems > mMaxItems)
mAmountItems = mMaxItems;