summaryrefslogtreecommitdiff
path: root/src/gui/windows/shopwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-15 00:14:39 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-15 00:14:39 +0300
commitc2f007b58743491dc9250f09137ad847043b840d (patch)
tree472ce728623054a7b58141c16118e53a2837759b /src/gui/windows/shopwindow.cpp
parentc7f54151ba693e7f57378b77cc567d5aa26cf4cf (diff)
downloadmv-c2f007b58743491dc9250f09137ad847043b840d.tar.gz
mv-c2f007b58743491dc9250f09137ad847043b840d.tar.bz2
mv-c2f007b58743491dc9250f09137ad847043b840d.tar.xz
mv-c2f007b58743491dc9250f09137ad847043b840d.zip
eathena: impliment packet SMSG_BUYINGSTORE_OWN_ITEMS.
Diffstat (limited to 'src/gui/windows/shopwindow.cpp')
-rw-r--r--src/gui/windows/shopwindow.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 6490ff746..bed828f0a 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -88,6 +88,7 @@ ShopWindow::ShopWindow() :
SelectionListener(),
VendingModeListener(),
VendingSlotsListener(),
+ BuyingStoreModeListener(),
BuyingStoreSlotsListener(),
// TRANSLATORS: shop window button
mCloseButton(new Button(this, _("Close"), "close", this)),
@@ -121,6 +122,7 @@ ShopWindow::ShopWindow() :
mBuyShopSize(0),
isBuySelected(true),
mHaveVending(serverFeatures->haveVending()),
+ mEnableBuyingStore(false),
mEnableVending(false)
{
mBuyShopItemList->postInit();
@@ -1063,3 +1065,12 @@ void ShopWindow::buyingStoreSlotsChanged(const int slots)
mBuyShopSize = slots;
updateButtonsAndLabels();
}
+
+void ShopWindow::buyingStoreEnabled(const bool b)
+{
+ mEnableBuyingStore = b;
+ localPlayer->enableShop(b);
+ if (!b)
+ mBuyShopSize = 0;
+ updateButtonsAndLabels();
+}