forked from github/server
Merge branch 'develop' of github.com:ennorehling/eressea into develop
This commit is contained in:
commit
e17fc6f078
|
@ -511,14 +511,13 @@ int build_skill(unit *u, int basesk, int skill_mod) {
|
||||||
*/
|
*/
|
||||||
static int build_limited(unit * u, const construction * con, int completed, int number, int want, int basesk, int *skill_total) {
|
static int build_limited(unit * u, const construction * con, int completed, int number, int want, int basesk, int *skill_total) {
|
||||||
int skills = *skill_total;
|
int skills = *skill_total;
|
||||||
int made = 0, maxsize = con->maxsize * number;
|
int made = 0, maxsize;
|
||||||
|
|
||||||
|
assert(con);
|
||||||
if (want <= 0) {
|
if (want <= 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (con == NULL) {
|
maxsize = con->maxsize * number;
|
||||||
return ENOMATERIALS;
|
|
||||||
}
|
|
||||||
if (completed == maxsize) {
|
if (completed == maxsize) {
|
||||||
return ECOMPLETE;
|
return ECOMPLETE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue