diff options
author | Hercules.ws <dev@herc.ws> | 2017-11-05 18:12:13 +0100 |
---|---|---|
committer | HerculesWSAPI <dev@herc.ws> | 2017-11-05 18:12:13 +0100 |
commit | fc5dc16c5d811df50aabe8f0614d440721773a3d (patch) | |
tree | 2abe053c4c9413bec451949f9c2c9db639a852db /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | |
parent | b236779fd1686d5f486eee3525d3368ac8680661 (diff) | |
download | hercules-fc5dc16c5d811df50aabe8f0614d440721773a3d.tar.gz hercules-fc5dc16c5d811df50aabe8f0614d440721773a3d.tar.bz2 hercules-fc5dc16c5d811df50aabe8f0614d440721773a3d.tar.xz hercules-fc5dc16c5d811df50aabe8f0614d440721773a3d.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index d0d062f4e..69658949c 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -52089,6 +52089,32 @@ bool HP_npc_db_checkid(const int id) { } return retVal___; } +void HP_npc_refresh(struct npc_data *nd) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_refresh_pre > 0) { + void (*preHookFunc) (struct npc_data **nd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_refresh_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_refresh_pre[hIndex].func; + preHookFunc(&nd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.refresh(nd); + } + if (HPMHooks.count.HP_npc_refresh_post > 0) { + void (*postHookFunc) (struct npc_data *nd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_refresh_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_refresh_post[hIndex].func; + postHookFunc(nd); + } + } + return; +} int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; |