diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2007-04-23 00:48:37 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2007-04-23 00:48:37 +0000 |
commit | b3376bfe4e26591e1dc1066d8f2270baf4f9f759 (patch) | |
tree | 6cba270a59320bf7c77266fe736cfb68bc2521a0 /src/resources/monsterdb.cpp | |
parent | 6d09c8f4667f75fece4a5549de237e17490398cf (diff) | |
download | mana-b3376bfe4e26591e1dc1066d8f2270baf4f9f759.tar.gz mana-b3376bfe4e26591e1dc1066d8f2270baf4f9f759.tar.bz2 mana-b3376bfe4e26591e1dc1066d8f2270baf4f9f759.tar.xz mana-b3376bfe4e26591e1dc1066d8f2270baf4f9f759.zip |
Merged Björn Steinbrinks improvements at the xml parsing from trunk version.
Diffstat (limited to 'src/resources/monsterdb.cpp')
-rw-r--r-- | src/resources/monsterdb.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp index e4406f9c..ac3ac3bc 100644 --- a/src/resources/monsterdb.cpp +++ b/src/resources/monsterdb.cpp @@ -18,7 +18,7 @@ * along with The Mana World; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id:
+ * $Id$
*/
#include "monsterdb.h"
@@ -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"))
{
|