From 1b56db93d9a5644235739398a3a8a7d86e6cd124 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 9 Apr 2005 14:46:45 +0000 Subject: [PATCH] http://eressea.upb.de/mantis/view.php?id=483 [Now a size 2 tradepost is not enough to trade anymore] --- src/common/gamecode/economy.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index 86ccec792..9aa121911 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -1775,7 +1775,7 @@ buy(unit * u, request ** buyorders, struct order * ord) static const struct building_type * bt_castle; if (!bt_castle) bt_castle = bt_find("castle"); for (b=r->buildings;b;b=b->next) { - if (b->type==bt_castle && b->size>2) break; + if (b->type==bt_castle && b->size>=2) break; } if (b==NULL) { cmistake(u, ord, 119, MSG_COMMERCE); @@ -2061,7 +2061,14 @@ sell(unit * u, request ** sellorders, struct order * ord) return false; } } else { - if (!rbuildings(r)) { + /* ...oder in der Region muß es eine Burg geben. */ + building * b; + static const struct building_type * bt_castle; + if (!bt_castle) bt_castle = bt_find("castle"); + for (b=r->buildings;b;b=b->next) { + if (b->type==bt_castle && b->size>=2) break; + } + if (b==NULL) { cmistake(u, ord, 119, MSG_COMMERCE); return false; }