summaryrefslogtreecommitdiff
path: root/src/shopitem.cpp
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/shopitem.cpp
parentd54c371ad9d3c8a019d7d6bdc0262cd352a06ae5 (diff)
downloadmanaverse-36bf685462f371b306f51a29331e7a1d86ce3a91.tar.gz
manaverse-36bf685462f371b306f51a29331e7a1d86ce3a91.tar.bz2
manaverse-36bf685462f371b306f51a29331e7a1d86ce3a91.tar.xz
manaverse-36bf685462f371b306f51a29331e7a1d86ce3a91.zip
add server feature haveItemColors.
Diffstat (limited to 'src/shopitem.cpp')
-rw-r--r--src/shopitem.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/shopitem.cpp b/src/shopitem.cpp
index 45ab60e05..071247483 100644
--- a/src/shopitem.cpp
+++ b/src/shopitem.cpp
@@ -28,6 +28,9 @@
#include "utils/stringutils.h"
+#include "net/net.h"
+#include "net/serverfeatures.h"
+
#include "debug.h"
extern int serverVersion;
@@ -41,7 +44,7 @@ ShopItem::ShopItem(const int inventoryIndex, const int id,
mPrice(price),
mShowQuantity(true)
{
- if (serverVersion > 0)
+ if (Net::getServerFeatures()->haveItemColors())
{
mDisplayName = std::string(getInfo().getName(color)).append(" (")
.append(Units::formatCurrency(mPrice)).append(") ");
@@ -65,7 +68,7 @@ ShopItem::ShopItem(const int id, const unsigned char color, const int price) :
mPrice(price),
mShowQuantity(false)
{
- if (serverVersion > 0)
+ if (Net::getServerFeatures()->haveItemColors())
{
mDisplayName = std::string(getInfo().getName(color)).append(" (")
.append(Units::formatCurrency(mPrice)).append(")");
@@ -93,7 +96,7 @@ void ShopItem::update()
{
if (mShowQuantity)
{
- if (serverVersion > 0)
+ if (Net::getServerFeatures()->haveItemColors())
{
mDisplayName = std::string(getInfo().getName(mColor)).append(" (")
.append(Units::formatCurrency(mPrice)).append(") ");