summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2019-09-22 21:06:59 +0200
committerHerculesWSAPI <dev@herc.ws>2019-09-22 21:06:59 +0200
commitb46daa52ac7ef2d3c9a4f0834bd0343682c625be (patch)
tree9c514a59eb197c3635acf653dbdd46f29696e8f3 /src/plugins/HPMHooking
parentd3d7e84cde670e6ac2ea0fbf1b93b35ff83b5e5f (diff)
downloadhercules-b46daa52ac7ef2d3c9a4f0834bd0343682c625be.tar.gz
hercules-b46daa52ac7ef2d3c9a4f0834bd0343682c625be.tar.bz2
hercules-b46daa52ac7ef2d3c9a4f0834bd0343682c625be.tar.xz
hercules-b46daa52ac7ef2d3c9a4f0834bd0343682c625be.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.inc12
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc24
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc6
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc157
4 files changed, 199 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 8560d2eff..5e79b3fe3 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -1756,6 +1756,10 @@ typedef void (*HPMHOOK_pre_clif_guild_basicinfo) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_guild_basicinfo) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_guild_allianceinfo) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_guild_allianceinfo) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_guild_castlelist) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_guild_castlelist) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_guild_castleinfo) (struct map_session_data **sd, struct guild_castle **gc);
+typedef void (*HPMHOOK_post_clif_guild_castleinfo) (struct map_session_data *sd, struct guild_castle *gc);
typedef void (*HPMHOOK_pre_clif_guild_memberlist) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_guild_memberlist) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_guild_skillinfo) (struct map_session_data **sd);
@@ -2726,6 +2730,12 @@ typedef void (*HPMHOOK_pre_clif_pRefineryUIRefine) (int *fd, struct map_session_
typedef void (*HPMHOOK_post_clif_pRefineryUIRefine) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_announce_refine_status) (struct map_session_data **sd, int *item_id, int *refine_level, bool *success, enum send_target *target);
typedef void (*HPMHOOK_post_clif_announce_refine_status) (struct map_session_data *sd, int item_id, int refine_level, bool success, enum send_target target);
+typedef void (*HPMHOOK_pre_clif_pGuildCastleTeleportRequest) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pGuildCastleTeleportRequest) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pGuildCastleInfoRequest) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pGuildCastleInfoRequest) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_guild_castleteleport_res) (struct map_session_data **sd, enum siege_teleport_result *result);
+typedef void (*HPMHOOK_post_clif_guild_castleteleport_res) (struct map_session_data *sd, enum siege_teleport_result result);
#endif // MAP_CLIF_H
#ifdef COMMON_CORE_H /* cmdline */
typedef void (*HPMHOOK_pre_cmdline_init) (void);
@@ -3058,6 +3068,8 @@ typedef bool (*HPMHOOK_pre_guild_read_castledb_libconfig) (void);
typedef bool (*HPMHOOK_post_guild_read_castledb_libconfig) (bool retVal___);
typedef bool (*HPMHOOK_pre_guild_read_castledb_libconfig_sub) (struct config_setting_t **it, int *idx, const char **source);
typedef bool (*HPMHOOK_post_guild_read_castledb_libconfig_sub) (bool retVal___, struct config_setting_t *it, int idx, const char *source);
+typedef bool (*HPMHOOK_pre_guild_read_castledb_libconfig_sub_warp) (struct config_setting_t **wd, const char **source, struct guild_castle **gc);
+typedef bool (*HPMHOOK_post_guild_read_castledb_libconfig_sub_warp) (bool retVal___, struct config_setting_t *wd, const char *source, struct guild_castle *gc);
typedef int (*HPMHOOK_pre_guild_payexp_timer_sub) (union DBKey *key, struct DBData **data, va_list ap);
typedef int (*HPMHOOK_post_guild_payexp_timer_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap);
typedef int (*HPMHOOK_pre_guild_send_xy_timer_sub) (union DBKey *key, struct DBData **data, va_list ap);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 1bf974d28..f45ec4cc2 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -1346,6 +1346,10 @@ struct {
struct HPMHookPoint *HP_clif_guild_basicinfo_post;
struct HPMHookPoint *HP_clif_guild_allianceinfo_pre;
struct HPMHookPoint *HP_clif_guild_allianceinfo_post;
+ struct HPMHookPoint *HP_clif_guild_castlelist_pre;
+ struct HPMHookPoint *HP_clif_guild_castlelist_post;
+ struct HPMHookPoint *HP_clif_guild_castleinfo_pre;
+ struct HPMHookPoint *HP_clif_guild_castleinfo_post;
struct HPMHookPoint *HP_clif_guild_memberlist_pre;
struct HPMHookPoint *HP_clif_guild_memberlist_post;
struct HPMHookPoint *HP_clif_guild_skillinfo_pre;
@@ -2316,6 +2320,12 @@ struct {
struct HPMHookPoint *HP_clif_pRefineryUIRefine_post;
struct HPMHookPoint *HP_clif_announce_refine_status_pre;
struct HPMHookPoint *HP_clif_announce_refine_status_post;
+ struct HPMHookPoint *HP_clif_pGuildCastleTeleportRequest_pre;
+ struct HPMHookPoint *HP_clif_pGuildCastleTeleportRequest_post;
+ struct HPMHookPoint *HP_clif_pGuildCastleInfoRequest_pre;
+ struct HPMHookPoint *HP_clif_pGuildCastleInfoRequest_post;
+ struct HPMHookPoint *HP_clif_guild_castleteleport_res_pre;
+ struct HPMHookPoint *HP_clif_guild_castleteleport_res_post;
struct HPMHookPoint *HP_cmdline_init_pre;
struct HPMHookPoint *HP_cmdline_init_post;
struct HPMHookPoint *HP_cmdline_final_pre;
@@ -2622,6 +2632,8 @@ struct {
struct HPMHookPoint *HP_guild_read_castledb_libconfig_post;
struct HPMHookPoint *HP_guild_read_castledb_libconfig_sub_pre;
struct HPMHookPoint *HP_guild_read_castledb_libconfig_sub_post;
+ struct HPMHookPoint *HP_guild_read_castledb_libconfig_sub_warp_pre;
+ struct HPMHookPoint *HP_guild_read_castledb_libconfig_sub_warp_post;
struct HPMHookPoint *HP_guild_payexp_timer_sub_pre;
struct HPMHookPoint *HP_guild_payexp_timer_sub_post;
struct HPMHookPoint *HP_guild_send_xy_timer_sub_pre;
@@ -8127,6 +8139,10 @@ struct {
int HP_clif_guild_basicinfo_post;
int HP_clif_guild_allianceinfo_pre;
int HP_clif_guild_allianceinfo_post;
+ int HP_clif_guild_castlelist_pre;
+ int HP_clif_guild_castlelist_post;
+ int HP_clif_guild_castleinfo_pre;
+ int HP_clif_guild_castleinfo_post;
int HP_clif_guild_memberlist_pre;
int HP_clif_guild_memberlist_post;
int HP_clif_guild_skillinfo_pre;
@@ -9097,6 +9113,12 @@ struct {
int HP_clif_pRefineryUIRefine_post;
int HP_clif_announce_refine_status_pre;
int HP_clif_announce_refine_status_post;
+ int HP_clif_pGuildCastleTeleportRequest_pre;
+ int HP_clif_pGuildCastleTeleportRequest_post;
+ int HP_clif_pGuildCastleInfoRequest_pre;
+ int HP_clif_pGuildCastleInfoRequest_post;
+ int HP_clif_guild_castleteleport_res_pre;
+ int HP_clif_guild_castleteleport_res_post;
int HP_cmdline_init_pre;
int HP_cmdline_init_post;
int HP_cmdline_final_pre;
@@ -9403,6 +9425,8 @@ struct {
int HP_guild_read_castledb_libconfig_post;
int HP_guild_read_castledb_libconfig_sub_pre;
int HP_guild_read_castledb_libconfig_sub_post;
+ int HP_guild_read_castledb_libconfig_sub_warp_pre;
+ int HP_guild_read_castledb_libconfig_sub_warp_post;
int HP_guild_payexp_timer_sub_pre;
int HP_guild_payexp_timer_sub_post;
int HP_guild_send_xy_timer_sub_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 290c27961..ea22350a6 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -697,6 +697,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->guild_masterormember, HP_clif_guild_masterormember) },
{ HP_POP(clif->guild_basicinfo, HP_clif_guild_basicinfo) },
{ HP_POP(clif->guild_allianceinfo, HP_clif_guild_allianceinfo) },
+ { HP_POP(clif->guild_castlelist, HP_clif_guild_castlelist) },
+ { HP_POP(clif->guild_castleinfo, HP_clif_guild_castleinfo) },
{ HP_POP(clif->guild_memberlist, HP_clif_guild_memberlist) },
{ HP_POP(clif->guild_skillinfo, HP_clif_guild_skillinfo) },
{ HP_POP(clif->guild_send_onlineinfo, HP_clif_guild_send_onlineinfo) },
@@ -1182,6 +1184,9 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->pRefineryUIClose, HP_clif_pRefineryUIClose) },
{ HP_POP(clif->pRefineryUIRefine, HP_clif_pRefineryUIRefine) },
{ HP_POP(clif->announce_refine_status, HP_clif_announce_refine_status) },
+ { HP_POP(clif->pGuildCastleTeleportRequest, HP_clif_pGuildCastleTeleportRequest) },
+ { HP_POP(clif->pGuildCastleInfoRequest, HP_clif_pGuildCastleInfoRequest) },
+ { HP_POP(clif->guild_castleteleport_res, HP_clif_guild_castleteleport_res) },
/* cmdline_interface */
{ HP_POP(cmdline->init, HP_cmdline_init) },
{ HP_POP(cmdline->final, HP_cmdline_final) },
@@ -1344,6 +1349,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(guild->read_guildskill_tree_db, HP_guild_read_guildskill_tree_db) },
{ HP_POP(guild->read_castledb_libconfig, HP_guild_read_castledb_libconfig) },
{ HP_POP(guild->read_castledb_libconfig_sub, HP_guild_read_castledb_libconfig_sub) },
+ { HP_POP(guild->read_castledb_libconfig_sub_warp, HP_guild_read_castledb_libconfig_sub_warp) },
{ HP_POP(guild->payexp_timer_sub, HP_guild_payexp_timer_sub) },
{ HP_POP(guild->send_xy_timer_sub, HP_guild_send_xy_timer_sub) },
{ HP_POP(guild->send_xy_timer, HP_guild_send_xy_timer) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 325d7407d..247087159 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -17552,6 +17552,58 @@ void HP_clif_guild_allianceinfo(struct map_session_data *sd) {
}
return;
}
+void HP_clif_guild_castlelist(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_guild_castlelist_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castlelist_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_castlelist_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_castlelist(sd);
+ }
+ if (HPMHooks.count.HP_clif_guild_castlelist_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castlelist_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_castlelist_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_guild_castleinfo(struct map_session_data *sd, struct guild_castle *gc) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_guild_castleinfo_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, struct guild_castle **gc);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castleinfo_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_castleinfo_pre[hIndex].func;
+ preHookFunc(&sd, &gc);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_castleinfo(sd, gc);
+ }
+ if (HPMHooks.count.HP_clif_guild_castleinfo_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, struct guild_castle *gc);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castleinfo_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_castleinfo_post[hIndex].func;
+ postHookFunc(sd, gc);
+ }
+ }
+ return;
+}
void HP_clif_guild_memberlist(struct map_session_data *sd) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_guild_memberlist_pre > 0) {
@@ -30193,6 +30245,84 @@ void HP_clif_announce_refine_status(struct map_session_data *sd, int item_id, in
}
return;
}
+void HP_clif_pGuildCastleTeleportRequest(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pGuildCastleTeleportRequest_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCastleTeleportRequest_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildCastleTeleportRequest_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildCastleTeleportRequest(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pGuildCastleTeleportRequest_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCastleTeleportRequest_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildCastleTeleportRequest_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildCastleInfoRequest(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pGuildCastleInfoRequest_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCastleInfoRequest_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildCastleInfoRequest_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildCastleInfoRequest(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pGuildCastleInfoRequest_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCastleInfoRequest_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildCastleInfoRequest_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_guild_castleteleport_res(struct map_session_data *sd, enum siege_teleport_result result) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_guild_castleteleport_res_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, enum siege_teleport_result *result);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castleteleport_res_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_castleteleport_res_pre[hIndex].func;
+ preHookFunc(&sd, &result);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_castleteleport_res(sd, result);
+ }
+ if (HPMHooks.count.HP_clif_guild_castleteleport_res_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, enum siege_teleport_result result);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castleteleport_res_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_castleteleport_res_post[hIndex].func;
+ postHookFunc(sd, result);
+ }
+ }
+ return;
+}
/* cmdline_interface */
void HP_cmdline_init(void) {
int hIndex = 0;
@@ -34304,6 +34434,33 @@ bool HP_guild_read_castledb_libconfig_sub(struct config_setting_t *it, int idx,
}
return retVal___;
}
+bool HP_guild_read_castledb_libconfig_sub_warp(struct config_setting_t *wd, const char *source, struct guild_castle *gc) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_guild_read_castledb_libconfig_sub_warp_pre > 0) {
+ bool (*preHookFunc) (struct config_setting_t **wd, const char **source, struct guild_castle **gc);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_libconfig_sub_warp_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_guild_read_castledb_libconfig_sub_warp_pre[hIndex].func;
+ retVal___ = preHookFunc(&wd, &source, &gc);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.read_castledb_libconfig_sub_warp(wd, source, gc);
+ }
+ if (HPMHooks.count.HP_guild_read_castledb_libconfig_sub_warp_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct config_setting_t *wd, const char *source, struct guild_castle *gc);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_libconfig_sub_warp_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_guild_read_castledb_libconfig_sub_warp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, wd, source, gc);
+ }
+ }
+ return retVal___;
+}
int HP_guild_payexp_timer_sub(union DBKey key, struct DBData *data, va_list ap) {
int hIndex = 0;
int retVal___ = 0;