diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Defs.inc | 8 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 16 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 107 |
4 files changed, 135 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index c04eedb05..60c00e8db 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -2674,6 +2674,8 @@ typedef time_t (*HPMHOOK_pre_clif_attendance_getendtime) (void); typedef time_t (*HPMHOOK_post_clif_attendance_getendtime) (time_t retVal___); typedef void (*HPMHOOK_pre_clif_pOpenUIRequest) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pOpenUIRequest) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_open_ui_send) (struct map_session_data **sd, enum zc_ui_types *ui_type); +typedef void (*HPMHOOK_post_clif_open_ui_send) (struct map_session_data *sd, enum zc_ui_types ui_type); typedef void (*HPMHOOK_pre_clif_open_ui) (struct map_session_data **sd, enum cz_ui_types *uiType); typedef void (*HPMHOOK_post_clif_open_ui) (struct map_session_data *sd, enum cz_ui_types uiType); typedef void (*HPMHOOK_pre_clif_pAttendanceRewardRequest) (int *fd, struct map_session_data **sd); @@ -6540,6 +6542,8 @@ typedef int (*HPMHOOK_pre_pet_hungry_val) (struct pet_data **pd); typedef int (*HPMHOOK_post_pet_hungry_val) (int retVal___, struct pet_data *pd); typedef void (*HPMHOOK_pre_pet_set_hunger) (struct pet_data **pd, int *value); typedef void (*HPMHOOK_post_pet_set_hunger) (struct pet_data *pd, int value); +typedef int (*HPMHOOK_pre_pet_get_card4_value) (int *rename_flag, int *intimacy); +typedef int (*HPMHOOK_post_pet_get_card4_value) (int retVal___, int rename_flag, int intimacy); typedef void (*HPMHOOK_pre_pet_set_intimate) (struct pet_data **pd, int *value); typedef void (*HPMHOOK_post_pet_set_intimate) (struct pet_data *pd, int value); typedef int (*HPMHOOK_pre_pet_create_egg) (struct map_session_data **sd, int *item_id); @@ -6564,6 +6568,8 @@ typedef int (*HPMHOOK_pre_pet_return_egg) (struct map_session_data **sd, struct typedef int (*HPMHOOK_post_pet_return_egg) (int retVal___, struct map_session_data *sd, struct pet_data *pd); typedef int (*HPMHOOK_pre_pet_data_init) (struct map_session_data **sd, struct s_pet **petinfo); typedef int (*HPMHOOK_post_pet_data_init) (int retVal___, struct map_session_data *sd, struct s_pet *petinfo); +typedef int (*HPMHOOK_pre_pet_spawn) (struct map_session_data **sd, bool *birth_process); +typedef int (*HPMHOOK_post_pet_spawn) (int retVal___, struct map_session_data *sd, bool birth_process); typedef int (*HPMHOOK_pre_pet_birth_process) (struct map_session_data **sd, struct s_pet **petinfo); typedef int (*HPMHOOK_post_pet_birth_process) (int retVal___, struct map_session_data *sd, struct s_pet *petinfo); typedef int (*HPMHOOK_pre_pet_recv_petdata) (int *account_id, struct s_pet **p, int *flag); @@ -7264,6 +7270,8 @@ typedef int (*HPMHOOK_pre_skill_get_state) (int *skill_id, int *skill_lv); typedef int (*HPMHOOK_post_skill_get_state) (int retVal___, int skill_id, int skill_lv); typedef int (*HPMHOOK_pre_skill_get_spiritball) (int *skill_id, int *skill_lv); typedef int (*HPMHOOK_post_skill_get_spiritball) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_item_index) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_item_index) (int retVal___, int skill_id, int skill_lv); typedef int (*HPMHOOK_pre_skill_get_itemid) (int *skill_id, int *item_idx); typedef int (*HPMHOOK_post_skill_get_itemid) (int retVal___, int skill_id, int item_idx); typedef int (*HPMHOOK_pre_skill_get_itemqty) (int *skill_id, int *item_idx, int *skill_lv); diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 60d8b7e20..62d2327da 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -2264,6 +2264,8 @@ struct { struct HPMHookPoint *HP_clif_attendance_getendtime_post; struct HPMHookPoint *HP_clif_pOpenUIRequest_pre; struct HPMHookPoint *HP_clif_pOpenUIRequest_post; + struct HPMHookPoint *HP_clif_open_ui_send_pre; + struct HPMHookPoint *HP_clif_open_ui_send_post; struct HPMHookPoint *HP_clif_open_ui_pre; struct HPMHookPoint *HP_clif_open_ui_post; struct HPMHookPoint *HP_clif_pAttendanceRewardRequest_pre; @@ -5116,6 +5118,8 @@ struct { struct HPMHookPoint *HP_pet_hungry_val_post; struct HPMHookPoint *HP_pet_set_hunger_pre; struct HPMHookPoint *HP_pet_set_hunger_post; + struct HPMHookPoint *HP_pet_get_card4_value_pre; + struct HPMHookPoint *HP_pet_get_card4_value_post; struct HPMHookPoint *HP_pet_set_intimate_pre; struct HPMHookPoint *HP_pet_set_intimate_post; struct HPMHookPoint *HP_pet_create_egg_pre; @@ -5140,6 +5144,8 @@ struct { struct HPMHookPoint *HP_pet_return_egg_post; struct HPMHookPoint *HP_pet_data_init_pre; struct HPMHookPoint *HP_pet_data_init_post; + struct HPMHookPoint *HP_pet_spawn_pre; + struct HPMHookPoint *HP_pet_spawn_post; struct HPMHookPoint *HP_pet_birth_process_pre; struct HPMHookPoint *HP_pet_birth_process_post; struct HPMHookPoint *HP_pet_recv_petdata_pre; @@ -5788,6 +5794,8 @@ struct { struct HPMHookPoint *HP_skill_get_state_post; struct HPMHookPoint *HP_skill_get_spiritball_pre; struct HPMHookPoint *HP_skill_get_spiritball_post; + struct HPMHookPoint *HP_skill_get_item_index_pre; + struct HPMHookPoint *HP_skill_get_item_index_post; struct HPMHookPoint *HP_skill_get_itemid_pre; struct HPMHookPoint *HP_skill_get_itemid_post; struct HPMHookPoint *HP_skill_get_itemqty_pre; @@ -9295,6 +9303,8 @@ struct { int HP_clif_attendance_getendtime_post; int HP_clif_pOpenUIRequest_pre; int HP_clif_pOpenUIRequest_post; + int HP_clif_open_ui_send_pre; + int HP_clif_open_ui_send_post; int HP_clif_open_ui_pre; int HP_clif_open_ui_post; int HP_clif_pAttendanceRewardRequest_pre; @@ -12147,6 +12157,8 @@ struct { int HP_pet_hungry_val_post; int HP_pet_set_hunger_pre; int HP_pet_set_hunger_post; + int HP_pet_get_card4_value_pre; + int HP_pet_get_card4_value_post; int HP_pet_set_intimate_pre; int HP_pet_set_intimate_post; int HP_pet_create_egg_pre; @@ -12171,6 +12183,8 @@ struct { int HP_pet_return_egg_post; int HP_pet_data_init_pre; int HP_pet_data_init_post; + int HP_pet_spawn_pre; + int HP_pet_spawn_post; int HP_pet_birth_process_pre; int HP_pet_birth_process_post; int HP_pet_recv_petdata_pre; @@ -12819,6 +12833,8 @@ struct { int HP_skill_get_state_post; int HP_skill_get_spiritball_pre; int HP_skill_get_spiritball_post; + int HP_skill_get_item_index_pre; + int HP_skill_get_item_index_post; int HP_skill_get_itemid_pre; int HP_skill_get_itemid_post; int HP_skill_get_itemqty_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 899f443d1..34f968c12 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -1156,6 +1156,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->attendance_timediff, HP_clif_attendance_timediff) }, { HP_POP(clif->attendance_getendtime, HP_clif_attendance_getendtime) }, { HP_POP(clif->pOpenUIRequest, HP_clif_pOpenUIRequest) }, + { HP_POP(clif->open_ui_send, HP_clif_open_ui_send) }, { HP_POP(clif->open_ui, HP_clif_open_ui) }, { HP_POP(clif->pAttendanceRewardRequest, HP_clif_pAttendanceRewardRequest) }, { HP_POP(clif->ui_action, HP_clif_ui_action) }, @@ -2618,6 +2619,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pet->final, HP_pet_final) }, { HP_POP(pet->hungry_val, HP_pet_hungry_val) }, { HP_POP(pet->set_hunger, HP_pet_set_hunger) }, + { HP_POP(pet->get_card4_value, HP_pet_get_card4_value) }, { HP_POP(pet->set_intimate, HP_pet_set_intimate) }, { HP_POP(pet->create_egg, HP_pet_create_egg) }, { HP_POP(pet->unlocktarget, HP_pet_unlocktarget) }, @@ -2630,6 +2632,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pet->performance, HP_pet_performance) }, { HP_POP(pet->return_egg, HP_pet_return_egg) }, { HP_POP(pet->data_init, HP_pet_data_init) }, + { HP_POP(pet->spawn, HP_pet_spawn) }, { HP_POP(pet->birth_process, HP_pet_birth_process) }, { HP_POP(pet->recv_petdata, HP_pet_recv_petdata) }, { HP_POP(pet->select_egg, HP_pet_select_egg) }, @@ -2963,6 +2966,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->get_sp_rate, HP_skill_get_sp_rate) }, { HP_POP(skill->get_state, HP_skill_get_state) }, { HP_POP(skill->get_spiritball, HP_skill_get_spiritball) }, + { HP_POP(skill->get_item_index, HP_skill_get_item_index) }, { HP_POP(skill->get_itemid, HP_skill_get_itemid) }, { HP_POP(skill->get_itemqty, HP_skill_get_itemqty) }, { HP_POP(skill->get_item_any_flag, HP_skill_get_item_any_flag) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index f6f1b3839..8cb425011 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -29508,6 +29508,32 @@ void HP_clif_pOpenUIRequest(int fd, struct map_session_data *sd) { } return; } +void HP_clif_open_ui_send(struct map_session_data *sd, enum zc_ui_types ui_type) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_open_ui_send_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum zc_ui_types *ui_type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_ui_send_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_open_ui_send_pre[hIndex].func; + preHookFunc(&sd, &ui_type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.open_ui_send(sd, ui_type); + } + if (HPMHooks.count.HP_clif_open_ui_send_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum zc_ui_types ui_type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_ui_send_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_open_ui_send_post[hIndex].func; + postHookFunc(sd, ui_type); + } + } + return; +} void HP_clif_open_ui(struct map_session_data *sd, enum cz_ui_types uiType) { int hIndex = 0; if (HPMHooks.count.HP_clif_open_ui_pre > 0) { @@ -68086,6 +68112,33 @@ void HP_pet_set_hunger(struct pet_data *pd, int value) { } return; } +int HP_pet_get_card4_value(int rename_flag, int intimacy) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pet_get_card4_value_pre > 0) { + int (*preHookFunc) (int *rename_flag, int *intimacy); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_card4_value_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pet_get_card4_value_pre[hIndex].func; + retVal___ = preHookFunc(&rename_flag, &intimacy); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.get_card4_value(rename_flag, intimacy); + } + if (HPMHooks.count.HP_pet_get_card4_value_post > 0) { + int (*postHookFunc) (int retVal___, int rename_flag, int intimacy); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_card4_value_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pet_get_card4_value_post[hIndex].func; + retVal___ = postHookFunc(retVal___, rename_flag, intimacy); + } + } + return retVal___; +} void HP_pet_set_intimate(struct pet_data *pd, int value) { int hIndex = 0; if (HPMHooks.count.HP_pet_set_intimate_pre > 0) { @@ -68409,6 +68462,33 @@ int HP_pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) { } return retVal___; } +int HP_pet_spawn(struct map_session_data *sd, bool birth_process) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pet_spawn_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, bool *birth_process); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_spawn_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pet_spawn_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &birth_process); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.spawn(sd, birth_process); + } + if (HPMHooks.count.HP_pet_spawn_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, bool birth_process); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_spawn_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pet_spawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, birth_process); + } + } + return retVal___; +} int HP_pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) { int hIndex = 0; int retVal___ = 0; @@ -77228,6 +77308,33 @@ int HP_skill_get_spiritball(int skill_id, int skill_lv) { } return retVal___; } +int HP_skill_get_item_index(int skill_id, int skill_lv) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_skill_get_item_index_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_item_index_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_get_item_index_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_item_index(skill_id, skill_lv); + } + if (HPMHooks.count.HP_skill_get_item_index_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int skill_lv); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_item_index_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_get_item_index_post[hIndex].func; + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); + } + } + return retVal___; +} int HP_skill_get_itemid(int skill_id, int item_idx) { int hIndex = 0; int retVal___ = 0; |