summaryrefslogtreecommitdiff
path: root/src/cmd2.c
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-05-12 12:32:36 +0200
committerBardur Arantsson <bardur@scientician.net>2012-05-12 12:32:36 +0200
commit0f3e84929038eeff1135bd7462347be64ac9fc71 (patch)
tree575905489b3e96c4483e2cd664ed8370a2dcbd76 /src/cmd2.c
parent226d3565889f551c00d4fccf184c98edb12c07c7 (diff)
Lua: Move "Udun" spell functions to C
Diffstat (limited to 'src/cmd2.c')
-rw-r--r--src/cmd2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd2.c b/src/cmd2.c
index 8c602db3..828cbc35 100644
--- a/src/cmd2.c
+++ b/src/cmd2.c
@@ -4565,8 +4565,10 @@ static bool_ item_tester_hook_sacrifiable(object_type *o_ptr)
return (TRUE);
/* Books without any udun spells */
- if ((o_ptr->tval == TV_BOOK) && (exec_lua(format("return udun_in_book(%d, %d)", o_ptr->sval, o_ptr->pval)) == 0))
+ if ((o_ptr->tval == TV_BOOK) && udun_in_book(o_ptr->sval, o_ptr->pval) <= 0)
+ {
return TRUE;
+ }
}
/* Assume not */