rechenfehler unterhaltung

This commit is contained in:
Enno Rehling 2019-08-06 20:04:47 +02:00
parent c97e881dbf
commit a0bd0378c3
1 changed files with 6 additions and 4 deletions

View File

@ -2027,11 +2027,13 @@ int entertain_cmd(unit * u, struct order *ord, econ_request **io_req)
wants = u->number * (entertainbase + effskill(u, SK_ENTERTAINMENT, NULL) * entertainperlevel);
max_e = getuint();
if (max_e != 0) {
if (wants > max_e) wants = max_e;
if (max_e != 0 && wants > max_e) {
wants = max_e;
}
if (max_e > 0) {
add_request(req++, ECON_ENTERTAIN, u, ord, max_e);
*io_req = req;
}
add_request(req++, ECON_ENTERTAIN, u, ord, max_e);
*io_req = req;
return max_e;
}