From 595dc35fb01048eef0be9f5b8b966b1ef899f0a0 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 14 Dec 2014 15:59:20 +0100 Subject: [PATCH] bugfix: monster races that cannot learn skills, will not try to study. This fixes https://bugs.eressea.de/view.php?id=2054 --- src/monsters.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/monsters.c b/src/monsters.c index 843b9d60b..a302b3d31 100644 --- a/src/monsters.c +++ b/src/monsters.c @@ -579,9 +579,13 @@ static order *monster_learn(unit * u) skill *sv; const struct locale *lang = u->faction->locale; + /* can these monsters even study? */ + if ((u_race(u)->flags & RCF_NOLEARN) || fval(u, UFL_WERE)) { + return NULL; + } + /* Monster lernt ein zufälliges Talent aus allen, in denen es schon * Lerntage hat. */ - for (sv = u->skills; sv != u->skills + u->skill_size; ++sv) { if (sv->level > 0) ++c;