forked from github/server
- it's log, not wood!
This commit is contained in:
parent
983d17745d
commit
901a08f52d
|
@ -123,6 +123,7 @@ xml_readrequirements(xmlNodePtr * nodeTab, int nodeNr, requirement ** reqArray)
|
||||||
|
|
||||||
property = xmlGetProp(node, BAD_CAST "type");
|
property = xmlGetProp(node, BAD_CAST "type");
|
||||||
rtype = rt_find((const char*)property);
|
rtype = rt_find((const char*)property);
|
||||||
|
assert(rtype!=NULL);
|
||||||
for (type=0;type!=MAX_RESOURCES;++type) {
|
for (type=0;type!=MAX_RESOURCES;++type) {
|
||||||
if (oldresourcetype[type]==rtype) {
|
if (oldresourcetype[type]==rtype) {
|
||||||
radd->type = type;
|
radd->type = type;
|
||||||
|
@ -584,6 +585,8 @@ parse_resources(xmlDocPtr doc)
|
||||||
xmlNodeSetPtr nodes;
|
xmlNodeSetPtr nodes;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
init_resources();
|
||||||
|
|
||||||
/* reading eressea/resources/resource */
|
/* reading eressea/resources/resource */
|
||||||
resources = xmlXPathEvalExpression(BAD_CAST "/eressea/resources/resource", xpath);
|
resources = xmlXPathEvalExpression(BAD_CAST "/eressea/resources/resource", xpath);
|
||||||
nodes = resources->nodesetval;
|
nodes = resources->nodesetval;
|
||||||
|
@ -705,7 +708,6 @@ parse_resources(xmlDocPtr doc)
|
||||||
|
|
||||||
xmlXPathFreeContext(xpath);
|
xmlXPathFreeContext(xpath);
|
||||||
|
|
||||||
init_resources();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@
|
||||||
<resource name="halberd">
|
<resource name="halberd">
|
||||||
<item weight="200">
|
<item weight="200">
|
||||||
<construction skill="sk_weaponsmithing" minskill="3" reqsize="1">
|
<construction skill="sk_weaponsmithing" minskill="3" reqsize="1">
|
||||||
<requirement type="wood" quantity="1"/>
|
<requirement type="log" quantity="1"/>
|
||||||
<requirement type="iron" quantity="1"/>
|
<requirement type="iron" quantity="1"/>
|
||||||
</construction>
|
</construction>
|
||||||
<weapon cut="true" skill="sk_polearm" offmod="-1" defmod="2" magres="0.0">
|
<weapon cut="true" skill="sk_polearm" offmod="-1" defmod="2" magres="0.0">
|
||||||
|
|
Loading…
Reference in New Issue