forked from github/server
this spell school was misnamed. that's trouble.
This commit is contained in:
parent
131840054c
commit
7152ffd40f
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||
<spellbook name="cerddor">
|
||||
<spellbook name="tybied">
|
||||
<entry spell="create_roi" level="6" />
|
||||
<entry spell="earn_silver#tybied" level="1" />
|
||||
<entry spell="create_aots" level="6" />
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <kernel/spell.h>
|
||||
#include <kernel/magic.h>
|
||||
#include <util/quicklist.h>
|
||||
#include <util/log.h>
|
||||
|
||||
#include "spellbook.h"
|
||||
|
||||
|
@ -21,8 +22,11 @@ void spellbook_add(spellbook *sb, struct spell * sp, int level)
|
|||
spellbook_entry * sbe;
|
||||
|
||||
assert(sb && sp && level>0);
|
||||
assert(!spellbook_get(sb, sp));
|
||||
|
||||
#ifndef NDEBUG
|
||||
if (spellbook_get(sb, sp)) {
|
||||
log_error("duplicate spell in spellbook '%s': '%s'\n", sb->name, sp->sname);
|
||||
}
|
||||
#endif
|
||||
sbe = (spellbook_entry *)malloc(sizeof(spellbook_entry));
|
||||
sbe->sp = sp;
|
||||
sbe->level = level;
|
||||
|
|
Loading…
Reference in New Issue