summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2018-06-29 11:33:55 +0200
committerHerculesWSAPI <dev@herc.ws>2018-06-29 11:33:55 +0200
commitd259adc39c1bd405da4fa5388747654b46a0d242 (patch)
treee9482818d17c0bc045548e5594b9634457951c31 /src
parent9d24045d743a11eda0c825ea3c989fc5e78bc8af (diff)
downloadhercules-d259adc39c1bd405da4fa5388747654b46a0d242.tar.gz
hercules-d259adc39c1bd405da4fa5388747654b46a0d242.tar.bz2
hercules-d259adc39c1bd405da4fa5388747654b46a0d242.tar.xz
hercules-d259adc39c1bd405da4fa5388747654b46a0d242.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src')
-rw-r--r--src/common/HPMDataCheck.h3
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc10
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc12
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc3
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc84
5 files changed, 107 insertions, 5 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 8df39df02..2370dfa8d 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -588,6 +588,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_CZ_ADD_ITEM_TO_MAIL", sizeof(struct PACKET_CZ_ADD_ITEM_TO_MAIL), SERVER_TYPE_MAP },
{ "PACKET_CZ_CHECKNAME", sizeof(struct PACKET_CZ_CHECKNAME), SERVER_TYPE_MAP },
{ "PACKET_CZ_OPEN_UI", sizeof(struct PACKET_CZ_OPEN_UI), SERVER_TYPE_MAP },
+ { "PACKET_CZ_PET_EVOLUTION", sizeof(struct PACKET_CZ_PET_EVOLUTION), SERVER_TYPE_MAP },
{ "PACKET_CZ_PRIVATE_AIRSHIP_REQUEST", sizeof(struct PACKET_CZ_PRIVATE_AIRSHIP_REQUEST), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_DELETE_MAIL", sizeof(struct PACKET_CZ_REQ_DELETE_MAIL), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_ITEM_FROM_MAIL", sizeof(struct PACKET_CZ_REQ_ITEM_FROM_MAIL), SERVER_TYPE_MAP },
@@ -696,6 +697,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "packet_viewequip_ack", sizeof(struct packet_viewequip_ack), SERVER_TYPE_MAP },
{ "packet_whisper_message", sizeof(struct packet_whisper_message), SERVER_TYPE_MAP },
{ "packet_wis_end", sizeof(struct packet_wis_end), SERVER_TYPE_MAP },
+ { "pet_evolution_items", sizeof(struct pet_evolution_items), SERVER_TYPE_MAP },
#else
#define MAP_PACKETS_STRUCT_H
#endif // MAP_PACKETS_STRUCT_H
@@ -746,6 +748,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#ifdef MAP_PET_H
{ "pet_bonus", sizeof(struct pet_bonus), SERVER_TYPE_MAP },
{ "pet_data", sizeof(struct pet_data), SERVER_TYPE_MAP },
+ { "pet_evolve_data", sizeof(struct pet_evolve_data), SERVER_TYPE_MAP },
{ "pet_interface", sizeof(struct pet_interface), SERVER_TYPE_MAP },
{ "pet_loot", sizeof(struct pet_loot), SERVER_TYPE_MAP },
{ "pet_recovery", sizeof(struct pet_recovery), SERVER_TYPE_MAP },
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 9ae123779..6d184d082 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -1266,8 +1266,8 @@ typedef void (*HPMHOOK_pre_clif_feel_hate_reset) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_feel_hate_reset) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_partytickack) (struct map_session_data **sd, bool *flag);
typedef void (*HPMHOOK_post_clif_partytickack) (struct map_session_data *sd, bool flag);
-typedef void (*HPMHOOK_pre_clif_zc_config) (struct map_session_data **sd, int *type, int *flag);
-typedef void (*HPMHOOK_post_clif_zc_config) (struct map_session_data *sd, int type, int flag);
+typedef void (*HPMHOOK_pre_clif_zc_config) (struct map_session_data **sd, enum CZ_CONFIG *type, int *flag);
+typedef void (*HPMHOOK_post_clif_zc_config) (struct map_session_data *sd, enum CZ_CONFIG type, int flag);
typedef void (*HPMHOOK_pre_clif_viewequip_ack) (struct map_session_data **sd, struct map_session_data **tsd);
typedef void (*HPMHOOK_post_clif_viewequip_ack) (struct map_session_data *sd, struct map_session_data *tsd);
typedef void (*HPMHOOK_pre_clif_equpcheckbox) (struct map_session_data **sd);
@@ -2450,6 +2450,10 @@ typedef void (*HPMHOOK_pre_clif_cz_req_style_change_sub) (struct map_session_dat
typedef void (*HPMHOOK_post_clif_cz_req_style_change_sub) (struct map_session_data *sd, int type, int16 idx, bool isitem);
typedef void (*HPMHOOK_pre_clif_style_change_response) (struct map_session_data **sd, enum stylist_shop *flag);
typedef void (*HPMHOOK_post_clif_style_change_response) (struct map_session_data *sd, enum stylist_shop flag);
+typedef void (*HPMHOOK_pre_clif_pPetEvolution) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pPetEvolution) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_petEvolutionResult) (int *fd, enum pet_evolution_result *result);
+typedef void (*HPMHOOK_post_clif_petEvolutionResult) (int fd, enum pet_evolution_result result);
#endif // MAP_CLIF_H
#ifdef COMMON_CORE_H /* cmdline */
typedef void (*HPMHOOK_pre_cmdline_init) (void);
@@ -6110,6 +6114,8 @@ typedef bool (*HPMHOOK_pre_pet_read_db_sub_intimacy) (int *idx, struct config_se
typedef bool (*HPMHOOK_post_pet_read_db_sub_intimacy) (bool retVal___, int idx, struct config_setting_t *t);
typedef void (*HPMHOOK_pre_pet_read_db_clear) (void);
typedef void (*HPMHOOK_post_pet_read_db_clear) (void);
+typedef void (*HPMHOOK_pre_pet_read_db_sub_evolution) (struct config_setting_t **t, int *n);
+typedef void (*HPMHOOK_post_pet_read_db_sub_evolution) (struct config_setting_t *t, int n);
#endif // MAP_PET_H
#ifdef CHAR_PINCODE_H /* pincode */
typedef void (*HPMHOOK_pre_pincode_handle) (int *fd, struct char_session_data **sd);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index d17955db7..671a9cb5c 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -2046,6 +2046,10 @@ struct {
struct HPMHookPoint *HP_clif_cz_req_style_change_sub_post;
struct HPMHookPoint *HP_clif_style_change_response_pre;
struct HPMHookPoint *HP_clif_style_change_response_post;
+ struct HPMHookPoint *HP_clif_pPetEvolution_pre;
+ struct HPMHookPoint *HP_clif_pPetEvolution_post;
+ struct HPMHookPoint *HP_clif_petEvolutionResult_pre;
+ struct HPMHookPoint *HP_clif_petEvolutionResult_post;
struct HPMHookPoint *HP_cmdline_init_pre;
struct HPMHookPoint *HP_cmdline_init_post;
struct HPMHookPoint *HP_cmdline_final_pre;
@@ -4762,6 +4766,8 @@ struct {
struct HPMHookPoint *HP_pet_read_db_sub_intimacy_post;
struct HPMHookPoint *HP_pet_read_db_clear_pre;
struct HPMHookPoint *HP_pet_read_db_clear_post;
+ struct HPMHookPoint *HP_pet_read_db_sub_evolution_pre;
+ struct HPMHookPoint *HP_pet_read_db_sub_evolution_post;
struct HPMHookPoint *HP_quest_init_pre;
struct HPMHookPoint *HP_quest_init_post;
struct HPMHookPoint *HP_quest_final_pre;
@@ -8421,6 +8427,10 @@ struct {
int HP_clif_cz_req_style_change_sub_post;
int HP_clif_style_change_response_pre;
int HP_clif_style_change_response_post;
+ int HP_clif_pPetEvolution_pre;
+ int HP_clif_pPetEvolution_post;
+ int HP_clif_petEvolutionResult_pre;
+ int HP_clif_petEvolutionResult_post;
int HP_cmdline_init_pre;
int HP_cmdline_init_post;
int HP_cmdline_final_pre;
@@ -11137,6 +11147,8 @@ struct {
int HP_pet_read_db_sub_intimacy_post;
int HP_pet_read_db_clear_pre;
int HP_pet_read_db_clear_post;
+ int HP_pet_read_db_sub_evolution_pre;
+ int HP_pet_read_db_sub_evolution_post;
int HP_quest_init_pre;
int HP_quest_init_post;
int HP_quest_final_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index c9463b1b8..942693da8 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -1046,6 +1046,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->pReqStyleChange, HP_clif_pReqStyleChange) },
{ HP_POP(clif->cz_req_style_change_sub, HP_clif_cz_req_style_change_sub) },
{ HP_POP(clif->style_change_response, HP_clif_style_change_response) },
+ { HP_POP(clif->pPetEvolution, HP_clif_pPetEvolution) },
+ { HP_POP(clif->petEvolutionResult, HP_clif_petEvolutionResult) },
/* cmdline_interface */
{ HP_POP(cmdline->init, HP_cmdline_init) },
{ HP_POP(cmdline->final, HP_cmdline_final) },
@@ -2439,6 +2441,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pet->read_db_sub, HP_pet_read_db_sub) },
{ HP_POP(pet->read_db_sub_intimacy, HP_pet_read_db_sub_intimacy) },
{ HP_POP(pet->read_db_clear, HP_pet_read_db_clear) },
+ { HP_POP(pet->read_db_sub_evolution, HP_pet_read_db_sub_evolution) },
/* quest_interface */
{ HP_POP(quest->init, HP_quest_init) },
{ HP_POP(quest->final, HP_quest_final) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index a74fc4edb..5cd54ba22 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -11221,10 +11221,10 @@ void HP_clif_partytickack(struct map_session_data *sd, bool flag) {
}
return;
}
-void HP_clif_zc_config(struct map_session_data *sd, int type, int flag) {
+void HP_clif_zc_config(struct map_session_data *sd, enum CZ_CONFIG type, int flag) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_zc_config_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, int *type, int *flag);
+ void (*preHookFunc) (struct map_session_data **sd, enum CZ_CONFIG *type, int *flag);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_config_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_zc_config_pre[hIndex].func;
@@ -11239,7 +11239,7 @@ void HP_clif_zc_config(struct map_session_data *sd, int type, int flag) {
HPMHooks.source.clif.zc_config(sd, type, flag);
}
if (HPMHooks.count.HP_clif_zc_config_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, int type, int flag);
+ void (*postHookFunc) (struct map_session_data *sd, enum CZ_CONFIG type, int flag);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_config_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_zc_config_post[hIndex].func;
postHookFunc(sd, type, flag);
@@ -26649,6 +26649,58 @@ void HP_clif_style_change_response(struct map_session_data *sd, enum stylist_sho
}
return;
}
+void HP_clif_pPetEvolution(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pPetEvolution_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetEvolution_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pPetEvolution_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPetEvolution(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pPetEvolution_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetEvolution_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pPetEvolution_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_petEvolutionResult(int fd, enum pet_evolution_result result) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_petEvolutionResult_pre > 0) {
+ void (*preHookFunc) (int *fd, enum pet_evolution_result *result);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_petEvolutionResult_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_petEvolutionResult_pre[hIndex].func;
+ preHookFunc(&fd, &result);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.petEvolutionResult(fd, result);
+ }
+ if (HPMHooks.count.HP_clif_petEvolutionResult_post > 0) {
+ void (*postHookFunc) (int fd, enum pet_evolution_result result);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_petEvolutionResult_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_petEvolutionResult_post[hIndex].func;
+ postHookFunc(fd, result);
+ }
+ }
+ return;
+}
/* cmdline_interface */
void HP_cmdline_init(void) {
int hIndex = 0;
@@ -63447,6 +63499,32 @@ void HP_pet_read_db_clear(void) {
}
return;
}
+void HP_pet_read_db_sub_evolution(struct config_setting_t *t, int n) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_pet_read_db_sub_evolution_pre > 0) {
+ void (*preHookFunc) (struct config_setting_t **t, int *n);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_sub_evolution_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_pet_read_db_sub_evolution_pre[hIndex].func;
+ preHookFunc(&t, &n);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pet.read_db_sub_evolution(t, n);
+ }
+ if (HPMHooks.count.HP_pet_read_db_sub_evolution_post > 0) {
+ void (*postHookFunc) (struct config_setting_t *t, int n);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_sub_evolution_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_pet_read_db_sub_evolution_post[hIndex].func;
+ postHookFunc(t, n);
+ }
+ }
+ return;
+}
/* quest_interface */
void HP_quest_init(bool minimal) {
int hIndex = 0;