diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2016-07-05 20:33:24 +0200 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2016-07-05 20:33:24 +0200 |
commit | 6437c36105b8c107b178a914961485833c68032b (patch) | |
tree | 4ff6d1142ce4eb44b54f3d3971bd7e659a347324 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | |
parent | b1dafc3e15322518c4ec0847ac81055297c91721 (diff) | |
download | hercules-6437c36105b8c107b178a914961485833c68032b.tar.gz hercules-6437c36105b8c107b178a914961485833c68032b.tar.bz2 hercules-6437c36105b8c107b178a914961485833c68032b.tar.xz hercules-6437c36105b8c107b178a914961485833c68032b.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 216 |
1 files changed, 208 insertions, 8 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 9685bb810..14b724f63 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -63041,31 +63041,32 @@ void HP_script_op_1(struct script_state *st, int op) { } return; } -void HP_script_check_buildin_argtype(struct script_state *st, int func) { +bool HP_script_check_buildin_argtype(struct script_state *st, int func) { int hIndex = 0; + bool retVal___ = false; if( HPMHooks.count.HP_script_check_buildin_argtype_pre ) { - void (*preHookFunc) (struct script_state **st, int *func); + bool (*preHookFunc) (struct script_state **st, int *func); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_buildin_argtype_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_script_check_buildin_argtype_pre[hIndex].func; - preHookFunc(&st, &func); + retVal___ = preHookFunc(&st, &func); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.check_buildin_argtype(st, func); + retVal___ = HPMHooks.source.script.check_buildin_argtype(st, func); } if( HPMHooks.count.HP_script_check_buildin_argtype_post ) { - void (*postHookFunc) (struct script_state *st, int func); + bool (*postHookFunc) (bool retVal___, struct script_state *st, int func); for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_buildin_argtype_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_script_check_buildin_argtype_post[hIndex].func; - postHookFunc(st, func); + retVal___ = postHookFunc(retVal___, st, func); } } - return; + return retVal___; } void HP_script_detach_state(struct script_state *st, bool dequeue_event) { int hIndex = 0; @@ -71083,6 +71084,99 @@ void HP_skill_get_requirement_unknown(struct status_change *sc, struct map_sessi } return; } +int HP_skill_splash_target(struct block_list *bl) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_skill_splash_target_pre ) { + int (*preHookFunc) (struct block_list **bl); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_splash_target_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_splash_target_pre[hIndex].func; + retVal___ = preHookFunc(&bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.splash_target(bl); + } + if( HPMHooks.count.HP_skill_splash_target_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_splash_target_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_splash_target_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_skill_check_npc_chaospanic(struct block_list *bl, va_list args) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_skill_check_npc_chaospanic_pre ) { + int (*preHookFunc) (struct block_list **bl, va_list args); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_npc_chaospanic_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_skill_check_npc_chaospanic_pre[hIndex].func; + retVal___ = preHookFunc(&bl, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.skill.check_npc_chaospanic(bl, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_skill_check_npc_chaospanic_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_npc_chaospanic_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_skill_check_npc_chaospanic_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_skill_count_wos(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_skill_count_wos_pre ) { + int (*preHookFunc) (struct block_list **bl, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_count_wos_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_count_wos_pre[hIndex].func; + retVal___ = preHookFunc(&bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.count_wos(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_count_wos_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_count_wos_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_count_wos_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} /* socket_interface */ void HP_sockt_init(void) { int hIndex = 0; @@ -75722,6 +75816,112 @@ void HP_status_read_job_db_sub(int idx, const char *name, struct config_setting_ } return; } +void HP_status_set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_status_set_sc_pre ) { + void (*preHookFunc) (uint16 *skill_id, sc_type *sc, int *icon, unsigned int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_set_sc_pre[hIndex].func; + preHookFunc(&skill_id, &sc, &icon, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.set_sc(skill_id, sc, icon, flag); + } + if( HPMHooks.count.HP_status_set_sc_post ) { + void (*postHookFunc) (uint16 skill_id, sc_type sc, int icon, unsigned int flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_set_sc_post[hIndex].func; + postHookFunc(skill_id, sc, icon, flag); + } + } + return; +} +void HP_status_copy(struct status_data *a, const struct status_data *b) { + int hIndex = 0; + if( HPMHooks.count.HP_status_copy_pre ) { + void (*preHookFunc) (struct status_data **a, const struct status_data **b); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_copy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_copy_pre[hIndex].func; + preHookFunc(&a, &b); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.copy(a, b); + } + if( HPMHooks.count.HP_status_copy_post ) { + void (*postHookFunc) (struct status_data *a, const struct status_data *b); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_copy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_copy_post[hIndex].func; + postHookFunc(a, b); + } + } + return; +} +unsigned short HP_status_base_matk_min(const struct status_data *st) { + int hIndex = 0; + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_base_matk_min_pre ) { + unsigned short (*preHookFunc) (const struct status_data **st); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_min_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_base_matk_min_pre[hIndex].func; + retVal___ = preHookFunc(&st); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.base_matk_min(st); + } + if( HPMHooks.count.HP_status_base_matk_min_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, const struct status_data *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_min_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_base_matk_min_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st); + } + } + return retVal___; +} +unsigned short HP_status_base_matk_max(const struct status_data *st) { + int hIndex = 0; + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_base_matk_max_pre ) { + unsigned short (*preHookFunc) (const struct status_data **st); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_max_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_base_matk_max_pre[hIndex].func; + retVal___ = preHookFunc(&st); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.base_matk_max(st); + } + if( HPMHooks.count.HP_status_base_matk_max_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, const struct status_data *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_max_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_base_matk_max_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st); + } + } + return retVal___; +} /* storage_interface */ void HP_storage_reconnect(void) { int hIndex = 0; |