diff options
author | Bardur Arantsson <bardur@scientician.net> | 2014-12-23 19:55:33 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2014-12-23 22:11:20 +0100 |
commit | ffee481435ac0afe3f9a5a3eb07b2f2a46467089 (patch) | |
tree | 287e3096b1df1c611089f662d1ff377df7d4be1c /src/lua_bind.cc | |
parent | b64182371884b077d44a038a51d646d7ec8ff3c8 (diff) |
Promote parameter of get_level_device() to spell_type * and make it static
Diffstat (limited to 'src/lua_bind.cc')
-rw-r--r-- | src/lua_bind.cc | 7 |
1 files changed, 3 insertions, 4 deletions
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; |