From f79c3332eb01788474fc672733f71e6ac4385871 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 28 Jul 2002 09:45:38 +0000 Subject: [PATCH] Bug in Untoten-Message Bug in Astraler Blick, Zauber disabled Bug in GIB, wenn Fluch aktiviert --- src/common/gamecode/economy.c | 16 +++++++++------- src/common/kernel/spell.c | 2 ++ src/res/de/messages.xml | 1 + 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index 584fc70e6..78b952e65 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -516,7 +516,7 @@ give_peasants(int n, const item_type * itype, unit * src) } } -void +int give_item(int want, const item_type * itype, unit * src, unit * dest, const char * cmd) { short error = 0; @@ -528,13 +528,13 @@ give_item(int want, const item_type * itype, unit * src, unit * dest, const char if (dest && src->faction != dest->faction && src->faction->age < GIVERESTRICTION) { ADDMSG(&src->faction->msgs, msg_error(src, cmd, "giverestriction", "turns", GIVERESTRICTION)); - return; + return -1; } else if (n == 0) { error = 36; } else if (itype->flags & ITF_CURSED) { error = 25; } else if (itype->give && !itype->give(src, dest, itype, n, cmd)) { - return; + return -1; } else { int use = new_use_pooled(src, item2resource(itype), GET_SLACK, n); if (usetype->rtype); if (htype && (*itmp)->number>0) { - give_item((*itmp)->number, (*itmp)->type, u, u2, S->s); n = 1; + if (give_item((*itmp)->number, (*itmp)->type, u, u2, S->s)==0) continue; } - else itmp = &(*itmp)->next; + itmp = &(*itmp)->next; } } if (!n) cmistake(u, S->s, 38, MSG_COMMERCE); @@ -972,9 +974,9 @@ dogive(region * r, unit * u, strlist * S, boolean liefere, int mode) if ((*itmp)->number > 0 && (*itmp)->number - new_get_resvalue(u, (*itmp)->type->rtype) > 0) { n = (*itmp)->number - new_get_resvalue(u, (*itmp)->type->rtype); - give_item(n, (*itmp)->type, u, u2, S->s); + if (give_item(n, (*itmp)->type, u, u2, S->s)==0) continue; } - else itmp = &(*itmp)->next; + itmp = &(*itmp)->next; } } return; diff --git a/src/common/kernel/spell.c b/src/common/kernel/spell.c index 2bd1d9cde..037e75ab6 100644 --- a/src/common/kernel/spell.c +++ b/src/common/kernel/spell.c @@ -6239,6 +6239,8 @@ sp_showastral(castorder *co) int cast_level = co->level; int power = co->force; + return 0; + switch(getplaneid(r)) { case 0: rt = r_standard_to_astral(r); diff --git a/src/res/de/messages.xml b/src/res/de/messages.xml index c2103ca1a..097d628df 100644 --- a/src/res/de/messages.xml +++ b/src/res/de/messages.xml @@ -5246,6 +5246,7 @@ +