diff options
Diffstat (limited to 'src/resources/db/skillunitdb.cpp')
-rw-r--r-- | src/resources/db/skillunitdb.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/resources/db/skillunitdb.cpp b/src/resources/db/skillunitdb.cpp index d89eca896..30d0b3918 100644 --- a/src/resources/db/skillunitdb.cpp +++ b/src/resources/db/skillunitdb.cpp @@ -111,22 +111,20 @@ void SkillUnitDb::loadXmlFile(const std::string &fileName) SpriteDisplay display; for_each_xml_child_node(spriteNode, skillUnitNode) { - if (!spriteNode->xmlChildrenNode) + if (!XmlHaveChildContent(spriteNode)) continue; if (xmlNameEqual(spriteNode, "sprite")) { SpriteReference *const currentSprite = new SpriteReference; - currentSprite->sprite = reinterpret_cast<const char*>( - spriteNode->xmlChildrenNode->content); + currentSprite->sprite = XmlChildContent(spriteNode); currentSprite->variant = XML::getProperty(spriteNode, "variant", 0); display.sprites.push_back(currentSprite); } else if (xmlNameEqual(spriteNode, "particlefx")) { - std::string particlefx = reinterpret_cast<const char*>( - spriteNode->xmlChildrenNode->content); + std::string particlefx = XmlChildContent(spriteNode); display.particles.push_back(particlefx); } } |