diff options
author | Bardur Arantsson <bardur@scientician.net> | 2014-12-21 14:46:44 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2014-12-23 12:07:55 +0100 |
commit | e4e6bc690bb319a2fb1ddca60a1e9fb7b5f89a81 (patch) | |
tree | 62713e5ac9900dab6e5f2c337f9da4e5fdd4a682 /src/xtra1.cc | |
parent | c1a907e0bf6acc94e77f5af50cd8099977a9ab30 (diff) |
Update HOOK_CALC_HP to new-style hook
Diffstat (limited to 'src/xtra1.cc')
-rw-r--r-- | src/xtra1.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/xtra1.cc b/src/xtra1.cc index 043386ee..e125025e 100644 --- a/src/xtra1.cc +++ b/src/xtra1.cc @@ -1910,9 +1910,13 @@ void calc_hitpoints(void) } /* Hp mods? */ - if (process_hooks_ret(HOOK_CALC_HP, "d", "(d)", mhp)) { - mhp = process_hooks_return[0].num; + struct hook_calculate_hp_in in = { mhp }; + struct hook_calculate_hp_out out = { 0 }; + if (process_hooks_new(HOOK_CALC_HP, &in, &out)) + { + mhp = out.mhp; + } } /* Never less than 1 */ |