summaryrefslogtreecommitdiff
path: root/src/resources/db/itemdb.cpp
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/resources/db/itemdb.cpp
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/resources/db/itemdb.cpp')
-rw-r--r--src/resources/db/itemdb.cpp17
1 files changed, 11 insertions, 6 deletions
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")
{