summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-01 18:28:32 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-01 18:28:32 +0300
commit89bc2ec72aa3713fc5a02ec1fcc4ea826043e9c3 (patch)
treef41622c9f4cc27809f00a91140ef8be2a5196051 /src
parent013e03f7a62c40554d0ed00c30375155557a1318 (diff)
downloadmv-89bc2ec72aa3713fc5a02ec1fcc4ea826043e9c3.tar.gz
mv-89bc2ec72aa3713fc5a02ec1fcc4ea826043e9c3.tar.bz2
mv-89bc2ec72aa3713fc5a02ec1fcc4ea826043e9c3.tar.xz
mv-89bc2ec72aa3713fc5a02ec1fcc4ea826043e9c3.zip
Remove ServerFeatures haveEightDirections because it depend only on server type.
Diffstat (limited to 'src')
-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
-rw-r--r--src/resources/db/itemdb.cpp17
6 files changed, 11 insertions, 22 deletions
diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp
index edf86f09f..bd33ec0c3 100644
--- a/src/net/eathena/serverfeatures.cpp
+++ b/src/net/eathena/serverfeatures.cpp
@@ -91,11 +91,6 @@ bool ServerFeatures::haveEmailOnDelete() const
return serverVersion > 0;
}
-bool ServerFeatures::haveEightDirections() const
-{
- return true;
-}
-
bool ServerFeatures::haveCharRename() const
{
return true;
diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h
index a8394b2e6..52511ea74 100644
--- a/src/net/eathena/serverfeatures.h
+++ b/src/net/eathena/serverfeatures.h
@@ -56,8 +56,6 @@ class ServerFeatures final : public Net::ServerFeatures
bool haveEmailOnDelete() const override final;
- bool haveEightDirections() const override final A_CONST;
-
bool haveCharRename() const override final A_CONST;
bool haveBankApi() const override final A_CONST;
diff --git a/src/net/serverfeatures.h b/src/net/serverfeatures.h
index ed66e1b63..391edf9f2 100644
--- a/src/net/serverfeatures.h
+++ b/src/net/serverfeatures.h
@@ -58,8 +58,6 @@ class ServerFeatures notfinal
virtual bool haveEmailOnDelete() const = 0;
- virtual bool haveEightDirections() const = 0;
-
virtual bool haveCharRename() const = 0;
virtual bool haveBankApi() const = 0;
diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp
index 86ea22075..bf0f370b1 100644
--- a/src/net/tmwa/serverfeatures.cpp
+++ b/src/net/tmwa/serverfeatures.cpp
@@ -89,11 +89,6 @@ bool ServerFeatures::haveEmailOnDelete() const
return false;
}
-bool ServerFeatures::haveEightDirections() const
-{
- return false;
-}
-
bool ServerFeatures::haveCharRename() const
{
return false;
diff --git a/src/net/tmwa/serverfeatures.h b/src/net/tmwa/serverfeatures.h
index 562a39c9e..b21faf69a 100644
--- a/src/net/tmwa/serverfeatures.h
+++ b/src/net/tmwa/serverfeatures.h
@@ -56,8 +56,6 @@ class ServerFeatures final : public Net::ServerFeatures
bool haveEmailOnDelete() const override final A_CONST;
- bool haveEightDirections() const override final A_CONST;
-
bool haveCharRename() const override final A_CONST;
bool haveBankApi() const override final A_CONST;
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index 94c9b14b8..e0616090d 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -39,6 +39,7 @@
#include "resources/sprite/spritereference.h"
+#include "net/net.h"
#include "net/serverfeatures.h"
#include "utils/checkutils.h"
@@ -780,10 +781,12 @@ static int parseDirectionName(const std::string &name)
int id = -1;
if (name == "down")
{
- if (serverFeatures->haveEightDirections())
- id = SpriteDirection::DOWN;
- else
+#ifdef TMWA_SUPPORT
+ if (Net::getNetworkType() == ServerType::TMWATHENA)
id = -2;
+ else
+#endif
+ id = SpriteDirection::DOWN;
}
else if (name == "downleft" || name == "leftdown")
{
@@ -799,10 +802,12 @@ static int parseDirectionName(const std::string &name)
}
else if (name == "up")
{
- if (serverFeatures->haveEightDirections())
- id = SpriteDirection::UP;
- else
+#ifdef TMWA_SUPPORT
+ if (Net::getNetworkType() == ServerType::TMWATHENA)
id = -3;
+ else
+#endif
+ id = SpriteDirection::UP;
}
else if (name == "upright" || name == "rightup")
{