forked from github/server
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:
parent
9eb50890c6
commit
4dec5c914d
|
@ -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>
|
||||||
|
|
|
@ -552,14 +552,19 @@ race_compat(void)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i=0;i!=MAXRACES;++i) {
|
for (i=0;i!=MAXRACES;++i) {
|
||||||
race * rc = rc_find(oldracenames[i]);
|
const char * rcname = oldracenames[i];
|
||||||
if (rc) {
|
if (rcname==NULL) {
|
||||||
new_race[i] = rc;
|
new_race[i] = NULL;
|
||||||
if (rc == new_race[RC_TROLL]) {
|
|
||||||
a_add(&rc->attribs, make_skillmod(NOSKILL, SMF_RIDING, NULL, 0.0, -1));
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
log_warning(("could not find old race %s\n", oldracenames[i]));
|
race * rc = rc_find(oldracenames[i]);
|
||||||
|
if (rc) {
|
||||||
|
new_race[i] = rc;
|
||||||
|
if (rc == new_race[RC_TROLL]) {
|
||||||
|
a_add(&rc->attribs, make_skillmod(NOSKILL, SMF_RIDING, NULL, 0.0, -1));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
log_warning(("could not find old race %s\n", oldracenames[i]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue