From 42ea90a6fcf6ff378fc6ab3ec68a5b7998f25e89 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 4 Jun 2005 09:19:37 +0000 Subject: [PATCH] =?UTF-8?q?auratransfer:=20fix=20f=C3=BCr=20den=20fall,=20?= =?UTF-8?q?das=20zielmagier=20nicht=20gefunden=20wurde=20Issue:=20335?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/kernel/spell.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/common/kernel/spell.c b/src/common/kernel/spell.c index a70e0fa27..fe2062eac 100644 --- a/src/common/kernel/spell.c +++ b/src/common/kernel/spell.c @@ -776,12 +776,11 @@ sp_transferaura(castorder *co) unit *mage = (unit *)co->magician; int cast_level = co->level; spellparameter *pa = co->par; - unit * u = pa->param[0]->data.u; - sc_mage * scm_src = get_mage(mage); - sc_mage * scm_dst = get_mage(u); + unit * u; + sc_mage * scm_dst, * scm_src = get_mage(mage); /* wenn kein Ziel gefunden, Zauber abbrechen */ - if(pa->param[0]->flag == TARGET_NOTFOUND) return 0; + if (pa->param[0]->flag == TARGET_NOTFOUND) return 0; /* wenn Ziel gefunden, dieses aber Magieresistent war, Zauber * abbrechen aber kosten lassen */ @@ -789,6 +788,8 @@ sp_transferaura(castorder *co) /* Wieviel Transferieren? */ aura = pa->param[1]->data.i; + u = pa->param[0]->data.u; + scm_dst = get_mage(u); if (scm_dst==NULL) { /* "Zu dieser Einheit kann ich keine Aura übertragen." */