code-polishing: Vertraute werden nicht mehr als RC_* gebraucht.find_spellbyid() kriegt nen magietyp für den fall wo zwei zauber gleich heissen, und nicht über ihre 'alte' id erkannt werden, sondern den hash des namens (für seenspell)

This commit is contained in:
Enno Rehling 2006-01-01 20:53:12 +00:00
parent 9eb50890c6
commit 4dec5c914d
2 changed files with 13 additions and 7 deletions

View File

@ -17,6 +17,7 @@
/* kernel includes */ /* kernel includes */
#include <kernel/item.h> #include <kernel/item.h>
#include <kernel/race.h>
#include <kernel/region.h> #include <kernel/region.h>
#include <kernel/faction.h> #include <kernel/faction.h>
#include <kernel/unit.h> #include <kernel/unit.h>

View File

@ -552,6 +552,10 @@ race_compat(void)
int i; int i;
for (i=0;i!=MAXRACES;++i) { for (i=0;i!=MAXRACES;++i) {
const char * rcname = oldracenames[i];
if (rcname==NULL) {
new_race[i] = NULL;
} else {
race * rc = rc_find(oldracenames[i]); race * rc = rc_find(oldracenames[i]);
if (rc) { if (rc) {
new_race[i] = rc; new_race[i] = rc;
@ -563,6 +567,7 @@ race_compat(void)
} }
} }
} }
}
static potion_type * static potion_type *
xml_readpotion(xmlXPathContextPtr xpath, item_type * itype) xml_readpotion(xmlXPathContextPtr xpath, item_type * itype)