summaryrefslogtreecommitdiff
path: root/src/gui/statuswindow.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-10-03 18:48:19 +0200
committerPhilipp Sehmisch <crush@themanaworld.org>2009-10-03 18:54:13 +0200
commitf3eb30fff7d99e063185c40f1445de921e228424 (patch)
tree22c555a9a8388cbc7e6ff0a1a67c6d6dcfecb882 /src/gui/statuswindow.cpp
parent3c6fb072a50f5a11974bb55e2ffc0816519e7db6 (diff)
downloadMana-f3eb30fff7d99e063185c40f1445de921e228424.tar.gz
Mana-f3eb30fff7d99e063185c40f1445de921e228424.tar.bz2
Mana-f3eb30fff7d99e063185c40f1445de921e228424.tar.xz
Mana-f3eb30fff7d99e063185c40f1445de921e228424.zip
Fixed real-time updating of attributes and character/correction points during attribute changing.
Diffstat (limited to 'src/gui/statuswindow.cpp')
-rw-r--r--src/gui/statuswindow.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index 8151bd92..e89b7437 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -520,11 +520,25 @@ void ChangeDisplay::action(const gcn::ActionEvent &event)
#ifdef TMWSERV_SUPPORT
if (event.getSource() == mDec)
{
+ int newcorpoints = player_node->getCorrectionPoints() - 1;
+ player_node->setCorrectionPoints(newcorpoints);
+ int newpoints = player_node->getCharacterPoints() + 1;
+ player_node->setCharacterPoints(newpoints);
+ int newbase = player_node->getAttributeBase(mId) - 1;
+ player_node->setAttributeBase(mId, newbase);
+ int newmod = player_node->getAttributeEffective(mId) - 1;
+ player_node->setAttributeEffective(mId, newmod);
Net::getPlayerHandler()->decreaseAttribute(mId);
} else
#endif
if (event.getSource() == mInc)
{
+ int newpoints = player_node->getCharacterPoints() - 1;
+ player_node->setCharacterPoints(newpoints);
+ int newbase = player_node->getAttributeBase(mId) + 1;
+ player_node->setAttributeBase(mId, newbase);
+ int newmod = player_node->getAttributeEffective(mId) + 1;
+ player_node->setAttributeEffective(mId, newmod);
Net::getPlayerHandler()->increaseAttribute(mId);
}
}