forked from github/server
support old rules (eressea 1.0 magic)
This commit is contained in:
parent
36a5e91eac
commit
90d59a8aa7
|
@ -389,13 +389,17 @@ static boolean know_school(const faction * f, magic_t school)
|
||||||
static int common = MAXMAGIETYP;
|
static int common = MAXMAGIETYP;
|
||||||
if (f->magiegebiet==school) return true;
|
if (f->magiegebiet==school) return true;
|
||||||
if (common==MAXMAGIETYP) {
|
if (common==MAXMAGIETYP) {
|
||||||
const char * school = get_param(global.parameters, "rules.magic.common");
|
const char * common_school = get_param(global.parameters, "rules.magic.common");
|
||||||
|
if (common_school) {
|
||||||
for (common=0;common!=MAXMAGIETYP;++common) {
|
for (common=0;common!=MAXMAGIETYP;++common) {
|
||||||
if (strcmp(school, magic_school[common])==0) break;
|
if (strcmp(common_school, magic_school[common])==0) break;
|
||||||
}
|
}
|
||||||
if (common==MAXMAGIETYP) {
|
if (common==MAXMAGIETYP) {
|
||||||
common = M_NONE;
|
common = M_NONE;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return school==common;
|
return school==common;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue