From f1227d99575a2947fbbb793d99ed025fc22f1dd9 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 1 Jul 2008 20:22:26 +0000 Subject: [PATCH] http://bugs.eressea.de/view.php?id=1450 "Pferde im Nebel" - reverted removal of ASTRAL_ITEM_RESTRICTIONS --- src/common/gamecode/laws.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index c2cfefdc9..37ba5f94b 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -338,6 +338,23 @@ age_unit(region * r, unit * u) u->race->age(u); } } +#ifdef ASTRAL_ITEM_RESTRICTIONS + if (u->region->planep==get_astralplane()) { + item ** itemp = &u->items; + while (*itemp) { + item * itm = *itemp; + if ((itm->type->flags & ITF_NOTLOST) == 0) { + if (itm->type->flags & (ITF_BIG|ITF_ANIMAL|ITF_CURSED)) { + ADDMSG(&u->faction->msgs, msg_message("itemcrumble", "unit region item amount", + u, u->region, itm->type->rtype, itm->number)); + i_free(i_remove(itemp, itm)); + continue; + } + } + itemp=&itm->next; + } + } +#endif }