summaryrefslogtreecommitdiff
path: root/src/resources/iteminfo.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-19 00:51:19 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-19 00:51:19 +0300
commit29a93440367af32463f285ae5f0bd2aa23aadc92 (patch)
treef04bcf2f82649a5eb6b729399c49d431959d032c /src/resources/iteminfo.h
parent495b746d928f28ce3e13ff95f26e8cddff2fb06e (diff)
downloadmanaverse-29a93440367af32463f285ae5f0bd2aa23aadc92.tar.gz
manaverse-29a93440367af32463f285ae5f0bd2aa23aadc92.tar.bz2
manaverse-29a93440367af32463f285ae5f0bd2aa23aadc92.tar.xz
manaverse-29a93440367af32463f285ae5f0bd2aa23aadc92.zip
Move itemtype into separate file.
Diffstat (limited to 'src/resources/iteminfo.h')
-rw-r--r--src/resources/iteminfo.h30
1 files changed, 4 insertions, 26 deletions
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index 8d8d18845..8d25ff8f2 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -26,6 +26,7 @@
#include "being/gender.h"
#include "resources/cursor.h"
+#include "resources/itemtype.h"
#include "resources/soundinfo.h"
#include "resources/spritedef.h"
@@ -36,29 +37,6 @@ namespace ColorDB
class ItemColor;
}
-/**
- * Enumeration of available Item types.
- */
-enum ItemType
-{
- ITEM_UNUSABLE = 0,
- ITEM_USABLE,
- ITEM_EQUIPMENT_ONE_HAND_WEAPON,
- ITEM_EQUIPMENT_TWO_HANDS_WEAPON,
- ITEM_EQUIPMENT_TORSO,
- ITEM_EQUIPMENT_ARMS, // 5
- ITEM_EQUIPMENT_HEAD,
- ITEM_EQUIPMENT_LEGS,
- ITEM_EQUIPMENT_SHIELD,
- ITEM_EQUIPMENT_RING,
- ITEM_EQUIPMENT_NECKLACE, // 10
- ITEM_EQUIPMENT_FEET,
- ITEM_EQUIPMENT_AMMO,
- ITEM_EQUIPMENT_CHARM,
- ITEM_SPRITE_RACE,
- ITEM_SPRITE_HAIR // 15
-};
-
// sprite, <itemfrom, itemto>
typedef std::map<int, std::map<int, int> > SpriteToItemMap;
typedef SpriteToItemMap::const_iterator SpriteToItemMapCIter;
@@ -115,10 +93,10 @@ class ItemInfo final
const std::string &getEffect() const A_WARN_UNUSED
{ return mEffect; }
- void setType(const ItemType type)
+ void setType(const ItemType::Type type)
{ mType = type; }
- ItemType getType() const A_WARN_UNUSED
+ ItemType::Type getType() const A_WARN_UNUSED
{ return mType; }
void setWeight(const int weight)
@@ -289,7 +267,7 @@ class ItemInfo final
std::string mName;
std::string mDescription; /**< Short description. */
std::string mEffect; /**< Description of effects. */
- ItemType mType; /**< Item type. */
+ ItemType::Type mType; /**< Item type. */
int mWeight; /**< Weight in grams. */
int mView; /**< Item ID of how this item looks. */
int mId; /**< Item ID */