summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-01 21:17:28 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-01 21:17:28 +0300
commite82f8ed2976b6b6412ab66329e0794225e2030e7 (patch)
treef0dbea61e6aa58edb0f16705612744880b4586c9
parentf16af47bd98f865193fcea1bbd9507904e2b20af (diff)
downloadmanaplus-e82f8ed2976b6b6412ab66329e0794225e2030e7.tar.gz
manaplus-e82f8ed2976b6b6412ab66329e0794225e2030e7.tar.bz2
manaplus-e82f8ed2976b6b6412ab66329e0794225e2030e7.tar.xz
manaplus-e82f8ed2976b6b6412ab66329e0794225e2030e7.zip
Remove ServerFeatures haveCards because it depend only on server type.
-rw-r--r--src/gui/widgets/itemcontainer.cpp3
-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, 2 insertions, 17 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 4ac331078..4ac62e86e 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -46,6 +46,7 @@
#include "input/inputmanager.h"
#include "net/inventoryhandler.h"
+#include "net/net.h"
#include "net/npchandler.h"
#include "net/serverfeatures.h"
#include "net/tradehandler.h"
@@ -797,7 +798,7 @@ void ItemContainer::mouseReleased(MouseEvent &event)
if (src == DragDropSource::Inventory
&& dst == DragDropSource::Inventory)
{
- if (!serverFeatures->haveCards())
+ if (Net::getNetworkType() == ServerType::TMWATHENA)
return;
const int index = getSlotIndex(event.getX(), event.getY());
if (index == Inventory::NO_SLOT_INDEX)
diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp
index a704e41c8..74008e072 100644
--- a/src/net/eathena/serverfeatures.cpp
+++ b/src/net/eathena/serverfeatures.cpp
@@ -116,11 +116,6 @@ bool ServerFeatures::haveCreateCharGender() const
return serverVersion > 0;
}
-bool ServerFeatures::haveCards() const
-{
- return true;
-}
-
bool ServerFeatures::haveTalkPet() const
{
return serverVersion > 0;
diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h
index 2c8162bc6..8e8d374f8 100644
--- a/src/net/eathena/serverfeatures.h
+++ b/src/net/eathena/serverfeatures.h
@@ -66,8 +66,6 @@ class ServerFeatures final : public Net::ServerFeatures
bool haveCreateCharGender() const override final;
- bool haveCards() const override final A_CONST;
-
bool haveTalkPet() const override final;
bool haveMovePet() const override final;
diff --git a/src/net/serverfeatures.h b/src/net/serverfeatures.h
index 521c764b9..a5733ea4b 100644
--- a/src/net/serverfeatures.h
+++ b/src/net/serverfeatures.h
@@ -68,8 +68,6 @@ class ServerFeatures notfinal
virtual bool haveCreateCharGender() const = 0;
- virtual bool haveCards() const = 0;
-
virtual bool haveTalkPet() const = 0;
virtual bool haveMovePet() const = 0;
diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp
index 47f4ea4a6..c006a691d 100644
--- a/src/net/tmwa/serverfeatures.cpp
+++ b/src/net/tmwa/serverfeatures.cpp
@@ -114,11 +114,6 @@ bool ServerFeatures::haveCreateCharGender() const
return tmwServerVersion > 0x0f0b17;
}
-bool ServerFeatures::haveCards() const
-{
- return false;
-}
-
bool ServerFeatures::haveTalkPet() const
{
return true;
diff --git a/src/net/tmwa/serverfeatures.h b/src/net/tmwa/serverfeatures.h
index 76cb2085b..2409de4f9 100644
--- a/src/net/tmwa/serverfeatures.h
+++ b/src/net/tmwa/serverfeatures.h
@@ -66,8 +66,6 @@ class ServerFeatures final : public Net::ServerFeatures
bool haveCreateCharGender() const override final;
- bool haveCards() const override final A_CONST;
-
bool haveTalkPet() const override final A_CONST;
bool haveMovePet() const override final A_CONST;