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.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index b910c639..77fda11b 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -66,8 +66,9 @@ void ItemDB::loadEmptyItemDefinition()
mUnknown->mName = _("Unknown item");
mUnknown->mDisplay = SpriteDisplay();
std::string errFile = paths.getStringValue("spriteErrorFile");
- mUnknown->setSprite(errFile, GENDER_MALE);
- mUnknown->setSprite(errFile, GENDER_FEMALE);
+ mUnknown->setSprite(errFile, Gender::MALE, 0);
+ mUnknown->setSprite(errFile, Gender::FEMALE, 0);
+ mUnknown->setSprite(errFile, Gender::HIDDEN, 0);
mUnknown->setHitEffectId(paths.getIntValue("hitEffectId"));
mUnknown->setCriticalHitEffectId(paths.getIntValue("criticalHitEffectId"));
}
@@ -122,14 +123,13 @@ void ItemDB::loadSpriteRef(ItemInfo *itemInfo, xmlNodePtr node)
std::string gender = XML::getProperty(node, "gender", "unisex");
std::string filename = (const char*) node->xmlChildrenNode->content;
+ const int race = XML::getProperty(node, "race", 0);
if (gender == "male" || gender == "unisex")
- {
- itemInfo->setSprite(filename, GENDER_MALE);
- }
+ itemInfo->setSprite(filename, Gender::MALE, race);
if (gender == "female" || gender == "unisex")
- {
- itemInfo->setSprite(filename, GENDER_FEMALE);
- }
+ itemInfo->setSprite(filename, Gender::FEMALE, race);
+ if (gender == "hidden" || gender == "other" || gender == "unisex")
+ itemInfo->setSprite(filename, Gender::HIDDEN, race);
}
void ItemDB::loadSoundRef(ItemInfo *itemInfo, xmlNodePtr node)