summaryrefslogtreecommitdiff
path: root/src/resources/db/npcdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-30 13:59:45 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-20 21:58:39 +0300
commitbc3a7cf853510ffe1e42dc683f854d360f6528c7 (patch)
tree9898f13eafc3e1a20388d8d592bfcc05c8f50ba7 /src/resources/db/npcdb.cpp
parenta058af57bddd4a4394401cc75d33461e17aab8c1 (diff)
downloadManaVerse-bc3a7cf853510ffe1e42dc683f854d360f6528c7.tar.gz
ManaVerse-bc3a7cf853510ffe1e42dc683f854d360f6528c7.tar.bz2
ManaVerse-bc3a7cf853510ffe1e42dc683f854d360f6528c7.tar.xz
ManaVerse-bc3a7cf853510ffe1e42dc683f854d360f6528c7.zip
Add pugixml backend incomplete.
Add some defines for xml nodes manipulation. With pugixml backend no xml writing.
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"))
{