From 36bf685462f371b306f51a29331e7a1d86ce3a91 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 16 Sep 2014 20:22:52 +0300 Subject: add server feature haveItemColors. --- src/gui/popups/itempopup.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gui/popups/itempopup.cpp') diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp index 797520c7b..42eeed6be 100644 --- a/src/gui/popups/itempopup.cpp +++ b/src/gui/popups/itempopup.cpp @@ -41,6 +41,9 @@ #include "resources/iteminfo.h" #include "resources/resourcemanager.h" +#include "net/net.h" +#include "net/serverfeatures.h" + #include "debug.h" extern int serverVersion; @@ -117,7 +120,7 @@ void ItemPopup::setItem(const Item *const item, const bool showImage) mLastName = ii.getName(); mLastColor = item->getColor(); mLastId = item->getId(); - if (serverVersion > 0) + if (Net::getServerFeatures()->haveItemColors()) { mItemName->setCaption(strprintf("%s (+%u), %d", ii.getName(item->getColor()).c_str(), @@ -181,7 +184,7 @@ void ItemPopup::setItem(const ItemInfo &item, const unsigned char color, mLastColor = color; mLastId = id; - if (serverVersion > 0) + if (Net::getServerFeatures()->haveItemColors()) { mItemName->setCaption(strprintf("%s, %d", item.getName(color).c_str(), id)); -- cgit v1.2.3-70-g09d2