From 978242f52cf1a9cdc520b2e80af19790c6082ca8 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 22 Apr 2006 18:43:58 +0000 Subject: [PATCH] =?UTF-8?q?b=C3=B6ser=20fehler=20in=20der=20fix=5Ffamiliar?= =?UTF-8?q?()=20routine=20von=20letzter=20woche.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/eressea/korrektur.c | 60 ----------------------------------------- 1 file changed, 60 deletions(-) diff --git a/src/eressea/korrektur.c b/src/eressea/korrektur.c index 5e6c7568f..c64b5acb1 100644 --- a/src/eressea/korrektur.c +++ b/src/eressea/korrektur.c @@ -848,65 +848,6 @@ check_mages(void) return 0; } -static int -fix_familiars(void) -{ - const struct locale * lang = find_locale("en"); - region * r; - for (r=regions;r;r=r->next) { - unit * u; - for (u=r->units;u;u=u->next) { - if (u->faction->no!=MONSTER_FACTION && u->race->init_familiar) { - attrib * a = a_find(u->attribs, &at_familiar); - if (a!=NULL) { - /* this is a familiar */ - unit * mage = get_familiar_mage(u); - equipment * eq; - char fname[64]; - - if (mage==0) { - log_error(("%s was a %s familiar with no mage for faction %s\n", - unitid(u), racename(lang, u, u->race), - factionid(u->faction))); - remove_familiar(u); - } else if (!is_mage(mage)) { - log_error(("%s was a %s familiar, but %s is not a mage for faction %s\n", - unitid(u), racename(lang, u, u->race), unitid(mage), - factionid(u->faction))); - remove_familiar(u); - } else if (has_skill(u, SK_MAGIC) && !is_mage(u)) { - log_error(("%s is a familiar with magic skill, but did not have a mage-attribute\n", - unitid(u))); - create_mage(u, M_GRAU); - } - - snprintf(fname, sizeof(fname), "%s_familiar", u->race->_name[0]); - eq = get_equipment(fname); - if (eq) { - spell_list * sp = eq->spells; - - if (sp!=NULL) { - sc_mage * m = get_mage(u); - if (m==NULL) { - log_error(("%s is a %s-familiar with spells, but did not have a mage-attribute\n", - unitid(u), racename(lang, u, u->race))); - create_mage(u, M_GRAU); - } - while (sp) { - if (!has_spell(u, sp->data)) { - add_spell(m, sp->data); - } - sp = sp->next; - } - } - } - } - } - } - } - return 0; -} - static int fix_resources(void) { @@ -1044,7 +985,6 @@ korrektur(void) */ fix_demands(); fix_otherfaction(); - fix_familiars(); check_mages(); do_once("tfrs", &fix_resources); /* trade_orders(); */