From 679ab7c8151b70bc9659c3ef4f16350702560a07 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 27 Jul 2018 22:30:26 +0300 Subject: Dont allow buy items with amount 0 from markets. --- src/gui/windows/buydialog.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2