- MACHE Holz scheitert an xmlreader Bugs
This commit is contained in:
Enno Rehling 2006-02-12 11:05:43 +00:00
parent ef2165e764
commit 6c3f4e7e79
2 changed files with 4 additions and 4 deletions

View File

@ -1323,7 +1323,7 @@ allocate_resource(unit * u, const resource_type * rtype, int want)
resource_mod * mod = rdata->modifiers;
for (;mod->flags!=0;++mod) {
if (mod->flags & RMF_SKILL) {
if (mod->flags & RMF_SAVEMATERIAL) {
if (mod->btype==NULL || mod->btype==btype) {
if (mod->race==NULL || mod->race==u->race) {
al->save *= mod->value.f;

View File

@ -968,13 +968,13 @@ parse_resources(xmlDocPtr doc)
property = xmlGetProp(node, BAD_CAST "type");
assert(property!=NULL);
if (strcmp((const char *)property, "skill")) {
if (strcmp((const char *)property, "skill")==0) {
rdata->modifiers[k].value.i = xml_ivalue(node, "value", 0);
rdata->modifiers[k].flags |= RMF_SKILL;
} else if (strcmp((const char *)property, "material")) {
} else if (strcmp((const char *)property, "material")==0) {
rdata->modifiers[k].value.f = (float)xml_fvalue(node, "value", 0);
rdata->modifiers[k].flags |= RMF_SAVEMATERIAL;
} else if (strcmp((const char *)property, "resource")) {
} else if (strcmp((const char *)property, "resource")==0) {
rdata->modifiers[k].value.f = (float)xml_fvalue(node, "value", 0);
rdata->modifiers[k].flags |= RMF_SAVERESOURCE;
} else {