summaryrefslogtreecommitdiff
path: root/src/q_one.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2014-12-18 23:46:28 +0100
committerBardur Arantsson <bardur@scientician.net>2014-12-23 12:07:54 +0100
commit752611806d109d182227c22354bd380899ba5d67 (patch)
treebdf9d58d8b65fed83266d3d94b9cb8892e8b635e /src/q_one.cc
parent471e7819c6af3b3513770d0784aed22cb5597da7 (diff)
Update HOOK_IDENTIFY to new-style hook
Diffstat (limited to 'src/q_one.cc')
-rw-r--r--src/q_one.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/q_one.cc b/src/q_one.cc
index ea6b93fc..20022100 100644
--- a/src/q_one.cc
+++ b/src/q_one.cc
@@ -192,18 +192,13 @@ static bool_ quest_one_die_hook(const char *fmt)
return (FALSE);
}
-static bool_ quest_one_identify_hook(const char *fmt)
+static bool_ quest_one_identify_hook(void *, void *in_, void *)
{
- s32b item;
-
- item = get_next_arg(fmt);
+ struct hook_identify_in *in = static_cast<struct hook_identify_in *>(in_);
+ object_type *o_ptr = in->o_ptr;
if (cquest.status == QUEST_STATUS_TAKEN)
{
- object_type *o_ptr;
-
- o_ptr = get_object(item);
-
if ((o_ptr->name1 == ART_POWER) && (!object_known_p(o_ptr)))
{
cmsg_print(TERM_YELLOW, "You finally found the One Ring, source of Sauron's power, and key to");
@@ -351,7 +346,7 @@ bool_ quest_one_init_hook(int q_idx)
add_hook (HOOK_MONSTER_DEATH, quest_one_death_hook, "one_death");
add_hook_new(HOOK_DROP, quest_one_drop_hook, "one_drop", NULL);
add_hook (HOOK_WIELD, quest_one_wield_hook, "one_wield");
- add_hook (HOOK_IDENTIFY, quest_one_identify_hook, "one_id");
+ add_hook_new(HOOK_IDENTIFY, quest_one_identify_hook, "one_id", NULL);
}
if (cquest.status == QUEST_STATUS_UNTAKEN)
{