forked from github/server
setting max_spelllevel correctly on load.
This commit is contained in:
parent
29e423fab4
commit
29bb5f4ceb
|
@ -1539,11 +1539,15 @@ readgame(const char * filename, int mode, int backup)
|
|||
mage = get_mage(u);
|
||||
if (mage) {
|
||||
faction * f = u->faction;
|
||||
int skl = effskill(u, SK_MAGIC);
|
||||
if (!is_monsters(f) && f->magiegebiet==M_GRAY) {
|
||||
log_error(("faction %s had magic=gray, fixing (%s)\n",
|
||||
factionname(f), magic_school[mage->magietyp]));
|
||||
f->magiegebiet = mage->magietyp;
|
||||
}
|
||||
if (f->max_spelllevel<skl) {
|
||||
f->max_spelllevel = skl;
|
||||
}
|
||||
if (mage->spellcount<0) {
|
||||
mage->spellcount = 0;
|
||||
updatespelllist(u);
|
||||
|
|
Loading…
Reference in New Issue