diff options
author | Hercules.ws <dev@herc.ws> | 2018-04-08 19:59:17 +0200 |
---|---|---|
committer | HerculesWSAPI <dev@herc.ws> | 2018-04-08 19:59:17 +0200 |
commit | dd6655709ea9f61cec8229d98fe9e4a9bc31bf14 (patch) | |
tree | faeddfa34d92eca176033b6a558ab29edf2f5994 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | |
parent | 86ca30e4d6140479f66d8d9f75d3f8157b561815 (diff) | |
download | hercules-dd6655709ea9f61cec8229d98fe9e4a9bc31bf14.tar.gz hercules-dd6655709ea9f61cec8229d98fe9e4a9bc31bf14.tar.bz2 hercules-dd6655709ea9f61cec8229d98fe9e4a9bc31bf14.tar.xz hercules-dd6655709ea9f61cec8229d98fe9e4a9bc31bf14.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 | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 6b89e4f65..9a844cb92 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -47346,6 +47346,59 @@ int HP_mob_db_searchname_array_sub(struct mob_db *monster, const char *str, int } return retVal___; } +void HP_mob_mvptomb_spawn_delayed(struct npc_data *nd) { + int hIndex = 0; + if (HPMHooks.count.HP_mob_mvptomb_spawn_delayed_pre > 0) { + void (*preHookFunc) (struct npc_data **nd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_spawn_delayed_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_mvptomb_spawn_delayed_pre[hIndex].func; + preHookFunc(&nd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.mvptomb_spawn_delayed(nd); + } + if (HPMHooks.count.HP_mob_mvptomb_spawn_delayed_post > 0) { + void (*postHookFunc) (struct npc_data *nd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_spawn_delayed_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_mvptomb_spawn_delayed_post[hIndex].func; + postHookFunc(nd); + } + } + return; +} +int HP_mob_mvptomb_delayspawn(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_mob_mvptomb_delayspawn_pre > 0) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_delayspawn_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_mvptomb_delayspawn_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.mvptomb_delayspawn(tid, tick, id, data); + } + if (HPMHooks.count.HP_mob_mvptomb_delayspawn_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_delayspawn_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_mvptomb_delayspawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, tid, tick, id, data); + } + } + return retVal___; +} void HP_mob_mvptomb_create(struct mob_data *md, char *killer, time_t time) { int hIndex = 0; if (HPMHooks.count.HP_mob_mvptomb_create_pre > 0) { |