diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-24 23:29:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-24 23:29:04 +0300 |
commit | 4e97da8e138b21a5f5bea75e6a8d3211e4f28594 (patch) | |
tree | c10d3cad963066a908ebd42041723e110a0c9bf0 /src/being | |
parent | ca0ca278d0c4aed9a6d50bb9a8982f5261151ab8 (diff) | |
download | manaplus-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.tar.gz manaplus-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.tar.bz2 manaplus-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.tar.xz manaplus-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.zip |
Add enum for item types.
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/flooritem.cpp | 2 | ||||
-rw-r--r-- | src/being/flooritem.h | 8 | ||||
-rw-r--r-- | src/being/playerinfo.cpp | 3 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/being/flooritem.cpp b/src/being/flooritem.cpp index 72f30998e..00b4ae45a 100644 --- a/src/being/flooritem.cpp +++ b/src/being/flooritem.cpp @@ -46,7 +46,7 @@ extern volatile int cur_time; FloorItem::FloorItem(const BeingId id, const int itemId, const int x, const int y, - const int itemType, + const ItemTypeT itemType, const int amount, const int refine, const ItemColor color, diff --git a/src/being/flooritem.h b/src/being/flooritem.h index bb57039e1..1b5b87d3e 100644 --- a/src/being/flooritem.h +++ b/src/being/flooritem.h @@ -25,6 +25,8 @@ #include "const/resources/item/cards.h" +#include "enums/resources/itemtype.h" + #include "enums/simpletypes/damaged.h" #include "enums/simpletypes/identified.h" #include "enums/simpletypes/itemcolor.h" @@ -54,7 +56,7 @@ class FloorItem final : public ActorSprite FloorItem(const BeingId id, const int itemId, const int x, const int y, - const int itemType, + const ItemTypeT itemType, const int amount, const int refine, const ItemColor color, @@ -121,7 +123,7 @@ class FloorItem final : public ActorSprite int getRefine() const A_WARN_UNUSED { return mRefine; } - int getItemType() const A_WARN_UNUSED + ItemTypeT getItemType() const A_WARN_UNUSED { return mItemType; } Identified getIdentified() const A_WARN_UNUSED @@ -138,7 +140,7 @@ class FloorItem final : public ActorSprite int mAmount; int mRefine; int mHeightPosDiff; - int mItemType; + ItemTypeT mItemType; unsigned int mPickupCount; Cursor::Cursor mCursor; ItemColor mColor; diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp index 04bb267aa..2d8f21056 100644 --- a/src/being/playerinfo.cpp +++ b/src/being/playerinfo.cpp @@ -276,8 +276,7 @@ void useEquipItem(const Item *const item, const Sfx sfx) if (item) { #ifdef EATHENA_SUPPORT - // IT_CARD - if (item->getType() == 6) + if (item->getType() == ItemType::Card) { if (mProtectedItems.find(item->getId()) == mProtectedItems.end()) { |