summaryrefslogtreecommitdiff
path: root/src/resources/db/npcdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/db/npcdb.cpp')
-rw-r--r--src/resources/db/npcdb.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/resources/db/npcdb.cpp b/src/resources/db/npcdb.cpp
index 3362c02c9..1827cd859 100644
--- a/src/resources/db/npcdb.cpp
+++ b/src/resources/db/npcdb.cpp
@@ -118,23 +118,21 @@ void NPCDB::loadXmlFile(const std::string &fileName)
{
if (xmlNameEqual(spriteNode, "sprite"))
{
- if (!spriteNode->xmlChildrenNode)
+ if (!XmlHaveChildContent(spriteNode))
continue;
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"))
{
- if (!spriteNode->xmlChildrenNode)
+ if (!XmlHaveChildContent(spriteNode))
continue;
- display.particles.push_back(reinterpret_cast<const char*>(
- spriteNode->xmlChildrenNode->content));
+ display.particles.push_back(XmlChildContent(spriteNode));
}
else if (xmlNameEqual(spriteNode, "menu"))
{