forked from github/server
spell_list removal in shared code needs to be reflected in eressea.
This commit is contained in:
parent
e3dbd71137
commit
e8aa30c673
2 changed files with 12 additions and 12 deletions
|
@ -6,6 +6,8 @@
|
||||||
#include <kernel/unit.h>
|
#include <kernel/unit.h>
|
||||||
#include <kernel/faction.h>
|
#include <kernel/faction.h>
|
||||||
|
|
||||||
|
#include <util/quicklist.h>
|
||||||
|
|
||||||
#include <tolua.h>
|
#include <tolua.h>
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -64,11 +66,7 @@ fix_familiars(struct lua_State * L)
|
||||||
equipment * eq;
|
equipment * eq;
|
||||||
char buffer[64];
|
char buffer[64];
|
||||||
|
|
||||||
while (mage->spells) {
|
ql_free(mage->spells);
|
||||||
spell_list * slist = mage->spells;
|
|
||||||
mage->spells = mage->spells->next;
|
|
||||||
free(slist);
|
|
||||||
}
|
|
||||||
|
|
||||||
snprintf(buffer, sizeof(buffer), "%s_familiar", u->race->_name[0]);
|
snprintf(buffer, sizeof(buffer), "%s_familiar", u->race->_name[0]);
|
||||||
eq = get_equipment(buffer);
|
eq = get_equipment(buffer);
|
||||||
|
|
16
src/main.c
16
src/main.c
|
@ -178,13 +178,15 @@ init_crtdbg(void)
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_spells(void)
|
dump_spells(void)
|
||||||
{
|
{
|
||||||
struct locale * loc = find_locale("de");
|
struct locale * loc = find_locale("de");
|
||||||
FILE * F = fopen("spells.csv", "w");
|
FILE * F = fopen("spells.csv", "w");
|
||||||
spell_list * spl = spells;
|
quicklist * ql;
|
||||||
for (;spl;spl=spl->next) {
|
int qi;
|
||||||
const spell * sp = spl->data;
|
|
||||||
|
for (ql=spells,qi=0;ql;ql_advance(&ql, &qi, 1)) {
|
||||||
|
spell * sp = (spell *)ql_get(ql, qi);
|
||||||
spell_component * spc = sp->components;
|
spell_component * spc = sp->components;
|
||||||
char components[128];
|
char components[128];
|
||||||
components[0]=0;
|
components[0]=0;
|
||||||
|
@ -198,7 +200,7 @@ write_spells(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_skills(void)
|
dump_skills(void)
|
||||||
{
|
{
|
||||||
struct locale * loc = find_locale("de");
|
struct locale * loc = find_locale("de");
|
||||||
FILE * F = fopen("skills.csv", "w");
|
FILE * F = fopen("skills.csv", "w");
|
||||||
|
@ -271,8 +273,8 @@ int main(int argc, char ** argv)
|
||||||
bind_eressea((struct lua_State *)global.vm_state);
|
bind_eressea((struct lua_State *)global.vm_state);
|
||||||
|
|
||||||
if (write_csv) {
|
if (write_csv) {
|
||||||
write_skills();
|
dump_skills();
|
||||||
write_spells();
|
dump_spells();
|
||||||
}
|
}
|
||||||
|
|
||||||
err = eressea_run(luafile, entry_point);
|
err = eressea_run(luafile, entry_point);
|
||||||
|
|
Loading…
Reference in a new issue