diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/itemdb.cpp | 3 | ||||
-rw-r--r-- | src/resources/iteminfo.cpp | 3 | ||||
-rw-r--r-- | src/resources/iteminfo.h | 7 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index 346ddb9de..b4ae544ba 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -269,6 +269,9 @@ void ItemDB::load() itemInfo->setType(itemTypeFromString(typeStr)); itemInfo->addTag(mTags["All"]); itemInfo->setPet(pet); + itemInfo->setProtected(XML::getBoolProperty( + node, "sellProtected", false)); + switch (itemInfo->getType()) { case ITEM_USABLE: diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index 3a2b3e836..e9a550cda 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -61,7 +61,8 @@ ItemInfo::ItemInfo() : mMissEffectId(-1), maxFloorOffset(32), mPickupCursor(Cursor::CURSOR_POINTER), - mPet(0) + mPet(0), + mProtected(false) { for (int f = 0; f < 10; f ++) { diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 64855bc0a..c1c9f9d27 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -286,6 +286,12 @@ class ItemInfo final Cursor::Cursor getPickupCursor() const A_WARN_UNUSED { return mPickupCursor; } + void setProtected(bool b) + { mProtected = b; } + + bool isProtected() const + { return mProtected; } + int mDrawBefore[10]; int mDrawAfter[10]; int mDrawPriority[10]; @@ -331,6 +337,7 @@ class ItemInfo final int maxFloorOffset; Cursor::Cursor mPickupCursor; int mPet; + bool mProtected; }; #endif |