summaryrefslogtreecommitdiff
path: root/src/gui/windows/shopwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-01 00:43:24 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-01 00:45:05 +0300
commit2c273a20b2cd3e1628840f2d87df16f0cce9ad33 (patch)
tree853d172e0fd05117d84eda712912ba2843bb87e2 /src/gui/windows/shopwindow.cpp
parent35481061f62111f916a39ce3cac6a314579418f9 (diff)
downloadplus-2c273a20b2cd3e1628840f2d87df16f0cce9ad33.tar.gz
plus-2c273a20b2cd3e1628840f2d87df16f0cce9ad33.tar.bz2
plus-2c273a20b2cd3e1628840f2d87df16f0cce9ad33.tar.xz
plus-2c273a20b2cd3e1628840f2d87df16f0cce9ad33.zip
Set currency to buy dialog based on selected npc type id.
For now this type never set.
Diffstat (limited to 'src/gui/windows/shopwindow.cpp')
-rw-r--r--src/gui/windows/shopwindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index d7b629a4e..b09b44a46 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -23,6 +23,8 @@
#include "gui/windows/shopwindow.h"
#ifdef TMWA_SUPPORT
+#include "const/resources/currency.h"
+
#include "gui/windows/buydialog.h"
#include "gui/windows/chatwindow.h"
#include "gui/windows/confirmdialog.h"
@@ -829,7 +831,7 @@ void ShopWindow::showList(const std::string &nick, std::string data)
if (data.find("B1") == 0)
{
data = data.substr(2);
- CREATEWIDGETV(buyDialog, BuyDialog, nick);
+ CREATEWIDGETV(buyDialog, BuyDialog, nick, DEFAULT_CURRENCY);
}
else if (data.find("S1") == 0)
{
@@ -854,7 +856,6 @@ void ShopWindow::showList(const std::string &nick, std::string data)
const int id = decodeStr(data.substr(f, 2));
const int price = decodeStr(data.substr(f + 2, 4));
int amount = decodeStr(data.substr(f + 6, 3));
- // +++ need impliment colors?
if (buyDialog && amount > 0)
{
buyDialog->addItem(id,
@@ -865,7 +866,6 @@ void ShopWindow::showList(const std::string &nick, std::string data)
}
if (sellDialog)
{
- // +++ need support for colors
const Item *const item = inv->findItem(id, ItemColor_zero);
if (item)
{