summaryrefslogtreecommitdiff
path: root/src/gui/windows/statuswindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-06 23:38:13 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-06 23:38:13 +0300
commit8bb1132c68330d892a6ca78b58daa5cbf7dd6c01 (patch)
tree9c11cd4b0ffd64d5f0b44418ce8a9f05625d3bd2 /src/gui/windows/statuswindow.cpp
parent4ac0902467fad3c5c0b6b116c368b6347be106c2 (diff)
downloadmv-8bb1132c68330d892a6ca78b58daa5cbf7dd6c01.tar.gz
mv-8bb1132c68330d892a6ca78b58daa5cbf7dd6c01.tar.bz2
mv-8bb1132c68330d892a6ca78b58daa5cbf7dd6c01.tar.xz
mv-8bb1132c68330d892a6ca78b58daa5cbf7dd6c01.zip
Use server feature haveMultyStatusUp.
Diffstat (limited to 'src/gui/windows/statuswindow.cpp')
-rw-r--r--src/gui/windows/statuswindow.cpp16
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);
+ }
}
}
}