diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-06-23 12:21:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-06-23 17:36:25 +0300 |
commit | 4c57a567eec8b3df0b0009b5520d647cccb83338 (patch) | |
tree | 6677639ab67b1209532d20d0ebffa52e4227cdc8 /src/gui/widgets | |
parent | a685e41954590525f5a9f215dbd37a286ae2bd37 (diff) | |
download | manaplus-4c57a567eec8b3df0b0009b5520d647cccb83338.tar.gz manaplus-4c57a567eec8b3df0b0009b5520d647cccb83338.tar.bz2 manaplus-4c57a567eec8b3df0b0009b5520d647cccb83338.tar.xz manaplus-4c57a567eec8b3df0b0009b5520d647cccb83338.zip |
Add support for protecting items.
Protected item cant be selled, traded, dropped, used.
Protect/unprotect item can be from context menu.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/shoplistbox.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp index 615b93010..827bb6755 100644 --- a/src/gui/widgets/shoplistbox.cpp +++ b/src/gui/widgets/shoplistbox.cpp @@ -24,6 +24,7 @@ #include "client.h" #include "configuration.h" +#include "playerinfo.h" #include "shopitem.h" #include "gui/itempopup.h" @@ -107,8 +108,8 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics) gcn::Color* backgroundColor = &mBackgroundColor; ShopItem *const item = mShopItems->at(i); - if (mShopItems && item && - mPlayerMoney < item->getPrice() && mPriceCheck) + if ((mShopItems && item && mPlayerMoney < item->getPrice() + && mPriceCheck) || PlayerInfo::isItemProtected(item->getId())) { if (i != mSelected) { |