forked from github/server
Bugfix: spellnames sind nicht von sp->info abhängig.
This commit is contained in:
parent
46cb474885
commit
046290ebdb
|
@ -810,20 +810,15 @@ cr_output_unit(FILE * F, const region * r,
|
||||||
fprintf(F, "SPRUECHE\n");
|
fprintf(F, "SPRUECHE\n");
|
||||||
for (;slist; slist = slist->next) {
|
for (;slist; slist = slist->next) {
|
||||||
spell * sp = slist->data;
|
spell * sp = slist->data;
|
||||||
const char * name = sp->sname;
|
if (sp->level <= t) {
|
||||||
if (sp->level > t) continue;
|
const char * name = add_translation(mkname("spell", sp->sname), spell_name(sp, f->locale));
|
||||||
if (sp->info==NULL) {
|
fprintf(F, "\"%s\"\n", name);
|
||||||
name = add_translation(mkname("spell", name), spell_name(sp, f->locale));
|
|
||||||
}
|
}
|
||||||
fprintf(F, "\"%s\"\n", name);
|
|
||||||
}
|
}
|
||||||
for (i=0;i!=MAXCOMBATSPELLS;++i) {
|
for (i=0;i!=MAXCOMBATSPELLS;++i) {
|
||||||
const spell * sp = mage->combatspells[i].sp;
|
const spell * sp = mage->combatspells[i].sp;
|
||||||
if (sp) {
|
if (sp) {
|
||||||
const char * name = sp->sname;
|
const char * name = add_translation(mkname("spell", sp->sname), spell_name(sp, f->locale));
|
||||||
if (sp->info==NULL) {
|
|
||||||
name = add_translation(mkname("spell", name), spell_name(sp, f->locale));
|
|
||||||
}
|
|
||||||
fprintf(F, "KAMPFZAUBER %d\n", i);
|
fprintf(F, "KAMPFZAUBER %d\n", i);
|
||||||
fprintf(F, "\"%s\";name\n", name);
|
fprintf(F, "\"%s\";name\n", name);
|
||||||
fprintf(F, "%d;level\n", mage->combatspells[i].level);
|
fprintf(F, "%d;level\n", mage->combatspells[i].level);
|
||||||
|
@ -968,10 +963,7 @@ cr_reportspell(FILE * F, spellid_t id, const struct locale * lang)
|
||||||
{
|
{
|
||||||
int k;
|
int k;
|
||||||
spell *sp = find_spellbyid(id);
|
spell *sp = find_spellbyid(id);
|
||||||
const char * name = sp->sname;
|
const char * name = add_translation(mkname("spell", sp->sname), spell_name(sp, lang));
|
||||||
if (sp->info==NULL) {
|
|
||||||
name = add_translation(mkname("spell", name), spell_name(sp, lang));
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(F, "ZAUBER %d\n", hashstring(spell_name(sp, default_locale)));
|
fprintf(F, "ZAUBER %d\n", hashstring(spell_name(sp, default_locale)));
|
||||||
fprintf(F, "\"%s\";name\n", name);
|
fprintf(F, "\"%s\";name\n", name);
|
||||||
|
|
|
@ -7517,12 +7517,12 @@ init_spellnames(const struct locale * lang, magic_t mtype)
|
||||||
sn->mtype = mtype;
|
sn->mtype = mtype;
|
||||||
for (slist=spells;slist!=NULL;slist=slist->next) {
|
for (slist=spells;slist!=NULL;slist=slist->next) {
|
||||||
spell * sp = slist->data;
|
spell * sp = slist->data;
|
||||||
const char * n = sp->sname;
|
if (sp->magietyp==mtype) {
|
||||||
variant token;
|
const char * n = spell_name(sp, lang);
|
||||||
if (sp->magietyp!=mtype) continue;
|
variant token;
|
||||||
if (sp->info==NULL) n = locale_string(lang, mkname("spell", n));
|
token.v = sp;
|
||||||
token.v = sp;
|
addtoken(&sn->names, n, token);
|
||||||
addtoken(&sn->names, n, token);
|
}
|
||||||
}
|
}
|
||||||
return spellnames = sn;
|
return spellnames = sn;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue