From e1a671a72db3757dd9a1181bf2f9581b145b6c31 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 30 May 2005 21:00:27 +0000 Subject: [PATCH] =?UTF-8?q?http://eressea.upb.de/mantis/view.php=3Fid=3D52?= =?UTF-8?q?1=20H=C3=A4ndler=20verkauft=20und=20lernt=20gleichzeitig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nachbesserung. --- src/common/gamecode/economy.c | 10 +++++----- src/common/kernel/unit.h | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) 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 */