From 666ce02020925a67386429b451d23071521d6da8 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Thu, 18 Dec 2014 22:28:59 +0100 Subject: Update HOOK_CHAR_DUMP to new-style hook --- src/q_poison.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/q_poison.cc') diff --git a/src/q_poison.cc b/src/q_poison.cc index d65b8802..aa03eeab 100644 --- a/src/q_poison.cc +++ b/src/q_poison.cc @@ -135,11 +135,14 @@ static bool_ quest_poison_finish_hook(const char *fmt) return TRUE; } -static bool_ quest_poison_dump_hook(const char *fmt) +static bool_ quest_poison_dump_hook(void *, void *in_, void *) { + hook_chardump_in *in = static_cast(in_); + FILE *f = in->file; + if (cquest.status >= QUEST_STATUS_COMPLETED) { - fprintf(hook_file, "\n You saved the beautiful Mallorns of Lothlorien."); + fprintf(f, "\n You saved the beautiful Mallorns of Lothlorien."); } return (FALSE); } @@ -242,6 +245,6 @@ bool_ quest_poison_init_hook(int q_idx) { add_hook(HOOK_INIT_QUEST, quest_poison_quest_hook, "poison_iquest"); } - add_hook(HOOK_CHAR_DUMP, quest_poison_dump_hook, "poison_dump"); + add_hook_new(HOOK_CHAR_DUMP, quest_poison_dump_hook, "poison_dump", NULL); return (FALSE); } -- cgit v1.2.3