bugfix: monster races that cannot learn skills, will not try to study.

This fixes https://bugs.eressea.de/view.php?id=2054
This commit is contained in:
Enno Rehling 2014-12-14 15:59:20 +01:00
parent b506bed4d9
commit 595dc35fb0

View file

@ -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;