summaryrefslogtreecommitdiff
path: root/src/resources/itemdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-03 02:21:07 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-03 02:21:07 +0200
commit8627c7745f47492ab349da6a74e98e3d5813418f (patch)
tree8c6abbe632dfb91e856e06fadcbbac1b72f25416 /src/resources/itemdb.cpp
parent22f79fd0d623c8e11994905534f53da267e22935 (diff)
downloadmanaplus-8627c7745f47492ab349da6a74e98e3d5813418f.tar.gz
manaplus-8627c7745f47492ab349da6a74e98e3d5813418f.tar.bz2
manaplus-8627c7745f47492ab349da6a74e98e3d5813418f.tar.xz
manaplus-8627c7745f47492ab349da6a74e98e3d5813418f.zip
Add some protections to disable advanced features for old servers like tmw.
Diffstat (limited to 'src/resources/itemdb.cpp')
-rw-r--r--src/resources/itemdb.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index d515495de..4ba254cf3 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -22,6 +22,7 @@
#include "resources/itemdb.h"
+#include "client.h"
#include "log.h"
#include "resources/iteminfo.h"
@@ -207,7 +208,11 @@ void ItemDB::load()
std::string drawBefore = XML::getProperty(node, "drawBefore", "");
std::string drawAfter = XML::getProperty(node, "drawAfter", "");
std::string removeSprite = XML::getProperty(node, "removeSprite", "");
- std::string colors = XML::getProperty(node, "colors", "");
+ std::string colors;
+ if (serverVersion >= 1)
+ colors = XML::getProperty(node, "colors", "");
+ else
+ colors = "";
std::string tags[3];
tags[0] = XML::getProperty(node, "tag",