forked from github/server
race-prefix bug fixed
This commit is contained in:
parent
0c6022e0ae
commit
338b4185be
|
@ -51,11 +51,6 @@ new_group(faction * f, const char * name, int gid)
|
|||
g->name = strdup(name);
|
||||
g->gid = gid;
|
||||
|
||||
a = a_find(f->attribs, &at_raceprefix);
|
||||
if(a) {
|
||||
a_add(&g->attribs, a_new(&at_raceprefix))->data.v = strdup((char *)a->data.v);
|
||||
}
|
||||
|
||||
g->nexthash = ghash[index];
|
||||
return ghash[index] = g;
|
||||
}
|
||||
|
|
|
@ -351,12 +351,12 @@ rc_name(const race * rc, int n)
|
|||
const char *
|
||||
raceprefix(const unit *u)
|
||||
{
|
||||
attrib * agroup = a_find(u->attribs, &at_group);
|
||||
attrib * asource = u->faction->attribs;
|
||||
attrib * a2 = NULL;
|
||||
const attrib * agroup = a_findc(u->attribs, &at_group);
|
||||
const attrib * asource = u->faction->attribs;
|
||||
const attrib * a2 = NULL;
|
||||
|
||||
if (agroup!=NULL) asource = ((group *)(agroup->data.v))->attribs;
|
||||
a2 = a_find(asource, &at_raceprefix);
|
||||
if (agroup!=NULL) asource = ((const group *)(agroup->data.v))->attribs;
|
||||
a2 = a_findc(asource, &at_raceprefix);
|
||||
|
||||
if (a2!=NULL) return (const char *)a2->data.v;
|
||||
return NULL;
|
||||
|
|
|
@ -108,7 +108,7 @@ a_add(attrib ** pa, attrib * a)
|
|||
}
|
||||
if (a->type->flags & ATF_UNIQUE && *find) {
|
||||
if ((*find)->type == a->type) {
|
||||
/* fprintf(stderr, "duplicate attribute: %s\n", a->type->name); */
|
||||
log_printf(stderr, "duplicate attribute: %s\n", a->type->name);
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -828,8 +828,8 @@
|
|||
<arg name="object" type="string"></arg>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) in $region($region): '$command' - $unit($unit) erschafft $int($amount) ${object}."</text>
|
||||
<text locale="fr">"$unit($unit) in $region($region): '$command' - $unit($unit) creates $int($amount) ${item}."</text>
|
||||
<text locale="en">"$unit($unit) in $region($region): '$command' - $unit($unit) creates $int($amount) ${item}."</text>
|
||||
<text locale="fr">"$unit($unit) in $region($region): '$command' - $unit($unit) creates $int($amount) ${object}."</text>
|
||||
<text locale="en">"$unit($unit) in $region($region): '$command' - $unit($unit) creates $int($amount) ${object}."</text>
|
||||
</message>
|
||||
<message name="use_tacticcrystal" section="magic">
|
||||
<type>
|
||||
|
|
Loading…
Reference in New Issue