summaryrefslogtreecommitdiff
path: root/src/gui/shopwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-16 22:52:46 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-16 22:52:46 +0300
commitfa68f4ad4b2f776af834f8209b51761f6c2ba125 (patch)
treee6ffa76bedd1ed8bae3b859814482d3cf6359183 /src/gui/shopwindow.cpp
parent658a7a325114783627c7c6c870bfe01791f9f63e (diff)
downloadmv-fa68f4ad4b2f776af834f8209b51761f6c2ba125.tar.gz
mv-fa68f4ad4b2f776af834f8209b51761f6c2ba125.tar.bz2
mv-fa68f4ad4b2f776af834f8209b51761f6c2ba125.tar.xz
mv-fa68f4ad4b2f776af834f8209b51761f6c2ba125.zip
Show shop sign to other players only if shop is not empty.
Diffstat (limited to 'src/gui/shopwindow.cpp')
-rw-r--r--src/gui/shopwindow.cpp9
1 files changed, 9 insertions, 0 deletions
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;
+}