diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index 4f5a9e925..5ac00a070 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -1832,8 +1832,6 @@ buy(unit * u, request ** buyorders, struct order * ord) o->unit = u; o->qty = n; addlist(buyorders, o); - - if (n) fset(u, UFL_TRADER); } /* ------------------------------------------------------------- */ @@ -2151,7 +2149,6 @@ sell(unit * u, request ** sellorders, struct order * ord) o->type.ltype = ltype; addlist(sellorders, o); - if (n) fset(u, UFL_TRADER); return unlimited; } } @@ -3001,24 +2998,27 @@ produce(void) if (!TradeDisabled()) { order * ord; + boolean trader = false; for (ord = u->orders;ord;ord=ord->next) { switch (get_keyword(ord)) { case K_BUY: buy(u, &buyorders, ord); + trader = true; break; case K_SELL: /* sell returns true if the sale is not limited * by the region limit */ limited &= !sell(u, &sellorders, ord); + trader = true; break; } } - if (fval(u, UFL_TRADER)) { + if (trader) { attrib * a = a_find(u->attribs, &at_trades); if (a && a->data.i) { produceexp(u, SK_TRADE, u->number); } - set_order(&u->thisorder, NULL); + fset(u, UFL_LONGACTION); continue; } } diff --git a/src/common/kernel/unit.h b/src/common/kernel/unit.h index 8b84b77e0..0183044ae 100644 --- a/src/common/kernel/unit.h +++ b/src/common/kernel/unit.h @@ -48,7 +48,6 @@ struct skill; #define UFL_DH (1<<18) /* same as FL_DH */ #define UFL_STORM (1<<19) /* Kapitän war in einem Sturm */ -#define UFL_TRADER (1<<20) /* Händler, pseudolang */ #define UFL_NOAID (1<<22) /* Einheit hat Noaid-Status */ #define UFL_MARK (1<<23) /* same as FL_MARK */