summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-07-22 12:10:13 -0600
committerJared Adams <jaxad0127@gmail.com>2009-07-22 12:10:13 -0600
commite917223c3d97c3a8bdfadd508054961c897bdcca (patch)
tree231e6a4fbbb26d9f6c8cadd8033766ed1292addf
parentf8b463d9fdd249f06ff48c128d17c83637e010dd (diff)
downloadmana-e917223c3d97c3a8bdfadd508054961c897bdcca.tar.gz
mana-e917223c3d97c3a8bdfadd508054961c897bdcca.tar.bz2
mana-e917223c3d97c3a8bdfadd508054961c897bdcca.tar.xz
mana-e917223c3d97c3a8bdfadd508054961c897bdcca.zip
Fix updating the status window when money changes
-rw-r--r--src/localplayer.cpp8
-rw-r--r--src/localplayer.h3
2 files changed, 9 insertions, 2 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index d20ebcc3..34ab5246 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -911,6 +911,14 @@ void LocalPlayer::setMaxMP(int value)
statusWindow->update(StatusWindow::MP);
}
+void LocalPlayer::setMoney(int value)
+{
+ mMoney = value;
+
+ if (statusWindow)
+ statusWindow->update(StatusWindow::MONEY);
+}
+
void LocalPlayer::pickedUp(const ItemInfo &itemInfo, int amount)
{
if (!amount)
diff --git a/src/localplayer.h b/src/localplayer.h
index 140d64b4..a3ed5f29 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -309,8 +309,7 @@ class LocalPlayer : public Player
int getMoney() const
{ return mMoney; }
- void setMoney(int value)
- { mMoney = value; }
+ void setMoney(int value);
int getTotalWeight() const
{ return mTotalWeight; }