diff options
author | Philipp Sehmisch <crush@themanaworld.org> | 2009-10-03 18:48:19 +0200 |
---|---|---|
committer | Philipp Sehmisch <crush@themanaworld.org> | 2009-10-03 18:54:13 +0200 |
commit | f3eb30fff7d99e063185c40f1445de921e228424 (patch) | |
tree | 22c555a9a8388cbc7e6ff0a1a67c6d6dcfecb882 /src/gui | |
parent | 3c6fb072a50f5a11974bb55e2ffc0816519e7db6 (diff) | |
download | mana-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')
-rw-r--r-- | src/gui/statuswindow.cpp | 14 |
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); } } |