forked from github/server
fix invalid create_mage calls
prepare to re-enable worldmap remove some dead code
This commit is contained in:
parent
584cea02ed
commit
bc2cedd34f
3 changed files with 6 additions and 14 deletions
|
@ -542,9 +542,7 @@ learn(void)
|
||||||
/* Vertraute zählen nicht zu den Magiern einer Partei,
|
/* Vertraute zählen nicht zu den Magiern einer Partei,
|
||||||
* können aber nur Graue Magie lernen */
|
* können aber nur Graue Magie lernen */
|
||||||
mtyp = M_GRAU;
|
mtyp = M_GRAU;
|
||||||
if (!has_skill(u, SK_MAGIC) || !is_mage(u)) {
|
if (!is_mage(u)) create_mage(u, mtyp);
|
||||||
create_mage(u, mtyp);
|
|
||||||
}
|
|
||||||
} else if (!has_skill(u, SK_MAGIC)) {
|
} else if (!has_skill(u, SK_MAGIC)) {
|
||||||
/* Die Einheit ist noch kein Magier */
|
/* Die Einheit ist noch kein Magier */
|
||||||
if (count_skill(u->faction, SK_MAGIC) + u->number >
|
if (count_skill(u->faction, SK_MAGIC) + u->number >
|
||||||
|
@ -580,7 +578,7 @@ learn(void)
|
||||||
u->faction->magiegebiet = mtyp;
|
u->faction->magiegebiet = mtyp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
create_mage(u, mtyp);
|
if (!is_mage(u)) create_mage(u, mtyp);
|
||||||
} else {
|
} else {
|
||||||
/* ist schon ein Magier und kein Vertrauter */
|
/* ist schon ein Magier und kein Vertrauter */
|
||||||
if(u->faction->magiegebiet == 0){
|
if(u->faction->magiegebiet == 0){
|
||||||
|
|
|
@ -2572,14 +2572,7 @@ register_faction_id(int id)
|
||||||
boolean
|
boolean
|
||||||
faction_id_is_unused(int id)
|
faction_id_is_unused(int id)
|
||||||
{
|
{
|
||||||
#if 0
|
return findfaction(id)==NULL;
|
||||||
if(used_faction_ids==NULL)
|
|
||||||
return(true);
|
|
||||||
return (boolean)(bsearch(&id, used_faction_ids, no_used_faction_ids,
|
|
||||||
sizeof(int), _cmp_int) == NULL);
|
|
||||||
#else
|
|
||||||
return findfaction(id)==NULL;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1391,7 +1391,8 @@ write_script(FILE * F, const faction * f)
|
||||||
fputc('\n', F);
|
fputc('\n', F);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#undef GLOBAL_REPORT
|
||||||
|
#ifdef GLOBAL_REPORT
|
||||||
static void
|
static void
|
||||||
global_report(const char * filename)
|
global_report(const char * filename)
|
||||||
{
|
{
|
||||||
|
@ -1451,7 +1452,7 @@ reports(void)
|
||||||
if (mailit) fclose(mailit);
|
if (mailit) fclose(mailit);
|
||||||
free_seen();
|
free_seen();
|
||||||
str = get_param(global.parameters, "globalreport");
|
str = get_param(global.parameters, "globalreport");
|
||||||
#if 0
|
#ifdef GLOBAL_REPORT
|
||||||
if (str!=NULL) {
|
if (str!=NULL) {
|
||||||
sprintf(buf, "%s/%s.%u.cr", reportpath(), str, turn);
|
sprintf(buf, "%s/%s.%u.cr", reportpath(), str, turn);
|
||||||
global_report(buf);
|
global_report(buf);
|
||||||
|
|
Loading…
Reference in a new issue