diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Defs.inc | 40 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc | 32 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc | 8 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | 177 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 40 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 10 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 283 |
7 files changed, 496 insertions, 94 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index c11c9c3c0..a548d4eaf 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -592,8 +592,6 @@ typedef void (*HPMHOOK_pre_chr_parse_frommap_auth_request) (int *fd, int *id); typedef void (*HPMHOOK_post_chr_parse_frommap_auth_request) (int fd, int id); typedef void (*HPMHOOK_pre_chr_parse_frommap_update_ip) (int *fd, int *id); typedef void (*HPMHOOK_post_chr_parse_frommap_update_ip) (int fd, int id); -typedef void (*HPMHOOK_pre_chr_parse_frommap_request_stats_report) (int *fd); -typedef void (*HPMHOOK_post_chr_parse_frommap_request_stats_report) (int fd); typedef void (*HPMHOOK_pre_chr_parse_frommap_scdata_update) (int *fd); typedef void (*HPMHOOK_post_chr_parse_frommap_scdata_update) (int fd); typedef void (*HPMHOOK_pre_chr_parse_frommap_scdata_delete) (int *fd); @@ -832,8 +830,6 @@ typedef bool (*HPMHOOK_pre_chrif_divorce) (int *partner_id1, int *partner_id2); typedef bool (*HPMHOOK_post_chrif_divorce) (bool retVal___, int partner_id1, int partner_id2); typedef bool (*HPMHOOK_pre_chrif_removefriend) (int *char_id, int *friend_id); typedef bool (*HPMHOOK_post_chrif_removefriend) (bool retVal___, int char_id, int friend_id); -typedef void (*HPMHOOK_pre_chrif_send_report) (char **buf, int *len); -typedef void (*HPMHOOK_post_chrif_send_report) (char *buf, int len); typedef bool (*HPMHOOK_pre_chrif_flush) (void); typedef bool (*HPMHOOK_post_chrif_flush) (bool retVal___); typedef void (*HPMHOOK_pre_chrif_skillid2idx) (int *fd); @@ -4286,8 +4282,8 @@ typedef bool (*HPMHOOK_pre_map_iwall_set) (int16 *m, int16 *x, int16 *y, int *si typedef bool (*HPMHOOK_post_map_iwall_set) (bool retVal___, int16 m, int16 x, int16 y, int size, int8 dir, bool shootable, const char *wall_name); typedef void (*HPMHOOK_pre_map_iwall_get) (struct map_session_data **sd); typedef void (*HPMHOOK_post_map_iwall_get) (struct map_session_data *sd); -typedef void (*HPMHOOK_pre_map_iwall_remove) (const char **wall_name); -typedef void (*HPMHOOK_post_map_iwall_remove) (const char *wall_name); +typedef bool (*HPMHOOK_pre_map_iwall_remove) (const char **wall_name); +typedef bool (*HPMHOOK_post_map_iwall_remove) (bool retVal___, const char *wall_name); typedef int (*HPMHOOK_pre_map_addmobtolist) (unsigned short *m, struct spawn_data **spawn); typedef int (*HPMHOOK_post_map_addmobtolist) (int retVal___, unsigned short m, struct spawn_data *spawn); typedef void (*HPMHOOK_pre_map_spawnmobs) (int16 *m); @@ -5558,6 +5554,10 @@ typedef int (*HPMHOOK_pre_pc_checkequip) (struct map_session_data **sd, int *pos typedef int (*HPMHOOK_post_pc_checkequip) (int retVal___, struct map_session_data *sd, int pos); typedef int (*HPMHOOK_pre_pc_calc_skilltree) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_calc_skilltree) (int retVal___, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_pc_calc_skilltree_clear) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_calc_skilltree_clear) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_pc_calc_skilltree_bonus) (struct map_session_data **sd, int *classidx); +typedef void (*HPMHOOK_post_pc_calc_skilltree_bonus) (struct map_session_data *sd, int classidx); typedef int (*HPMHOOK_pre_pc_calc_skilltree_normalize_job) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_calc_skilltree_normalize_job) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_clean_skilltree) (struct map_session_data **sd); @@ -5654,6 +5654,8 @@ typedef int (*HPMHOOK_pre_pc_maxjoblv) (const struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_maxjoblv) (int retVal___, const struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_checkbaselevelup) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_checkbaselevelup) (int retVal___, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_pc_checkbaselevelup_sc) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_checkbaselevelup_sc) (struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_checkjoblevelup) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_checkjoblevelup) (int retVal___, struct map_session_data *sd); typedef bool (*HPMHOOK_pre_pc_gainexp) (struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, bool *is_quest); @@ -5686,6 +5688,8 @@ typedef int (*HPMHOOK_pre_pc_resetstate) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_resetstate) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_resetskill) (struct map_session_data **sd, int *flag); typedef int (*HPMHOOK_post_pc_resetskill) (int retVal___, struct map_session_data *sd, int flag); +typedef bool (*HPMHOOK_pre_pc_resetskill_job) (struct map_session_data **sd, int *index); +typedef bool (*HPMHOOK_post_pc_resetskill_job) (bool retVal___, struct map_session_data *sd, int index); typedef int (*HPMHOOK_pre_pc_resetfeel) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_resetfeel) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_resethate) (struct map_session_data **sd); @@ -5806,8 +5810,12 @@ typedef void (*HPMHOOK_pre_pc_delinvincibletimer) (struct map_session_data **sd) typedef void (*HPMHOOK_post_pc_delinvincibletimer) (struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_addspiritball) (struct map_session_data **sd, int *interval, int *max); typedef int (*HPMHOOK_post_pc_addspiritball) (int retVal___, struct map_session_data *sd, int interval, int max); +typedef int (*HPMHOOK_pre_pc_addspiritball_sub) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_addspiritball_sub) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_delspiritball) (struct map_session_data **sd, int *count, int *type); typedef int (*HPMHOOK_post_pc_delspiritball) (int retVal___, struct map_session_data *sd, int count, int type); +typedef int (*HPMHOOK_pre_pc_delspiritball_sub) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_delspiritball_sub) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_getmaxspiritball) (struct map_session_data **sd, int *min); typedef int (*HPMHOOK_post_pc_getmaxspiritball) (int retVal___, struct map_session_data *sd, int min); typedef void (*HPMHOOK_pre_pc_addfame) (struct map_session_data **sd, int *ranktype, int *count); @@ -5896,6 +5904,8 @@ typedef int (*HPMHOOK_pre_pc_follow_timer) (int *tid, int64 *tick, int *id, intp typedef int (*HPMHOOK_post_pc_follow_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef void (*HPMHOOK_pre_pc_read_skill_tree) (void); typedef void (*HPMHOOK_post_pc_read_skill_tree) (void); +typedef bool (*HPMHOOK_pre_pc_read_skill_job_skip) (short *skill_id, int *job_id); +typedef bool (*HPMHOOK_post_pc_read_skill_job_skip) (bool retVal___, short skill_id, int job_id); typedef void (*HPMHOOK_pre_pc_clear_skill_tree) (void); typedef void (*HPMHOOK_post_pc_clear_skill_tree) (void); typedef int (*HPMHOOK_pre_pc_isUseitem) (struct map_session_data **sd, int *n); @@ -5954,6 +5964,8 @@ typedef void (*HPMHOOK_pre_pc_check_supernovice_call) (struct map_session_data * typedef void (*HPMHOOK_post_pc_check_supernovice_call) (struct map_session_data *sd, const char *message); typedef bool (*HPMHOOK_pre_pc_check_basicskill) (struct map_session_data **sd, int *level); typedef bool (*HPMHOOK_post_pc_check_basicskill) (bool retVal___, struct map_session_data *sd, int level); +typedef bool (*HPMHOOK_pre_pc_isDeathPenaltyJob) (uint16 *job); +typedef bool (*HPMHOOK_post_pc_isDeathPenaltyJob) (bool retVal___, uint16 job); #endif // MAP_PC_H #ifdef MAP_NPC_H /* libpcre */ typedef pcre* (*HPMHOOK_pre_libpcre_compile) (const char **pattern, int *options, const char ***errptr, int **erroffset, const unsigned char **tableptr); @@ -6068,18 +6080,28 @@ typedef void (*HPMHOOK_pre_pincode_error) (int *account_id); typedef void (*HPMHOOK_post_pincode_error) (int account_id); typedef void (*HPMHOOK_pre_pincode_update) (int *account_id, char **pin); typedef void (*HPMHOOK_post_pincode_update) (int account_id, char *pin); -typedef void (*HPMHOOK_pre_pincode_sendstate) (int *fd, struct char_session_data **sd, uint16 *state); -typedef void (*HPMHOOK_post_pincode_sendstate) (int fd, struct char_session_data *sd, uint16 state); +typedef void (*HPMHOOK_pre_pincode_makestate) (int *fd, struct char_session_data **sd, enum pincode_make_response *state); +typedef void (*HPMHOOK_post_pincode_makestate) (int fd, struct char_session_data *sd, enum pincode_make_response state); +typedef void (*HPMHOOK_pre_pincode_editstate) (int *fd, struct char_session_data **sd, enum pincode_edit_response *state); +typedef void (*HPMHOOK_post_pincode_editstate) (int fd, struct char_session_data *sd, enum pincode_edit_response state); +typedef void (*HPMHOOK_pre_pincode_loginstate) (int *fd, struct char_session_data **sd, enum pincode_login_response *state); +typedef void (*HPMHOOK_post_pincode_loginstate) (int fd, struct char_session_data *sd, enum pincode_login_response state); typedef void (*HPMHOOK_pre_pincode_setnew) (int *fd, struct char_session_data **sd); typedef void (*HPMHOOK_post_pincode_setnew) (int fd, struct char_session_data *sd); typedef void (*HPMHOOK_pre_pincode_change) (int *fd, struct char_session_data **sd); typedef void (*HPMHOOK_post_pincode_change) (int fd, struct char_session_data *sd); +typedef bool (*HPMHOOK_pre_pincode_isBlacklisted) (const char **pin); +typedef bool (*HPMHOOK_post_pincode_isBlacklisted) (bool retVal___, const char *pin); typedef int (*HPMHOOK_pre_pincode_compare) (int *fd, struct char_session_data **sd, char **pin); typedef int (*HPMHOOK_post_pincode_compare) (int retVal___, int fd, struct char_session_data *sd, char *pin); typedef void (*HPMHOOK_pre_pincode_check) (int *fd, struct char_session_data **sd); typedef void (*HPMHOOK_post_pincode_check) (int fd, struct char_session_data *sd); typedef bool (*HPMHOOK_pre_pincode_config_read) (const char **filename, const struct config_t **config, bool *imported); typedef bool (*HPMHOOK_post_pincode_config_read) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef void (*HPMHOOK_pre_pincode_init) (void); +typedef void (*HPMHOOK_post_pincode_init) (void); +typedef void (*HPMHOOK_pre_pincode_final) (void); +typedef void (*HPMHOOK_post_pincode_final) (void); #endif // CHAR_PINCODE_H #ifdef MAP_QUEST_H /* quest */ typedef void (*HPMHOOK_pre_quest_init) (bool *minimal); @@ -7294,6 +7316,8 @@ typedef int (*HPMHOOK_pre_status_calc_pc_) (struct map_session_data **sd, enum e typedef int (*HPMHOOK_post_status_calc_pc_) (int retVal___, struct map_session_data *sd, enum e_status_calc_opt opt); typedef void (*HPMHOOK_pre_status_calc_pc_additional) (struct map_session_data **sd, enum e_status_calc_opt *opt); typedef void (*HPMHOOK_post_status_calc_pc_additional) (struct map_session_data *sd, enum e_status_calc_opt opt); +typedef void (*HPMHOOK_pre_status_calc_pc_recover_hp) (struct map_session_data **sd, struct status_data **bstatus); +typedef void (*HPMHOOK_post_status_calc_pc_recover_hp) (struct map_session_data *sd, struct status_data *bstatus); typedef int (*HPMHOOK_pre_status_calc_homunculus_) (struct homun_data **hd, enum e_status_calc_opt *opt); typedef int (*HPMHOOK_post_status_calc_homunculus_) (int retVal___, struct homun_data *hd, enum e_status_calc_opt opt); typedef int (*HPMHOOK_pre_status_calc_mercenary_) (struct mercenary_data **md, enum e_status_calc_opt *opt); diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc index d0b4ac5ce..be39bf2ea 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc @@ -234,8 +234,6 @@ struct { struct HPMHookPoint *HP_chr_parse_frommap_auth_request_post; struct HPMHookPoint *HP_chr_parse_frommap_update_ip_pre; struct HPMHookPoint *HP_chr_parse_frommap_update_ip_post; - struct HPMHookPoint *HP_chr_parse_frommap_request_stats_report_pre; - struct HPMHookPoint *HP_chr_parse_frommap_request_stats_report_post; struct HPMHookPoint *HP_chr_parse_frommap_scdata_update_pre; struct HPMHookPoint *HP_chr_parse_frommap_scdata_update_post; struct HPMHookPoint *HP_chr_parse_frommap_scdata_delete_pre; @@ -1248,18 +1246,28 @@ struct { struct HPMHookPoint *HP_pincode_error_post; struct HPMHookPoint *HP_pincode_update_pre; struct HPMHookPoint *HP_pincode_update_post; - struct HPMHookPoint *HP_pincode_sendstate_pre; - struct HPMHookPoint *HP_pincode_sendstate_post; + struct HPMHookPoint *HP_pincode_makestate_pre; + struct HPMHookPoint *HP_pincode_makestate_post; + struct HPMHookPoint *HP_pincode_editstate_pre; + struct HPMHookPoint *HP_pincode_editstate_post; + struct HPMHookPoint *HP_pincode_loginstate_pre; + struct HPMHookPoint *HP_pincode_loginstate_post; struct HPMHookPoint *HP_pincode_setnew_pre; struct HPMHookPoint *HP_pincode_setnew_post; struct HPMHookPoint *HP_pincode_change_pre; struct HPMHookPoint *HP_pincode_change_post; + struct HPMHookPoint *HP_pincode_isBlacklisted_pre; + struct HPMHookPoint *HP_pincode_isBlacklisted_post; struct HPMHookPoint *HP_pincode_compare_pre; struct HPMHookPoint *HP_pincode_compare_post; struct HPMHookPoint *HP_pincode_check_pre; struct HPMHookPoint *HP_pincode_check_post; struct HPMHookPoint *HP_pincode_config_read_pre; struct HPMHookPoint *HP_pincode_config_read_post; + struct HPMHookPoint *HP_pincode_init_pre; + struct HPMHookPoint *HP_pincode_init_post; + struct HPMHookPoint *HP_pincode_final_pre; + struct HPMHookPoint *HP_pincode_final_post; struct HPMHookPoint *HP_rnd_init_pre; struct HPMHookPoint *HP_rnd_init_post; struct HPMHookPoint *HP_rnd_final_pre; @@ -1763,8 +1771,6 @@ struct { int HP_chr_parse_frommap_auth_request_post; int HP_chr_parse_frommap_update_ip_pre; int HP_chr_parse_frommap_update_ip_post; - int HP_chr_parse_frommap_request_stats_report_pre; - int HP_chr_parse_frommap_request_stats_report_post; int HP_chr_parse_frommap_scdata_update_pre; int HP_chr_parse_frommap_scdata_update_post; int HP_chr_parse_frommap_scdata_delete_pre; @@ -2777,18 +2783,28 @@ struct { int HP_pincode_error_post; int HP_pincode_update_pre; int HP_pincode_update_post; - int HP_pincode_sendstate_pre; - int HP_pincode_sendstate_post; + int HP_pincode_makestate_pre; + int HP_pincode_makestate_post; + int HP_pincode_editstate_pre; + int HP_pincode_editstate_post; + int HP_pincode_loginstate_pre; + int HP_pincode_loginstate_post; int HP_pincode_setnew_pre; int HP_pincode_setnew_post; int HP_pincode_change_pre; int HP_pincode_change_post; + int HP_pincode_isBlacklisted_pre; + int HP_pincode_isBlacklisted_post; int HP_pincode_compare_pre; int HP_pincode_compare_post; int HP_pincode_check_pre; int HP_pincode_check_post; int HP_pincode_config_read_pre; int HP_pincode_config_read_post; + int HP_pincode_init_pre; + int HP_pincode_init_post; + int HP_pincode_final_pre; + int HP_pincode_final_post; int HP_rnd_init_pre; int HP_rnd_init_post; int HP_rnd_final_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc index 36a115e1b..3ba47102c 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc @@ -132,7 +132,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chr->map_auth_failed, HP_chr_map_auth_failed) }, { HP_POP(chr->parse_frommap_auth_request, HP_chr_parse_frommap_auth_request) }, { HP_POP(chr->parse_frommap_update_ip, HP_chr_parse_frommap_update_ip) }, - { HP_POP(chr->parse_frommap_request_stats_report, HP_chr_parse_frommap_request_stats_report) }, { HP_POP(chr->parse_frommap_scdata_update, HP_chr_parse_frommap_scdata_update) }, { HP_POP(chr->parse_frommap_scdata_delete, HP_chr_parse_frommap_scdata_delete) }, { HP_POP(chr->parse_frommap, HP_chr_parse_frommap) }, @@ -666,12 +665,17 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pincode->decrypt, HP_pincode_decrypt) }, { HP_POP(pincode->error, HP_pincode_error) }, { HP_POP(pincode->update, HP_pincode_update) }, - { HP_POP(pincode->sendstate, HP_pincode_sendstate) }, + { HP_POP(pincode->makestate, HP_pincode_makestate) }, + { HP_POP(pincode->editstate, HP_pincode_editstate) }, + { HP_POP(pincode->loginstate, HP_pincode_loginstate) }, { HP_POP(pincode->setnew, HP_pincode_setnew) }, { HP_POP(pincode->change, HP_pincode_change) }, + { HP_POP(pincode->isBlacklisted, HP_pincode_isBlacklisted) }, { HP_POP(pincode->compare, HP_pincode_compare) }, { HP_POP(pincode->check, HP_pincode_check) }, { HP_POP(pincode->config_read, HP_pincode_config_read) }, + { HP_POP(pincode->init, HP_pincode_init) }, + { HP_POP(pincode->final, HP_pincode_final) }, /* rnd_interface */ { HP_POP(rnd->init, HP_rnd_init) }, { HP_POP(rnd->final, HP_rnd_final) }, diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index 6ea10f78f..a15eccc0c 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -2788,32 +2788,6 @@ void HP_chr_parse_frommap_update_ip(int fd, int id) { } return; } -void HP_chr_parse_frommap_request_stats_report(int fd) { - int hIndex = 0; - if (HPMHooks.count.HP_chr_parse_frommap_request_stats_report_pre > 0) { - void (*preHookFunc) (int *fd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_stats_report_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_chr_parse_frommap_request_stats_report_pre[hIndex].func; - preHookFunc(&fd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.chr.parse_frommap_request_stats_report(fd); - } - if (HPMHooks.count.HP_chr_parse_frommap_request_stats_report_post > 0) { - void (*postHookFunc) (int fd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_stats_report_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_chr_parse_frommap_request_stats_report_post[hIndex].func; - postHookFunc(fd); - } - } - return; -} void HP_chr_parse_frommap_scdata_update(int fd) { int hIndex = 0; if (HPMHooks.count.HP_chr_parse_frommap_scdata_update_pre > 0) { @@ -16353,13 +16327,13 @@ void HP_pincode_update(int account_id, char *pin) { } return; } -void HP_pincode_sendstate(int fd, struct char_session_data *sd, uint16 state) { +void HP_pincode_makestate(int fd, struct char_session_data *sd, enum pincode_make_response state) { int hIndex = 0; - if (HPMHooks.count.HP_pincode_sendstate_pre > 0) { - void (*preHookFunc) (int *fd, struct char_session_data **sd, uint16 *state); + if (HPMHooks.count.HP_pincode_makestate_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd, enum pincode_make_response *state); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_sendstate_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_pincode_sendstate_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_makestate_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pincode_makestate_pre[hIndex].func; preHookFunc(&fd, &sd, &state); } if (*HPMforce_return) { @@ -16368,12 +16342,64 @@ void HP_pincode_sendstate(int fd, struct char_session_data *sd, uint16 state) { } } { - HPMHooks.source.pincode.sendstate(fd, sd, state); + HPMHooks.source.pincode.makestate(fd, sd, state); } - if (HPMHooks.count.HP_pincode_sendstate_post > 0) { - void (*postHookFunc) (int fd, struct char_session_data *sd, uint16 state); - for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_sendstate_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_pincode_sendstate_post[hIndex].func; + if (HPMHooks.count.HP_pincode_makestate_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd, enum pincode_make_response state); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_makestate_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pincode_makestate_post[hIndex].func; + postHookFunc(fd, sd, state); + } + } + return; +} +void HP_pincode_editstate(int fd, struct char_session_data *sd, enum pincode_edit_response state) { + int hIndex = 0; + if (HPMHooks.count.HP_pincode_editstate_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd, enum pincode_edit_response *state); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_editstate_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pincode_editstate_pre[hIndex].func; + preHookFunc(&fd, &sd, &state); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.editstate(fd, sd, state); + } + if (HPMHooks.count.HP_pincode_editstate_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd, enum pincode_edit_response state); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_editstate_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pincode_editstate_post[hIndex].func; + postHookFunc(fd, sd, state); + } + } + return; +} +void HP_pincode_loginstate(int fd, struct char_session_data *sd, enum pincode_login_response state) { + int hIndex = 0; + if (HPMHooks.count.HP_pincode_loginstate_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd, enum pincode_login_response *state); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_loginstate_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pincode_loginstate_pre[hIndex].func; + preHookFunc(&fd, &sd, &state); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.loginstate(fd, sd, state); + } + if (HPMHooks.count.HP_pincode_loginstate_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd, enum pincode_login_response state); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_loginstate_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pincode_loginstate_post[hIndex].func; postHookFunc(fd, sd, state); } } @@ -16431,6 +16457,33 @@ void HP_pincode_change(int fd, struct char_session_data *sd) { } return; } +bool HP_pincode_isBlacklisted(const char *pin) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pincode_isBlacklisted_pre > 0) { + bool (*preHookFunc) (const char **pin); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_isBlacklisted_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pincode_isBlacklisted_pre[hIndex].func; + retVal___ = preHookFunc(&pin); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pincode.isBlacklisted(pin); + } + if (HPMHooks.count.HP_pincode_isBlacklisted_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *pin); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_isBlacklisted_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pincode_isBlacklisted_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pin); + } + } + return retVal___; +} int HP_pincode_compare(int fd, struct char_session_data *sd, char *pin) { int hIndex = 0; int retVal___ = 0; @@ -16511,6 +16564,58 @@ bool HP_pincode_config_read(const char *filename, const struct config_t *config, } return retVal___; } +void HP_pincode_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_pincode_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pincode_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.init(); + } + if (HPMHooks.count.HP_pincode_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pincode_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_pincode_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_pincode_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pincode_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.final(); + } + if (HPMHooks.count.HP_pincode_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pincode_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} /* rnd_interface */ void HP_rnd_init(void) { int hIndex = 0; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index cbfaf1b65..19f91bb11 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -430,8 +430,6 @@ struct { struct HPMHookPoint *HP_chrif_divorce_post; struct HPMHookPoint *HP_chrif_removefriend_pre; struct HPMHookPoint *HP_chrif_removefriend_post; - struct HPMHookPoint *HP_chrif_send_report_pre; - struct HPMHookPoint *HP_chrif_send_report_post; struct HPMHookPoint *HP_chrif_flush_pre; struct HPMHookPoint *HP_chrif_flush_post; struct HPMHookPoint *HP_chrif_skillid2idx_pre; @@ -4212,6 +4210,10 @@ struct { struct HPMHookPoint *HP_pc_checkequip_post; struct HPMHookPoint *HP_pc_calc_skilltree_pre; struct HPMHookPoint *HP_pc_calc_skilltree_post; + struct HPMHookPoint *HP_pc_calc_skilltree_clear_pre; + struct HPMHookPoint *HP_pc_calc_skilltree_clear_post; + struct HPMHookPoint *HP_pc_calc_skilltree_bonus_pre; + struct HPMHookPoint *HP_pc_calc_skilltree_bonus_post; struct HPMHookPoint *HP_pc_calc_skilltree_normalize_job_pre; struct HPMHookPoint *HP_pc_calc_skilltree_normalize_job_post; struct HPMHookPoint *HP_pc_clean_skilltree_pre; @@ -4308,6 +4310,8 @@ struct { struct HPMHookPoint *HP_pc_maxjoblv_post; struct HPMHookPoint *HP_pc_checkbaselevelup_pre; struct HPMHookPoint *HP_pc_checkbaselevelup_post; + struct HPMHookPoint *HP_pc_checkbaselevelup_sc_pre; + struct HPMHookPoint *HP_pc_checkbaselevelup_sc_post; struct HPMHookPoint *HP_pc_checkjoblevelup_pre; struct HPMHookPoint *HP_pc_checkjoblevelup_post; struct HPMHookPoint *HP_pc_gainexp_pre; @@ -4340,6 +4344,8 @@ struct { struct HPMHookPoint *HP_pc_resetstate_post; struct HPMHookPoint *HP_pc_resetskill_pre; struct HPMHookPoint *HP_pc_resetskill_post; + struct HPMHookPoint *HP_pc_resetskill_job_pre; + struct HPMHookPoint *HP_pc_resetskill_job_post; struct HPMHookPoint *HP_pc_resetfeel_pre; struct HPMHookPoint *HP_pc_resetfeel_post; struct HPMHookPoint *HP_pc_resethate_pre; @@ -4460,8 +4466,12 @@ struct { struct HPMHookPoint *HP_pc_delinvincibletimer_post; struct HPMHookPoint *HP_pc_addspiritball_pre; struct HPMHookPoint *HP_pc_addspiritball_post; + struct HPMHookPoint *HP_pc_addspiritball_sub_pre; + struct HPMHookPoint *HP_pc_addspiritball_sub_post; struct HPMHookPoint *HP_pc_delspiritball_pre; struct HPMHookPoint *HP_pc_delspiritball_post; + struct HPMHookPoint *HP_pc_delspiritball_sub_pre; + struct HPMHookPoint *HP_pc_delspiritball_sub_post; struct HPMHookPoint *HP_pc_getmaxspiritball_pre; struct HPMHookPoint *HP_pc_getmaxspiritball_post; struct HPMHookPoint *HP_pc_addfame_pre; @@ -4550,6 +4560,8 @@ struct { struct HPMHookPoint *HP_pc_follow_timer_post; struct HPMHookPoint *HP_pc_read_skill_tree_pre; struct HPMHookPoint *HP_pc_read_skill_tree_post; + struct HPMHookPoint *HP_pc_read_skill_job_skip_pre; + struct HPMHookPoint *HP_pc_read_skill_job_skip_post; struct HPMHookPoint *HP_pc_clear_skill_tree_pre; struct HPMHookPoint *HP_pc_clear_skill_tree_post; struct HPMHookPoint *HP_pc_isUseitem_pre; @@ -4608,6 +4620,8 @@ struct { struct HPMHookPoint *HP_pc_check_supernovice_call_post; struct HPMHookPoint *HP_pc_check_basicskill_pre; struct HPMHookPoint *HP_pc_check_basicskill_post; + struct HPMHookPoint *HP_pc_isDeathPenaltyJob_pre; + struct HPMHookPoint *HP_pc_isDeathPenaltyJob_post; struct HPMHookPoint *HP_libpcre_compile_pre; struct HPMHookPoint *HP_libpcre_compile_post; struct HPMHookPoint *HP_libpcre_study_pre; @@ -5902,6 +5916,8 @@ struct { struct HPMHookPoint *HP_status_calc_pc__post; struct HPMHookPoint *HP_status_calc_pc_additional_pre; struct HPMHookPoint *HP_status_calc_pc_additional_post; + struct HPMHookPoint *HP_status_calc_pc_recover_hp_pre; + struct HPMHookPoint *HP_status_calc_pc_recover_hp_post; struct HPMHookPoint *HP_status_calc_homunculus__pre; struct HPMHookPoint *HP_status_calc_homunculus__post; struct HPMHookPoint *HP_status_calc_mercenary__pre; @@ -6749,8 +6765,6 @@ struct { int HP_chrif_divorce_post; int HP_chrif_removefriend_pre; int HP_chrif_removefriend_post; - int HP_chrif_send_report_pre; - int HP_chrif_send_report_post; int HP_chrif_flush_pre; int HP_chrif_flush_post; int HP_chrif_skillid2idx_pre; @@ -10531,6 +10545,10 @@ struct { int HP_pc_checkequip_post; int HP_pc_calc_skilltree_pre; int HP_pc_calc_skilltree_post; + int HP_pc_calc_skilltree_clear_pre; + int HP_pc_calc_skilltree_clear_post; + int HP_pc_calc_skilltree_bonus_pre; + int HP_pc_calc_skilltree_bonus_post; int HP_pc_calc_skilltree_normalize_job_pre; int HP_pc_calc_skilltree_normalize_job_post; int HP_pc_clean_skilltree_pre; @@ -10627,6 +10645,8 @@ struct { int HP_pc_maxjoblv_post; int HP_pc_checkbaselevelup_pre; int HP_pc_checkbaselevelup_post; + int HP_pc_checkbaselevelup_sc_pre; + int HP_pc_checkbaselevelup_sc_post; int HP_pc_checkjoblevelup_pre; int HP_pc_checkjoblevelup_post; int HP_pc_gainexp_pre; @@ -10659,6 +10679,8 @@ struct { int HP_pc_resetstate_post; int HP_pc_resetskill_pre; int HP_pc_resetskill_post; + int HP_pc_resetskill_job_pre; + int HP_pc_resetskill_job_post; int HP_pc_resetfeel_pre; int HP_pc_resetfeel_post; int HP_pc_resethate_pre; @@ -10779,8 +10801,12 @@ struct { int HP_pc_delinvincibletimer_post; int HP_pc_addspiritball_pre; int HP_pc_addspiritball_post; + int HP_pc_addspiritball_sub_pre; + int HP_pc_addspiritball_sub_post; int HP_pc_delspiritball_pre; int HP_pc_delspiritball_post; + int HP_pc_delspiritball_sub_pre; + int HP_pc_delspiritball_sub_post; int HP_pc_getmaxspiritball_pre; int HP_pc_getmaxspiritball_post; int HP_pc_addfame_pre; @@ -10869,6 +10895,8 @@ struct { int HP_pc_follow_timer_post; int HP_pc_read_skill_tree_pre; int HP_pc_read_skill_tree_post; + int HP_pc_read_skill_job_skip_pre; + int HP_pc_read_skill_job_skip_post; int HP_pc_clear_skill_tree_pre; int HP_pc_clear_skill_tree_post; int HP_pc_isUseitem_pre; @@ -10927,6 +10955,8 @@ struct { int HP_pc_check_supernovice_call_post; int HP_pc_check_basicskill_pre; int HP_pc_check_basicskill_post; + int HP_pc_isDeathPenaltyJob_pre; + int HP_pc_isDeathPenaltyJob_post; int HP_libpcre_compile_pre; int HP_libpcre_compile_post; int HP_libpcre_study_pre; @@ -12221,6 +12251,8 @@ struct { int HP_status_calc_pc__post; int HP_status_calc_pc_additional_pre; int HP_status_calc_pc_additional_post; + int HP_status_calc_pc_recover_hp_pre; + int HP_status_calc_pc_recover_hp_post; int HP_status_calc_homunculus__pre; int HP_status_calc_homunculus__post; int HP_status_calc_mercenary__pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 5fdfd9e03..711e25d30 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -236,7 +236,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chrif->changesex, HP_chrif_changesex) }, { HP_POP(chrif->divorce, HP_chrif_divorce) }, { HP_POP(chrif->removefriend, HP_chrif_removefriend) }, - { HP_POP(chrif->send_report, HP_chrif_send_report) }, { HP_POP(chrif->flush, HP_chrif_flush) }, { HP_POP(chrif->skillid2idx, HP_chrif_skillid2idx) }, { HP_POP(chrif->sd_to_auth, HP_chrif_sd_to_auth) }, @@ -2162,6 +2161,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->checkallowskill, HP_pc_checkallowskill) }, { HP_POP(pc->checkequip, HP_pc_checkequip) }, { HP_POP(pc->calc_skilltree, HP_pc_calc_skilltree) }, + { HP_POP(pc->calc_skilltree_clear, HP_pc_calc_skilltree_clear) }, + { HP_POP(pc->calc_skilltree_bonus, HP_pc_calc_skilltree_bonus) }, { HP_POP(pc->calc_skilltree_normalize_job, HP_pc_calc_skilltree_normalize_job) }, { HP_POP(pc->clean_skilltree, HP_pc_clean_skilltree) }, { HP_POP(pc->setpos, HP_pc_setpos) }, @@ -2210,6 +2211,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->maxbaselv, HP_pc_maxbaselv) }, { HP_POP(pc->maxjoblv, HP_pc_maxjoblv) }, { HP_POP(pc->checkbaselevelup, HP_pc_checkbaselevelup) }, + { HP_POP(pc->checkbaselevelup_sc, HP_pc_checkbaselevelup_sc) }, { HP_POP(pc->checkjoblevelup, HP_pc_checkjoblevelup) }, { HP_POP(pc->gainexp, HP_pc_gainexp) }, { HP_POP(pc->nextbaseexp, HP_pc_nextbaseexp) }, @@ -2226,6 +2228,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->resetlvl, HP_pc_resetlvl) }, { HP_POP(pc->resetstate, HP_pc_resetstate) }, { HP_POP(pc->resetskill, HP_pc_resetskill) }, + { HP_POP(pc->resetskill_job, HP_pc_resetskill_job) }, { HP_POP(pc->resetfeel, HP_pc_resetfeel) }, { HP_POP(pc->resethate, HP_pc_resethate) }, { HP_POP(pc->equipitem, HP_pc_equipitem) }, @@ -2286,7 +2289,9 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->setinvincibletimer, HP_pc_setinvincibletimer) }, { HP_POP(pc->delinvincibletimer, HP_pc_delinvincibletimer) }, { HP_POP(pc->addspiritball, HP_pc_addspiritball) }, + { HP_POP(pc->addspiritball_sub, HP_pc_addspiritball_sub) }, { HP_POP(pc->delspiritball, HP_pc_delspiritball) }, + { HP_POP(pc->delspiritball_sub, HP_pc_delspiritball_sub) }, { HP_POP(pc->getmaxspiritball, HP_pc_getmaxspiritball) }, { HP_POP(pc->addfame, HP_pc_addfame) }, { HP_POP(pc->fame_rank, HP_pc_fame_rank) }, @@ -2331,6 +2336,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->autosave, HP_pc_autosave) }, { HP_POP(pc->follow_timer, HP_pc_follow_timer) }, { HP_POP(pc->read_skill_tree, HP_pc_read_skill_tree) }, + { HP_POP(pc->read_skill_job_skip, HP_pc_read_skill_job_skip) }, { HP_POP(pc->clear_skill_tree, HP_pc_clear_skill_tree) }, { HP_POP(pc->isUseitem, HP_pc_isUseitem) }, { HP_POP(pc->show_steal, HP_pc_show_steal) }, @@ -2360,6 +2366,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->process_chat_message, HP_pc_process_chat_message) }, { HP_POP(pc->check_supernovice_call, HP_pc_check_supernovice_call) }, { HP_POP(pc->check_basicskill, HP_pc_check_basicskill) }, + { HP_POP(pc->isDeathPenaltyJob, HP_pc_isDeathPenaltyJob) }, /* pcre_interface */ { HP_POP(libpcre->compile, HP_libpcre_compile) }, { HP_POP(libpcre->study, HP_libpcre_study) }, @@ -3019,6 +3026,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(status->calc_pet_, HP_status_calc_pet_) }, { HP_POP(status->calc_pc_, HP_status_calc_pc_) }, { HP_POP(status->calc_pc_additional, HP_status_calc_pc_additional) }, + { HP_POP(status->calc_pc_recover_hp, HP_status_calc_pc_recover_hp) }, { HP_POP(status->calc_homunculus_, HP_status_calc_homunculus_) }, { HP_POP(status->calc_mercenary_, HP_status_calc_mercenary_) }, { HP_POP(status->calc_elemental_, HP_status_calc_elemental_) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 02cf68bd2..0d07e26a2 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -5499,32 +5499,6 @@ bool HP_chrif_removefriend(int char_id, int friend_id) { } return retVal___; } -void HP_chrif_send_report(char *buf, int len) { - int hIndex = 0; - if (HPMHooks.count.HP_chrif_send_report_pre > 0) { - void (*preHookFunc) (char **buf, int *len); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_report_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_chrif_send_report_pre[hIndex].func; - preHookFunc(&buf, &len); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.chrif.send_report(buf, len); - } - if (HPMHooks.count.HP_chrif_send_report_post > 0) { - void (*postHookFunc) (char *buf, int len); - for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_report_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_chrif_send_report_post[hIndex].func; - postHookFunc(buf, len); - } - } - return; -} bool HP_chrif_flush(void) { int hIndex = 0; bool retVal___ = false; @@ -26230,7 +26204,6 @@ bool HP_clif_attendance_timediff(struct map_session_data *sd) { return retVal___; } time_t HP_clif_attendance_getendtime(void) { -/* Unknown return type 'time_t'. Initializing to '0'. */ int hIndex = 0; time_t retVal___ = 0; if (HPMHooks.count.HP_clif_attendance_getendtime_pre > 0) { @@ -44099,31 +44072,32 @@ void HP_map_iwall_get(struct map_session_data *sd) { } return; } -void HP_map_iwall_remove(const char *wall_name) { +bool HP_map_iwall_remove(const char *wall_name) { int hIndex = 0; + bool retVal___ = false; if (HPMHooks.count.HP_map_iwall_remove_pre > 0) { - void (*preHookFunc) (const char **wall_name); + bool (*preHookFunc) (const char **wall_name); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_remove_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_iwall_remove_pre[hIndex].func; - preHookFunc(&wall_name); + retVal___ = preHookFunc(&wall_name); } if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.iwall_remove(wall_name); + retVal___ = HPMHooks.source.map.iwall_remove(wall_name); } if (HPMHooks.count.HP_map_iwall_remove_post > 0) { - void (*postHookFunc) (const char *wall_name); + bool (*postHookFunc) (bool retVal___, const char *wall_name); for (hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_remove_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_iwall_remove_post[hIndex].func; - postHookFunc(wall_name); + retVal___ = postHookFunc(retVal___, wall_name); } } - return; + return retVal___; } int HP_map_addmobtolist(unsigned short m, struct spawn_data *spawn) { int hIndex = 0; @@ -56040,6 +56014,58 @@ int HP_pc_calc_skilltree(struct map_session_data *sd) { } return retVal___; } +void HP_pc_calc_skilltree_clear(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_pc_calc_skilltree_clear_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_clear_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_calc_skilltree_clear_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.calc_skilltree_clear(sd); + } + if (HPMHooks.count.HP_pc_calc_skilltree_clear_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_clear_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_calc_skilltree_clear_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_pc_calc_skilltree_bonus(struct map_session_data *sd, int classidx) { + int hIndex = 0; + if (HPMHooks.count.HP_pc_calc_skilltree_bonus_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *classidx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_bonus_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_calc_skilltree_bonus_pre[hIndex].func; + preHookFunc(&sd, &classidx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.calc_skilltree_bonus(sd, classidx); + } + if (HPMHooks.count.HP_pc_calc_skilltree_bonus_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int classidx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_bonus_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_calc_skilltree_bonus_post[hIndex].func; + postHookFunc(sd, classidx); + } + } + return; +} int HP_pc_calc_skilltree_normalize_job(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; @@ -57336,6 +57362,32 @@ int HP_pc_checkbaselevelup(struct map_session_data *sd) { } return retVal___; } +void HP_pc_checkbaselevelup_sc(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_pc_checkbaselevelup_sc_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_sc_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_checkbaselevelup_sc_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.checkbaselevelup_sc(sd); + } + if (HPMHooks.count.HP_pc_checkbaselevelup_sc_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_sc_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_checkbaselevelup_sc_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} int HP_pc_checkjoblevelup(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; @@ -57768,6 +57820,33 @@ int HP_pc_resetskill(struct map_session_data *sd, int flag) { } return retVal___; } +bool HP_pc_resetskill_job(struct map_session_data *sd, int index) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_resetskill_job_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *index); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_job_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_resetskill_job_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &index); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.resetskill_job(sd, index); + } + if (HPMHooks.count.HP_pc_resetskill_job_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_job_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_resetskill_job_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, index); + } + } + return retVal___; +} int HP_pc_resetfeel(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; @@ -59371,6 +59450,33 @@ int HP_pc_addspiritball(struct map_session_data *sd, int interval, int max) { } return retVal___; } +int HP_pc_addspiritball_sub(struct map_session_data *sd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_addspiritball_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_addspiritball_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_addspiritball_sub_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.addspiritball_sub(sd); + } + if (HPMHooks.count.HP_pc_addspiritball_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_addspiritball_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_addspiritball_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} int HP_pc_delspiritball(struct map_session_data *sd, int count, int type) { int hIndex = 0; int retVal___ = 0; @@ -59398,6 +59504,33 @@ int HP_pc_delspiritball(struct map_session_data *sd, int count, int type) { } return retVal___; } +int HP_pc_delspiritball_sub(struct map_session_data *sd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_delspiritball_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_delspiritball_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_delspiritball_sub_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.delspiritball_sub(sd); + } + if (HPMHooks.count.HP_pc_delspiritball_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_delspiritball_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_delspiritball_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} int HP_pc_getmaxspiritball(struct map_session_data *sd, int min) { int hIndex = 0; int retVal___ = 0; @@ -60593,6 +60726,33 @@ void HP_pc_read_skill_tree(void) { } return; } +bool HP_pc_read_skill_job_skip(short skill_id, int job_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_read_skill_job_skip_pre > 0) { + bool (*preHookFunc) (short *skill_id, int *job_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_job_skip_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_read_skill_job_skip_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &job_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.read_skill_job_skip(skill_id, job_id); + } + if (HPMHooks.count.HP_pc_read_skill_job_skip_post > 0) { + bool (*postHookFunc) (bool retVal___, short skill_id, int job_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_job_skip_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_read_skill_job_skip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, skill_id, job_id); + } + } + return retVal___; +} void HP_pc_clear_skill_tree(void) { int hIndex = 0; if (HPMHooks.count.HP_pc_clear_skill_tree_pre > 0) { @@ -61372,6 +61532,33 @@ bool HP_pc_check_basicskill(struct map_session_data *sd, int level) { } return retVal___; } +bool HP_pc_isDeathPenaltyJob(uint16 job) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_isDeathPenaltyJob_pre > 0) { + bool (*preHookFunc) (uint16 *job); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_isDeathPenaltyJob_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_isDeathPenaltyJob_pre[hIndex].func; + retVal___ = preHookFunc(&job); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.isDeathPenaltyJob(job); + } + if (HPMHooks.count.HP_pc_isDeathPenaltyJob_post > 0) { + bool (*postHookFunc) (bool retVal___, uint16 job); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_isDeathPenaltyJob_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_isDeathPenaltyJob_post[hIndex].func; + retVal___ = postHookFunc(retVal___, job); + } + } + return retVal___; +} /* pcre_interface */ pcre* HP_libpcre_compile(const char *pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr) { int hIndex = 0; @@ -79026,6 +79213,32 @@ void HP_status_calc_pc_additional(struct map_session_data *sd, enum e_status_cal } return; } +void HP_status_calc_pc_recover_hp(struct map_session_data *sd, struct status_data *bstatus) { + int hIndex = 0; + if (HPMHooks.count.HP_status_calc_pc_recover_hp_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct status_data **bstatus); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_recover_hp_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_calc_pc_recover_hp_pre[hIndex].func; + preHookFunc(&sd, &bstatus); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.calc_pc_recover_hp(sd, bstatus); + } + if (HPMHooks.count.HP_status_calc_pc_recover_hp_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct status_data *bstatus); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_recover_hp_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_calc_pc_recover_hp_post[hIndex].func; + postHookFunc(sd, bstatus); + } + } + return; +} int HP_status_calc_homunculus_(struct homun_data *hd, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; |