forked from github/server
prevent an invalid assert when undead heroes are magical
This commit is contained in:
parent
66f733e105
commit
3dd3761acd
|
@ -1190,7 +1190,8 @@ skill *add_skill(unit * u, skill_t id)
|
||||||
sv->old = 0;
|
sv->old = 0;
|
||||||
sv->id = id;
|
sv->id = id;
|
||||||
if (id == SK_MAGIC && u->faction && !fval(u->faction, FFL_NPC)) {
|
if (id == SK_MAGIC && u->faction && !fval(u->faction, FFL_NPC)) {
|
||||||
assert(u->number==1 && max_magicians(u->faction) >= u->number);
|
assert(u->number<=1);
|
||||||
|
assert(max_magicians(u->faction) >= u->number);
|
||||||
}
|
}
|
||||||
return sv;
|
return sv;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue