From f3eb30fff7d99e063185c40f1445de921e228424 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Sat, 3 Oct 2009 18:48:19 +0200 Subject: Fixed real-time updating of attributes and character/correction points during attribute changing. --- src/gui/statuswindow.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/gui/statuswindow.cpp') 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); } } -- cgit v1.2.3-60-g2f50