summaryrefslogtreecommitdiff
path: root/src/resources/itemdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-13 22:24:00 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-13 22:24:00 +0300
commit1da8072253138fe2b6f4139cf3b2488edaff74c4 (patch)
treec2bd1661ac8a9bcc15f93e1dae8f7010efe9594b /src/resources/itemdb.cpp
parentecd456560bf8dbd12822ccc8a5b71e957ab85df4 (diff)
downloadmv-1da8072253138fe2b6f4139cf3b2488edaff74c4.tar.gz
mv-1da8072253138fe2b6f4139cf3b2488edaff74c4.tar.bz2
mv-1da8072253138fe2b6f4139cf3b2488edaff74c4.tar.xz
mv-1da8072253138fe2b6f4139cf3b2488edaff74c4.zip
Another compotability fix with mana. Use advanced directions only
if server version more than 0.
Diffstat (limited to 'src/resources/itemdb.cpp')
-rw-r--r--src/resources/itemdb.cpp30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index 3e53dd6e7..2911fa06f 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -546,25 +546,51 @@ int parseDirectionName(std::string name)
{
int id = -1;
if (name == "down")
- id = DIRECTION_DOWN;
+ {
+ if (serverVersion > 0)
+ id = DIRECTION_DOWN;
+ else
+ id = -2;
+ }
else if (name == "downleft" || name == "leftdown")
+ {
id = DIRECTION_DOWNLEFT;
+ }
else if (name == "left")
+ {
id = DIRECTION_LEFT;
+ }
else if (name == "upleft" || name == "leftup")
+ {
id = DIRECTION_UPLEFT;
+ }
else if (name == "up")
- id = DIRECTION_UP;
+ {
+ if (serverVersion > 0)
+ id = DIRECTION_UP;
+ else
+ id = -3;
+ }
else if (name == "upright" || name == "rightup")
+ {
id = DIRECTION_UPRIGHT;
+ }
else if (name == "right")
+ {
id = DIRECTION_RIGHT;
+ }
else if (name == "downright" || name == "rightdown")
+ {
id = DIRECTION_DOWNRIGHT;
+ }
else if (name == "downall")
+ {
id = -2;
+ }
else if (name == "upall")
+ {
id = -3;
+ }
return id;
}