summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-09 23:58:34 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-09 23:58:34 +0200
commit9b680f95087290315c24a04535f1626acd8ec9a7 (patch)
treefbfd4e40e8eeaf0c077266a95e701e01688279e2 /src/resources
parent4893acb9cdbd83349f88668ca932f7fddd3e8288 (diff)
downloadmana-client-9b680f95087290315c24a04535f1626acd8ec9a7.tar.gz
mana-client-9b680f95087290315c24a04535f1626acd8ec9a7.tar.bz2
mana-client-9b680f95087290315c24a04535f1626acd8ec9a7.tar.xz
mana-client-9b680f95087290315c24a04535f1626acd8ec9a7.zip
Actually use ItemType instead of short
Plus some random cleanups.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/itemdb.cpp3
-rw-r--r--src/resources/iteminfo.h6
2 files changed, 4 insertions, 5 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index cf7b976b..036bdea8 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -143,8 +143,7 @@ void ItemDB::load()
itemInfo->setImageName(image);
itemInfo->setName(name.empty() ? _("Unnamed") : name);
itemInfo->setDescription(description);
- int type = itemTypeFromString(typeStr);
- itemInfo->setType(type);
+ itemInfo->setType(itemTypeFromString(typeStr));
itemInfo->setView(view);
itemInfo->setWeight(weight);
itemInfo->setWeaponType(weaponType);
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index 5c76af40..3329d95b 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -156,10 +156,10 @@ class ItemInfo
const std::string &getEffect() const { return mEffect; }
- void setType(short type)
+ void setType(ItemType type)
{ mType = type; }
- short getType() const
+ ItemType getType() const
{ return mType; }
void setWeight(short weight)
@@ -196,7 +196,7 @@ class ItemInfo
std::string mName;
std::string mDescription; /**< Short description. */
std::string mEffect; /**< Description of effects. */
- char mType; /**< Item type. */
+ ItemType mType; /**< Item type. */
std::string mParticle; /**< Particle effect used with this item */
short mWeight; /**< Weight in grams. */
int mView; /**< Item ID of how this item looks. */