summaryrefslogtreecommitdiff
path: root/src/gui
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/gui
parentd54c371ad9d3c8a019d7d6bdc0262cd352a06ae5 (diff)
downloadmv-36bf685462f371b306f51a29331e7a1d86ce3a91.tar.gz
mv-36bf685462f371b306f51a29331e7a1d86ce3a91.tar.bz2
mv-36bf685462f371b306f51a29331e7a1d86ce3a91.tar.xz
mv-36bf685462f371b306f51a29331e7a1d86ce3a91.zip
add server feature haveItemColors.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/popups/itempopup.cpp7
-rw-r--r--src/gui/popups/popupmenu.cpp4
2 files changed, 7 insertions, 4 deletions
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));
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index bcc0b92ef..b92d572fb 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -1089,7 +1089,7 @@ void PopupMenu::handleLink(const std::string &link,
{
if (mItem)
{
- if (serverVersion > 0)
+ if (Net::getServerFeatures()->haveItemColors())
{
chatWindow->addItemText(mItem->getInfo().getName(
mItem->getColor()));
@@ -1106,7 +1106,7 @@ void PopupMenu::handleLink(const std::string &link,
if (item)
{
- if (serverVersion > 0)
+ if (Net::getServerFeatures()->haveItemColors())
{
chatWindow->addItemText(item->getInfo().getName(
item->getColor()));