From 8185a857a4d9152b3dda7f6b5649a27427010605 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 16 Sep 2014 16:34:42 +0300 Subject: add server feature havePlayerStatusUpdate. --- src/being/localplayer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/being') diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 237f21dc2..fd3acd4f9 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -68,6 +68,7 @@ #include "net/packetlimiter.h" #include "net/pethandler.h" #include "net/playerhandler.h" +#include "net/serverfeatures.h" #include "resources/iteminfo.h" #include "resources/itemslot.h" @@ -333,7 +334,9 @@ void LocalPlayer::slowLogic() weightNoticeTime = 0; } - if (serverVersion < 4 && mEnableAdvert && !mBlockAdvert + if (!Net::getServerFeatures()->havePlayerStatusUpdate() + && mEnableAdvert + && !mBlockAdvert && mAdvertTime < cur_time) { uint8_t smile = BeingFlag::SPECIAL; @@ -3222,7 +3225,7 @@ bool LocalPlayer::checAttackPermissions(const Being *const target) void LocalPlayer::updateStatus() const { - if (serverVersion >= 4 && mEnableAdvert) + if (Net::getServerFeatures()->havePlayerStatusUpdate() && mEnableAdvert) { uint8_t status = 0; if (mTradebot && shopWindow && !shopWindow->isShopEmpty()) -- cgit v1.2.3-70-g09d2