forked from github/server
remove_unit is a dangerous thing.
This commit is contained in:
parent
fec171d75f
commit
32097e56cb
2 changed files with 2 additions and 1 deletions
|
@ -329,6 +329,7 @@ remove_unit(unit ** ulist, unit * u)
|
|||
|
||||
if (u->number) set_number(u, 0);
|
||||
leave(u->region, u);
|
||||
u->region = NULL;
|
||||
|
||||
uunhash(u);
|
||||
if (ulist) {
|
||||
|
|
|
@ -175,7 +175,7 @@ alp_findet_opfer(unit *alp, region *r)
|
|||
c = create_curse(mage, &opfer->attribs, ct_find("worse"), 2, 2, effect, opfer->number);
|
||||
/* solange es noch keine spezielle alp-Antimagie gibt, reagiert der
|
||||
* auch auf normale */
|
||||
remove_unit(&r->units, alp);
|
||||
set_number(alp, 0);
|
||||
|
||||
/* wenn der Magier stirbt, wird der Curse wieder vom Opfer genommen */
|
||||
add_trigger(&mage->attribs, "destroy", trigger_removecurse(c, opfer));
|
||||
|
|
Loading…
Reference in a new issue