summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2014-12-23 19:55:33 +0100
committerBardur Arantsson <bardur@scientician.net>2014-12-23 22:11:20 +0100
commitffee481435ac0afe3f9a5a3eb07b2f2a46467089 (patch)
tree287e3096b1df1c611089f662d1ff377df7d4be1c
parentb64182371884b077d44a038a51d646d7ec8ff3c8 (diff)
Promote parameter of get_level_device() to spell_type * and make it static
-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;