mapper should not try to load gamecode functions of objects

This commit is contained in:
Enno Rehling 2005-10-16 19:19:40 +00:00
parent d4a0c6c06c
commit 40385e2d3e
1 changed files with 105 additions and 97 deletions

View File

@ -279,6 +279,7 @@ parse_buildings(xmlDocPtr doc)
xml_readconstruction(xpath, result->nodesetval->nodeTab, result->nodesetval->nodeNr, &bt->construction);
xmlXPathFreeObject(result);
if (gamecode_enabled) {
/* reading eressea/buildings/building/function */
xpath->node = node;
result = xmlXPathEvalExpression(BAD_CAST "function", xpath);
@ -305,6 +306,7 @@ parse_buildings(xmlDocPtr doc)
xmlFree(property);
}
xmlXPathFreeObject(result);
}
/* reading eressea/buildings/building/maintenance */
result = xmlXPathEvalExpression(BAD_CAST "maintenance", xpath);
@ -808,6 +810,7 @@ parse_resources(xmlDocPtr doc)
free(names[0]);
free(names[1]);
if (gamecode_enabled) {
/* reading eressea/resources/resource/function */
xpath->node = node;
result = xmlXPathEvalExpression(BAD_CAST "function", xpath);
@ -837,6 +840,7 @@ parse_resources(xmlDocPtr doc)
xmlFree(property);
}
xmlXPathFreeObject(result);
}
/* reading eressea/resources/resource/resourcelimit/function */
xpath->node = node;
@ -1088,6 +1092,7 @@ parse_spells(xmlDocPtr doc)
if (xml_bvalue(node, "ocean", false)) sp->sptyp |= OCEANCASTABLE;
if (xml_bvalue(node, "far", false)) sp->sptyp |= FARCASTING;
if (gamecode_enabled) {
/* reading eressea/spells/spell/function */
xpath->node = node;
result = xmlXPathEvalExpression(BAD_CAST "function", xpath);
@ -1114,6 +1119,7 @@ parse_spells(xmlDocPtr doc)
xmlFree(property);
}
xmlXPathFreeObject(result);
}
/* reading eressea/spells/spell/resource */
xpath->node = node;
@ -1278,6 +1284,7 @@ parse_races(xmlDocPtr doc)
}
xmlXPathFreeObject(result);
if (gamecode_enabled) {
/* reading eressea/races/race/function */
xpath->node = node;
result = xmlXPathEvalExpression(BAD_CAST "function", xpath);
@ -1310,6 +1317,7 @@ parse_races(xmlDocPtr doc)
xmlFree(property);
}
xmlXPathFreeObject(result);
}
/* reading eressea/races/race/familiar */
xpath->node = node;