forked from github/server
- MACHE Holz scheitert an xmlreader Bugs
This commit is contained in:
parent
ef2165e764
commit
6c3f4e7e79
|
@ -1323,7 +1323,7 @@ allocate_resource(unit * u, const resource_type * rtype, int want)
|
||||||
|
|
||||||
resource_mod * mod = rdata->modifiers;
|
resource_mod * mod = rdata->modifiers;
|
||||||
for (;mod->flags!=0;++mod) {
|
for (;mod->flags!=0;++mod) {
|
||||||
if (mod->flags & RMF_SKILL) {
|
if (mod->flags & RMF_SAVEMATERIAL) {
|
||||||
if (mod->btype==NULL || mod->btype==btype) {
|
if (mod->btype==NULL || mod->btype==btype) {
|
||||||
if (mod->race==NULL || mod->race==u->race) {
|
if (mod->race==NULL || mod->race==u->race) {
|
||||||
al->save *= mod->value.f;
|
al->save *= mod->value.f;
|
||||||
|
|
|
@ -968,13 +968,13 @@ parse_resources(xmlDocPtr doc)
|
||||||
|
|
||||||
property = xmlGetProp(node, BAD_CAST "type");
|
property = xmlGetProp(node, BAD_CAST "type");
|
||||||
assert(property!=NULL);
|
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].value.i = xml_ivalue(node, "value", 0);
|
||||||
rdata->modifiers[k].flags |= RMF_SKILL;
|
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].value.f = (float)xml_fvalue(node, "value", 0);
|
||||||
rdata->modifiers[k].flags |= RMF_SAVEMATERIAL;
|
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].value.f = (float)xml_fvalue(node, "value", 0);
|
||||||
rdata->modifiers[k].flags |= RMF_SAVERESOURCE;
|
rdata->modifiers[k].flags |= RMF_SAVERESOURCE;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue