summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/externs.h1
-rw-r--r--src/lua_bind.cc7
2 files changed, 3 insertions, 5 deletions
diff --git a/src/externs.h b/src/externs.h
index dacb89b7..c6184f8c 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -2209,7 +2209,6 @@ extern int find_module(cptr name);
/* lua_bind.c */
extern s32b lua_get_level(spell_type *spell, s32b lvl, s32b max, s32b min, s32b bonus);
-extern s32b get_level_device(s32b s, s32b max, s32b min);
extern int get_mana(s32b s);
extern s32b get_power(s32b s);
extern s32b spell_chance(s32b s);
diff --git a/src/lua_bind.cc b/src/lua_bind.cc
index 36d378f2..e4a9bc60 100644
--- a/src/lua_bind.cc
+++ b/src/lua_bind.cc
@@ -45,11 +45,9 @@ s32b lua_get_level(spell_type *spell, s32b lvl, s32b max, s32b min, s32b bonus)
return lvl;
}
-/** This is the function to use when casting through a stick */
-s32b get_level_device(s32b s, s32b max, s32b min)
+static s32b get_level_device(spell_type *spell, s32b max, s32b min)
{
int lvl;
- spell_type *spell = spell_at(s);
/* No max specified ? assume 50 */
if (max <= 0) {
@@ -163,7 +161,8 @@ s32b get_level(s32b s, s32b max, s32b min)
{
/** Ahah shall we use Magic device instead ? */
if (get_level_use_stick > -1) {
- return get_level_device(s, max, min);
+ spell_type *spell = spell_at(s);
+ return get_level_device(spell, max, min);
} else {
s32b level;
bool_ notused;