diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/HPMDataCheck.h | 2 | ||||
-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 |
5 files changed, 134 insertions, 0 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h index f5875fe11..21b90ee50 100644 --- a/src/common/HPMDataCheck.h +++ b/src/common/HPMDataCheck.h @@ -660,6 +660,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "PACKET_ZC_ADD_ITEM_TO_MAIL", sizeof(struct PACKET_ZC_ADD_ITEM_TO_MAIL), SERVER_TYPE_MAP }, { "PACKET_ZC_ADD_ITEM_TO_STORE", sizeof(struct PACKET_ZC_ADD_ITEM_TO_STORE), SERVER_TYPE_MAP }, { "PACKET_ZC_ADD_MEMBER_TO_GROUP", sizeof(struct PACKET_ZC_ADD_MEMBER_TO_GROUP), SERVER_TYPE_MAP }, + { "PACKET_ZC_CAMERA_INFO", sizeof(struct PACKET_ZC_CAMERA_INFO), SERVER_TYPE_MAP }, { "PACKET_ZC_CASH_ITEM_DELETE", sizeof(struct PACKET_ZC_CASH_ITEM_DELETE), SERVER_TYPE_MAP }, { "PACKET_ZC_CASH_TIME_COUNTER", sizeof(struct PACKET_ZC_CASH_TIME_COUNTER), SERVER_TYPE_MAP }, { "PACKET_ZC_CHECKNAME", sizeof(struct PACKET_ZC_CHECKNAME), SERVER_TYPE_MAP }, @@ -707,6 +708,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE", sizeof(struct PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE), SERVER_TYPE_MAP }, { "PACKET_ZC_PROPERTY_HOMUN", sizeof(struct PACKET_ZC_PROPERTY_HOMUN), SERVER_TYPE_MAP }, { "PACKET_ZC_READ_MAIL", sizeof(struct PACKET_ZC_READ_MAIL), SERVER_TYPE_MAP }, + { "PACKET_ZC_REMOVE_EFFECT", sizeof(struct PACKET_ZC_REMOVE_EFFECT), SERVER_TYPE_MAP }, { "PACKET_ZC_REPAIRITEMLIST", sizeof(struct PACKET_ZC_REPAIRITEMLIST), SERVER_TYPE_MAP }, { "PACKET_ZC_REPAIRITEMLIST_sub", sizeof(struct PACKET_ZC_REPAIRITEMLIST_sub), SERVER_TYPE_MAP }, { "PACKET_ZC_SEARCH_STORE_INFO_ACK", sizeof(struct PACKET_ZC_SEARCH_STORE_INFO_ACK), SERVER_TYPE_MAP }, 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; |