diff options
author | Bardur Arantsson <bardur@scientician.net> | 2014-12-18 19:22:12 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2014-12-23 12:07:54 +0100 |
commit | dd5f6f4691b9975c7087a9bb6f92befd59e5d795 (patch) | |
tree | 7c271361e39fa556fbadf68f53f46e904e5d478a /src/cmd2.cc | |
parent | c315b41d8fd2ee37a36eaaafec10994623392df3 (diff) |
Update HOOK_GIVE to new-style hook
Diffstat (limited to 'src/cmd2.cc')
-rw-r--r-- | src/cmd2.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/cmd2.cc b/src/cmd2.cc index 261207d4..e0a1bb08 100644 --- a/src/cmd2.cc +++ b/src/cmd2.cc @@ -5115,13 +5115,10 @@ void do_cmd_give() if (!get_item(&item, q, s, USE_INVEN)) return; /* Process hooks if there are any */ - if (!process_hooks(HOOK_GIVE, "(d,d)", c_ptr->m_idx, item)) + hook_give_in in = { c_ptr->m_idx, item }; + if (!process_hooks_new(HOOK_GIVE, &in, NULL)) { - hook_give_in in = { c_ptr->m_idx, item }; - if (!process_hooks_new(HOOK_GIVE, &in, NULL)) - { - msg_print("The monster does not want your item."); - } + msg_print("The monster does not want your item."); } /* Take a turn, even if the offer is declined */ |