summaryrefslogtreecommitdiff
path: root/src/resources/itemdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/itemdb.cpp')
-rw-r--r--src/resources/itemdb.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index d60e38da..4638f00e 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -78,6 +78,8 @@ static ItemType itemTypeFromString(const std::string &name, int id = 0)
else if (name=="equip-necklace") return ITEM_EQUIPMENT_NECKLACE;
else if (name=="equip-feet") return ITEM_EQUIPMENT_FEET;
else if (name=="equip-ammo") return ITEM_EQUIPMENT_AMMO;
+ else if (name=="racesprite") return ITEM_SPRITE_RACE;
+ else if (name=="hairsprite") return ITEM_SPRITE_HAIR;
else return ITEM_UNUSABLE;
}
@@ -255,6 +257,15 @@ void ItemDB::unload()
mLoaded = false;
}
+bool ItemDB::exists(int id)
+{
+ assert(mLoaded);
+
+ ItemInfos::const_iterator i = mItemInfos.find(id);
+
+ return i != mItemInfos.end();
+}
+
const ItemInfo &ItemDB::get(int id)
{
assert(mLoaded);