summaryrefslogtreecommitdiff
path: root/src/gui/windows/shopwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-24 23:29:04 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-24 23:29:04 +0300
commit4e97da8e138b21a5f5bea75e6a8d3211e4f28594 (patch)
treec10d3cad963066a908ebd42041723e110a0c9bf0 /src/gui/windows/shopwindow.cpp
parentca0ca278d0c4aed9a6d50bb9a8982f5261151ab8 (diff)
downloadmv-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.tar.gz
mv-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.tar.bz2
mv-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.tar.xz
mv-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.zip
Add enum for item types.
Diffstat (limited to 'src/gui/windows/shopwindow.cpp')
-rw-r--r--src/gui/windows/shopwindow.cpp29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 679bbc47f..eb07c90dc 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -562,12 +562,20 @@ void ShopWindow::loadList()
if (tokens[1] && tokens[2])
{
mBuyShopItems->addItem(
- tokens[0], 0, ItemColor_one, tokens[1], tokens[2]);
+ tokens[0],
+ ItemType::Unknown,
+ ItemColor_one,
+ tokens[1],
+ tokens[2]);
}
if (tokens[3] && tokens[4])
{
mSellShopItems->addItem(
- tokens[0], 0, ItemColor_one, tokens[3], tokens[4]);
+ tokens[0],
+ ItemType::Unknown,
+ ItemColor_one,
+ tokens[3],
+ tokens[4]);
}
}
}
@@ -855,7 +863,13 @@ void ShopWindow::showList(const std::string &nick, std::string data)
int amount = decodeStr(data.substr(f + 6, 3));
// +++ need impliment colors?
if (buyDialog && amount > 0)
- buyDialog->addItem(id, 0, ItemColor_one, amount, price);
+ {
+ buyDialog->addItem(id,
+ ItemType::Unknown,
+ ItemColor_one,
+ amount,
+ price);
+ }
if (sellDialog)
{
// +++ need support for colors
@@ -870,7 +884,7 @@ void ShopWindow::showList(const std::string &nick, std::string data)
amount = 0;
}
ShopItem *const shopItem = sellDialog->addItem(id,
- 0,
+ ItemType::Unknown,
ItemColor_one,
amount,
price);
@@ -940,7 +954,12 @@ void ShopWindow::processRequest(const std::string &nick, std::string data,
delete mTradeItem;
// +++ need impliment colors?
- mTradeItem = new ShopItem(-1, id, 0, ItemColor_one, amount, price);
+ mTradeItem = new ShopItem(-1,
+ id,
+ ItemType::Unknown,
+ ItemColor_one,
+ amount,
+ price);
if (mode == BUY)
{