diff options
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 250 |
1 files changed, 204 insertions, 46 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index d7e798637..f7b6ef056 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -24067,6 +24067,84 @@ void HP_clif_dressroom_open(struct map_session_data *sd, int view) { } return; } +void HP_clif_pOneClick_ItemIdentify(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pOneClick_ItemIdentify_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOneClick_ItemIdentify_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pOneClick_ItemIdentify_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pOneClick_ItemIdentify(fd, sd); + } + if( HPMHooks.count.HP_clif_pOneClick_ItemIdentify_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOneClick_ItemIdentify_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pOneClick_ItemIdentify_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_selectcart(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_selectcart_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selectcart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_selectcart_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.selectcart(sd); + } + if( HPMHooks.count.HP_clif_selectcart_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selectcart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_selectcart_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_pSelectCart(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pSelectCart_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectCart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pSelectCart_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pSelectCart(fd, sd); + } + if( HPMHooks.count.HP_clif_pSelectCart_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectCart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pSelectCart_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} /* cmdline */ void HP_cmdline_init(void) { int hIndex = 0; @@ -46153,6 +46231,33 @@ bool HP_mob_get_const(const config_setting_t *it, int *value) { } return retVal___; } +int HP_mob_db_validate_entry(struct mob_db *entry, int n, const char *source) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mob_db_validate_entry_pre ) { + int (*preHookFunc) (struct mob_db *entry, int *n, const char *source); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_validate_entry_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_db_validate_entry_pre[hIndex].func; + retVal___ = preHookFunc(entry, &n, source); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.db_validate_entry(entry, n, source); + } + if( HPMHooks.count.HP_mob_db_validate_entry_post ) { + int (*postHookFunc) (int retVal___, struct mob_db *entry, int *n, const char *source); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_validate_entry_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_db_validate_entry_post[hIndex].func; + retVal___ = postHookFunc(retVal___, entry, &n, source); + } + } + return retVal___; +} int HP_mob_read_libconfig(const char *filename, bool ignore_missing) { int hIndex = 0; int retVal___ = 0; @@ -46180,14 +46285,14 @@ int HP_mob_read_libconfig(const char *filename, bool ignore_missing) { } return retVal___; } -void HP_mob_read_db_additional_fields(struct mob_db *entry, int class_, config_setting_t *it, int n, const char *source) { +void HP_mob_read_db_additional_fields(struct mob_db *entry, config_setting_t *it, int n, const char *source) { int hIndex = 0; if( HPMHooks.count.HP_mob_read_db_additional_fields_pre ) { - void (*preHookFunc) (struct mob_db *entry, int *class_, config_setting_t *it, int *n, const char *source); + void (*preHookFunc) (struct mob_db *entry, config_setting_t *it, int *n, const char *source); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_additional_fields_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_mob_read_db_additional_fields_pre[hIndex].func; - preHookFunc(entry, &class_, it, &n, source); + preHookFunc(entry, it, &n, source); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46195,22 +46300,22 @@ void HP_mob_read_db_additional_fields(struct mob_db *entry, int class_, config_s } } { - HPMHooks.source.mob.read_db_additional_fields(entry, class_, it, n, source); + HPMHooks.source.mob.read_db_additional_fields(entry, it, n, source); } if( HPMHooks.count.HP_mob_read_db_additional_fields_post ) { - void (*postHookFunc) (struct mob_db *entry, int *class_, config_setting_t *it, int *n, const char *source); + void (*postHookFunc) (struct mob_db *entry, config_setting_t *it, int *n, const char *source); for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_additional_fields_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_mob_read_db_additional_fields_post[hIndex].func; - postHookFunc(entry, &class_, it, &n, source); + postHookFunc(entry, it, &n, source); } } return; } -bool HP_mob_read_db_sub(config_setting_t *mobt, int id, const char *source) { +int HP_mob_read_db_sub(config_setting_t *mobt, int id, const char *source) { int hIndex = 0; - bool retVal___ = false; + int retVal___ = 0; if( HPMHooks.count.HP_mob_read_db_sub_pre ) { - bool (*preHookFunc) (config_setting_t *mobt, int *id, const char *source); + int (*preHookFunc) (config_setting_t *mobt, int *id, const char *source); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_sub_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_mob_read_db_sub_pre[hIndex].func; @@ -46225,7 +46330,7 @@ bool HP_mob_read_db_sub(config_setting_t *mobt, int id, const char *source) { retVal___ = HPMHooks.source.mob.read_db_sub(mobt, id, source); } if( HPMHooks.count.HP_mob_read_db_sub_post ) { - bool (*postHookFunc) (bool retVal___, config_setting_t *mobt, int *id, const char *source); + int (*postHookFunc) (int retVal___, config_setting_t *mobt, int *id, const char *source); for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_sub_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_mob_read_db_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, mobt, &id, source); @@ -46233,14 +46338,14 @@ bool HP_mob_read_db_sub(config_setting_t *mobt, int id, const char *source) { } return retVal___; } -void HP_mob_read_db_drops_sub(struct mob_db *entry, struct status_data *mstatus, int class_, config_setting_t *t) { +void HP_mob_read_db_drops_sub(struct mob_db *entry, config_setting_t *t) { int hIndex = 0; if( HPMHooks.count.HP_mob_read_db_drops_sub_pre ) { - void (*preHookFunc) (struct mob_db *entry, struct status_data *mstatus, int *class_, config_setting_t *t); + void (*preHookFunc) (struct mob_db *entry, config_setting_t *t); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_sub_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_mob_read_db_drops_sub_pre[hIndex].func; - preHookFunc(entry, mstatus, &class_, t); + preHookFunc(entry, t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46248,25 +46353,25 @@ void HP_mob_read_db_drops_sub(struct mob_db *entry, struct status_data *mstatus, } } { - HPMHooks.source.mob.read_db_drops_sub(entry, mstatus, class_, t); + HPMHooks.source.mob.read_db_drops_sub(entry, t); } if( HPMHooks.count.HP_mob_read_db_drops_sub_post ) { - void (*postHookFunc) (struct mob_db *entry, struct status_data *mstatus, int *class_, config_setting_t *t); + void (*postHookFunc) (struct mob_db *entry, config_setting_t *t); for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_sub_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_mob_read_db_drops_sub_post[hIndex].func; - postHookFunc(entry, mstatus, &class_, t); + postHookFunc(entry, t); } } return; } -void HP_mob_read_db_mvpdrops_sub(struct mob_db *entry, struct status_data *mstatus, int class_, config_setting_t *t) { +void HP_mob_read_db_mvpdrops_sub(struct mob_db *entry, config_setting_t *t) { int hIndex = 0; if( HPMHooks.count.HP_mob_read_db_mvpdrops_sub_pre ) { - void (*preHookFunc) (struct mob_db *entry, struct status_data *mstatus, int *class_, config_setting_t *t); + void (*preHookFunc) (struct mob_db *entry, config_setting_t *t); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mvpdrops_sub_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_mob_read_db_mvpdrops_sub_pre[hIndex].func; - preHookFunc(entry, mstatus, &class_, t); + preHookFunc(entry, t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46274,26 +46379,26 @@ void HP_mob_read_db_mvpdrops_sub(struct mob_db *entry, struct status_data *mstat } } { - HPMHooks.source.mob.read_db_mvpdrops_sub(entry, mstatus, class_, t); + HPMHooks.source.mob.read_db_mvpdrops_sub(entry, t); } if( HPMHooks.count.HP_mob_read_db_mvpdrops_sub_post ) { - void (*postHookFunc) (struct mob_db *entry, struct status_data *mstatus, int *class_, config_setting_t *t); + void (*postHookFunc) (struct mob_db *entry, config_setting_t *t); for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mvpdrops_sub_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_mob_read_db_mvpdrops_sub_post[hIndex].func; - postHookFunc(entry, mstatus, &class_, t); + postHookFunc(entry, t); } } return; } -int HP_mob_read_db_mode_sub(struct mob_db *entry, struct status_data *mstatus, int class_, config_setting_t *t) { +int HP_mob_read_db_mode_sub(struct mob_db *entry, config_setting_t *t) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_mob_read_db_mode_sub_pre ) { - int (*preHookFunc) (struct mob_db *entry, struct status_data *mstatus, int *class_, config_setting_t *t); + int (*preHookFunc) (struct mob_db *entry, config_setting_t *t); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mode_sub_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_mob_read_db_mode_sub_pre[hIndex].func; - retVal___ = preHookFunc(entry, mstatus, &class_, t); + retVal___ = preHookFunc(entry, t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46301,25 +46406,25 @@ int HP_mob_read_db_mode_sub(struct mob_db *entry, struct status_data *mstatus, i } } { - retVal___ = HPMHooks.source.mob.read_db_mode_sub(entry, mstatus, class_, t); + retVal___ = HPMHooks.source.mob.read_db_mode_sub(entry, t); } if( HPMHooks.count.HP_mob_read_db_mode_sub_post ) { - int (*postHookFunc) (int retVal___, struct mob_db *entry, struct status_data *mstatus, int *class_, config_setting_t *t); + int (*postHookFunc) (int retVal___, struct mob_db *entry, config_setting_t *t); for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mode_sub_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_mob_read_db_mode_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, entry, mstatus, &class_, t); + retVal___ = postHookFunc(retVal___, entry, t); } } return retVal___; } -void HP_mob_read_db_stats_sub(struct mob_db *entry, struct status_data *mstatus, int class_, config_setting_t *t) { +void HP_mob_read_db_stats_sub(struct mob_db *entry, config_setting_t *t) { int hIndex = 0; if( HPMHooks.count.HP_mob_read_db_stats_sub_pre ) { - void (*preHookFunc) (struct mob_db *entry, struct status_data *mstatus, int *class_, config_setting_t *t); + void (*preHookFunc) (struct mob_db *entry, config_setting_t *t); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_stats_sub_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_mob_read_db_stats_sub_pre[hIndex].func; - preHookFunc(entry, mstatus, &class_, t); + preHookFunc(entry, t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46327,13 +46432,13 @@ void HP_mob_read_db_stats_sub(struct mob_db *entry, struct status_data *mstatus, } } { - HPMHooks.source.mob.read_db_stats_sub(entry, mstatus, class_, t); + HPMHooks.source.mob.read_db_stats_sub(entry, t); } if( HPMHooks.count.HP_mob_read_db_stats_sub_post ) { - void (*postHookFunc) (struct mob_db *entry, struct status_data *mstatus, int *class_, config_setting_t *t); + void (*postHookFunc) (struct mob_db *entry, config_setting_t *t); for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_stats_sub_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_mob_read_db_stats_sub_post[hIndex].func; - postHookFunc(entry, mstatus, &class_, t); + postHookFunc(entry, t); } } return; @@ -57571,6 +57676,33 @@ void HP_pc_update_idle_time(struct map_session_data *sd, enum e_battle_config_id } return; } +int HP_pc_have_magnifier(struct map_session_data *sd) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_pc_have_magnifier_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_have_magnifier_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_have_magnifier_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.have_magnifier(sd); + } + if( HPMHooks.count.HP_pc_have_magnifier_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_have_magnifier_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_have_magnifier_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} /* libpcre */ pcre* HP_libpcre_compile(const char *pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr) { int hIndex = 0; @@ -60089,14 +60221,14 @@ void HP_script_pop_stack(struct script_state *st, int start, int end) { } return; } -void HP_script_set_constant(const char *name, int value, bool isparameter) { +void HP_script_set_constant(const char *name, int value, bool is_parameter, bool is_deprecated) { int hIndex = 0; if( HPMHooks.count.HP_script_set_constant_pre ) { - void (*preHookFunc) (const char *name, int *value, bool *isparameter); + void (*preHookFunc) (const char *name, int *value, bool *is_parameter, bool *is_deprecated); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_script_set_constant_pre[hIndex].func; - preHookFunc(name, &value, &isparameter); + preHookFunc(name, &value, &is_parameter, &is_deprecated); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60104,25 +60236,25 @@ void HP_script_set_constant(const char *name, int value, bool isparameter) { } } { - HPMHooks.source.script.set_constant(name, value, isparameter); + HPMHooks.source.script.set_constant(name, value, is_parameter, is_deprecated); } if( HPMHooks.count.HP_script_set_constant_post ) { - void (*postHookFunc) (const char *name, int *value, bool *isparameter); + void (*postHookFunc) (const char *name, int *value, bool *is_parameter, bool *is_deprecated); for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_script_set_constant_post[hIndex].func; - postHookFunc(name, &value, &isparameter); + postHookFunc(name, &value, &is_parameter, &is_deprecated); } } return; } -void HP_script_set_constant2(const char *name, int value, bool isparameter) { +void HP_script_set_constant2(const char *name, int value, bool is_parameter, bool is_deprecated) { int hIndex = 0; if( HPMHooks.count.HP_script_set_constant2_pre ) { - void (*preHookFunc) (const char *name, int *value, bool *isparameter); + void (*preHookFunc) (const char *name, int *value, bool *is_parameter, bool *is_deprecated); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_script_set_constant2_pre[hIndex].func; - preHookFunc(name, &value, &isparameter); + preHookFunc(name, &value, &is_parameter, &is_deprecated); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60130,13 +60262,13 @@ void HP_script_set_constant2(const char *name, int value, bool isparameter) { } } { - HPMHooks.source.script.set_constant2(name, value, isparameter); + HPMHooks.source.script.set_constant2(name, value, is_parameter, is_deprecated); } if( HPMHooks.count.HP_script_set_constant2_post ) { - void (*postHookFunc) (const char *name, int *value, bool *isparameter); + void (*postHookFunc) (const char *name, int *value, bool *is_parameter, bool *is_deprecated); for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_script_set_constant2_post[hIndex].func; - postHookFunc(name, &value, &isparameter); + postHookFunc(name, &value, &is_parameter, &is_deprecated); } } return; @@ -61626,6 +61758,32 @@ void HP_script_read_constdb(void) { } return; } +void HP_script_constdb_comment(const char *comment) { + int hIndex = 0; + if( HPMHooks.count.HP_script_constdb_comment_pre ) { + void (*preHookFunc) (const char *comment); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_constdb_comment_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_constdb_comment_pre[hIndex].func; + preHookFunc(comment); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.constdb_comment(comment); + } + if( HPMHooks.count.HP_script_constdb_comment_post ) { + void (*postHookFunc) (const char *comment); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_constdb_comment_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_constdb_comment_post[hIndex].func; + postHookFunc(comment); + } + } + return; +} const char* HP_script_print_line(StringBuf *buf, const char *p, const char *mark, int line) { int hIndex = 0; const char* retVal___ = NULL; |