summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2018-05-07 00:14:01 +0200
committerHerculesWSAPI <dev@herc.ws>2018-05-07 00:14:01 +0200
commitaab3a10649b54361388e3c9be4f4df6d54505304 (patch)
tree354f0e49d316b322dd55dd1f9f47b0b8c7b9f937 /src/plugins
parent614d7b66475f58dfb6354b57ca14999cc8c1b687 (diff)
downloadhercules-aab3a10649b54361388e3c9be4f4df6d54505304.tar.gz
hercules-aab3a10649b54361388e3c9be4f4df6d54505304.tar.bz2
hercules-aab3a10649b54361388e3c9be4f4df6d54505304.tar.xz
hercules-aab3a10649b54361388e3c9be4f4df6d54505304.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc8
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc52
4 files changed, 66 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 33cf3a9b2..5044dd45a 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -2428,6 +2428,10 @@ typedef void (*HPMHOOK_pre_clif_pAttendanceRewardRequest) (int *fd, struct map_s
typedef void (*HPMHOOK_post_clif_pAttendanceRewardRequest) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_ui_action) (struct map_session_data **sd, int32 *UIType, int32 *data);
typedef void (*HPMHOOK_post_clif_ui_action) (struct map_session_data *sd, int32 UIType, int32 data);
+typedef void (*HPMHOOK_pre_clif_pPrivateAirshipRequest) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pPrivateAirshipRequest) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_PrivateAirshipResponse) (struct map_session_data **sd, uint32 *flag);
+typedef void (*HPMHOOK_post_clif_PrivateAirshipResponse) (struct map_session_data *sd, uint32 flag);
#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 f0090a5ba..747ec357e 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -2024,6 +2024,10 @@ struct {
struct HPMHookPoint *HP_clif_pAttendanceRewardRequest_post;
struct HPMHookPoint *HP_clif_ui_action_pre;
struct HPMHookPoint *HP_clif_ui_action_post;
+ struct HPMHookPoint *HP_clif_pPrivateAirshipRequest_pre;
+ struct HPMHookPoint *HP_clif_pPrivateAirshipRequest_post;
+ struct HPMHookPoint *HP_clif_PrivateAirshipResponse_pre;
+ struct HPMHookPoint *HP_clif_PrivateAirshipResponse_post;
struct HPMHookPoint *HP_cmdline_init_pre;
struct HPMHookPoint *HP_cmdline_init_post;
struct HPMHookPoint *HP_cmdline_final_pre;
@@ -8365,6 +8369,10 @@ struct {
int HP_clif_pAttendanceRewardRequest_post;
int HP_clif_ui_action_pre;
int HP_clif_ui_action_post;
+ int HP_clif_pPrivateAirshipRequest_pre;
+ int HP_clif_pPrivateAirshipRequest_post;
+ int HP_clif_PrivateAirshipResponse_pre;
+ int HP_clif_PrivateAirshipResponse_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 7f1397f18..06c1b2c88 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -1035,6 +1035,8 @@ struct HookingPointData HookingPoints[] = {
{ 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) },
+ { HP_POP(clif->pPrivateAirshipRequest, HP_clif_pPrivateAirshipRequest) },
+ { HP_POP(clif->PrivateAirshipResponse, HP_clif_PrivateAirshipResponse) },
/* 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 e505e6dd0..dae598218 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -26360,6 +26360,58 @@ void HP_clif_ui_action(struct map_session_data *sd, int32 UIType, int32 data) {
}
return;
}
+void HP_clif_pPrivateAirshipRequest(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pPrivateAirshipRequest_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPrivateAirshipRequest_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pPrivateAirshipRequest_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPrivateAirshipRequest(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pPrivateAirshipRequest_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPrivateAirshipRequest_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pPrivateAirshipRequest_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_PrivateAirshipResponse(struct map_session_data *sd, uint32 flag) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_PrivateAirshipResponse_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, uint32 *flag);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PrivateAirshipResponse_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_PrivateAirshipResponse_pre[hIndex].func;
+ preHookFunc(&sd, &flag);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PrivateAirshipResponse(sd, flag);
+ }
+ if (HPMHooks.count.HP_clif_PrivateAirshipResponse_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, uint32 flag);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PrivateAirshipResponse_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_PrivateAirshipResponse_post[hIndex].func;
+ postHookFunc(sd, flag);
+ }
+ }
+ return;
+}
/* cmdline_interface */
void HP_cmdline_init(void) {
int hIndex = 0;