summaryrefslogtreecommitdiff
path: root/src/gui/popups/itempopup.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-01 17:52:56 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-01 17:52:56 +0300
commit87918db755040bb693cb286d8fb0bcfd97d761af (patch)
tree581d2df22397f829e407d6b5235193e1bf26aac6 /src/gui/popups/itempopup.cpp
parentd8e382e49317adf9717d83509c6975f8958f5043 (diff)
downloadplus-87918db755040bb693cb286d8fb0bcfd97d761af.tar.gz
plus-87918db755040bb693cb286d8fb0bcfd97d761af.tar.bz2
plus-87918db755040bb693cb286d8fb0bcfd97d761af.tar.xz
plus-87918db755040bb693cb286d8fb0bcfd97d761af.zip
Remove ServerFeatures haveItemColors because it depend only by server type.
Diffstat (limited to 'src/gui/popups/itempopup.cpp')
-rw-r--r--src/gui/popups/itempopup.cpp21
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();