summaryrefslogtreecommitdiff
path: root/src/q_one.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2014-12-19 01:21:46 +0100
committerBardur Arantsson <bardur@scientician.net>2014-12-23 12:07:54 +0100
commite6c73d8eb175fe69a6a8d341cbbc35b8873e1ed9 (patch)
treee46e64fda1fff187d10c79f057842ca6fb1eb537 /src/q_one.cc
parentaab1ab37bcc0f02a57c1559ff02bd7f4d8d42fca (diff)
Update HOOK_WIELD to new-style hook
Diffstat (limited to 'src/q_one.cc')
-rw-r--r--src/q_one.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/q_one.cc b/src/q_one.cc
index b869c429..3412de56 100644
--- a/src/q_one.cc
+++ b/src/q_one.cc
@@ -96,13 +96,10 @@ static bool_ quest_one_drop_hook(void *, void *in_, void *)
return TRUE;
}
-static bool_ quest_one_wield_hook(const char *fmt)
+static bool_ quest_one_wield_hook(void *, void *in_, void *)
{
- s32b o_idx;
- object_type *o_ptr;
-
- o_idx = get_next_arg(fmt);
- o_ptr = &p_ptr->inventory[o_idx];
+ struct hook_wield_in *in = static_cast<struct hook_wield_in *>(in_);
+ object_type *o_ptr = in->o_ptr;
if (cquest.status != QUEST_STATUS_TAKEN) return FALSE;
@@ -344,7 +341,7 @@ bool_ quest_one_init_hook(int q_idx)
add_hook (HOOK_LEVEL_END_GEN, quest_one_gen_hook, "one_gen");
add_hook_new(HOOK_MONSTER_DEATH, quest_one_death_hook, "one_death", NULL);
add_hook_new(HOOK_DROP, quest_one_drop_hook, "one_drop", NULL);
- add_hook (HOOK_WIELD, quest_one_wield_hook, "one_wield");
+ add_hook_new(HOOK_WIELD, quest_one_wield_hook, "one_wield", NULL);
add_hook_new(HOOK_IDENTIFY, quest_one_identify_hook, "one_id", NULL);
}
if (cquest.status == QUEST_STATUS_UNTAKEN)