diff options
author | Hercules.ws <dev@herc.ws> | 2019-10-19 16:47:07 +0200 |
---|---|---|
committer | HerculesWSAPI <dev@herc.ws> | 2019-10-19 16:47:07 +0200 |
commit | a7f67d0513cc6f55056a37d2f6ae55bcf58af174 (patch) | |
tree | cdeda16cb903f3c8ff57c2d0c922529546d3ec73 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | |
parent | 660830898b83342ab4eb822c7a61c604d37d645c (diff) | |
download | hercules-a7f67d0513cc6f55056a37d2f6ae55bcf58af174.tar.gz hercules-a7f67d0513cc6f55056a37d2f6ae55bcf58af174.tar.bz2 hercules-a7f67d0513cc6f55056a37d2f6ae55bcf58af174.tar.xz hercules-a7f67d0513cc6f55056a37d2f6ae55bcf58af174.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 | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 7a817f45d..8eefa292a 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -52322,6 +52322,33 @@ int HP_mob_warpchase_sub(struct block_list *bl, va_list ap) { } return retVal___; } +bool HP_mob_is_in_battle_state(const struct mob_data *md) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_is_in_battle_state_pre > 0) { + bool (*preHookFunc) (const struct mob_data **md); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_in_battle_state_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_is_in_battle_state_pre[hIndex].func; + retVal___ = preHookFunc(&md); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.is_in_battle_state(md); + } + if (HPMHooks.count.HP_mob_is_in_battle_state_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct mob_data *md); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_in_battle_state_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_is_in_battle_state_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick) { int hIndex = 0; int retVal___ = 0; |