From 7f455d373c0a1b1bcb8e177dbb8422c13037eeee Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 14 Feb 2007 20:17:24 +0000 Subject: [PATCH] http://eressea.upb.de/mantis/view.php?id=1004 "Giftelementar 3 Wochen lang gezaubert - obwohl sich der Magier bewegt hat" Message wurde an der falschen stelle generiert --- src/common/spells/spells.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/common/spells/spells.c b/src/common/spells/spells.c index 34976d7e1..7b4388f0f 100644 --- a/src/common/spells/spells.c +++ b/src/common/spells/spells.c @@ -3205,7 +3205,7 @@ dc_age(struct curse * c) /* age returns 0 if the attribute needs to be removed, !=0 otherwise */ { region * r = (region*)c->data.v; - unit *u, **up; + unit **up; unit * mage = c->magician; if (r==NULL || mage==NULL || mage->number==0) { @@ -3231,20 +3231,6 @@ dc_age(struct curse * c) if (*up==u) up=&u->next; } - /* melden, 1x pro Partei */ - for (u = r->units; u; u = u->next ) { - if (!fval(u->faction, FL_DH) ) { - fset(u->faction, FL_DH); - ADDMSG(&u->faction->msgs, msg_message("deathcloud_effect", - "mage region", cansee(u->faction, r, mage, 0) ? mage : NULL, r)); - } - } - - if (!fval(mage->faction, FL_DH)) { - ADDMSG(&mage->faction->msgs, msg_message("deathcloud_effect", - "mage region", mage, r)); - } - return 0; } @@ -3308,6 +3294,7 @@ sp_deathcloud(castorder *co) region *r = co->rt; unit *mage = co->magician.u; attrib *a = r->attribs; + unit * u; while (a) { if ((a->type->flags & ATF_CURSE)) { @@ -3323,6 +3310,20 @@ sp_deathcloud(castorder *co) mk_deathcloud(mage, r, co->force, co->level); + /* melden, 1x pro Partei */ + for (u = r->units; u; u = u->next ) { + if (!fval(u->faction, FL_DH) ) { + fset(u->faction, FL_DH); + ADDMSG(&u->faction->msgs, msg_message("deathcloud_effect", + "mage region", cansee(u->faction, r, mage, 0) ? mage : NULL, r)); + } + } + + if (!fval(mage->faction, FL_DH)) { + ADDMSG(&mage->faction->msgs, msg_message("deathcloud_effect", + "mage region", mage, r)); + } + return co->level; }