From c6997f8ee41d5f85dd8a1269e82982e1ab0b5c74 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 11 Nov 2015 21:29:51 +0300 Subject: In personal shops in sell dialog shop no existing items with amount 0 and disabled. Only for legacy servers. --- src/gui/widgets/selldialog.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/gui/widgets/selldialog.cpp') diff --git a/src/gui/widgets/selldialog.cpp b/src/gui/widgets/selldialog.cpp index 3ad8e5e7e..76cea21f2 100644 --- a/src/gui/widgets/selldialog.cpp +++ b/src/gui/widgets/selldialog.cpp @@ -218,18 +218,19 @@ void SellDialog::addItem(const Item *const item, const int price) mShopItemList->adjustSize(); } -void SellDialog::addItem(const int id, - const int type, - const ItemColor color, - const int amount, - const int price) +ShopItem *SellDialog::addItem(const int id, + const int type, + const ItemColor color, + const int amount, + const int price) { - mShopItems->addItem(id, + ShopItem *const item = mShopItems->addItem(id, type, color, amount, price); mShopItemList->adjustSize(); + return item; } -- cgit v1.2.3-70-g09d2