remove the last of the static item_type variables.

This commit is contained in:
Enno Rehling 2014-06-24 23:13:18 -07:00
parent 31c0e5c2a4
commit a75d91fb6d
1 changed files with 102 additions and 105 deletions

View File

@ -2114,14 +2114,12 @@ static void expandselling(region * r, request * sellorders, int limit)
return; return;
for (j = 0; j != norders; j++) { for (j = 0; j != norders; j++) {
static const luxury_type *search = NULL; const luxury_type *search = NULL;
const luxury_type *ltype = oa[j].type.ltype; const luxury_type *ltype = oa[j].type.ltype;
int multi = r_demand(r, ltype); int multi = r_demand(r, ltype);
static int i = -1; int i;
int use = 0; int use = 0;
if (search != ltype) { for (i=0,search=luxurytypes; search!=ltype; search=search->next) {
i = 0;
for (search = luxurytypes; search != ltype; search = search->next)
++i; ++i;
} }
if (counter[i] >= limit) if (counter[i] >= limit)
@ -2193,7 +2191,6 @@ static void expandselling(region * r, request * sellorders, int limit)
free(oa); free(oa);
/* Steuern. Hier werden die Steuern dem Besitzer der größten Burg gegeben. */ /* Steuern. Hier werden die Steuern dem Besitzer der größten Burg gegeben. */
if (maxowner) { if (maxowner) {
if (taxcollected > 0) { if (taxcollected > 0) {
change_money(maxowner, (int)taxcollected); change_money(maxowner, (int)taxcollected);