diff options
Diffstat (limited to 'src/plugins')
7 files changed, 582 insertions, 50 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 1884507b2..8aa1c6512 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -622,8 +622,8 @@ typedef void (*HPMHOOK_pre_chr_send_account_id) (int *fd, int *account_id); typedef void (*HPMHOOK_post_chr_send_account_id) (int fd, int account_id); typedef void (*HPMHOOK_pre_chr_parse_char_connect) (int *fd, struct char_session_data **sd, uint32 *ipl); typedef void (*HPMHOOK_post_chr_parse_char_connect) (int fd, struct char_session_data *sd, uint32 ipl); -typedef void (*HPMHOOK_pre_chr_send_map_info) (int *fd, int *i, uint32 *subnet_map_ip, struct mmo_charstatus **cd); -typedef void (*HPMHOOK_post_chr_send_map_info) (int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd); +typedef void (*HPMHOOK_pre_chr_send_map_info) (int *fd, int *i, uint32 *subnet_map_ip, struct mmo_charstatus **cd, char **dnsHost); +typedef void (*HPMHOOK_post_chr_send_map_info) (int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd, char *dnsHost); typedef void (*HPMHOOK_pre_chr_send_wait_char_server) (int *fd); typedef void (*HPMHOOK_post_chr_send_wait_char_server) (int fd); typedef int (*HPMHOOK_pre_chr_search_default_maps_mapserver) (struct mmo_charstatus **cd); @@ -988,6 +988,8 @@ typedef unsigned short (*HPMHOOK_pre_clif_decrypt_cmd) (int *cmd, struct map_ses typedef unsigned short (*HPMHOOK_post_clif_decrypt_cmd) (unsigned short retVal___, int cmd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_authok) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_authok) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_auth_error) (int *fd, int *errorCode); +typedef void (*HPMHOOK_post_clif_auth_error) (int fd, int errorCode); typedef void (*HPMHOOK_pre_clif_authrefuse) (int *fd, uint8 *error_code); typedef void (*HPMHOOK_post_clif_authrefuse) (int fd, uint8 error_code); typedef void (*HPMHOOK_pre_clif_authfail_fd) (int *fd, int *type); @@ -1102,6 +1104,8 @@ typedef bool (*HPMHOOK_pre_clif_spawn) (struct block_list **bl); typedef bool (*HPMHOOK_post_clif_spawn) (bool retVal___, struct block_list *bl); typedef void (*HPMHOOK_pre_clif_changemap) (struct map_session_data **sd, short *m, int *x, int *y); typedef void (*HPMHOOK_post_clif_changemap) (struct map_session_data *sd, short m, int x, int y); +typedef void (*HPMHOOK_pre_clif_changemap_airship) (struct map_session_data **sd, short *m, int *x, int *y); +typedef void (*HPMHOOK_post_clif_changemap_airship) (struct map_session_data *sd, short m, int x, int y); typedef void (*HPMHOOK_pre_clif_changemapcell) (int *fd, int16 *m, int *x, int *y, int *type, enum send_target *target); typedef void (*HPMHOOK_post_clif_changemapcell) (int fd, int16 m, int x, int y, int type, enum send_target target); typedef void (*HPMHOOK_pre_clif_map_property) (struct map_session_data **sd, enum map_property *property); @@ -1118,6 +1122,8 @@ typedef void (*HPMHOOK_pre_clif_maptypeproperty2) (struct block_list **bl, enum typedef void (*HPMHOOK_post_clif_maptypeproperty2) (struct block_list *bl, enum send_target t); typedef void (*HPMHOOK_pre_clif_changemapserver) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port); typedef void (*HPMHOOK_post_clif_changemapserver) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port); +typedef void (*HPMHOOK_pre_clif_changemapserver_airship) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port); +typedef void (*HPMHOOK_post_clif_changemapserver_airship) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port); typedef void (*HPMHOOK_pre_clif_npcbuysell) (struct map_session_data **sd, int *id); typedef void (*HPMHOOK_post_clif_npcbuysell) (struct map_session_data *sd, int id); typedef void (*HPMHOOK_pre_clif_buylist) (struct map_session_data **sd, struct npc_data **nd); @@ -1266,8 +1272,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); @@ -2422,8 +2428,8 @@ typedef time_t (*HPMHOOK_pre_clif_attendance_getendtime) (void); typedef time_t (*HPMHOOK_post_clif_attendance_getendtime) (time_t retVal___); typedef void (*HPMHOOK_pre_clif_pOpenUIRequest) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pOpenUIRequest) (int fd, struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_open_ui) (struct map_session_data **sd, int8 *UIType); -typedef void (*HPMHOOK_post_clif_open_ui) (struct map_session_data *sd, int8 UIType); +typedef void (*HPMHOOK_pre_clif_open_ui) (struct map_session_data **sd, enum cz_ui_types *uiType); +typedef void (*HPMHOOK_post_clif_open_ui) (struct map_session_data *sd, enum cz_ui_types uiType); typedef void (*HPMHOOK_pre_clif_pAttendanceRewardRequest) (int *fd, struct map_session_data **sd); 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); @@ -2432,6 +2438,28 @@ typedef void (*HPMHOOK_pre_clif_pPrivateAirshipRequest) (int *fd, struct map_ses 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); +typedef void (*HPMHOOK_pre_clif_stylist_vector_init) (void); +typedef void (*HPMHOOK_post_clif_stylist_vector_init) (void); +typedef void (*HPMHOOK_pre_clif_stylist_vector_clear) (void); +typedef void (*HPMHOOK_post_clif_stylist_vector_clear) (void); +typedef bool (*HPMHOOK_pre_clif_stylist_read_db_libconfig) (void); +typedef bool (*HPMHOOK_post_clif_stylist_read_db_libconfig) (bool retVal___); +typedef bool (*HPMHOOK_pre_clif_stylist_read_db_libconfig_sub) (struct config_setting_t **it, int *idx, const char **source); +typedef bool (*HPMHOOK_post_clif_stylist_read_db_libconfig_sub) (bool retVal___, struct config_setting_t *it, int idx, const char *source); +typedef bool (*HPMHOOK_pre_clif_style_change_validate_requirements) (struct map_session_data **sd, int *type, int16 *idx); +typedef bool (*HPMHOOK_post_clif_style_change_validate_requirements) (bool retVal___, struct map_session_data *sd, int type, int16 idx); +typedef void (*HPMHOOK_pre_clif_stylist_send_rodexitem) (struct map_session_data **sd, int16 *itemid); +typedef void (*HPMHOOK_post_clif_stylist_send_rodexitem) (struct map_session_data *sd, int16 itemid); +typedef void (*HPMHOOK_pre_clif_pReqStyleChange) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pReqStyleChange) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_cz_req_style_change_sub) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem); +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); @@ -3590,8 +3618,8 @@ typedef struct item_data* (*HPMHOOK_pre_itemdb_search) (int *nameid); typedef struct item_data* (*HPMHOOK_post_itemdb_search) (struct item_data* retVal___, int nameid); typedef struct item_data* (*HPMHOOK_pre_itemdb_exists) (int *nameid); typedef struct item_data* (*HPMHOOK_post_itemdb_exists) (struct item_data* retVal___, int nameid); -typedef struct item_option* (*HPMHOOK_pre_itemdb_option_exists) (int *idx); -typedef struct item_option* (*HPMHOOK_post_itemdb_option_exists) (struct item_option* retVal___, int idx); +typedef struct itemdb_option* (*HPMHOOK_pre_itemdb_option_exists) (int *idx); +typedef struct itemdb_option* (*HPMHOOK_post_itemdb_option_exists) (struct itemdb_option* retVal___, int idx); typedef bool (*HPMHOOK_pre_itemdb_in_group) (struct item_group **group, int *nameid); typedef bool (*HPMHOOK_post_itemdb_in_group) (bool retVal___, struct item_group *group, int nameid); typedef int (*HPMHOOK_pre_itemdb_group_item) (struct item_group **group); @@ -3656,8 +3684,8 @@ typedef int (*HPMHOOK_pre_itemdb_gendercheck) (struct item_data **id); typedef int (*HPMHOOK_post_itemdb_gendercheck) (int retVal___, struct item_data *id); typedef int (*HPMHOOK_pre_itemdb_validate_entry) (struct item_data **entry, int *n, const char **source); typedef int (*HPMHOOK_post_itemdb_validate_entry) (int retVal___, struct item_data *entry, int n, const char *source); -typedef void (*HPMHOOK_pre_itemdb_readdb_options_additional_fields) (struct item_option **ito, struct config_setting_t **t, const char **source); -typedef void (*HPMHOOK_post_itemdb_readdb_options_additional_fields) (struct item_option *ito, struct config_setting_t *t, const char *source); +typedef void (*HPMHOOK_pre_itemdb_readdb_options_additional_fields) (struct itemdb_option **ito, struct config_setting_t **t, const char **source); +typedef void (*HPMHOOK_post_itemdb_readdb_options_additional_fields) (struct itemdb_option *ito, struct config_setting_t *t, const char *source); typedef void (*HPMHOOK_pre_itemdb_readdb_additional_fields) (int *itemid, struct config_setting_t **it, int *n, const char **source); typedef void (*HPMHOOK_post_itemdb_readdb_additional_fields) (int itemid, struct config_setting_t *it, int n, const char *source); typedef void (*HPMHOOK_pre_itemdb_readdb_job_sub) (struct item_data **id, struct config_setting_t **t); @@ -6092,6 +6120,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); @@ -6108,6 +6138,8 @@ typedef void (*HPMHOOK_pre_pincode_editstate) (int *fd, struct char_session_data typedef void (*HPMHOOK_post_pincode_editstate) (int fd, struct char_session_data *sd, enum pincode_edit_response state); typedef void (*HPMHOOK_pre_pincode_loginstate) (int *fd, struct char_session_data **sd, enum pincode_login_response *state); typedef void (*HPMHOOK_post_pincode_loginstate) (int fd, struct char_session_data *sd, enum pincode_login_response state); +typedef void (*HPMHOOK_pre_pincode_loginstate2) (int *fd, struct char_session_data **sd, enum pincode_login_response *state, enum pincode_login_response2 *flag); +typedef void (*HPMHOOK_post_pincode_loginstate2) (int fd, struct char_session_data *sd, enum pincode_login_response state, enum pincode_login_response2 flag); typedef void (*HPMHOOK_pre_pincode_setnew) (int *fd, struct char_session_data **sd); typedef void (*HPMHOOK_post_pincode_setnew) (int fd, struct char_session_data *sd); typedef void (*HPMHOOK_pre_pincode_change) (int *fd, struct char_session_data **sd); @@ -6598,8 +6630,8 @@ typedef bool (*HPMHOOK_pre_searchstore_queryremote) (struct map_session_data **s typedef bool (*HPMHOOK_post_searchstore_queryremote) (bool retVal___, struct map_session_data *sd, int account_id); typedef void (*HPMHOOK_pre_searchstore_clearremote) (struct map_session_data **sd); typedef void (*HPMHOOK_post_searchstore_clearremote) (struct map_session_data *sd); -typedef bool (*HPMHOOK_pre_searchstore_result) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short **card, unsigned char *refine); -typedef bool (*HPMHOOK_post_searchstore_result) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine); +typedef bool (*HPMHOOK_pre_searchstore_result) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short **card, unsigned char *refine, const struct item_option **option); +typedef bool (*HPMHOOK_post_searchstore_result) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine, const struct item_option *option); #endif // MAP_SEARCHSTORE_H #ifdef COMMON_SHOWMSG_H /* showmsg */ typedef void (*HPMHOOK_pre_showmsg_init) (void); @@ -7084,8 +7116,8 @@ typedef int (*HPMHOOK_pre_skill_check_condition_castbegin_madogear_unknown) (str typedef int (*HPMHOOK_post_skill_check_condition_castbegin_madogear_unknown) (int retVal___, struct status_change *sc, uint16 *skill_id); typedef int (*HPMHOOK_pre_skill_check_condition_castbegin_unknown) (struct status_change **sc, uint16 **skill_id); typedef int (*HPMHOOK_post_skill_check_condition_castbegin_unknown) (int retVal___, struct status_change *sc, uint16 *skill_id); -typedef void (*HPMHOOK_pre_skill_check_condition_castend_unknown) (struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv); -typedef void (*HPMHOOK_post_skill_check_condition_castend_unknown) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); +typedef bool (*HPMHOOK_pre_skill_check_condition_castend_unknown) (struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv); +typedef bool (*HPMHOOK_post_skill_check_condition_castend_unknown) (bool retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); typedef bool (*HPMHOOK_pre_skill_get_requirement_off_unknown) (struct status_change **sc, uint16 **skill_id); typedef bool (*HPMHOOK_post_skill_get_requirement_off_unknown) (bool retVal___, struct status_change *sc, uint16 *skill_id); typedef bool (*HPMHOOK_pre_skill_get_requirement_item_unknown) (struct status_change **sc, struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv, uint16 **idx, int **i); diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc index be39bf2ea..0f9e48287 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc @@ -1252,6 +1252,8 @@ struct { struct HPMHookPoint *HP_pincode_editstate_post; struct HPMHookPoint *HP_pincode_loginstate_pre; struct HPMHookPoint *HP_pincode_loginstate_post; + struct HPMHookPoint *HP_pincode_loginstate2_pre; + struct HPMHookPoint *HP_pincode_loginstate2_post; struct HPMHookPoint *HP_pincode_setnew_pre; struct HPMHookPoint *HP_pincode_setnew_post; struct HPMHookPoint *HP_pincode_change_pre; @@ -2789,6 +2791,8 @@ struct { int HP_pincode_editstate_post; int HP_pincode_loginstate_pre; int HP_pincode_loginstate_post; + int HP_pincode_loginstate2_pre; + int HP_pincode_loginstate2_post; int HP_pincode_setnew_pre; int HP_pincode_setnew_post; int HP_pincode_change_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc index 3ba47102c..099bd1e81 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc @@ -668,6 +668,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pincode->makestate, HP_pincode_makestate) }, { HP_POP(pincode->editstate, HP_pincode_editstate) }, { HP_POP(pincode->loginstate, HP_pincode_loginstate) }, + { HP_POP(pincode->loginstate2, HP_pincode_loginstate2) }, { HP_POP(pincode->setnew, HP_pincode_setnew) }, { HP_POP(pincode->change, HP_pincode_change) }, { HP_POP(pincode->isBlacklisted, HP_pincode_isBlacklisted) }, diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index a15eccc0c..6ce1c5015 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -3182,14 +3182,14 @@ void HP_chr_parse_char_connect(int fd, struct char_session_data *sd, uint32 ipl) } return; } -void HP_chr_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd) { +void HP_chr_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd, char *dnsHost) { int hIndex = 0; if (HPMHooks.count.HP_chr_send_map_info_pre > 0) { - void (*preHookFunc) (int *fd, int *i, uint32 *subnet_map_ip, struct mmo_charstatus **cd); + void (*preHookFunc) (int *fd, int *i, uint32 *subnet_map_ip, struct mmo_charstatus **cd, char **dnsHost); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_map_info_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_map_info_pre[hIndex].func; - preHookFunc(&fd, &i, &subnet_map_ip, &cd); + preHookFunc(&fd, &i, &subnet_map_ip, &cd, &dnsHost); } if (*HPMforce_return) { *HPMforce_return = false; @@ -3197,13 +3197,13 @@ void HP_chr_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charst } } { - HPMHooks.source.chr.send_map_info(fd, i, subnet_map_ip, cd); + HPMHooks.source.chr.send_map_info(fd, i, subnet_map_ip, cd, dnsHost); } if (HPMHooks.count.HP_chr_send_map_info_post > 0) { - void (*postHookFunc) (int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd); + void (*postHookFunc) (int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd, char *dnsHost); for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_map_info_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_map_info_post[hIndex].func; - postHookFunc(fd, i, subnet_map_ip, cd); + postHookFunc(fd, i, subnet_map_ip, cd, dnsHost); } } return; @@ -16405,6 +16405,32 @@ void HP_pincode_loginstate(int fd, struct char_session_data *sd, enum pincode_lo } return; } +void HP_pincode_loginstate2(int fd, struct char_session_data *sd, enum pincode_login_response state, enum pincode_login_response2 flag) { + int hIndex = 0; + if (HPMHooks.count.HP_pincode_loginstate2_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd, enum pincode_login_response *state, enum pincode_login_response2 *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_loginstate2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pincode_loginstate2_pre[hIndex].func; + preHookFunc(&fd, &sd, &state, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.loginstate2(fd, sd, state, flag); + } + if (HPMHooks.count.HP_pincode_loginstate2_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd, enum pincode_login_response state, enum pincode_login_response2 flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_loginstate2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pincode_loginstate2_post[hIndex].func; + postHookFunc(fd, sd, state, flag); + } + } + return; +} void HP_pincode_setnew(int fd, struct char_session_data *sd) { int hIndex = 0; if (HPMHooks.count.HP_pincode_setnew_pre > 0) { diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 5c8fc9d68..803948d89 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -584,6 +584,8 @@ struct { struct HPMHookPoint *HP_clif_decrypt_cmd_post; struct HPMHookPoint *HP_clif_authok_pre; struct HPMHookPoint *HP_clif_authok_post; + struct HPMHookPoint *HP_clif_auth_error_pre; + struct HPMHookPoint *HP_clif_auth_error_post; struct HPMHookPoint *HP_clif_authrefuse_pre; struct HPMHookPoint *HP_clif_authrefuse_post; struct HPMHookPoint *HP_clif_authfail_fd_pre; @@ -698,6 +700,8 @@ struct { struct HPMHookPoint *HP_clif_spawn_post; struct HPMHookPoint *HP_clif_changemap_pre; struct HPMHookPoint *HP_clif_changemap_post; + struct HPMHookPoint *HP_clif_changemap_airship_pre; + struct HPMHookPoint *HP_clif_changemap_airship_post; struct HPMHookPoint *HP_clif_changemapcell_pre; struct HPMHookPoint *HP_clif_changemapcell_post; struct HPMHookPoint *HP_clif_map_property_pre; @@ -714,6 +718,8 @@ struct { struct HPMHookPoint *HP_clif_maptypeproperty2_post; struct HPMHookPoint *HP_clif_changemapserver_pre; struct HPMHookPoint *HP_clif_changemapserver_post; + struct HPMHookPoint *HP_clif_changemapserver_airship_pre; + struct HPMHookPoint *HP_clif_changemapserver_airship_post; struct HPMHookPoint *HP_clif_npcbuysell_pre; struct HPMHookPoint *HP_clif_npcbuysell_post; struct HPMHookPoint *HP_clif_buylist_pre; @@ -2028,6 +2034,28 @@ struct { struct HPMHookPoint *HP_clif_pPrivateAirshipRequest_post; struct HPMHookPoint *HP_clif_PrivateAirshipResponse_pre; struct HPMHookPoint *HP_clif_PrivateAirshipResponse_post; + struct HPMHookPoint *HP_clif_stylist_vector_init_pre; + struct HPMHookPoint *HP_clif_stylist_vector_init_post; + struct HPMHookPoint *HP_clif_stylist_vector_clear_pre; + struct HPMHookPoint *HP_clif_stylist_vector_clear_post; + struct HPMHookPoint *HP_clif_stylist_read_db_libconfig_pre; + struct HPMHookPoint *HP_clif_stylist_read_db_libconfig_post; + struct HPMHookPoint *HP_clif_stylist_read_db_libconfig_sub_pre; + struct HPMHookPoint *HP_clif_stylist_read_db_libconfig_sub_post; + struct HPMHookPoint *HP_clif_style_change_validate_requirements_pre; + struct HPMHookPoint *HP_clif_style_change_validate_requirements_post; + struct HPMHookPoint *HP_clif_stylist_send_rodexitem_pre; + struct HPMHookPoint *HP_clif_stylist_send_rodexitem_post; + struct HPMHookPoint *HP_clif_pReqStyleChange_pre; + struct HPMHookPoint *HP_clif_pReqStyleChange_post; + struct HPMHookPoint *HP_clif_cz_req_style_change_sub_pre; + 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; @@ -4744,6 +4772,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; @@ -6941,6 +6971,8 @@ struct { int HP_clif_decrypt_cmd_post; int HP_clif_authok_pre; int HP_clif_authok_post; + int HP_clif_auth_error_pre; + int HP_clif_auth_error_post; int HP_clif_authrefuse_pre; int HP_clif_authrefuse_post; int HP_clif_authfail_fd_pre; @@ -7055,6 +7087,8 @@ struct { int HP_clif_spawn_post; int HP_clif_changemap_pre; int HP_clif_changemap_post; + int HP_clif_changemap_airship_pre; + int HP_clif_changemap_airship_post; int HP_clif_changemapcell_pre; int HP_clif_changemapcell_post; int HP_clif_map_property_pre; @@ -7071,6 +7105,8 @@ struct { int HP_clif_maptypeproperty2_post; int HP_clif_changemapserver_pre; int HP_clif_changemapserver_post; + int HP_clif_changemapserver_airship_pre; + int HP_clif_changemapserver_airship_post; int HP_clif_npcbuysell_pre; int HP_clif_npcbuysell_post; int HP_clif_buylist_pre; @@ -8385,6 +8421,28 @@ struct { int HP_clif_pPrivateAirshipRequest_post; int HP_clif_PrivateAirshipResponse_pre; int HP_clif_PrivateAirshipResponse_post; + int HP_clif_stylist_vector_init_pre; + int HP_clif_stylist_vector_init_post; + int HP_clif_stylist_vector_clear_pre; + int HP_clif_stylist_vector_clear_post; + int HP_clif_stylist_read_db_libconfig_pre; + int HP_clif_stylist_read_db_libconfig_post; + int HP_clif_stylist_read_db_libconfig_sub_pre; + int HP_clif_stylist_read_db_libconfig_sub_post; + int HP_clif_style_change_validate_requirements_pre; + int HP_clif_style_change_validate_requirements_post; + int HP_clif_stylist_send_rodexitem_pre; + int HP_clif_stylist_send_rodexitem_post; + int HP_clif_pReqStyleChange_pre; + int HP_clif_pReqStyleChange_post; + int HP_clif_cz_req_style_change_sub_pre; + 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; @@ -11101,6 +11159,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 64f9a39e0..2658bef00 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -315,6 +315,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->parse_cmd, HP_clif_parse_cmd) }, { HP_POP(clif->decrypt_cmd, HP_clif_decrypt_cmd) }, { HP_POP(clif->authok, HP_clif_authok) }, + { HP_POP(clif->auth_error, HP_clif_auth_error) }, { HP_POP(clif->authrefuse, HP_clif_authrefuse) }, { HP_POP(clif->authfail_fd, HP_clif_authfail_fd) }, { HP_POP(clif->charselectok, HP_clif_charselectok) }, @@ -372,6 +373,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->graffiti_entry, HP_clif_graffiti_entry) }, { HP_POP(clif->spawn, HP_clif_spawn) }, { HP_POP(clif->changemap, HP_clif_changemap) }, + { HP_POP(clif->changemap_airship, HP_clif_changemap_airship) }, { HP_POP(clif->changemapcell, HP_clif_changemapcell) }, { HP_POP(clif->map_property, HP_clif_map_property) }, { HP_POP(clif->pvpset, HP_clif_pvpset) }, @@ -380,6 +382,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->map_type, HP_clif_map_type) }, { HP_POP(clif->maptypeproperty2, HP_clif_maptypeproperty2) }, { HP_POP(clif->changemapserver, HP_clif_changemapserver) }, + { HP_POP(clif->changemapserver_airship, HP_clif_changemapserver_airship) }, { HP_POP(clif->npcbuysell, HP_clif_npcbuysell) }, { HP_POP(clif->buylist, HP_clif_buylist) }, { HP_POP(clif->selllist, HP_clif_selllist) }, @@ -1037,6 +1040,17 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->ui_action, HP_clif_ui_action) }, { HP_POP(clif->pPrivateAirshipRequest, HP_clif_pPrivateAirshipRequest) }, { HP_POP(clif->PrivateAirshipResponse, HP_clif_PrivateAirshipResponse) }, + { HP_POP(clif->stylist_vector_init, HP_clif_stylist_vector_init) }, + { HP_POP(clif->stylist_vector_clear, HP_clif_stylist_vector_clear) }, + { HP_POP(clif->stylist_read_db_libconfig, HP_clif_stylist_read_db_libconfig) }, + { HP_POP(clif->stylist_read_db_libconfig_sub, HP_clif_stylist_read_db_libconfig_sub) }, + { HP_POP(clif->style_change_validate_requirements, HP_clif_style_change_validate_requirements) }, + { HP_POP(clif->stylist_send_rodexitem, HP_clif_stylist_send_rodexitem) }, + { 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) }, @@ -2430,6 +2444,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 e39dc4c2c..497d1b646 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -7574,6 +7574,32 @@ void HP_clif_authok(struct map_session_data *sd) { } return; } +void HP_clif_auth_error(int fd, int errorCode) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_auth_error_pre > 0) { + void (*preHookFunc) (int *fd, int *errorCode); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_auth_error_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_auth_error_pre[hIndex].func; + preHookFunc(&fd, &errorCode); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.auth_error(fd, errorCode); + } + if (HPMHooks.count.HP_clif_auth_error_post > 0) { + void (*postHookFunc) (int fd, int errorCode); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_auth_error_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_auth_error_post[hIndex].func; + postHookFunc(fd, errorCode); + } + } + return; +} void HP_clif_authrefuse(int fd, uint8 error_code) { int hIndex = 0; if (HPMHooks.count.HP_clif_authrefuse_pre > 0) { @@ -9066,6 +9092,32 @@ void HP_clif_changemap(struct map_session_data *sd, short m, int x, int y) { } return; } +void HP_clif_changemap_airship(struct map_session_data *sd, short m, int x, int y) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_changemap_airship_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, short *m, int *x, int *y); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemap_airship_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_changemap_airship_pre[hIndex].func; + preHookFunc(&sd, &m, &x, &y); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changemap_airship(sd, m, x, y); + } + if (HPMHooks.count.HP_clif_changemap_airship_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, short m, int x, int y); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemap_airship_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_changemap_airship_post[hIndex].func; + postHookFunc(sd, m, x, y); + } + } + return; +} void HP_clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_target target) { int hIndex = 0; if (HPMHooks.count.HP_clif_changemapcell_pre > 0) { @@ -9274,6 +9326,32 @@ void HP_clif_changemapserver(struct map_session_data *sd, unsigned short map_ind } return; } +void HP_clif_changemapserver_airship(struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_changemapserver_airship_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapserver_airship_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_changemapserver_airship_pre[hIndex].func; + preHookFunc(&sd, &map_index, &x, &y, &ip, &port); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changemapserver_airship(sd, map_index, x, y, ip, port); + } + if (HPMHooks.count.HP_clif_changemapserver_airship_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapserver_airship_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_changemapserver_airship_post[hIndex].func; + postHookFunc(sd, map_index, x, y, ip, port); + } + } + return; +} void HP_clif_npcbuysell(struct map_session_data *sd, int id) { int hIndex = 0; if (HPMHooks.count.HP_clif_npcbuysell_pre > 0) { @@ -11221,10 +11299,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 +11317,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); @@ -26282,14 +26360,14 @@ void HP_clif_pOpenUIRequest(int fd, struct map_session_data *sd) { } return; } -void HP_clif_open_ui(struct map_session_data *sd, int8 UIType) { +void HP_clif_open_ui(struct map_session_data *sd, enum cz_ui_types uiType) { int hIndex = 0; if (HPMHooks.count.HP_clif_open_ui_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int8 *UIType); + void (*preHookFunc) (struct map_session_data **sd, enum cz_ui_types *uiType); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_ui_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_open_ui_pre[hIndex].func; - preHookFunc(&sd, &UIType); + preHookFunc(&sd, &uiType); } if (*HPMforce_return) { *HPMforce_return = false; @@ -26297,13 +26375,13 @@ void HP_clif_open_ui(struct map_session_data *sd, int8 UIType) { } } { - HPMHooks.source.clif.open_ui(sd, UIType); + HPMHooks.source.clif.open_ui(sd, uiType); } if (HPMHooks.count.HP_clif_open_ui_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int8 UIType); + void (*postHookFunc) (struct map_session_data *sd, enum cz_ui_types uiType); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_ui_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_open_ui_post[hIndex].func; - postHookFunc(sd, UIType); + postHookFunc(sd, uiType); } } return; @@ -26412,6 +26490,295 @@ void HP_clif_PrivateAirshipResponse(struct map_session_data *sd, uint32 flag) { } return; } +void HP_clif_stylist_vector_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_stylist_vector_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_vector_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_stylist_vector_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.stylist_vector_init(); + } + if (HPMHooks.count.HP_clif_stylist_vector_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_vector_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_stylist_vector_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_clif_stylist_vector_clear(void) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_stylist_vector_clear_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_vector_clear_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_stylist_vector_clear_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.stylist_vector_clear(); + } + if (HPMHooks.count.HP_clif_stylist_vector_clear_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_vector_clear_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_stylist_vector_clear_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_clif_stylist_read_db_libconfig(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_stylist_read_db_libconfig_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_read_db_libconfig_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_stylist_read_db_libconfig_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.stylist_read_db_libconfig(); + } + if (HPMHooks.count.HP_clif_stylist_read_db_libconfig_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_read_db_libconfig_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_stylist_read_db_libconfig_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_clif_stylist_read_db_libconfig_sub(struct config_setting_t *it, int idx, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_stylist_read_db_libconfig_sub_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, int *idx, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_read_db_libconfig_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_stylist_read_db_libconfig_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &idx, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.stylist_read_db_libconfig_sub(it, idx, source); + } + if (HPMHooks.count.HP_clif_stylist_read_db_libconfig_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int idx, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_read_db_libconfig_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_stylist_read_db_libconfig_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, idx, source); + } + } + return retVal___; +} +bool HP_clif_style_change_validate_requirements(struct map_session_data *sd, int type, int16 idx) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_style_change_validate_requirements_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *type, int16 *idx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_validate_requirements_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_style_change_validate_requirements_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &type, &idx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.style_change_validate_requirements(sd, type, idx); + } + if (HPMHooks.count.HP_clif_style_change_validate_requirements_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int type, int16 idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_validate_requirements_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_style_change_validate_requirements_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, type, idx); + } + } + return retVal___; +} +void HP_clif_stylist_send_rodexitem(struct map_session_data *sd, int16 itemid) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_stylist_send_rodexitem_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int16 *itemid); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_send_rodexitem_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_stylist_send_rodexitem_pre[hIndex].func; + preHookFunc(&sd, &itemid); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.stylist_send_rodexitem(sd, itemid); + } + if (HPMHooks.count.HP_clif_stylist_send_rodexitem_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int16 itemid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_send_rodexitem_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_stylist_send_rodexitem_post[hIndex].func; + postHookFunc(sd, itemid); + } + } + return; +} +void HP_clif_pReqStyleChange(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pReqStyleChange_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqStyleChange_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pReqStyleChange_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pReqStyleChange(fd, sd); + } + if (HPMHooks.count.HP_clif_pReqStyleChange_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqStyleChange_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pReqStyleChange_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int16 idx, bool isitem) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_cz_req_style_change_sub_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cz_req_style_change_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_cz_req_style_change_sub_pre[hIndex].func; + preHookFunc(&sd, &type, &idx, &isitem); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cz_req_style_change_sub(sd, type, idx, isitem); + } + if (HPMHooks.count.HP_clif_cz_req_style_change_sub_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int type, int16 idx, bool isitem); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cz_req_style_change_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_cz_req_style_change_sub_post[hIndex].func; + postHookFunc(sd, type, idx, isitem); + } + } + return; +} +void HP_clif_style_change_response(struct map_session_data *sd, enum stylist_shop flag) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_style_change_response_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum stylist_shop *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_response_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_style_change_response_pre[hIndex].func; + preHookFunc(&sd, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.style_change_response(sd, flag); + } + if (HPMHooks.count.HP_clif_style_change_response_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum stylist_shop flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_response_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_style_change_response_post[hIndex].func; + postHookFunc(sd, flag); + } + } + 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; @@ -37934,11 +38301,11 @@ struct item_data* HP_itemdb_exists(int nameid) { } return retVal___; } -struct item_option* HP_itemdb_option_exists(int idx) { +struct itemdb_option* HP_itemdb_option_exists(int idx) { int hIndex = 0; - struct item_option* retVal___ = NULL; + struct itemdb_option* retVal___ = NULL; if (HPMHooks.count.HP_itemdb_option_exists_pre > 0) { - struct item_option* (*preHookFunc) (int *idx); + struct itemdb_option* (*preHookFunc) (int *idx); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_option_exists_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_option_exists_pre[hIndex].func; @@ -37953,7 +38320,7 @@ struct item_option* HP_itemdb_option_exists(int idx) { retVal___ = HPMHooks.source.itemdb.option_exists(idx); } if (HPMHooks.count.HP_itemdb_option_exists_post > 0) { - struct item_option* (*postHookFunc) (struct item_option* retVal___, int idx); + struct itemdb_option* (*postHookFunc) (struct itemdb_option* retVal___, int idx); for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_option_exists_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_option_exists_post[hIndex].func; retVal___ = postHookFunc(retVal___, idx); @@ -38832,10 +39199,10 @@ int HP_itemdb_validate_entry(struct item_data *entry, int n, const char *source) } return retVal___; } -void HP_itemdb_readdb_options_additional_fields(struct item_option *ito, struct config_setting_t *t, const char *source) { +void HP_itemdb_readdb_options_additional_fields(struct itemdb_option *ito, struct config_setting_t *t, const char *source) { int hIndex = 0; if (HPMHooks.count.HP_itemdb_readdb_options_additional_fields_pre > 0) { - void (*preHookFunc) (struct item_option **ito, struct config_setting_t **t, const char **source); + void (*preHookFunc) (struct itemdb_option **ito, struct config_setting_t **t, const char **source); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_options_additional_fields_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_readdb_options_additional_fields_pre[hIndex].func; @@ -38850,7 +39217,7 @@ void HP_itemdb_readdb_options_additional_fields(struct item_option *ito, struct HPMHooks.source.itemdb.readdb_options_additional_fields(ito, t, source); } if (HPMHooks.count.HP_itemdb_readdb_options_additional_fields_post > 0) { - void (*postHookFunc) (struct item_option *ito, struct config_setting_t *t, const char *source); + void (*postHookFunc) (struct itemdb_option *ito, struct config_setting_t *t, const char *source); for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_options_additional_fields_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_readdb_options_additional_fields_post[hIndex].func; postHookFunc(ito, t, source); @@ -63210,6 +63577,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; @@ -69540,15 +69933,15 @@ void HP_searchstore_clearremote(struct map_session_data *sd) { } return; } -bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine) { +bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine, const struct item_option *option) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_searchstore_result_pre > 0) { - bool (*preHookFunc) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short **card, unsigned char *refine); + bool (*preHookFunc) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short **card, unsigned char *refine, const struct item_option **option); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_searchstore_result_pre[hIndex].func; - retVal___ = preHookFunc(&sd, &store_id, &account_id, &store_name, &nameid, &amount, &price, &card, &refine); + retVal___ = preHookFunc(&sd, &store_id, &account_id, &store_name, &nameid, &amount, &price, &card, &refine, &option); } if (*HPMforce_return) { *HPMforce_return = false; @@ -69556,13 +69949,13 @@ bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, i } } { - retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine); + retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine, option); } if (HPMHooks.count.HP_searchstore_result_post > 0) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine); + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine, const struct item_option *option); for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_post; hIndex++) { postHookFunc = HPMHooks.list.HP_searchstore_result_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, store_id, account_id, store_name, nameid, amount, price, card, refine); + retVal___ = postHookFunc(retVal___, sd, store_id, account_id, store_name, nameid, amount, price, card, refine, option); } } return retVal___; @@ -76149,31 +76542,32 @@ int HP_skill_check_condition_castbegin_unknown(struct status_change *sc, uint16 } return retVal___; } -void HP_skill_check_condition_castend_unknown(struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv) { +bool HP_skill_check_condition_castend_unknown(struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv) { int hIndex = 0; + bool retVal___ = false; if (HPMHooks.count.HP_skill_check_condition_castend_unknown_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv); + bool (*preHookFunc) (struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_check_condition_castend_unknown_pre[hIndex].func; - preHookFunc(&sd, &skill_id, &skill_lv); + retVal___ = preHookFunc(&sd, &skill_id, &skill_lv); } if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.check_condition_castend_unknown(sd, skill_id, skill_lv); + retVal___ = HPMHooks.source.skill.check_condition_castend_unknown(sd, skill_id, skill_lv); } if (HPMHooks.count.HP_skill_check_condition_castend_unknown_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_check_condition_castend_unknown_post[hIndex].func; - postHookFunc(sd, skill_id, skill_lv); + retVal___ = postHookFunc(retVal___, sd, skill_id, skill_lv); } } - return; + return retVal___; } bool HP_skill_get_requirement_off_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; |