summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-01 19:10:28 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-01 19:10:28 +0300
commiteb7382cbe4c699a907ced9f2a0e6631381e74673 (patch)
tree92164dfc4b3cf02a9a2ed1554743880e2ce8607e /src
parent3c39535b77209f4afda43b689999a7e61a1e163b (diff)
downloadManaVerse-eb7382cbe4c699a907ced9f2a0e6631381e74673.tar.gz
ManaVerse-eb7382cbe4c699a907ced9f2a0e6631381e74673.tar.bz2
ManaVerse-eb7382cbe4c699a907ced9f2a0e6631381e74673.tar.xz
ManaVerse-eb7382cbe4c699a907ced9f2a0e6631381e74673.zip
Remove ServerFeatures haveNpcWhispers because it depend only on server type.
Diffstat (limited to 'src')
-rw-r--r--src/gui/popups/popupmenu.cpp4
-rw-r--r--src/net/eathena/serverfeatures.cpp5
-rw-r--r--src/net/eathena/serverfeatures.h2
-rw-r--r--src/net/serverfeatures.h2
-rw-r--r--src/net/tmwa/serverfeatures.cpp5
-rw-r--r--src/net/tmwa/serverfeatures.h2
6 files changed, 3 insertions, 17 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 370700f48..b1110c615 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -265,7 +265,9 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
// TRANSLATORS: popup menu item
// TRANSLATORS: talk with npc
mBrowserBox->addRow("/talk 'NAME'", _("Talk"));
- if (serverFeatures->haveNpcWhispers())
+#ifdef TMWA_SUPPORT
+ if (Net::getNetworkType() == ServerType::EATHENA)
+#endif
{
mBrowserBox->addRow("/whispertext NPC:'NAME'",
// TRANSLATORS: popup menu item
diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp
index e16e445e2..f5570b0a1 100644
--- a/src/net/eathena/serverfeatures.cpp
+++ b/src/net/eathena/serverfeatures.cpp
@@ -111,11 +111,6 @@ bool ServerFeatures::haveJoinChannel() const
return serverVersion > 0;
}
-bool ServerFeatures::haveNpcWhispers() const
-{
- return true;
-}
-
bool ServerFeatures::haveCreateCharGender() const
{
return serverVersion > 0;
diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h
index adb23d240..4e28684bd 100644
--- a/src/net/eathena/serverfeatures.h
+++ b/src/net/eathena/serverfeatures.h
@@ -64,8 +64,6 @@ class ServerFeatures final : public Net::ServerFeatures
bool haveJoinChannel() const override final;
- bool haveNpcWhispers() const override final A_CONST;
-
bool haveCreateCharGender() const override final;
bool haveAttackDirections() const override final A_CONST;
diff --git a/src/net/serverfeatures.h b/src/net/serverfeatures.h
index 84db095d1..dbea1b5d5 100644
--- a/src/net/serverfeatures.h
+++ b/src/net/serverfeatures.h
@@ -66,8 +66,6 @@ class ServerFeatures notfinal
virtual bool haveJoinChannel() const = 0;
- virtual bool haveNpcWhispers() const = 0;
-
virtual bool haveCreateCharGender() const = 0;
virtual bool haveAttackDirections() const = 0;
diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp
index ba0d5f438..b1a9c3feb 100644
--- a/src/net/tmwa/serverfeatures.cpp
+++ b/src/net/tmwa/serverfeatures.cpp
@@ -109,11 +109,6 @@ bool ServerFeatures::haveJoinChannel() const
return false;
}
-bool ServerFeatures::haveNpcWhispers() const
-{
- return false;
-}
-
bool ServerFeatures::haveCreateCharGender() const
{
return tmwServerVersion > 0x0f0b17;
diff --git a/src/net/tmwa/serverfeatures.h b/src/net/tmwa/serverfeatures.h
index 727a55a5c..0fef3ce70 100644
--- a/src/net/tmwa/serverfeatures.h
+++ b/src/net/tmwa/serverfeatures.h
@@ -64,8 +64,6 @@ class ServerFeatures final : public Net::ServerFeatures
bool haveJoinChannel() const override final A_CONST;
- bool haveNpcWhispers() const override final A_CONST;
-
bool haveCreateCharGender() const override final;
bool haveAttackDirections() const override final A_CONST;