BENENNE FREMDE EINHEIT - korrekturroutine zum fixen des flag.

This commit is contained in:
Enno Rehling 2003-01-19 09:10:28 +00:00
parent 54447452b1
commit c653eacccf
1 changed files with 23 additions and 0 deletions

View File

@ -64,6 +64,7 @@
/* util includes */
#include <attrib.h>
#include <language.h>
#include <base36.h>
#include <cvector.h>
#include <event.h>
@ -664,6 +665,27 @@ show_newspells(void)
}
static int
fix_foreign(void)
{
region * r;
for (r=regions;r;r=r->next) {
struct locale * lang;
for (lang=locales;lang;lang=nextlocale(lang)) {
const char * udefault = LOC(lang, "unitdefault");
size_t udlen = strlen(udefault);
unit * u;
for (u=r->units;u;u=u->next) {
size_t unlen = strlen(u->name);
if (unlen<udlen) continue;
if (strncmp(u->name, udefault, udlen)==0) {
fset(u, FL_UNNAMED);
}
}
}
}
return 0;
}
#if 0
static void
fix_feuerwand_orks(void)
@ -1830,6 +1852,7 @@ update_gmquests(void)
}
do_once("rq02", regatta_quest());
do_once("rq03", regatta_quest());
do_once("renm", fix_foreign());
}
#if 0