From 91ece491e5a882af5d1882b56523451c184b20f0 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 5 Mar 2008 19:30:52 +0000 Subject: [PATCH] http://eressea.upb.de/mantis/view.php?id=1344 "Kampfallianzen fehlerhaft" New units must not be added to a group in another faction, ever. --- src/common/kernel/alchemy.h | 6 +++--- src/common/kernel/unit.c | 2 +- src/common/spells/combatspells.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/kernel/alchemy.h b/src/common/kernel/alchemy.h index 2e94fb8ae..f9444fee6 100644 --- a/src/common/kernel/alchemy.h +++ b/src/common/kernel/alchemy.h @@ -51,9 +51,9 @@ enum { MAX_POTIONS }; -void herbsearch(struct region * r, struct unit * u, int max); -int use_potion(struct unit * u, const struct item_type * itype, int amount, struct order *); -void init_potions(void); +extern void herbsearch(struct region * r, struct unit * u, int max); +extern int use_potion(struct unit * u, const struct item_type * itype, int amount, struct order *); +extern void init_potions(void); extern int get_effect(const struct unit * u, const struct potion_type * effect); extern int change_effect(struct unit * u, const struct potion_type * effect, int value); diff --git a/src/common/kernel/unit.c b/src/common/kernel/unit.c index 586e18b90..ac8b92db3 100644 --- a/src/common/kernel/unit.c +++ b/src/common/kernel/unit.c @@ -1382,7 +1382,7 @@ create_unit(region * r, faction * f, int number, const struct race *urace, int i } /* Gruppen */ - if (fval(creator, UFL_GROUP)) { + if (creator->faction==f && fval(creator, UFL_GROUP)) { a = a_find(creator->attribs, &at_group); if (a) { group * g = (group*)a->data.v; diff --git a/src/common/spells/combatspells.c b/src/common/spells/combatspells.c index 5d7642174..8016ba104 100644 --- a/src/common/spells/combatspells.c +++ b/src/common/spells/combatspells.c @@ -1584,7 +1584,7 @@ sp_undeadhero(fighter * fi, int level, double power, spell * sp) setstatus(u, du->status); setguard(u, GUARD_NONE); - /* inheit stealth from magician */ + /* inherit stealth from magician */ if (fval(mage, UFL_PARTEITARNUNG)) { fset(u, UFL_PARTEITARNUNG); }