forked from github/server
stop warning about duplicate spells.
This commit is contained in:
parent
2af300431d
commit
168e1d08d4
1 changed files with 2 additions and 7 deletions
|
@ -430,7 +430,7 @@ update_spellbook(faction * f, int level)
|
||||||
commonspells[numspells++] = sp;
|
commonspells[numspells++] = sp;
|
||||||
} else {
|
} else {
|
||||||
if (know_school(f, sp->magietyp) && sp->level <= level) {
|
if (know_school(f, sp->magietyp) && sp->level <= level) {
|
||||||
add_spell(&f->spellbook, sp);
|
ql_set_insert(&f->spellbook, sp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -524,13 +524,8 @@ create_mage(unit * u, magic_t mtyp)
|
||||||
void
|
void
|
||||||
add_spell(struct quicklist ** slistp, spell * sp)
|
add_spell(struct quicklist ** slistp, spell * sp)
|
||||||
{
|
{
|
||||||
quicklist * ql = *slistp;
|
if (ql_set_insert(slistp, sp)!=0) {
|
||||||
int qi;
|
|
||||||
|
|
||||||
if (ql_set_find(&ql, &qi, sp)) {
|
|
||||||
log_error(("add_spell: the list already contains the spell '%s'.\n", sp->sname));
|
log_error(("add_spell: the list already contains the spell '%s'.\n", sp->sname));
|
||||||
} else {
|
|
||||||
ql_set_insert(slistp, sp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue