summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2019-02-11 01:03:29 +0100
committerHerculesWSAPI <dev@herc.ws>2019-02-11 01:03:29 +0100
commitbfedf40f23eef409fd0dcc1cb85ed63b0166317b (patch)
treee047cc055d2046490cb5c12ce27e935c4c444d08 /src/plugins
parent277c9edf4fb18dbb594fc293289d0b74ecc143d9 (diff)
downloadhercules-bfedf40f23eef409fd0dcc1cb85ed63b0166317b.tar.gz
hercules-bfedf40f23eef409fd0dcc1cb85ed63b0166317b.tar.bz2
hercules-bfedf40f23eef409fd0dcc1cb85ed63b0166317b.tar.xz
hercules-bfedf40f23eef409fd0dcc1cb85ed63b0166317b.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_char.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc26
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc26
7 files changed, 66 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index cd28f9b0b..5f3a3a4be 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -562,6 +562,8 @@ typedef int (*HPMHOOK_pre_chr_mmo_char_tobuf) (uint8 **buffer, struct mmo_charst
typedef int (*HPMHOOK_post_chr_mmo_char_tobuf) (int retVal___, uint8 *buffer, struct mmo_charstatus *p);
typedef void (*HPMHOOK_pre_chr_send_HC_ACK_CHARINFO_PER_PAGE) (int *fd, struct char_session_data **sd);
typedef void (*HPMHOOK_post_chr_send_HC_ACK_CHARINFO_PER_PAGE) (int fd, struct char_session_data *sd);
+typedef void (*HPMHOOK_pre_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) (int *fd, struct char_session_data **sd);
+typedef void (*HPMHOOK_post_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) (int fd, struct char_session_data *sd);
typedef void (*HPMHOOK_pre_chr_mmo_char_send_ban_list) (int *fd, struct char_session_data **sd);
typedef void (*HPMHOOK_post_chr_mmo_char_send_ban_list) (int fd, struct char_session_data *sd);
typedef void (*HPMHOOK_pre_chr_mmo_char_send_slots_info) (int *fd, struct char_session_data **sd);
@@ -2664,6 +2666,8 @@ typedef void (*HPMHOOK_pre_clif_pNPCBarterClosed) (int *fd, struct map_session_d
typedef void (*HPMHOOK_post_clif_pNPCBarterClosed) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pNPCBarterPurchase) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pNPCBarterPurchase) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pClientVersion) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pClientVersion) (int fd, struct map_session_data *sd);
#endif // MAP_CLIF_H
#ifdef COMMON_CORE_H /* cmdline */
typedef void (*HPMHOOK_pre_cmdline_init) (void);
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index 39fb82304..a8b4860f3 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -92,6 +92,8 @@ struct {
struct HPMHookPoint *HP_chr_mmo_char_tobuf_post;
struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre;
struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post;
+ struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre;
+ struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post;
struct HPMHookPoint *HP_chr_mmo_char_send_ban_list_pre;
struct HPMHookPoint *HP_chr_mmo_char_send_ban_list_post;
struct HPMHookPoint *HP_chr_mmo_char_send_slots_info_pre;
@@ -1727,6 +1729,8 @@ struct {
int HP_chr_mmo_char_tobuf_post;
int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre;
int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post;
+ int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre;
+ int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post;
int HP_chr_mmo_char_send_ban_list_pre;
int HP_chr_mmo_char_send_ban_list_post;
int HP_chr_mmo_char_send_slots_info_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index 7813f5bac..56c5bcfb7 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -61,6 +61,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(chr->count_users, HP_chr_count_users) },
{ HP_POP(chr->mmo_char_tobuf, HP_chr_mmo_char_tobuf) },
{ HP_POP(chr->send_HC_ACK_CHARINFO_PER_PAGE, HP_chr_send_HC_ACK_CHARINFO_PER_PAGE) },
+ { HP_POP(chr->send_HC_ACK_CHARINFO_PER_PAGE_tail, HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) },
{ HP_POP(chr->mmo_char_send_ban_list, HP_chr_mmo_char_send_ban_list) },
{ HP_POP(chr->mmo_char_send_slots_info, HP_chr_mmo_char_send_slots_info) },
{ HP_POP(chr->mmo_char_send_characters, HP_chr_mmo_char_send_characters) },
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index e177462e9..be4620a1c 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -932,6 +932,32 @@ void HP_chr_send_HC_ACK_CHARINFO_PER_PAGE(int fd, struct char_session_data *sd)
}
return;
}
+void HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail(int fd, struct char_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre > 0) {
+ void (*preHookFunc) (int *fd, struct char_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chr.send_HC_ACK_CHARINFO_PER_PAGE_tail(fd, sd);
+ }
+ if (HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post > 0) {
+ void (*postHookFunc) (int fd, struct char_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
void HP_chr_mmo_char_send_ban_list(int fd, struct char_session_data *sd) {
int hIndex = 0;
if (HPMHooks.count.HP_chr_mmo_char_send_ban_list_pre > 0) {
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index aa4efd5c3..b323d77e6 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -2256,6 +2256,8 @@ struct {
struct HPMHookPoint *HP_clif_pNPCBarterClosed_post;
struct HPMHookPoint *HP_clif_pNPCBarterPurchase_pre;
struct HPMHookPoint *HP_clif_pNPCBarterPurchase_post;
+ struct HPMHookPoint *HP_clif_pClientVersion_pre;
+ struct HPMHookPoint *HP_clif_pClientVersion_post;
struct HPMHookPoint *HP_cmdline_init_pre;
struct HPMHookPoint *HP_cmdline_init_post;
struct HPMHookPoint *HP_cmdline_final_pre;
@@ -8923,6 +8925,8 @@ struct {
int HP_clif_pNPCBarterClosed_post;
int HP_clif_pNPCBarterPurchase_pre;
int HP_clif_pNPCBarterPurchase_post;
+ int HP_clif_pClientVersion_pre;
+ int HP_clif_pClientVersion_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 8d031e140..3c09aba59 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -1152,6 +1152,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->npc_barter_open, HP_clif_npc_barter_open) },
{ HP_POP(clif->pNPCBarterClosed, HP_clif_pNPCBarterClosed) },
{ HP_POP(clif->pNPCBarterPurchase, HP_clif_pNPCBarterPurchase) },
+ { HP_POP(clif->pClientVersion, HP_clif_pClientVersion) },
/* 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 af1fc7bc4..52ec843d2 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -29408,6 +29408,32 @@ void HP_clif_pNPCBarterPurchase(int fd, struct map_session_data *sd) {
}
return;
}
+void HP_clif_pClientVersion(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pClientVersion_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pClientVersion_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pClientVersion_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pClientVersion(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pClientVersion_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pClientVersion_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pClientVersion_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
/* cmdline_interface */
void HP_cmdline_init(void) {
int hIndex = 0;