bugfix AMK

This commit is contained in:
Enno Rehling 2005-10-23 15:11:22 +00:00
parent 1c7ace7556
commit 5cc18d1e37
1 changed files with 6 additions and 5 deletions

View File

@ -96,8 +96,9 @@ use_speedsail(struct unit * u, const struct item_type * itype, int amount, struc
/* Kann auch von Nichtmagiern benutzt werden, erzeugt eine /* Kann auch von Nichtmagiern benutzt werden, erzeugt eine
* Antimagiezone, die zwei Runden bestehen bleibt */ * Antimagiezone, die zwei Runden bestehen bleibt */
static void static void
use_antimagiccrystal(region * r, unit * mage, int amount, struct order * ord) use_antimagiccrystal(unit * u, const struct item_type * itype, int amount, struct order * ord)
{ {
region * r = u->region;
const resource_type * rt_crystal = NULL; const resource_type * rt_crystal = NULL;
int i; int i;
@ -147,12 +148,12 @@ use_antimagiccrystal(region * r, unit * mage, int amount, struct order * ord)
if(force > 0) { if(force > 0) {
variant var ; variant var ;
var.i = effect; var.i = effect;
create_curse(mage, &r->attribs, ct_find("antimagiczone"), force, duration, var, 0); create_curse(u, &r->attribs, ct_find("antimagiczone"), force, duration, var, 0);
} }
} }
new_use_pooled(mage, rt_crystal, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK, amount); new_use_pooled(u, rt_crystal, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK, amount);
ADDMSG(&mage->faction->msgs, msg_message("use_antimagiccrystal", ADDMSG(&u->faction->msgs, msg_message("use_antimagiccrystal",
"unit region", mage, r)); "unit region", u, r));
return; return;
} }