summaryrefslogtreecommitdiff
path: root/src/resources/item/item.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-24 23:29:04 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-24 23:29:04 +0300
commit4e97da8e138b21a5f5bea75e6a8d3211e4f28594 (patch)
treec10d3cad963066a908ebd42041723e110a0c9bf0 /src/resources/item/item.h
parentca0ca278d0c4aed9a6d50bb9a8982f5261151ab8 (diff)
downloadplus-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.tar.gz
plus-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.tar.bz2
plus-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.tar.xz
plus-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.zip
Add enum for item types.
Diffstat (limited to 'src/resources/item/item.h')
-rw-r--r--src/resources/item/item.h12
1 files changed, 7 insertions, 5 deletions
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 */