summaryrefslogtreecommitdiff
path: root/src/item.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-16 20:22:52 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-16 20:22:52 +0300
commit36bf685462f371b306f51a29331e7a1d86ce3a91 (patch)
tree79ef1ffdb59524f9fec7ce2dcb3e1cf7f490c70f /src/item.cpp
parentd54c371ad9d3c8a019d7d6bdc0262cd352a06ae5 (diff)
downloadManaVerse-36bf685462f371b306f51a29331e7a1d86ce3a91.tar.gz
ManaVerse-36bf685462f371b306f51a29331e7a1d86ce3a91.tar.bz2
ManaVerse-36bf685462f371b306f51a29331e7a1d86ce3a91.tar.xz
ManaVerse-36bf685462f371b306f51a29331e7a1d86ce3a91.zip
add server feature haveItemColors.
Diffstat (limited to 'src/item.cpp')
-rw-r--r--src/item.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/item.cpp b/src/item.cpp
index ad84b724d..01a47e0dd 100644
--- a/src/item.cpp
+++ b/src/item.cpp
@@ -31,6 +31,9 @@
#include "resources/resourcemanager.h"
#include "configuration.h"
+#include "net/net.h"
+#include "net/serverfeatures.h"
+
#include "debug.h"
extern int serverVersion;
@@ -116,7 +119,7 @@ Image *Item::getImage(const int id, const unsigned char color)
std::string Item::getName() const
{
const ItemInfo &info = ItemDB::get(mId);
- if (serverVersion > 0)
+ if (Net::getServerFeatures()->haveItemColors())
return info.getName(mColor);
else
return info.getName();