summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/gui/buy.cpp10
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index f3835387..80a8381a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2008-08-17 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+ * Correctly show GP remaining after buying from NPC
+ vendor (from TMW svn, r4449)
+
+2008-08-17 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
* Fixed issues with unequipping some arrows failing.
* Removed hard-coded item ID's from several files
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp
index 0e48ea29..8e2a7a7a 100644
--- a/src/gui/buy.cpp
+++ b/src/gui/buy.cpp
@@ -171,15 +171,15 @@ void BuyDialog::action(const gcn::ActionEvent &event)
outMsg.writeInt16(mAmountItems);
outMsg.writeInt16(mShopItems->at(selectedItem)->getId());
- // Reset selection
- mAmountItems = 1;
- mSlider->setValue(1);
- mSlider->gcn::Slider::setScale(1, mMaxItems);
-
// Update money and adjust the max number of items that can be bought
mMaxItems -= mAmountItems;
setMoney(mMoney -
mAmountItems * mShopItems->at(selectedItem)->getPrice());
+
+ // Reset selection
+ mAmountItems = 1;
+ mSlider->setValue(1);
+ mSlider->gcn::Slider::setScale(1, mMaxItems);
}
}