From f89721ebec96342734b9d8fc79fafe9f2a224446 Mon Sep 17 00:00:00 2001 From: CTD Date: Tue, 16 Sep 2014 09:21:33 +0200 Subject: [PATCH 1/2] Monster Email MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit kann jetzt über die config.xml eingestellt werden --- src/kernel/faction.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/kernel/faction.c b/src/kernel/faction.c index b46848e3c..fd1faf459 100755 --- a/src/kernel/faction.c +++ b/src/kernel/faction.c @@ -126,7 +126,15 @@ faction *get_or_create_monsters(void) if (!f) { const race *rc = rc_find("dragon"); - f = addfaction("noreply@eressea.de", NULL, rc, NULL, 0); + const char *email = get_param(global.parameters, "monster.email"); + if (email) + { + f = addfaction(email, NULL, rc, NULL, 0); + } + else + { + f = addfaction("noreply@eressea.de", NULL, rc, NULL, 0); + } renumber_faction(f, 666); faction_setname(f, "Monster"); f->options = 0; From 911b93e343437dbed2e16610c363d23b8934cecd Mon Sep 17 00:00:00 2001 From: CTD1 Date: Thu, 25 Sep 2014 08:59:29 +0200 Subject: [PATCH 2/2] Update faction.c --- src/kernel/faction.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/kernel/faction.c b/src/kernel/faction.c index fd1faf459..2522f6968 100755 --- a/src/kernel/faction.c +++ b/src/kernel/faction.c @@ -127,12 +127,10 @@ faction *get_or_create_monsters(void) const race *rc = rc_find("dragon"); const char *email = get_param(global.parameters, "monster.email"); - if (email) - { + if (email) { f = addfaction(email, NULL, rc, NULL, 0); - } - else - { + } + else { f = addfaction("noreply@eressea.de", NULL, rc, NULL, 0); } renumber_faction(f, 666); @@ -348,7 +346,7 @@ void destroyfaction(faction * f) if (rc->ec_flags & ECF_REC_HORSES) { /* Zentauren an die Pferde */ h += u->number; } - else { /* Orks zählen nur zur Hälfte */ + else { /* Orks zählen nur zur Hälfte */ p += (int)(u->number * rc->recruit_multi); } for (itm = u->items; itm; itm = itm->next) { @@ -373,7 +371,7 @@ void destroyfaction(faction * f) group *g; ally *sf, *sfn; - /* Alle HELFE für die Partei löschen */ + /* Alle HELFE für die Partei löschen */ for (sf = ff->allies; sf; sf = sf->next) { if (sf->faction == f) { removelist(&ff->allies, sf);