From 618eb708d5ca59039cb978099c7606760a5fca5b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 1 May 2017 00:58:18 +0300 Subject: Remove ServerFeatures haveBrokenAttackDistance because it depend only on server type. --- src/being/localplayer.cpp | 7 +++---- src/net/eathena/serverfeatures.cpp | 5 ----- src/net/eathena/serverfeatures.h | 2 -- src/net/serverfeatures.h | 2 -- src/net/tmwa/serverfeatures.cpp | 5 ----- src/net/tmwa/serverfeatures.h | 2 -- 6 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index f3ec36a14..730421b70 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -1285,8 +1285,8 @@ void LocalPlayer::moveToTarget(int dist) dist = settings.moveToTargetType; if (dist != 0) { - const bool broken = serverFeatures - ->haveBrokenPlayerAttackDistance(); + const bool broken = (Net::getNetworkType() == + ServerType::TMWATHENA); switch (dist) { case 10: @@ -2254,8 +2254,7 @@ void LocalPlayer::attack2(Being *const target, const bool keep, if (!dontChangeEquipment && target) changeEquipmentBeforeAttack(target); - const bool broken = serverFeatures - ->haveBrokenPlayerAttackDistance(); + const bool broken = (Net::getNetworkType() == ServerType::TMWATHENA); // probably need cache getPathLength(target) if ((!target || settings.attackType == 0 || settings.attackType == 3) diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp index 924a588d3..edd4498f9 100644 --- a/src/net/eathena/serverfeatures.cpp +++ b/src/net/eathena/serverfeatures.cpp @@ -51,11 +51,6 @@ bool ServerFeatures::havePlayerStatusUpdate() const return serverVersion > 0; } -bool ServerFeatures::haveBrokenPlayerAttackDistance() const -{ - return false; -} - bool ServerFeatures::haveNativeGuilds() const { return true; diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h index 5d0da137e..91d59345d 100644 --- a/src/net/eathena/serverfeatures.h +++ b/src/net/eathena/serverfeatures.h @@ -40,8 +40,6 @@ class ServerFeatures final : public Net::ServerFeatures bool havePlayerStatusUpdate() const override final; - bool haveBrokenPlayerAttackDistance() const override final A_CONST; - bool haveNativeGuilds() const override final A_CONST; bool haveIncompleteChatMessages() const override final A_CONST; diff --git a/src/net/serverfeatures.h b/src/net/serverfeatures.h index 2262f2dcc..009c5cee1 100644 --- a/src/net/serverfeatures.h +++ b/src/net/serverfeatures.h @@ -42,8 +42,6 @@ class ServerFeatures notfinal virtual bool havePlayerStatusUpdate() const = 0; - virtual bool haveBrokenPlayerAttackDistance() const = 0; - virtual bool haveNativeGuilds() const = 0; virtual bool haveIncompleteChatMessages() const = 0; diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp index a413e2f19..8cd73884c 100644 --- a/src/net/tmwa/serverfeatures.cpp +++ b/src/net/tmwa/serverfeatures.cpp @@ -49,11 +49,6 @@ bool ServerFeatures::havePlayerStatusUpdate() const return false; } -bool ServerFeatures::haveBrokenPlayerAttackDistance() const -{ - return true; -} - bool ServerFeatures::haveNativeGuilds() const { return false; diff --git a/src/net/tmwa/serverfeatures.h b/src/net/tmwa/serverfeatures.h index 1cd4feb2d..0f0b43547 100644 --- a/src/net/tmwa/serverfeatures.h +++ b/src/net/tmwa/serverfeatures.h @@ -40,8 +40,6 @@ class ServerFeatures final : public Net::ServerFeatures bool havePlayerStatusUpdate() const override final A_CONST; - bool haveBrokenPlayerAttackDistance() const override final A_CONST; - bool haveNativeGuilds() const override final; bool haveIncompleteChatMessages() const override final; -- cgit v1.2.3-70-g09d2