From bdcefcb1356124bfad9a71398b0feaa53075d402 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 8 Jul 2009 12:27:01 +0000 Subject: [PATCH] recruiting and stuff --- src/common/gamecode/economy.c | 7 +++++-- src/common/kernel/reports.c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index 9b87e1c9e..88f07343b 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -468,7 +468,8 @@ recruit_cost(const faction * f, const race * rc) } else { const char * str = get_param(f->race->parameters, "other_race"); if (str && strcmp(rc->_name[0], str)==0) { - return get_param_int(f->race->parameters, "other_cost", -1); + return rc->recruitcost; +/* return get_param_int(f->race->parameters, "other_cost", -1); */ } } return -1; @@ -497,7 +498,9 @@ recruit(unit * u, struct order * ord, request ** recruitorders) /* Monster dürfen REKRUTIERE 15 dracoid machen * also: secondary race */ rc = findrace(str, f->locale); - recruitcost = recruit_cost(f, rc); + if (rc!=NULL) { + recruitcost = recruit_cost(f, rc); + } if ((u->number!=0 && rc!=f->race) || rc==NULL || recruitcost<0) { rc = f->race; recruitcost = recruit_cost(f, f->race); diff --git a/src/common/kernel/reports.c b/src/common/kernel/reports.c index 57272ba50..1eae94fd8 100644 --- a/src/common/kernel/reports.c +++ b/src/common/kernel/reports.c @@ -1471,7 +1471,7 @@ write_script(FILE * F, const faction * f) report_type * rtype; char buf[1024]; - fprintf(F, "faction=%s:email=%s", factionid(f), f->email); + fprintf(F, "faction=%s:email=%s:lang=%s", factionid(f), f->email, locale_name(f->locale)); if (f->options & (1<