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