From fa68f4ad4b2f776af834f8209b51761f6c2ba125 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 16 Aug 2011 22:52:46 +0300 Subject: Show shop sign to other players only if shop is not empty. --- src/gui/shopwindow.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/gui/shopwindow.cpp') diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp index 68ea57314..4311a04d2 100644 --- a/src/gui/shopwindow.cpp +++ b/src/gui/shopwindow.cpp @@ -803,3 +803,12 @@ int ShopWindow::sumAmount(Item *shopItem) } return sum; } + +bool ShopWindow::isShopEmpty() +{ + if (!mBuyShopItems || !mSellShopItems) + return true; + if (mBuyShopItems->empty() && mSellShopItems->empty()) + return true; + return false; +} -- cgit v1.2.3-60-g2f50