forked from github/server
Noch eine Division by zero. Testdurchlauf gemacht, funktioniert schienbar alles.
This commit is contained in:
parent
7bed85420b
commit
1c917f070e
|
@ -333,7 +333,7 @@ count_skill(faction * f, skill_t skill)
|
|||
|
||||
for (r = firstregion(f); r != last; r = r->next)
|
||||
for (u = r->units; u; u = u->next)
|
||||
if (u->faction == f && get_skill(u, skill) > 0)
|
||||
if (u->faction == f && get_skill(u, skill))
|
||||
if(!is_familiar(u))
|
||||
n += u->number;
|
||||
|
||||
|
@ -3072,3 +3072,20 @@ reorder_owners(region * r)
|
|||
assert(len==listlen(r->units));
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
produceexp(struct unit * u, skill_t sk, int n)
|
||||
{
|
||||
if (n==0 || !playerrace(u->race)) return 0;
|
||||
#if SKILLPOINTS
|
||||
change_skill(u, SK_HERBALISM, PRODUCEEXP * n);
|
||||
return 1;
|
||||
#else
|
||||
if (learn_skill(u, SK_HERBALISM, PRODUCEEXP * n)) {
|
||||
change_skill(u, SK_HERBALISM, n);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue