From 9be90b76adb1518c4ffe0e365a18c5afcc3158f2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 23 Dec 2014 01:27:45 +0300 Subject: Add item type to item object. --- src/item.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/item.h') diff --git a/src/item.h b/src/item.h index 15ea64a07..80343f400 100644 --- a/src/item.h +++ b/src/item.h @@ -43,6 +43,7 @@ class Item notfinal * Constructor. */ Item(const int id, + const int type, const int quantity, const uint8_t refine, const uint8_t color, @@ -200,6 +201,12 @@ class Item notfinal const int *getCards() const { return mCards; } + void setType(const int type) + { mType = type; } + + int getType() const A_WARN_UNUSED + { return mType; } + int mId; /**< Item type id. */ unsigned char mColor; int mQuantity; /**< Number of items. */ @@ -211,6 +218,7 @@ class Item notfinal int mCards[maxCards]; uint8_t mRefine; /**< Item refine level. */ int mInvIndex; /**< Inventory index. */ + int mType; /**< Item type. */ bool mEquipment; /**< Item is equipment. */ bool mEquipped; /**< Item is equipped. */ bool mInEquipment; /**< Item is in equipment */ -- cgit v1.2.3-60-g2f50