From 7152ffd40f39e2ff3882a0aa7743e5f0944ef5d8 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 27 May 2012 09:52:44 -0700 Subject: [PATCH] this spell school was misnamed. that's trouble. --- res/spellbooks/tybied.xml | 2 +- src/kernel/spellbook.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/res/spellbooks/tybied.xml b/res/spellbooks/tybied.xml index 2965ec782..f6db0bfd5 100644 --- a/res/spellbooks/tybied.xml +++ b/res/spellbooks/tybied.xml @@ -1,5 +1,5 @@ - + diff --git a/src/kernel/spellbook.c b/src/kernel/spellbook.c index ab73bdd09..7093fca84 100644 --- a/src/kernel/spellbook.c +++ b/src/kernel/spellbook.c @@ -3,6 +3,7 @@ #include #include #include +#include #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;