summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/gui/sell.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fdce4aec..bb357931 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,7 @@
precisions about the total money in it.
* src/gui/shop.h, src/gui/shop.cpp, src/gui/sell.cpp: Fixes to Sell
dialog.
+ * src/gui/sell.cpp: Fixes the money value after seling something.
2006-11-05 Björn Steinbrink <B.Steinbrink@gmx.de>
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index 7f50c1e4..f32b4b5c 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -234,6 +234,7 @@ void SellDialog::action(const std::string& eventId, gcn::Widget* widget)
mMaxItems -= mAmountItems;
mShopItems->getShop()->at(selectedItem).quantity = mMaxItems;
+ mPlayerMoney += (mAmountItems * mShopItems->at(selectedItem).price);
mAmountItems = 0;
mSlider->setValue(0);
mSlider->setEnabled(mMaxItems != 0);