diff options
author | Bardur Arantsson <bardur@scientician.net> | 2014-12-18 22:28:59 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2014-12-23 12:07:54 +0100 |
commit | 666ce02020925a67386429b451d23071521d6da8 (patch) | |
tree | 9369a82a16042186f77210d47d7173780ce5d8e5 /src/q_betwen.cc | |
parent | 132e99238140b1628a2f0175a6edc85358fe8101 (diff) |
Update HOOK_CHAR_DUMP to new-style hook
Diffstat (limited to 'src/q_betwen.cc')
-rw-r--r-- | src/q_betwen.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/q_betwen.cc b/src/q_betwen.cc index 6f4072ca..f8d0ff7a 100644 --- a/src/q_betwen.cc +++ b/src/q_betwen.cc @@ -156,12 +156,15 @@ static bool_ quest_between_death_hook(const char *fmt) return FALSE; } -static bool_ quest_between_dump_hook(const char *fmt) +static bool_ quest_between_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 established a permanent void jumpgates liaison between Minas Anor and Gondolin,"); - fprintf(hook_file, "\n thus allowing the last alliance to exist."); + fprintf(f, "\n You established a permanent void jumpgates liaison between Minas Anor and Gondolin,"); + fprintf(f, "\n thus allowing the last alliance to exist."); } return (FALSE); } @@ -190,7 +193,7 @@ bool_ quest_between_init_hook(int q) add_hook(HOOK_QUEST_FINISH, quest_between_finish_hook, "between_finish"); add_hook(HOOK_MONSTER_DEATH, quest_between_death_hook, "between_death"); } - add_hook(HOOK_CHAR_DUMP, quest_between_dump_hook, "between_dump"); - add_hook(HOOK_INIT_QUEST, quest_between_forbid_hook, "between_forbid"); + add_hook_new(HOOK_CHAR_DUMP, quest_between_dump_hook, "between_dump", NULL); + add_hook (HOOK_INIT_QUEST, quest_between_forbid_hook, "between_forbid"); return (FALSE); } |