diff options
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Defs.inc | 24 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 24 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 6 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 208 |
4 files changed, 238 insertions, 24 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 82622f333..63b4567ed 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -1426,6 +1426,8 @@ typedef void (*HPMHOOK_pre_clif_party_member_info) (struct party_data **p, struc typedef void (*HPMHOOK_post_clif_party_member_info) (struct party_data *p, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_party_info) (struct party_data **p, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_party_info) (struct party_data *p, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_party_job_and_level) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_party_job_and_level) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_party_invite) (struct map_session_data **sd, struct map_session_data **tsd); typedef void (*HPMHOOK_post_clif_party_invite) (struct map_session_data *sd, struct map_session_data *tsd); typedef void (*HPMHOOK_pre_clif_party_inviteack) (struct map_session_data **sd, const char **nick, int *result); @@ -2532,8 +2534,8 @@ typedef int (*HPMHOOK_pre_guild_dobreak) (struct map_session_data **sd, const ch typedef int (*HPMHOOK_post_guild_dobreak) (int retVal___, struct map_session_data *sd, const char *name); typedef int (*HPMHOOK_pre_guild_broken) (int *guild_id, int *flag); typedef int (*HPMHOOK_post_guild_broken) (int retVal___, int guild_id, int flag); -typedef int (*HPMHOOK_pre_guild_gm_change) (int *guild_id, struct map_session_data **sd); -typedef int (*HPMHOOK_post_guild_gm_change) (int retVal___, int guild_id, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_guild_gm_change) (int *guild_id, int *char_id); +typedef int (*HPMHOOK_post_guild_gm_change) (int retVal___, int guild_id, int char_id); typedef int (*HPMHOOK_pre_guild_gm_changed) (int *guild_id, int *account_id, int *char_id); typedef int (*HPMHOOK_post_guild_gm_changed) (int retVal___, int guild_id, int account_id, int char_id); typedef void (*HPMHOOK_pre_guild_castle_map_init) (void); @@ -5198,6 +5200,8 @@ typedef int (*HPMHOOK_pre_pc_isequip) (struct map_session_data **sd, int *n); typedef int (*HPMHOOK_post_pc_isequip) (int retVal___, struct map_session_data *sd, int n); typedef int (*HPMHOOK_pre_pc_equippoint) (struct map_session_data **sd, int *n); typedef int (*HPMHOOK_post_pc_equippoint) (int retVal___, struct map_session_data *sd, int n); +typedef int (*HPMHOOK_pre_pc_item_equippoint) (struct map_session_data **sd, struct item_data **id); +typedef int (*HPMHOOK_post_pc_item_equippoint) (int retVal___, struct map_session_data *sd, struct item_data *id); typedef int (*HPMHOOK_pre_pc_setinventorydata) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_setinventorydata) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_checkskill) (struct map_session_data **sd, uint16 *skill_id); @@ -5580,6 +5584,8 @@ typedef bool (*HPMHOOK_pre_pc_db_checkid) (int *class); typedef bool (*HPMHOOK_post_pc_db_checkid) (bool retVal___, int class); typedef void (*HPMHOOK_pre_pc_validate_levels) (void); typedef void (*HPMHOOK_post_pc_validate_levels) (void); +typedef void (*HPMHOOK_pre_pc_update_job_and_level) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_update_job_and_level) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_pc_autotrade_load) (void); typedef void (*HPMHOOK_post_pc_autotrade_load) (void); typedef void (*HPMHOOK_pre_pc_autotrade_update) (struct map_session_data **sd, enum e_pc_autotrade_update_action *action); @@ -5734,8 +5740,8 @@ typedef struct quest_db* (*HPMHOOK_pre_quest_db) (int *quest_id); typedef struct quest_db* (*HPMHOOK_post_quest_db) (struct quest_db* retVal___, int quest_id); typedef int (*HPMHOOK_pre_quest_pc_login) (struct map_session_data **sd); typedef int (*HPMHOOK_post_quest_pc_login) (int retVal___, struct map_session_data *sd); -typedef int (*HPMHOOK_pre_quest_add) (struct map_session_data **sd, int *quest_id); -typedef int (*HPMHOOK_post_quest_add) (int retVal___, struct map_session_data *sd, int quest_id); +typedef int (*HPMHOOK_pre_quest_add) (struct map_session_data **sd, int *quest_id, unsigned int *time_limit); +typedef int (*HPMHOOK_post_quest_add) (int retVal___, struct map_session_data *sd, int quest_id, unsigned int time_limit); typedef int (*HPMHOOK_pre_quest_change) (struct map_session_data **sd, int *qid1, int *qid2); typedef int (*HPMHOOK_post_quest_change) (int retVal___, struct map_session_data *sd, int qid1, int qid2); typedef int (*HPMHOOK_pre_quest_delete) (struct map_session_data **sd, int *quest_id); @@ -6024,6 +6030,12 @@ typedef void (*HPMHOOK_pre_script_add_autobonus) (const char **autobonus); typedef void (*HPMHOOK_post_script_add_autobonus) (const char *autobonus); typedef int (*HPMHOOK_pre_script_menu_countoptions) (const char **str, int *max_count, int **total); typedef int (*HPMHOOK_post_script_menu_countoptions) (int retVal___, const char *str, int max_count, int *total); +typedef int (*HPMHOOK_pre_script_buildin_recovery_sub) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_script_buildin_recovery_sub) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_script_buildin_recovery_pc_sub) (struct map_session_data **sd, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_recovery_pc_sub) (int retVal___, struct map_session_data *sd, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_recovery_bl_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_recovery_bl_sub) (int retVal___, struct block_list *bl, va_list ap); typedef int (*HPMHOOK_pre_script_buildin_areawarp_sub) (struct block_list **bl, va_list ap); typedef int (*HPMHOOK_post_script_buildin_areawarp_sub) (int retVal___, struct block_list *bl, va_list ap); typedef int (*HPMHOOK_pre_script_buildin_areapercentheal_sub) (struct block_list **bl, va_list ap); @@ -6778,8 +6790,8 @@ typedef int (*HPMHOOK_pre_status_init) (bool *minimal); typedef int (*HPMHOOK_post_status_init) (int retVal___, bool minimal); typedef void (*HPMHOOK_pre_status_final) (void); typedef void (*HPMHOOK_post_status_final) (void); -typedef int (*HPMHOOK_pre_status_get_refine_chance) (enum refine_type *wlv, int *refine); -typedef int (*HPMHOOK_post_status_get_refine_chance) (int retVal___, enum refine_type wlv, int refine); +typedef int (*HPMHOOK_pre_status_get_refine_chance) (enum refine_type *wlv, int *refine, enum refine_chance_type *type); +typedef int (*HPMHOOK_post_status_get_refine_chance) (int retVal___, enum refine_type wlv, int refine, enum refine_chance_type type); typedef sc_type (*HPMHOOK_pre_status_skill2sc) (int *skill_id); typedef sc_type (*HPMHOOK_post_status_skill2sc) (sc_type retVal___, int skill_id); typedef int (*HPMHOOK_pre_status_sc2skill) (sc_type *sc); diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index e84a9bd0d..d470a3bd9 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1062,6 +1062,8 @@ struct { struct HPMHookPoint *HP_clif_party_member_info_post; struct HPMHookPoint *HP_clif_party_info_pre; struct HPMHookPoint *HP_clif_party_info_post; + struct HPMHookPoint *HP_clif_party_job_and_level_pre; + struct HPMHookPoint *HP_clif_party_job_and_level_post; struct HPMHookPoint *HP_clif_party_invite_pre; struct HPMHookPoint *HP_clif_party_invite_post; struct HPMHookPoint *HP_clif_party_inviteack_pre; @@ -4016,6 +4018,8 @@ struct { struct HPMHookPoint *HP_pc_isequip_post; struct HPMHookPoint *HP_pc_equippoint_pre; struct HPMHookPoint *HP_pc_equippoint_post; + struct HPMHookPoint *HP_pc_item_equippoint_pre; + struct HPMHookPoint *HP_pc_item_equippoint_post; struct HPMHookPoint *HP_pc_setinventorydata_pre; struct HPMHookPoint *HP_pc_setinventorydata_post; struct HPMHookPoint *HP_pc_checkskill_pre; @@ -4398,6 +4402,8 @@ struct { struct HPMHookPoint *HP_pc_db_checkid_post; struct HPMHookPoint *HP_pc_validate_levels_pre; struct HPMHookPoint *HP_pc_validate_levels_post; + struct HPMHookPoint *HP_pc_update_job_and_level_pre; + struct HPMHookPoint *HP_pc_update_job_and_level_post; struct HPMHookPoint *HP_pc_autotrade_load_pre; struct HPMHookPoint *HP_pc_autotrade_load_post; struct HPMHookPoint *HP_pc_autotrade_update_pre; @@ -4810,6 +4816,12 @@ struct { struct HPMHookPoint *HP_script_add_autobonus_post; struct HPMHookPoint *HP_script_menu_countoptions_pre; struct HPMHookPoint *HP_script_menu_countoptions_post; + struct HPMHookPoint *HP_script_buildin_recovery_sub_pre; + struct HPMHookPoint *HP_script_buildin_recovery_sub_post; + struct HPMHookPoint *HP_script_buildin_recovery_pc_sub_pre; + struct HPMHookPoint *HP_script_buildin_recovery_pc_sub_post; + struct HPMHookPoint *HP_script_buildin_recovery_bl_sub_pre; + struct HPMHookPoint *HP_script_buildin_recovery_bl_sub_post; struct HPMHookPoint *HP_script_buildin_areawarp_sub_pre; struct HPMHookPoint *HP_script_buildin_areawarp_sub_post; struct HPMHookPoint *HP_script_buildin_areapercentheal_sub_pre; @@ -7125,6 +7137,8 @@ struct { int HP_clif_party_member_info_post; int HP_clif_party_info_pre; int HP_clif_party_info_post; + int HP_clif_party_job_and_level_pre; + int HP_clif_party_job_and_level_post; int HP_clif_party_invite_pre; int HP_clif_party_invite_post; int HP_clif_party_inviteack_pre; @@ -10079,6 +10093,8 @@ struct { int HP_pc_isequip_post; int HP_pc_equippoint_pre; int HP_pc_equippoint_post; + int HP_pc_item_equippoint_pre; + int HP_pc_item_equippoint_post; int HP_pc_setinventorydata_pre; int HP_pc_setinventorydata_post; int HP_pc_checkskill_pre; @@ -10461,6 +10477,8 @@ struct { int HP_pc_db_checkid_post; int HP_pc_validate_levels_pre; int HP_pc_validate_levels_post; + int HP_pc_update_job_and_level_pre; + int HP_pc_update_job_and_level_post; int HP_pc_autotrade_load_pre; int HP_pc_autotrade_load_post; int HP_pc_autotrade_update_pre; @@ -10873,6 +10891,12 @@ struct { int HP_script_add_autobonus_post; int HP_script_menu_countoptions_pre; int HP_script_menu_countoptions_post; + int HP_script_buildin_recovery_sub_pre; + int HP_script_buildin_recovery_sub_post; + int HP_script_buildin_recovery_pc_sub_pre; + int HP_script_buildin_recovery_pc_sub_post; + int HP_script_buildin_recovery_bl_sub_pre; + int HP_script_buildin_recovery_bl_sub_post; int HP_script_buildin_areawarp_sub_pre; int HP_script_buildin_areawarp_sub_post; int HP_script_buildin_areapercentheal_sub_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index a8ec0b4f5..4f2565740 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -553,6 +553,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->party_created, HP_clif_party_created) }, { HP_POP(clif->party_member_info, HP_clif_party_member_info) }, { HP_POP(clif->party_info, HP_clif_party_info) }, + { HP_POP(clif->party_job_and_level, HP_clif_party_job_and_level) }, { HP_POP(clif->party_invite, HP_clif_party_invite) }, { HP_POP(clif->party_inviteack, HP_clif_party_inviteack) }, { HP_POP(clif->party_option, HP_clif_party_option) }, @@ -2063,6 +2064,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->reg_received, HP_pc_reg_received) }, { HP_POP(pc->isequip, HP_pc_isequip) }, { HP_POP(pc->equippoint, HP_pc_equippoint) }, + { HP_POP(pc->item_equippoint, HP_pc_item_equippoint) }, { HP_POP(pc->setinventorydata, HP_pc_setinventorydata) }, { HP_POP(pc->checkskill, HP_pc_checkskill) }, { HP_POP(pc->checkskill2, HP_pc_checkskill2) }, @@ -2254,6 +2256,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->expire_check, HP_pc_expire_check) }, { HP_POP(pc->db_checkid, HP_pc_db_checkid) }, { HP_POP(pc->validate_levels, HP_pc_validate_levels) }, + { HP_POP(pc->update_job_and_level, HP_pc_update_job_and_level) }, { HP_POP(pc->autotrade_load, HP_pc_autotrade_load) }, { HP_POP(pc->autotrade_update, HP_pc_autotrade_update) }, { HP_POP(pc->autotrade_start, HP_pc_autotrade_start) }, @@ -2465,6 +2468,9 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->db_free_code_sub, HP_script_db_free_code_sub) }, { HP_POP(script->add_autobonus, HP_script_add_autobonus) }, { HP_POP(script->menu_countoptions, HP_script_menu_countoptions) }, + { HP_POP(script->buildin_recovery_sub, HP_script_buildin_recovery_sub) }, + { HP_POP(script->buildin_recovery_pc_sub, HP_script_buildin_recovery_pc_sub) }, + { HP_POP(script->buildin_recovery_bl_sub, HP_script_buildin_recovery_bl_sub) }, { HP_POP(script->buildin_areawarp_sub, HP_script_buildin_areawarp_sub) }, { HP_POP(script->buildin_areapercentheal_sub, HP_script_buildin_areapercentheal_sub) }, { HP_POP(script->buildin_delitem_delete, HP_script_buildin_delitem_delete) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index a13074cb9..3bde41022 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -13811,6 +13811,32 @@ void HP_clif_party_info(struct party_data *p, struct map_session_data *sd) { } return; } +void HP_clif_party_job_and_level(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_party_job_and_level_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_job_and_level_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_party_job_and_level_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_job_and_level(sd); + } + if (HPMHooks.count.HP_clif_party_job_and_level_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_job_and_level_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_party_job_and_level_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} void HP_clif_party_invite(struct map_session_data *sd, struct map_session_data *tsd) { int hIndex = 0; if (HPMHooks.count.HP_clif_party_invite_pre > 0) { @@ -27994,15 +28020,15 @@ int HP_guild_broken(int guild_id, int flag) { } return retVal___; } -int HP_guild_gm_change(int guild_id, struct map_session_data *sd) { +int HP_guild_gm_change(int guild_id, int char_id) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_guild_gm_change_pre > 0) { - int (*preHookFunc) (int *guild_id, struct map_session_data **sd); + int (*preHookFunc) (int *guild_id, int *char_id); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_gm_change_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_gm_change_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &sd); + retVal___ = preHookFunc(&guild_id, &char_id); } if (*HPMforce_return) { *HPMforce_return = false; @@ -28010,13 +28036,13 @@ int HP_guild_gm_change(int guild_id, struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.guild.gm_change(guild_id, sd); + retVal___ = HPMHooks.source.guild.gm_change(guild_id, char_id); } if (HPMHooks.count.HP_guild_gm_change_post > 0) { - int (*postHookFunc) (int retVal___, int guild_id, struct map_session_data *sd); + int (*postHookFunc) (int retVal___, int guild_id, int char_id); for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_gm_change_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_gm_change_post[hIndex].func; - retVal___ = postHookFunc(retVal___, guild_id, sd); + retVal___ = postHookFunc(retVal___, guild_id, char_id); } } return retVal___; @@ -53450,6 +53476,33 @@ int HP_pc_equippoint(struct map_session_data *sd, int n) { } return retVal___; } +int HP_pc_item_equippoint(struct map_session_data *sd, struct item_data *id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_item_equippoint_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct item_data **id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_item_equippoint_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_item_equippoint_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.item_equippoint(sd, id); + } + if (HPMHooks.count.HP_pc_item_equippoint_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item_data *id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_item_equippoint_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_item_equippoint_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, id); + } + } + return retVal___; +} int HP_pc_setinventorydata(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; @@ -58595,6 +58648,32 @@ void HP_pc_validate_levels(void) { } return; } +void HP_pc_update_job_and_level(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_pc_update_job_and_level_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_update_job_and_level_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_update_job_and_level_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.update_job_and_level(sd); + } + if (HPMHooks.count.HP_pc_update_job_and_level_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_update_job_and_level_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_update_job_and_level_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} void HP_pc_autotrade_load(void) { int hIndex = 0; if (HPMHooks.count.HP_pc_autotrade_load_pre > 0) { @@ -60304,15 +60383,15 @@ int HP_quest_pc_login(struct map_session_data *sd) { } return retVal___; } -int HP_quest_add(struct map_session_data *sd, int quest_id) { +int HP_quest_add(struct map_session_data *sd, int quest_id, unsigned int time_limit) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_quest_add_pre > 0) { - int (*preHookFunc) (struct map_session_data **sd, int *quest_id); + int (*preHookFunc) (struct map_session_data **sd, int *quest_id, unsigned int *time_limit); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_quest_add_pre[hIndex].func; - retVal___ = preHookFunc(&sd, &quest_id); + retVal___ = preHookFunc(&sd, &quest_id, &time_limit); } if (*HPMforce_return) { *HPMforce_return = false; @@ -60320,13 +60399,13 @@ int HP_quest_add(struct map_session_data *sd, int quest_id) { } } { - retVal___ = HPMHooks.source.quest.add(sd, quest_id); + retVal___ = HPMHooks.source.quest.add(sd, quest_id, time_limit); } if (HPMHooks.count.HP_quest_add_post > 0) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int quest_id); + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int quest_id, unsigned int time_limit); for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_quest_add_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, quest_id); + retVal___ = postHookFunc(retVal___, sd, quest_id, time_limit); } } return retVal___; @@ -64116,6 +64195,99 @@ int HP_script_menu_countoptions(const char *str, int max_count, int *total) { } return retVal___; } +int HP_script_buildin_recovery_sub(struct map_session_data *sd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_buildin_recovery_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_buildin_recovery_sub_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.buildin_recovery_sub(sd); + } + if (HPMHooks.count.HP_script_buildin_recovery_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_buildin_recovery_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_script_buildin_recovery_pc_sub(struct map_session_data *sd, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_buildin_recovery_pc_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_pc_sub_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_recovery_pc_sub_pre[hIndex].func; + retVal___ = preHookFunc(&sd, 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.script.buildin_recovery_pc_sub(sd, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_script_buildin_recovery_pc_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_pc_sub_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_recovery_pc_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_buildin_recovery_bl_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_buildin_recovery_bl_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_bl_sub_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_recovery_bl_sub_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.script.buildin_recovery_bl_sub(bl, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_script_buildin_recovery_bl_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_bl_sub_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_recovery_bl_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} int HP_script_buildin_areawarp_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; @@ -74360,15 +74532,15 @@ void HP_status_final(void) { } return; } -int HP_status_get_refine_chance(enum refine_type wlv, int refine) { +int HP_status_get_refine_chance(enum refine_type wlv, int refine, enum refine_chance_type type) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_status_get_refine_chance_pre > 0) { - int (*preHookFunc) (enum refine_type *wlv, int *refine); + int (*preHookFunc) (enum refine_type *wlv, int *refine, enum refine_chance_type *type); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_get_refine_chance_pre[hIndex].func; - retVal___ = preHookFunc(&wlv, &refine); + retVal___ = preHookFunc(&wlv, &refine, &type); } if (*HPMforce_return) { *HPMforce_return = false; @@ -74376,13 +74548,13 @@ int HP_status_get_refine_chance(enum refine_type wlv, int refine) { } } { - retVal___ = HPMHooks.source.status.get_refine_chance(wlv, refine); + retVal___ = HPMHooks.source.status.get_refine_chance(wlv, refine, type); } if (HPMHooks.count.HP_status_get_refine_chance_post > 0) { - int (*postHookFunc) (int retVal___, enum refine_type wlv, int refine); + int (*postHookFunc) (int retVal___, enum refine_type wlv, int refine, enum refine_chance_type type); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_get_refine_chance_post[hIndex].func; - retVal___ = postHookFunc(retVal___, wlv, refine); + retVal___ = postHookFunc(retVal___, wlv, refine, type); } } return retVal___; |