diff options
Diffstat (limited to 'src/resources/monsterdb.cpp')
-rw-r--r-- | src/resources/monsterdb.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp index e773911d..ac3ac3bc 100644 --- a/src/resources/monsterdb.cpp +++ b/src/resources/monsterdb.cpp @@ -72,11 +72,8 @@ MonsterDB::load() }
//iterate <monster>s
- for ( xmlNodePtr monsterNode = rootNode->xmlChildrenNode;
- monsterNode != NULL;
- monsterNode = monsterNode->next)
+ for_each_xml_child_node(monsterNode, rootNode)
{
-
if (!xmlStrEqual(monsterNode->name, BAD_CAST "monster"))
{
continue;
@@ -87,9 +84,7 @@ MonsterDB::load() currentInfo->setName (XML::getProperty(monsterNode, "name", "unnamed"));
//iterate <sprite>s and <sound>s
- for ( xmlNodePtr spriteNode = monsterNode->xmlChildrenNode;
- spriteNode != NULL;
- spriteNode = spriteNode->next)
+ for_each_xml_child_node(spriteNode, monsterNode)
{
if (xmlStrEqual(spriteNode->name, BAD_CAST "sprite"))
{
|