summaryrefslogtreecommitdiff
path: root/src/q_hobbit.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2014-12-18 22:28:59 +0100
committerBardur Arantsson <bardur@scientician.net>2014-12-23 12:07:54 +0100
commit666ce02020925a67386429b451d23071521d6da8 (patch)
tree9369a82a16042186f77210d47d7173780ce5d8e5 /src/q_hobbit.cc
parent132e99238140b1628a2f0175a6edc85358fe8101 (diff)
Update HOOK_CHAR_DUMP to new-style hook
Diffstat (limited to 'src/q_hobbit.cc')
-rw-r--r--src/q_hobbit.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/q_hobbit.cc b/src/q_hobbit.cc
index 143e7599..c52b8653 100644
--- a/src/q_hobbit.cc
+++ b/src/q_hobbit.cc
@@ -160,11 +160,14 @@ static bool_ quest_hobbit_chat_hook(void *, void *in_, void *)
return TRUE;
}
-static bool_ quest_hobbit_dump_hook(const char *fmt)
+static bool_ quest_hobbit_dump_hook(void *, void *in_, void *)
{
+ struct hook_chardump_in *in = static_cast<struct hook_chardump_in *>(in_);
+ FILE *f = in->file;
+
if (cquest.status >= QUEST_STATUS_COMPLETED)
{
- fprintf(hook_file, "\n You saved a young hobbit from an horrible fate.");
+ fprintf(f, "\n You saved a young hobbit from an horrible fate.");
}
return (FALSE);
}
@@ -196,6 +199,6 @@ bool_ quest_hobbit_init_hook(int q_idx)
add_hook_new(HOOK_WILD_GEN, quest_hobbit_town_gen_hook, "hobbit_town_gen", NULL);
add_hook_new(HOOK_CHAT, quest_hobbit_chat_hook, "hobbit_chat", NULL);
}
- add_hook(HOOK_CHAR_DUMP, quest_hobbit_dump_hook, "hobbit_dump");
+ add_hook_new(HOOK_CHAR_DUMP, quest_hobbit_dump_hook, "hobbit_dump", NULL);
return (FALSE);
}