From 87918db755040bb693cb286d8fb0bcfd97d761af Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 1 May 2017 17:52:56 +0300 Subject: Remove ServerFeatures haveItemColors because it depend only by server type. --- src/gui/popups/itempopup.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/gui') diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp index 7d58161c3..7947934b7 100644 --- a/src/gui/popups/itempopup.cpp +++ b/src/gui/popups/itempopup.cpp @@ -50,6 +50,7 @@ #include "resources/loaders/imageloader.h" #include "net/beinghandler.h" +#include "net/net.h" #include "net/serverfeatures.h" #include "utils/translation/podict.h" @@ -151,17 +152,19 @@ void ItemPopup::setItem(const Item *const item, mLastName = ii.getName(); mLastColor = item->getColor(); mLastId = item->getId(); - if (serverFeatures->haveItemColors()) +#ifdef TMWA_SUPPORT + if (Net::getNetworkType() == ServerType::TMWATHENA) { mItemName->setCaption(strprintf("%s (+%u), %d", - ii.getName(item->getColor()).c_str(), + ii.getName().c_str(), CAST_U32(item->getRefine()), ii.getId())); } else +#endif // TMWA_SUPPORT { mItemName->setCaption(strprintf("%s (+%u), %d", - ii.getName().c_str(), + ii.getName(item->getColor()).c_str(), CAST_U32(item->getRefine()), ii.getId())); } @@ -219,17 +222,19 @@ void ItemPopup::setItem(const ItemInfo &item, mLastColor = color; mLastId = id; - if (serverFeatures->haveItemColors()) +#ifdef TMWA_SUPPORT + if (Net::getNetworkType() == ServerType::TMWATHENA) { mItemName->setCaption(strprintf("%s, %d", - item.getName(color).c_str(), id)); - mItemDesc->setTextWrapped(item.getDescription(color), 196); + item.getName().c_str(), id)); + mItemDesc->setTextWrapped(item.getDescription(), 196); } else +#endif // TMWA_SUPPORT { mItemName->setCaption(strprintf("%s, %d", - item.getName().c_str(), id)); - mItemDesc->setTextWrapped(item.getDescription(), 196); + item.getName(color).c_str(), id)); + mItemDesc->setTextWrapped(item.getDescription(color), 196); } mItemName->adjustSize(); -- cgit v1.2.3-60-g2f50