Clearing every mage's spell-list before each turn is counter-productive. It destroys tests, and it doesn't let us have special spells added per-unit.

This commit is contained in:
Enno Rehling 2010-08-08 23:39:21 -07:00
parent 240aae8c58
commit beec74e0c6
2 changed files with 3 additions and 9 deletions

View File

@ -522,7 +522,9 @@ unit_addspell(unit * u, const char * name)
slist=slist->next;
}
if (!spadd) log_error(("spell %s could not be found\n", name));
else add_spell(starget, spadd);
else {
add_spell(starget, spadd);
}
}
static int

View File

@ -3596,14 +3596,6 @@ update_spells(void)
if (FactionSpells() && maxlevel>f->max_spelllevel) {
update_spellbook(f, maxlevel);
for (i=0;i!=n;++i) {
sc_mage *mage = get_mage(mages[i]);
while (mage->spells) {
spell_list * slist = mage->spells;
mage->spells = slist->next;
free(slist);
}
}
}
for (i=0;i!=n;++i) {
updatespelllist(mages[i]);