summaryrefslogtreecommitdiff
path: root/src/gui/buy.cpp
diff options
context:
space:
mode:
authorLloyd Bryant <lloyd_bryant@netzero.net>2008-08-18 15:51:10 +0000
committerLloyd Bryant <lloyd_bryant@netzero.net>2008-08-18 15:51:10 +0000
commit7ac798f289e58348fdd1c08bd422fb435399f5d4 (patch)
tree2fc3384f23df76d1523475edcd448620a52e50dd /src/gui/buy.cpp
parent46074f67394f313331d13a5def4eb81ca92df576 (diff)
downloadmana-client-7ac798f289e58348fdd1c08bd422fb435399f5d4.tar.gz
mana-client-7ac798f289e58348fdd1c08bd422fb435399f5d4.tar.bz2
mana-client-7ac798f289e58348fdd1c08bd422fb435399f5d4.tar.xz
mana-client-7ac798f289e58348fdd1c08bd422fb435399f5d4.zip
Fixed bug with GP shown being incorrect after purchasing from NPC vendor (code from TMW svn, r4449)
Diffstat (limited to 'src/gui/buy.cpp')
-rw-r--r--src/gui/buy.cpp10
1 files changed, 5 insertions, 5 deletions
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);
}
}