From 4e97da8e138b21a5f5bea75e6a8d3211e4f28594 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 24 Mar 2016 23:29:04 +0300 Subject: Add enum for item types. --- src/resources/item/item.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/resources/item/item.h') diff --git a/src/resources/item/item.h b/src/resources/item/item.h index 9a910c31b..d0bb9b9f3 100644 --- a/src/resources/item/item.h +++ b/src/resources/item/item.h @@ -25,6 +25,8 @@ #include "const/resources/item/cards.h" +#include "enums/resources/itemtype.h" + #include "enums/simpletypes/damaged.h" #include "enums/simpletypes/equipm.h" #include "enums/simpletypes/equipped.h" @@ -48,7 +50,7 @@ class Item notfinal * Constructor. */ Item(const int id, - const int type, + const ItemTypeT type, const int quantity, const uint8_t refine, const ItemColor color, @@ -209,10 +211,10 @@ class Item notfinal const int *getCards() const { return mCards; } - void setType(const int type) + void setType(const ItemTypeT type) { mType = type; } - int getType() const A_WARN_UNUSED + ItemTypeT getType() const A_WARN_UNUSED { return mType; } void setTag(const int tag) @@ -225,7 +227,7 @@ class Item notfinal void updateColor(); - int mId; /**< Item type id. */ + int mId; /**< Item id. */ ItemColor mColor; int mQuantity; /**< Number of items. */ int mTag; @@ -237,7 +239,7 @@ class Item notfinal int mCards[maxCards]; uint8_t mRefine; /**< Item refine level. */ int mInvIndex; /**< Inventory index. */ - int mType; /**< Item type. */ + ItemTypeT mType; /**< Item type. */ Equipm mEquipment; /**< Item is equipment. */ Equipped mEquipped; /**< Item is equipped. */ bool mInEquipment; /**< Item is in equipment */ -- cgit v1.2.3-70-g09d2