From 5d661e47d80b3b6e39a49f492893241a4a432b94 Mon Sep 17 00:00:00 2001 From: Katja Zedel Date: Sun, 28 Apr 2002 12:47:29 +0000 Subject: [PATCH] =?UTF-8?q?anti-'drachen=20sind=20wimps'=20=C3=A4nderung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/gamecode/laws.c | 31 +++++++++++++++++++++++++++++-- src/res/races.xml | 10 +++++----- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index a76833e2e..108cfbee1 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -2808,7 +2808,7 @@ reorder(void) } #if 0 - +/* Aus Gebäude weisen, VERBANNE */ static void evict(void) { @@ -2821,11 +2821,38 @@ evict(void) for (S = u->orders; S; S = S->next) if (igetkeyword(S->s, u->faction->locale)==K_EVICT) { /* Nur der Kapitän bzw Burgherr kann jemanden rausschmeißen */ if(!fval(u, FL_OWNER)) { - cmistake(u,S->s,146,MSG_EVENT); + /* Die Einheit ist nicht der Eigentümer */ + cmistake(u,S->s,49,MSG_EVENT); continue; } int id = getid(); unit *u2 = findunit(id); + if (!u2){ + /* Einheit nicht gefunden */ + cmistake(u,S->s,63,MSG_EVENT); + continue; + } + + if (u->building){ + /* in der selben Burg? */ + if (u->building != u2->building){ + /* nicht in Burg */ + cmistake(u,S->s,33,MSG_EVENT); + continue; + } + leave_building(u2); + /* meldung an beide */ + } + + if (u->ship){ + if (u->ship != u2->ship){ + /* nicht an Bord */ + cmistake(u,S->s,32,MSG_EVENT); + continue; + } + leave_ship(u2); + /* meldung an beide */ + } } } } diff --git a/src/res/races.xml b/src/res/races.xml index 5ff58753d..3ff3b3771 100644 --- a/src/res/races.xml +++ b/src/res/races.xml @@ -187,7 +187,7 @@ - + @@ -866,7 +866,7 @@ - + @@ -879,7 +879,7 @@ - + @@ -893,7 +893,7 @@ - + @@ -1268,7 +1268,7 @@ - +