diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-01 17:52:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-01 17:52:56 +0300 |
commit | 87918db755040bb693cb286d8fb0bcfd97d761af (patch) | |
tree | 581d2df22397f829e407d6b5235193e1bf26aac6 /src/gui | |
parent | d8e382e49317adf9717d83509c6975f8958f5043 (diff) | |
download | manaverse-87918db755040bb693cb286d8fb0bcfd97d761af.tar.gz manaverse-87918db755040bb693cb286d8fb0bcfd97d761af.tar.bz2 manaverse-87918db755040bb693cb286d8fb0bcfd97d761af.tar.xz manaverse-87918db755040bb693cb286d8fb0bcfd97d761af.zip |
Remove ServerFeatures haveItemColors because it depend only by server type.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/popups/itempopup.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
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(); |