From 3f5599082b5543a7f1c6a7bf3d631ac3805acc23 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 1 May 2017 22:17:05 +0300 Subject: Remove ServerFeatures haveSecureTrades because it depend only on server type. --- src/gui/windows/tradewindow.cpp | 3 ++- 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, 2 insertions(+), 17 deletions(-) diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp index 6e6fe5d95..34ee3699a 100644 --- a/src/gui/windows/tradewindow.cpp +++ b/src/gui/windows/tradewindow.cpp @@ -53,6 +53,7 @@ #include "resources/item/item.h" +#include "net/net.h" #include "net/serverfeatures.h" #include "net/tradehandler.h" @@ -535,7 +536,7 @@ bool TradeWindow::checkItem(const Item *const item) const } return false; } - if (serverFeatures->haveSecureTrades() && + if (Net::getNetworkType() == ServerType::EATHENA && item->isEquipped() == Equipped_true) { if (localChatTab) diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp index 9849f0811..264c03b23 100644 --- a/src/net/eathena/serverfeatures.cpp +++ b/src/net/eathena/serverfeatures.cpp @@ -141,11 +141,6 @@ bool ServerFeatures::haveExtendedDropsPosition() const return serverVersion >= 12; } -bool ServerFeatures::haveSecureTrades() const -{ - return true; -} - bool ServerFeatures::haveMultyStatusUp() const { return true; diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h index 308cca255..d827d372d 100644 --- a/src/net/eathena/serverfeatures.h +++ b/src/net/eathena/serverfeatures.h @@ -76,8 +76,6 @@ class ServerFeatures final : public Net::ServerFeatures bool haveExtendedDropsPosition() const override final; - bool haveSecureTrades() const override final; - bool haveMultyStatusUp() const override final; bool haveMail() const override final; diff --git a/src/net/serverfeatures.h b/src/net/serverfeatures.h index 3e8fdce99..1a0de93d2 100644 --- a/src/net/serverfeatures.h +++ b/src/net/serverfeatures.h @@ -78,8 +78,6 @@ class ServerFeatures notfinal virtual bool haveExtendedDropsPosition() const = 0; - virtual bool haveSecureTrades() const = 0; - virtual bool haveMultyStatusUp() const = 0; virtual bool haveMail() const = 0; diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp index f6fc06671..54d86af40 100644 --- a/src/net/tmwa/serverfeatures.cpp +++ b/src/net/tmwa/serverfeatures.cpp @@ -139,11 +139,6 @@ bool ServerFeatures::haveExtendedDropsPosition() const return false; } -bool ServerFeatures::haveSecureTrades() const -{ - return false; -} - bool ServerFeatures::haveMultyStatusUp() const { return false; diff --git a/src/net/tmwa/serverfeatures.h b/src/net/tmwa/serverfeatures.h index 7f2efbf64..d609fa300 100644 --- a/src/net/tmwa/serverfeatures.h +++ b/src/net/tmwa/serverfeatures.h @@ -76,8 +76,6 @@ class ServerFeatures final : public Net::ServerFeatures bool haveExtendedDropsPosition() const override final A_CONST; - bool haveSecureTrades() const override final A_CONST; - bool haveMultyStatusUp() const override final A_CONST; bool haveMail() const override final A_CONST; -- cgit v1.2.3-70-g09d2