Vertrauter hat keine Zauber
- Korrekturroutine komplett
This commit is contained in:
Enno Rehling 2006-02-26 15:48:56 +00:00
parent d598babbb1
commit d5b6803137
1 changed files with 11 additions and 10 deletions

View File

@ -834,7 +834,7 @@ fix_familiars(void)
for (r=regions;r;r=r->next) { for (r=regions;r;r=r->next) {
unit * u; unit * u;
for (u=r->units;u;u=u->next) if (u->faction->no!=MONSTER_FACTION) { for (u=r->units;u;u=u->next) if (u->faction->no!=MONSTER_FACTION) {
if (u->race->init_familiar && u->race->maintenance==0) { if (u->race->init_familiar) {
/* this is a familiar */ /* this is a familiar */
unit * mage = get_familiar_mage(u); unit * mage = get_familiar_mage(u);
equipment * eq; equipment * eq;
@ -855,7 +855,7 @@ fix_familiars(void)
create_mage(u, M_GRAU); create_mage(u, M_GRAU);
} }
snprintf(fname, sizeof(fname), "initfamiliar_%s", u->race->_name[0]); snprintf(fname, sizeof(fname), "%s_familiar", u->race->_name[0]);
eq = get_equipment(fname); eq = get_equipment(fname);
if (eq) { if (eq) {
spell_list * sp = eq->spells; spell_list * sp = eq->spells;
@ -866,11 +866,12 @@ fix_familiars(void)
log_error(("%s is a %s-familiar with spells, but did not have a mage-attribute\n", log_error(("%s is a %s-familiar with spells, but did not have a mage-attribute\n",
unitid(u), racename(lang, u, u->race))); unitid(u), racename(lang, u, u->race)));
create_mage(u, M_GRAU); create_mage(u, M_GRAU);
} else {
while (sp) {
add_spell(m, sp->data);
sp = sp->next;
} }
while (sp) {
if (!has_spell(u, sp->data)) {
add_spell(m, sp->data);
}
sp = sp->next;
} }
} }
} }