forked from github/server
"buying more luxury goods than available for basic price gives wrong total cost" Wow. Was wir alles fuer Fehler haben...
This commit is contained in:
parent
00aea147a0
commit
4478e666a9
|
@ -1788,7 +1788,6 @@ expandbuying(region * r, request * buyorders)
|
|||
trade = trades;
|
||||
while (trade->type!=ltype) ++trade;
|
||||
multi = trade->multi;
|
||||
if (trade->number + 1 > max_products) ++multi;
|
||||
price = ltype->price * multi;
|
||||
|
||||
if (get_pooled(oa[j].unit, oldresourcetype[R_SILVER], GET_DEFAULT, price) >= price) {
|
||||
|
@ -1800,6 +1799,7 @@ expandbuying(region * r, request * buyorders)
|
|||
* merken muß. */
|
||||
attrib * a = a_find(u->attribs, &at_luxuries);
|
||||
if (a==NULL) a = a_add(&u->attribs, a_new(&at_luxuries));
|
||||
|
||||
i_change((item**)&a->data.v, ltype->itype, 1);
|
||||
i_change(&oa[j].unit->items, ltype->itype, 1);
|
||||
use_pooled(u, oldresourcetype[R_SILVER], GET_DEFAULT, price);
|
||||
|
@ -1812,7 +1812,7 @@ expandbuying(region * r, request * buyorders)
|
|||
/* Falls mehr als max_products Bauern ein Produkt verkauft haben, steigt
|
||||
* der Preis Multiplikator für das Produkt um den Faktor 1. Der Zähler
|
||||
* wird wieder auf 0 gesetzt. */
|
||||
if (++trade->number > max_products) {
|
||||
if (++trade->number == max_products) {
|
||||
trade->number = 0;
|
||||
++trade->multi;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue