summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorStefan Dombrowski <stefan@uni-bonn.de>2011-04-29 09:32:10 +0200
committerStefan Dombrowski <stefan@uni-bonn.de>2011-04-29 09:32:10 +0200
commitf450d1e7d0238a8126f2fe419aa019767290f9fb (patch)
treedb8a6e11ccd0e2a80b6c2e9f3ae93093523947bf /src/resources
parent79ecbe05884988f791c27190797a005f827369de (diff)
downloadmana-client-f450d1e7d0238a8126f2fe419aa019767290f9fb.tar.gz
mana-client-f450d1e7d0238a8126f2fe419aa019767290f9fb.tar.bz2
mana-client-f450d1e7d0238a8126f2fe419aa019767290f9fb.tar.xz
mana-client-f450d1e7d0238a8126f2fe419aa019767290f9fb.zip
Making the check for the node name earlier while reading items.xml
Reviewed-by: Jaxad0127
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/itemdb.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index 1f17865f..bb8e3bce 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -180,9 +180,6 @@ void ItemDB::unload()
void ItemDB::loadCommonRef(ItemInfo *itemInfo, xmlNodePtr node)
{
- if (!xmlStrEqual(node->name, BAD_CAST "item"))
- return;
-
int id = XML::getProperty(node, "id", 0);
if (!id)
@@ -332,6 +329,9 @@ void TaItemDB::load()
for_each_xml_child_node(node, rootNode)
{
+ if (!xmlStrEqual(node->name, BAD_CAST "item"))
+ continue;
+
TaItemInfo *itemInfo = new TaItemInfo;
loadCommonRef(itemInfo, node);
@@ -430,6 +430,9 @@ void ManaServItemDB::load()
for_each_xml_child_node(node, rootNode)
{
+ if (!xmlStrEqual(node->name, BAD_CAST "item"))
+ continue;
+
ManaServItemInfo *itemInfo = new ManaServItemInfo;
loadCommonRef(itemInfo, node);