forked from github/server
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:
parent
b506bed4d9
commit
595dc35fb0
1 changed files with 5 additions and 1 deletions
|
@ -579,9 +579,13 @@ static order *monster_learn(unit * u)
|
||||||
skill *sv;
|
skill *sv;
|
||||||
const struct locale *lang = u->faction->locale;
|
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
|
/* Monster lernt ein zufälliges Talent aus allen, in denen es schon
|
||||||
* Lerntage hat. */
|
* Lerntage hat. */
|
||||||
|
|
||||||
for (sv = u->skills; sv != u->skills + u->skill_size; ++sv) {
|
for (sv = u->skills; sv != u->skills + u->skill_size; ++sv) {
|
||||||
if (sv->level > 0)
|
if (sv->level > 0)
|
||||||
++c;
|
++c;
|
||||||
|
|
Loading…
Reference in a new issue