summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2020-06-28 02:04:59 +0200
committerHerculesWSAPI <dev@herc.ws>2020-06-28 02:04:59 +0200
commit5b7b4361b53d9d7d5bf6518664f261c1bc7b02f6 (patch)
treece6866101f5f7f771c68e4c7578afc403c1fe448
parent74e33aee9e47d0d74bf3ff58b55a823729c529ad (diff)
downloadhercules-5b7b4361b53d9d7d5bf6518664f261c1bc7b02f6.tar.gz
hercules-5b7b4361b53d9d7d5bf6518664f261c1bc7b02f6.tar.bz2
hercules-5b7b4361b53d9d7d5bf6518664f261c1bc7b02f6.tar.xz
hercules-5b7b4361b53d9d7d5bf6518664f261c1bc7b02f6.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
-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.inc54
4 files changed, 68 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 9ce99fbe7..f8f760b48 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -6540,6 +6540,8 @@ typedef int (*HPMHOOK_pre_pet_hungry_val) (struct pet_data **pd);
typedef int (*HPMHOOK_post_pet_hungry_val) (int retVal___, struct pet_data *pd);
typedef void (*HPMHOOK_pre_pet_set_hunger) (struct pet_data **pd, int *value);
typedef void (*HPMHOOK_post_pet_set_hunger) (struct pet_data *pd, int value);
+typedef int (*HPMHOOK_pre_pet_get_card4_value) (int *rename_flag, int *intimacy);
+typedef int (*HPMHOOK_post_pet_get_card4_value) (int retVal___, int rename_flag, int intimacy);
typedef void (*HPMHOOK_pre_pet_set_intimate) (struct pet_data **pd, int *value);
typedef void (*HPMHOOK_post_pet_set_intimate) (struct pet_data *pd, int value);
typedef int (*HPMHOOK_pre_pet_create_egg) (struct map_session_data **sd, int *item_id);
@@ -6564,6 +6566,8 @@ typedef int (*HPMHOOK_pre_pet_return_egg) (struct map_session_data **sd, struct
typedef int (*HPMHOOK_post_pet_return_egg) (int retVal___, struct map_session_data *sd, struct pet_data *pd);
typedef int (*HPMHOOK_pre_pet_data_init) (struct map_session_data **sd, struct s_pet **petinfo);
typedef int (*HPMHOOK_post_pet_data_init) (int retVal___, struct map_session_data *sd, struct s_pet *petinfo);
+typedef int (*HPMHOOK_pre_pet_spawn) (struct map_session_data **sd, bool *birth_process);
+typedef int (*HPMHOOK_post_pet_spawn) (int retVal___, struct map_session_data *sd, bool birth_process);
typedef int (*HPMHOOK_pre_pet_birth_process) (struct map_session_data **sd, struct s_pet **petinfo);
typedef int (*HPMHOOK_post_pet_birth_process) (int retVal___, struct map_session_data *sd, struct s_pet *petinfo);
typedef int (*HPMHOOK_pre_pet_recv_petdata) (int *account_id, struct s_pet **p, int *flag);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index c0627fa5c..acd65174c 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -5116,6 +5116,8 @@ struct {
struct HPMHookPoint *HP_pet_hungry_val_post;
struct HPMHookPoint *HP_pet_set_hunger_pre;
struct HPMHookPoint *HP_pet_set_hunger_post;
+ struct HPMHookPoint *HP_pet_get_card4_value_pre;
+ struct HPMHookPoint *HP_pet_get_card4_value_post;
struct HPMHookPoint *HP_pet_set_intimate_pre;
struct HPMHookPoint *HP_pet_set_intimate_post;
struct HPMHookPoint *HP_pet_create_egg_pre;
@@ -5140,6 +5142,8 @@ struct {
struct HPMHookPoint *HP_pet_return_egg_post;
struct HPMHookPoint *HP_pet_data_init_pre;
struct HPMHookPoint *HP_pet_data_init_post;
+ struct HPMHookPoint *HP_pet_spawn_pre;
+ struct HPMHookPoint *HP_pet_spawn_post;
struct HPMHookPoint *HP_pet_birth_process_pre;
struct HPMHookPoint *HP_pet_birth_process_post;
struct HPMHookPoint *HP_pet_recv_petdata_pre;
@@ -12149,6 +12153,8 @@ struct {
int HP_pet_hungry_val_post;
int HP_pet_set_hunger_pre;
int HP_pet_set_hunger_post;
+ int HP_pet_get_card4_value_pre;
+ int HP_pet_get_card4_value_post;
int HP_pet_set_intimate_pre;
int HP_pet_set_intimate_post;
int HP_pet_create_egg_pre;
@@ -12173,6 +12179,8 @@ struct {
int HP_pet_return_egg_post;
int HP_pet_data_init_pre;
int HP_pet_data_init_post;
+ int HP_pet_spawn_pre;
+ int HP_pet_spawn_post;
int HP_pet_birth_process_pre;
int HP_pet_birth_process_post;
int HP_pet_recv_petdata_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index c35e9b3d6..4cd13c366 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -2618,6 +2618,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pet->final, HP_pet_final) },
{ HP_POP(pet->hungry_val, HP_pet_hungry_val) },
{ HP_POP(pet->set_hunger, HP_pet_set_hunger) },
+ { HP_POP(pet->get_card4_value, HP_pet_get_card4_value) },
{ HP_POP(pet->set_intimate, HP_pet_set_intimate) },
{ HP_POP(pet->create_egg, HP_pet_create_egg) },
{ HP_POP(pet->unlocktarget, HP_pet_unlocktarget) },
@@ -2630,6 +2631,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pet->performance, HP_pet_performance) },
{ HP_POP(pet->return_egg, HP_pet_return_egg) },
{ HP_POP(pet->data_init, HP_pet_data_init) },
+ { HP_POP(pet->spawn, HP_pet_spawn) },
{ HP_POP(pet->birth_process, HP_pet_birth_process) },
{ HP_POP(pet->recv_petdata, HP_pet_recv_petdata) },
{ HP_POP(pet->select_egg, HP_pet_select_egg) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 4ef6c21eb..5440d9f2a 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -68086,6 +68086,33 @@ void HP_pet_set_hunger(struct pet_data *pd, int value) {
}
return;
}
+int HP_pet_get_card4_value(int rename_flag, int intimacy) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_pet_get_card4_value_pre > 0) {
+ int (*preHookFunc) (int *rename_flag, int *intimacy);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_card4_value_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_pet_get_card4_value_pre[hIndex].func;
+ retVal___ = preHookFunc(&rename_flag, &intimacy);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.get_card4_value(rename_flag, intimacy);
+ }
+ if (HPMHooks.count.HP_pet_get_card4_value_post > 0) {
+ int (*postHookFunc) (int retVal___, int rename_flag, int intimacy);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_card4_value_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_pet_get_card4_value_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, rename_flag, intimacy);
+ }
+ }
+ return retVal___;
+}
void HP_pet_set_intimate(struct pet_data *pd, int value) {
int hIndex = 0;
if (HPMHooks.count.HP_pet_set_intimate_pre > 0) {
@@ -68409,6 +68436,33 @@ int HP_pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) {
}
return retVal___;
}
+int HP_pet_spawn(struct map_session_data *sd, bool birth_process) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_pet_spawn_pre > 0) {
+ int (*preHookFunc) (struct map_session_data **sd, bool *birth_process);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_spawn_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_pet_spawn_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, &birth_process);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.spawn(sd, birth_process);
+ }
+ if (HPMHooks.count.HP_pet_spawn_post > 0) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, bool birth_process);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_spawn_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_pet_spawn_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, birth_process);
+ }
+ }
+ return retVal___;
+}
int HP_pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) {
int hIndex = 0;
int retVal___ = 0;