forked from github/server
remove old & unused fix_famililar repair code.
This commit is contained in:
parent
8d02d5a5aa
commit
494643d65f
|
@ -58,34 +58,6 @@ static int tolua_spawn_undead(lua_State * L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int fix_familiars(struct lua_State *L)
|
||||
{
|
||||
faction *f;
|
||||
for (f = factions; f; f = f->next) {
|
||||
unit *u;
|
||||
for (u = f->units; u; u = u->nextF) {
|
||||
struct sc_mage *mage = get_mage(u);
|
||||
if (mage && is_familiar(u)) {
|
||||
if (mage->spellbook && mage->magietyp == M_GRAY) {
|
||||
equipment *eq;
|
||||
char buffer[64];
|
||||
|
||||
spellbook_clear(mage->spellbook);
|
||||
free(mage->spellbook);
|
||||
mage->spellbook = 0;
|
||||
|
||||
_snprintf(buffer, sizeof(buffer), "%s_familiar", u_race(u)->_name);
|
||||
eq = get_equipment(buffer);
|
||||
if (eq) {
|
||||
equip_unit_mask(u, eq, EQUIP_SPELLS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void bind_monsters(struct lua_State *L)
|
||||
{
|
||||
tolua_module(L, NULL, 0);
|
||||
|
@ -95,7 +67,6 @@ void bind_monsters(struct lua_State *L)
|
|||
tolua_function(L, TOLUA_CAST "plan_monsters", tolua_planmonsters);
|
||||
tolua_function(L, TOLUA_CAST "spawn_undead", tolua_spawn_undead);
|
||||
tolua_function(L, TOLUA_CAST "spawn_dragons", tolua_spawn_dragons);
|
||||
tolua_function(L, TOLUA_CAST "fix_familiars", fix_familiars);
|
||||
tolua_function(L, TOLUA_CAST "get_monsters", tolua_get_monsters);
|
||||
}
|
||||
tolua_endmodule(L);
|
||||
|
|
Loading…
Reference in New Issue