summaryrefslogtreecommitdiff
path: root/src/spells5.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/spells5.c')
-rw-r--r--src/spells5.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/src/spells5.c b/src/spells5.c
index 821d4151..d2d9eda2 100644
--- a/src/spells5.c
+++ b/src/spells5.c
@@ -90,9 +90,10 @@ s16b get_random_spell(s16b random_type, int level)
return -1;
}
-bool_ check_spell_depends(s16b spell_idx)
+bool_ check_spell_depends(spell_type *spell)
{
- spell_type *spell = spell_at(spell_idx);
+ assert(spell != NULL);
+
if (spell->depend_func != NULL) {
return spell->depend_func();
} else {
@@ -100,34 +101,6 @@ bool_ check_spell_depends(s16b spell_idx)
}
}
-int spell_get_school_idx(s16b spell_idx, int idx)
-{
- spell_type *spell = spell_at(spell_idx);
- school_idx *school_idx = NULL;
- struct sglib_school_idx_iterator sit;
-
- if (idx < 0)
- {
- return -1;
- }
-
- for (school_idx = sglib_school_idx_it_init(&sit, spell->schools);
- school_idx != NULL && idx > 0;
- school_idx = sglib_school_idx_it_next(&sit))
- {
- /* Just counting down */
- }
-
- if (school_idx == NULL)
- {
- return -1;
- }
- else
- {
- return school_idx->i;
- }
-}
-
static void spell_init_music(spell_type *spell, s16b minimum_pval)
{
assert(spell != NULL);