From 8bb1132c68330d892a6ca78b58daa5cbf7dd6c01 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 6 Mar 2016 23:38:13 +0300 Subject: Use server feature haveMultyStatusUp. --- src/gui/windows/statuswindow.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/gui') 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); + } } } } -- cgit v1.2.3-70-g09d2