diff options
author | Hercules.ws <dev@herc.ws> | 2018-10-07 16:19:56 +0200 |
---|---|---|
committer | HerculesWSAPI <dev@herc.ws> | 2018-10-07 16:19:56 +0200 |
commit | 6260982b69be48e13ff1f3f1c57b87dfa2139634 (patch) | |
tree | 6dbe15fdd05524435d284a748116ba8bab0dd92d /src/plugins/HPMHooking | |
parent | 9ac923705b93d6f05f1f204d9322b0748762dc16 (diff) | |
download | hercules-6260982b69be48e13ff1f3f1c57b87dfa2139634.tar.gz hercules-6260982b69be48e13ff1f3f1c57b87dfa2139634.tar.bz2 hercules-6260982b69be48e13ff1f3f1c57b87dfa2139634.tar.xz hercules-6260982b69be48e13ff1f3f1c57b87dfa2139634.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src/plugins/HPMHooking')
-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 | 104 |
4 files changed, 132 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 33fcdab4d..a8d48546d 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -1516,6 +1516,10 @@ typedef void (*HPMHOOK_pre_clif_specialeffect_single) (struct block_list **bl, i typedef void (*HPMHOOK_post_clif_specialeffect_single) (struct block_list *bl, int type, int fd); typedef void (*HPMHOOK_pre_clif_specialeffect_value) (struct block_list **bl, int *effect_id, int *num, send_target *target); typedef void (*HPMHOOK_post_clif_specialeffect_value) (struct block_list *bl, int effect_id, int num, send_target target); +typedef void (*HPMHOOK_pre_clif_removeSpecialEffect) (struct block_list **bl, int *effectId, enum send_target *target); +typedef void (*HPMHOOK_post_clif_removeSpecialEffect) (struct block_list *bl, int effectId, enum send_target target); +typedef void (*HPMHOOK_pre_clif_removeSpecialEffect_single) (struct block_list **bl, int *effectId, struct block_list **targetBl); +typedef void (*HPMHOOK_post_clif_removeSpecialEffect_single) (struct block_list *bl, int effectId, struct block_list *targetBl); typedef void (*HPMHOOK_pre_clif_millenniumshield) (struct block_list **bl, short *shields); typedef void (*HPMHOOK_post_clif_millenniumshield) (struct block_list *bl, short shields); typedef void (*HPMHOOK_pre_clif_spiritcharm) (struct map_session_data **sd); @@ -2620,6 +2624,10 @@ typedef void (*HPMHOOK_pre_clif_party_dead_notification) (struct map_session_dat typedef void (*HPMHOOK_post_clif_party_dead_notification) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pMemorialDungeonCommand) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pMemorialDungeonCommand) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_camera_showWindow) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_camera_showWindow) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_camera_change) (struct map_session_data **sd, float *range, float *rotation, float *latitude, enum send_target *target); +typedef void (*HPMHOOK_post_clif_camera_change) (struct map_session_data *sd, float range, float rotation, float latitude, enum send_target target); #endif // MAP_CLIF_H #ifdef COMMON_CORE_H /* cmdline */ typedef void (*HPMHOOK_pre_cmdline_init) (void); diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 663dcac11..889faa44c 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1108,6 +1108,10 @@ struct { struct HPMHookPoint *HP_clif_specialeffect_single_post; struct HPMHookPoint *HP_clif_specialeffect_value_pre; struct HPMHookPoint *HP_clif_specialeffect_value_post; + struct HPMHookPoint *HP_clif_removeSpecialEffect_pre; + struct HPMHookPoint *HP_clif_removeSpecialEffect_post; + struct HPMHookPoint *HP_clif_removeSpecialEffect_single_pre; + struct HPMHookPoint *HP_clif_removeSpecialEffect_single_post; struct HPMHookPoint *HP_clif_millenniumshield_pre; struct HPMHookPoint *HP_clif_millenniumshield_post; struct HPMHookPoint *HP_clif_spiritcharm_pre; @@ -2212,6 +2216,10 @@ struct { struct HPMHookPoint *HP_clif_party_dead_notification_post; struct HPMHookPoint *HP_clif_pMemorialDungeonCommand_pre; struct HPMHookPoint *HP_clif_pMemorialDungeonCommand_post; + struct HPMHookPoint *HP_clif_camera_showWindow_pre; + struct HPMHookPoint *HP_clif_camera_showWindow_post; + struct HPMHookPoint *HP_clif_camera_change_pre; + struct HPMHookPoint *HP_clif_camera_change_post; struct HPMHookPoint *HP_cmdline_init_pre; struct HPMHookPoint *HP_cmdline_init_post; struct HPMHookPoint *HP_cmdline_final_pre; @@ -7695,6 +7703,10 @@ struct { int HP_clif_specialeffect_single_post; int HP_clif_specialeffect_value_pre; int HP_clif_specialeffect_value_post; + int HP_clif_removeSpecialEffect_pre; + int HP_clif_removeSpecialEffect_post; + int HP_clif_removeSpecialEffect_single_pre; + int HP_clif_removeSpecialEffect_single_post; int HP_clif_millenniumshield_pre; int HP_clif_millenniumshield_post; int HP_clif_spiritcharm_pre; @@ -8799,6 +8811,10 @@ struct { int HP_clif_party_dead_notification_post; int HP_clif_pMemorialDungeonCommand_pre; int HP_clif_pMemorialDungeonCommand_post; + int HP_clif_camera_showWindow_pre; + int HP_clif_camera_showWindow_post; + int HP_clif_camera_change_pre; + int HP_clif_camera_change_post; int HP_cmdline_init_pre; int HP_cmdline_init_post; int HP_cmdline_final_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index da318d52c..b11e2d61c 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -578,6 +578,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->specialeffect, HP_clif_specialeffect) }, { HP_POP(clif->specialeffect_single, HP_clif_specialeffect_single) }, { HP_POP(clif->specialeffect_value, HP_clif_specialeffect_value) }, + { HP_POP(clif->removeSpecialEffect, HP_clif_removeSpecialEffect) }, + { HP_POP(clif->removeSpecialEffect_single, HP_clif_removeSpecialEffect_single) }, { HP_POP(clif->millenniumshield, HP_clif_millenniumshield) }, { HP_POP(clif->spiritcharm, HP_clif_spiritcharm) }, { HP_POP(clif->charm_single, HP_clif_charm_single) }, @@ -1130,6 +1132,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->petEvolutionResult, HP_clif_petEvolutionResult) }, { HP_POP(clif->party_dead_notification, HP_clif_party_dead_notification) }, { HP_POP(clif->pMemorialDungeonCommand, HP_clif_pMemorialDungeonCommand) }, + { HP_POP(clif->camera_showWindow, HP_clif_camera_showWindow) }, + { HP_POP(clif->camera_change, HP_clif_camera_change) }, /* cmdline_interface */ { HP_POP(cmdline->init, HP_cmdline_init) }, { HP_POP(cmdline->final, HP_cmdline_final) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index aeb494d59..6405c03a2 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -14456,6 +14456,58 @@ void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, int num, } return; } +void HP_clif_removeSpecialEffect(struct block_list *bl, int effectId, enum send_target target) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_removeSpecialEffect_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *effectId, enum send_target *target); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_removeSpecialEffect_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_removeSpecialEffect_pre[hIndex].func; + preHookFunc(&bl, &effectId, &target); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.removeSpecialEffect(bl, effectId, target); + } + if (HPMHooks.count.HP_clif_removeSpecialEffect_post > 0) { + void (*postHookFunc) (struct block_list *bl, int effectId, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_removeSpecialEffect_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_removeSpecialEffect_post[hIndex].func; + postHookFunc(bl, effectId, target); + } + } + return; +} +void HP_clif_removeSpecialEffect_single(struct block_list *bl, int effectId, struct block_list *targetBl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_removeSpecialEffect_single_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *effectId, struct block_list **targetBl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_removeSpecialEffect_single_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_removeSpecialEffect_single_pre[hIndex].func; + preHookFunc(&bl, &effectId, &targetBl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.removeSpecialEffect_single(bl, effectId, targetBl); + } + if (HPMHooks.count.HP_clif_removeSpecialEffect_single_post > 0) { + void (*postHookFunc) (struct block_list *bl, int effectId, struct block_list *targetBl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_removeSpecialEffect_single_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_removeSpecialEffect_single_post[hIndex].func; + postHookFunc(bl, effectId, targetBl); + } + } + return; +} void HP_clif_millenniumshield(struct block_list *bl, short shields) { int hIndex = 0; if (HPMHooks.count.HP_clif_millenniumshield_pre > 0) { @@ -28835,6 +28887,58 @@ void HP_clif_pMemorialDungeonCommand(int fd, struct map_session_data *sd) { } return; } +void HP_clif_camera_showWindow(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_camera_showWindow_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_camera_showWindow_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_camera_showWindow_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.camera_showWindow(sd); + } + if (HPMHooks.count.HP_clif_camera_showWindow_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_camera_showWindow_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_camera_showWindow_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_camera_change(struct map_session_data *sd, float range, float rotation, float latitude, enum send_target target) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_camera_change_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, float *range, float *rotation, float *latitude, enum send_target *target); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_camera_change_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_camera_change_pre[hIndex].func; + preHookFunc(&sd, &range, &rotation, &latitude, &target); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.camera_change(sd, range, rotation, latitude, target); + } + if (HPMHooks.count.HP_clif_camera_change_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, float range, float rotation, float latitude, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_camera_change_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_camera_change_post[hIndex].func; + postHookFunc(sd, range, rotation, latitude, target); + } + } + return; +} /* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; |