diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-06 23:38:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-06 23:38:13 +0300 |
commit | 8bb1132c68330d892a6ca78b58daa5cbf7dd6c01 (patch) | |
tree | 9c11cd4b0ffd64d5f0b44418ce8a9f05625d3bd2 | |
parent | 4ac0902467fad3c5c0b6b116c368b6347be106c2 (diff) | |
download | manaplus-8bb1132c68330d892a6ca78b58daa5cbf7dd6c01.tar.gz manaplus-8bb1132c68330d892a6ca78b58daa5cbf7dd6c01.tar.bz2 manaplus-8bb1132c68330d892a6ca78b58daa5cbf7dd6c01.tar.xz manaplus-8bb1132c68330d892a6ca78b58daa5cbf7dd6c01.zip |
Use server feature haveMultyStatusUp.
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index 231b4d9b5..e2c65f827 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -47,6 +47,7 @@ #include "net/inventoryhandler.h" #include "net/playerhandler.h" +#include "net/serverfeatures.h" #include "resources/item/item.h" @@ -796,11 +797,18 @@ void ChangeDisplay::action(const ActionEvent &event) const int newbase = PlayerInfo::getStatBase(mId) + cnt; PlayerInfo::setStatBase(mId, newbase); - for (int f = 0; f < mInc->getClickCount(); f ++) + if (serverFeatures->haveMultyStatusUp()) { - playerHandler->increaseAttribute(mId, 1); - if (cnt != 1) - SDL_Delay(100); + playerHandler->increaseAttribute(mId, cnt); + } + else + { + for (int f = 0; f < cnt; f ++) + { + playerHandler->increaseAttribute(mId, 1); + if (cnt != 1) + SDL_Delay(100); + } } } } |