summaryrefslogtreecommitdiff
path: root/src/item.cpp
diff options
context:
space:
mode:
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();