Merge pull request #864 from ennorehling/develop

rechenfehler unterhaltung
This commit is contained in:
Enno Rehling 2019-08-06 20:05:41 +02:00 committed by GitHub
commit 854ff47b29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;
}