From 26a4a4ddfde04ae02964c434063d74d82e3a2143 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 21 Oct 2014 15:08:07 +0300 Subject: Add card fields into item. --- src/item.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/item.h') diff --git a/src/item.h b/src/item.h index 842e0d79b..13f34499b 100644 --- a/src/item.h +++ b/src/item.h @@ -31,6 +31,8 @@ class Image; +const int maxCards = 4; + /** * Represents one or more instances of a certain item type. */ @@ -189,6 +191,12 @@ class Item notfinal bool getFavorite() const A_WARN_UNUSED { return mFavorite; } + void setCard(const int index, const int id); + + int getCard(const int index) const; + + void setCards(const int *const cards, const int size); + int mId; /**< Item type id. */ unsigned char mColor; int mQuantity; /**< Number of items. */ @@ -197,6 +205,7 @@ class Item notfinal Image *mImage; /**< Item image. */ std::string mDescription; std::map mTags; + int mCards[maxCards]; uint8_t mRefine; /**< Item refine level. */ int mInvIndex; /**< Inventory index. */ bool mEquipment; /**< Item is equipment. */ -- cgit v1.2.3-60-g2f50