diff options
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Defs.inc | 42 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 68 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 17 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 477 |
4 files changed, 586 insertions, 18 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index bd17dc7fe..4bd77f588 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -1452,6 +1452,10 @@ typedef void (*HPMHOOK_pre_clif_msgtable_num) (struct map_session_data **sd, uns typedef void (*HPMHOOK_post_clif_msgtable_num) (struct map_session_data *sd, unsigned short msg_id, int value); typedef void (*HPMHOOK_pre_clif_msgtable_skill) (struct map_session_data **sd, uint16 *skill_id, int *msg_id); typedef void (*HPMHOOK_post_clif_msgtable_skill) (struct map_session_data *sd, uint16 skill_id, int msg_id); +typedef void (*HPMHOOK_pre_clif_msgtable_str) (struct map_session_data **sd, uint16 *msg_id, const char **value); +typedef void (*HPMHOOK_post_clif_msgtable_str) (struct map_session_data *sd, uint16 msg_id, const char *value); +typedef void (*HPMHOOK_pre_clif_msgtable_color) (struct map_session_data **sd, uint16 *msg_id, uint32 *color); +typedef void (*HPMHOOK_post_clif_msgtable_color) (struct map_session_data *sd, uint16 msg_id, uint32 color); typedef void (*HPMHOOK_pre_clif_message) (const int *fd, const char **mes); typedef void (*HPMHOOK_post_clif_message) (const int fd, const char *mes); typedef void (*HPMHOOK_pre_clif_messageln) (const int *fd, const char **mes); @@ -1692,6 +1696,8 @@ typedef void (*HPMHOOK_pre_clif_quest_update_status) (struct map_session_data ** typedef void (*HPMHOOK_post_clif_quest_update_status) (struct map_session_data *sd, int quest_id, bool active); typedef void (*HPMHOOK_pre_clif_quest_update_objective) (struct map_session_data **sd, struct quest **qd); typedef void (*HPMHOOK_post_clif_quest_update_objective) (struct map_session_data *sd, struct quest *qd); +typedef void (*HPMHOOK_pre_clif_quest_notify_objective) (struct map_session_data **sd, struct quest **qd); +typedef void (*HPMHOOK_post_clif_quest_notify_objective) (struct map_session_data *sd, struct quest *qd); typedef void (*HPMHOOK_pre_clif_quest_show_event) (struct map_session_data **sd, struct block_list **bl, short *state, short *color); typedef void (*HPMHOOK_post_clif_quest_show_event) (struct map_session_data *sd, struct block_list *bl, short state, short color); typedef void (*HPMHOOK_pre_clif_mail_window) (int *fd, int *flag); @@ -2404,6 +2410,26 @@ typedef void (*HPMHOOK_pre_clif_clan_message) (struct clan **c, const char **mes typedef void (*HPMHOOK_post_clif_clan_message) (struct clan *c, const char *mes, int len); typedef void (*HPMHOOK_pre_clif_pClanMessage) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pClanMessage) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_hat_effect) (struct block_list **bl, struct block_list **tbl, enum send_target *target); +typedef void (*HPMHOOK_post_clif_hat_effect) (struct block_list *bl, struct block_list *tbl, enum send_target target); +typedef void (*HPMHOOK_pre_clif_hat_effect_single) (struct block_list **bl, uint16 *effectId, bool *enable); +typedef void (*HPMHOOK_post_clif_hat_effect_single) (struct block_list *bl, uint16 effectId, bool enable); +typedef bool (*HPMHOOK_pre_clif_pAttendanceDB) (void); +typedef bool (*HPMHOOK_post_clif_pAttendanceDB) (bool retVal___); +typedef bool (*HPMHOOK_pre_clif_attendancedb_libconfig_sub) (struct config_setting_t **it, int *n, const char **source); +typedef bool (*HPMHOOK_post_clif_attendancedb_libconfig_sub) (bool retVal___, struct config_setting_t *it, int n, const char *source); +typedef bool (*HPMHOOK_pre_clif_attendance_timediff) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_clif_attendance_timediff) (bool retVal___, struct map_session_data *sd); +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_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); +typedef void (*HPMHOOK_post_clif_ui_action) (struct map_session_data *sd, int32 UIType, int32 data); #endif // MAP_CLIF_H #ifdef COMMON_CORE_H /* cmdline */ typedef void (*HPMHOOK_pre_cmdline_init) (void); @@ -2668,8 +2694,8 @@ typedef int (*HPMHOOK_pre_guild_check_alliance) (int *guild_id1, int *guild_id2, typedef int (*HPMHOOK_post_guild_check_alliance) (int retVal___, int guild_id1, int guild_id2, int flag); typedef int (*HPMHOOK_pre_guild_send_memberinfoshort) (struct map_session_data **sd, int *online); typedef int (*HPMHOOK_post_guild_send_memberinfoshort) (int retVal___, struct map_session_data *sd, int online); -typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); -typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class); +typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class, uint32 *last_login); +typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login); typedef int (*HPMHOOK_pre_guild_change_memberposition) (int *guild_id, int *account_id, int *char_id, short *idx); typedef int (*HPMHOOK_post_guild_change_memberposition) (int retVal___, int guild_id, int account_id, int char_id, short idx); typedef int (*HPMHOOK_pre_guild_memberposition_changed) (struct guild **g, int *idx, int *pos); @@ -6018,8 +6044,16 @@ typedef int (*HPMHOOK_pre_pet_recovery_timer) (int *tid, int64 *tick, int *id, i typedef int (*HPMHOOK_post_pet_recovery_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef int (*HPMHOOK_pre_pet_skill_support_timer) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_pet_skill_support_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); -typedef int (*HPMHOOK_pre_pet_read_db) (void); -typedef int (*HPMHOOK_post_pet_read_db) (int retVal___); +typedef void (*HPMHOOK_pre_pet_read_db) (void); +typedef void (*HPMHOOK_post_pet_read_db) (void); +typedef int (*HPMHOOK_pre_pet_read_db_libconfig) (const char **filename, bool *ignore_missing); +typedef int (*HPMHOOK_post_pet_read_db_libconfig) (int retVal___, const char *filename, bool ignore_missing); +typedef int (*HPMHOOK_pre_pet_read_db_sub) (struct config_setting_t **it, int *n, const char **source); +typedef int (*HPMHOOK_post_pet_read_db_sub) (int retVal___, struct config_setting_t *it, int n, const char *source); +typedef bool (*HPMHOOK_pre_pet_read_db_sub_intimacy) (int *idx, struct config_setting_t **t); +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); #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 9d531e370..c01f8000c 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1046,6 +1046,10 @@ struct { struct HPMHookPoint *HP_clif_msgtable_num_post; struct HPMHookPoint *HP_clif_msgtable_skill_pre; struct HPMHookPoint *HP_clif_msgtable_skill_post; + struct HPMHookPoint *HP_clif_msgtable_str_pre; + struct HPMHookPoint *HP_clif_msgtable_str_post; + struct HPMHookPoint *HP_clif_msgtable_color_pre; + struct HPMHookPoint *HP_clif_msgtable_color_post; struct HPMHookPoint *HP_clif_message_pre; struct HPMHookPoint *HP_clif_message_post; struct HPMHookPoint *HP_clif_messageln_pre; @@ -1286,6 +1290,8 @@ struct { struct HPMHookPoint *HP_clif_quest_update_status_post; struct HPMHookPoint *HP_clif_quest_update_objective_pre; struct HPMHookPoint *HP_clif_quest_update_objective_post; + struct HPMHookPoint *HP_clif_quest_notify_objective_pre; + struct HPMHookPoint *HP_clif_quest_notify_objective_post; struct HPMHookPoint *HP_clif_quest_show_event_pre; struct HPMHookPoint *HP_clif_quest_show_event_post; struct HPMHookPoint *HP_clif_mail_window_pre; @@ -1998,6 +2004,26 @@ struct { struct HPMHookPoint *HP_clif_clan_message_post; struct HPMHookPoint *HP_clif_pClanMessage_pre; struct HPMHookPoint *HP_clif_pClanMessage_post; + struct HPMHookPoint *HP_clif_hat_effect_pre; + struct HPMHookPoint *HP_clif_hat_effect_post; + struct HPMHookPoint *HP_clif_hat_effect_single_pre; + struct HPMHookPoint *HP_clif_hat_effect_single_post; + struct HPMHookPoint *HP_clif_pAttendanceDB_pre; + struct HPMHookPoint *HP_clif_pAttendanceDB_post; + struct HPMHookPoint *HP_clif_attendancedb_libconfig_sub_pre; + struct HPMHookPoint *HP_clif_attendancedb_libconfig_sub_post; + struct HPMHookPoint *HP_clif_attendance_timediff_pre; + struct HPMHookPoint *HP_clif_attendance_timediff_post; + struct HPMHookPoint *HP_clif_attendance_getendtime_pre; + struct HPMHookPoint *HP_clif_attendance_getendtime_post; + struct HPMHookPoint *HP_clif_pOpenUIRequest_pre; + struct HPMHookPoint *HP_clif_pOpenUIRequest_post; + struct HPMHookPoint *HP_clif_open_ui_pre; + struct HPMHookPoint *HP_clif_open_ui_post; + struct HPMHookPoint *HP_clif_pAttendanceRewardRequest_pre; + struct HPMHookPoint *HP_clif_pAttendanceRewardRequest_post; + struct HPMHookPoint *HP_clif_ui_action_pre; + struct HPMHookPoint *HP_clif_ui_action_post; struct HPMHookPoint *HP_cmdline_init_pre; struct HPMHookPoint *HP_cmdline_init_post; struct HPMHookPoint *HP_cmdline_final_pre; @@ -4670,6 +4696,14 @@ struct { struct HPMHookPoint *HP_pet_skill_support_timer_post; struct HPMHookPoint *HP_pet_read_db_pre; struct HPMHookPoint *HP_pet_read_db_post; + struct HPMHookPoint *HP_pet_read_db_libconfig_pre; + struct HPMHookPoint *HP_pet_read_db_libconfig_post; + struct HPMHookPoint *HP_pet_read_db_sub_pre; + struct HPMHookPoint *HP_pet_read_db_sub_post; + struct HPMHookPoint *HP_pet_read_db_sub_intimacy_pre; + 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_quest_init_pre; struct HPMHookPoint *HP_quest_init_post; struct HPMHookPoint *HP_quest_final_pre; @@ -7327,6 +7361,10 @@ struct { int HP_clif_msgtable_num_post; int HP_clif_msgtable_skill_pre; int HP_clif_msgtable_skill_post; + int HP_clif_msgtable_str_pre; + int HP_clif_msgtable_str_post; + int HP_clif_msgtable_color_pre; + int HP_clif_msgtable_color_post; int HP_clif_message_pre; int HP_clif_message_post; int HP_clif_messageln_pre; @@ -7567,6 +7605,8 @@ struct { int HP_clif_quest_update_status_post; int HP_clif_quest_update_objective_pre; int HP_clif_quest_update_objective_post; + int HP_clif_quest_notify_objective_pre; + int HP_clif_quest_notify_objective_post; int HP_clif_quest_show_event_pre; int HP_clif_quest_show_event_post; int HP_clif_mail_window_pre; @@ -8279,6 +8319,26 @@ struct { int HP_clif_clan_message_post; int HP_clif_pClanMessage_pre; int HP_clif_pClanMessage_post; + int HP_clif_hat_effect_pre; + int HP_clif_hat_effect_post; + int HP_clif_hat_effect_single_pre; + int HP_clif_hat_effect_single_post; + int HP_clif_pAttendanceDB_pre; + int HP_clif_pAttendanceDB_post; + int HP_clif_attendancedb_libconfig_sub_pre; + int HP_clif_attendancedb_libconfig_sub_post; + int HP_clif_attendance_timediff_pre; + int HP_clif_attendance_timediff_post; + int HP_clif_attendance_getendtime_pre; + int HP_clif_attendance_getendtime_post; + int HP_clif_pOpenUIRequest_pre; + int HP_clif_pOpenUIRequest_post; + int HP_clif_open_ui_pre; + int HP_clif_open_ui_post; + int HP_clif_pAttendanceRewardRequest_pre; + int HP_clif_pAttendanceRewardRequest_post; + int HP_clif_ui_action_pre; + int HP_clif_ui_action_post; int HP_cmdline_init_pre; int HP_cmdline_init_post; int HP_cmdline_final_pre; @@ -10951,6 +11011,14 @@ struct { int HP_pet_skill_support_timer_post; int HP_pet_read_db_pre; int HP_pet_read_db_post; + int HP_pet_read_db_libconfig_pre; + int HP_pet_read_db_libconfig_post; + int HP_pet_read_db_sub_pre; + int HP_pet_read_db_sub_post; + int HP_pet_read_db_sub_intimacy_pre; + int HP_pet_read_db_sub_intimacy_post; + int HP_pet_read_db_clear_pre; + int HP_pet_read_db_clear_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 5551668d2..2e762a231 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -546,6 +546,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->msgtable, HP_clif_msgtable) }, { HP_POP(clif->msgtable_num, HP_clif_msgtable_num) }, { HP_POP(clif->msgtable_skill, HP_clif_msgtable_skill) }, + { HP_POP(clif->msgtable_str, HP_clif_msgtable_str) }, + { HP_POP(clif->msgtable_color, HP_clif_msgtable_color) }, { HP_POP(clif->message, HP_clif_message) }, { HP_POP(clif->messageln, HP_clif_messageln) }, { HP_POP(clif->process_chat_message, HP_clif_process_chat_message) }, @@ -666,6 +668,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->quest_delete, HP_clif_quest_delete) }, { HP_POP(clif->quest_update_status, HP_clif_quest_update_status) }, { HP_POP(clif->quest_update_objective, HP_clif_quest_update_objective) }, + { HP_POP(clif->quest_notify_objective, HP_clif_quest_notify_objective) }, { HP_POP(clif->quest_show_event, HP_clif_quest_show_event) }, { HP_POP(clif->mail_window, HP_clif_mail_window) }, { HP_POP(clif->mail_read, HP_clif_mail_read) }, @@ -1022,6 +1025,16 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->clan_leave, HP_clif_clan_leave) }, { HP_POP(clif->clan_message, HP_clif_clan_message) }, { HP_POP(clif->pClanMessage, HP_clif_pClanMessage) }, + { HP_POP(clif->hat_effect, HP_clif_hat_effect) }, + { HP_POP(clif->hat_effect_single, HP_clif_hat_effect_single) }, + { HP_POP(clif->pAttendanceDB, HP_clif_pAttendanceDB) }, + { HP_POP(clif->attendancedb_libconfig_sub, HP_clif_attendancedb_libconfig_sub) }, + { HP_POP(clif->attendance_timediff, HP_clif_attendance_timediff) }, + { HP_POP(clif->attendance_getendtime, HP_clif_attendance_getendtime) }, + { HP_POP(clif->pOpenUIRequest, HP_clif_pOpenUIRequest) }, + { HP_POP(clif->open_ui, HP_clif_open_ui) }, + { HP_POP(clif->pAttendanceRewardRequest, HP_clif_pAttendanceRewardRequest) }, + { HP_POP(clif->ui_action, HP_clif_ui_action) }, /* cmdline_interface */ { HP_POP(cmdline->init, HP_cmdline_init) }, { HP_POP(cmdline->final, HP_cmdline_final) }, @@ -2393,6 +2406,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pet->recovery_timer, HP_pet_recovery_timer) }, { HP_POP(pet->skill_support_timer, HP_pet_skill_support_timer) }, { HP_POP(pet->read_db, HP_pet_read_db) }, + { HP_POP(pet->read_db_libconfig, HP_pet_read_db_libconfig) }, + { 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) }, /* 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 2e20ab157..6b89e4f65 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -13622,6 +13622,58 @@ void HP_clif_msgtable_skill(struct map_session_data *sd, uint16 skill_id, int ms } return; } +void HP_clif_msgtable_str(struct map_session_data *sd, uint16 msg_id, const char *value) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_msgtable_str_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint16 *msg_id, const char **value); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_str_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_msgtable_str_pre[hIndex].func; + preHookFunc(&sd, &msg_id, &value); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.msgtable_str(sd, msg_id, value); + } + if (HPMHooks.count.HP_clif_msgtable_str_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, uint16 msg_id, const char *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_str_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_msgtable_str_post[hIndex].func; + postHookFunc(sd, msg_id, value); + } + } + return; +} +void HP_clif_msgtable_color(struct map_session_data *sd, uint16 msg_id, uint32 color) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_msgtable_color_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint16 *msg_id, uint32 *color); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_color_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_msgtable_color_pre[hIndex].func; + preHookFunc(&sd, &msg_id, &color); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.msgtable_color(sd, msg_id, color); + } + if (HPMHooks.count.HP_clif_msgtable_color_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, uint16 msg_id, uint32 color); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_color_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_msgtable_color_post[hIndex].func; + postHookFunc(sd, msg_id, color); + } + } + return; +} void HP_clif_message(const int fd, const char *mes) { int hIndex = 0; if (HPMHooks.count.HP_clif_message_pre > 0) { @@ -16753,6 +16805,32 @@ void HP_clif_quest_update_objective(struct map_session_data *sd, struct quest *q } return; } +void HP_clif_quest_notify_objective(struct map_session_data *sd, struct quest *qd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_quest_notify_objective_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct quest **qd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_notify_objective_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_quest_notify_objective_pre[hIndex].func; + preHookFunc(&sd, &qd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.quest_notify_objective(sd, qd); + } + if (HPMHooks.count.HP_clif_quest_notify_objective_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct quest *qd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_notify_objective_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_quest_notify_objective_post[hIndex].func; + postHookFunc(sd, qd); + } + } + return; +} void HP_clif_quest_show_event(struct map_session_data *sd, struct block_list *bl, short state, short color) { int hIndex = 0; if (HPMHooks.count.HP_clif_quest_show_event_pre > 0) { @@ -26018,6 +26096,271 @@ void HP_clif_pClanMessage(int fd, struct map_session_data *sd) { } return; } +void HP_clif_hat_effect(struct block_list *bl, struct block_list *tbl, enum send_target target) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_hat_effect_pre > 0) { + void (*preHookFunc) (struct block_list **bl, struct block_list **tbl, enum send_target *target); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hat_effect_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_hat_effect_pre[hIndex].func; + preHookFunc(&bl, &tbl, &target); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.hat_effect(bl, tbl, target); + } + if (HPMHooks.count.HP_clif_hat_effect_post > 0) { + void (*postHookFunc) (struct block_list *bl, struct block_list *tbl, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hat_effect_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_hat_effect_post[hIndex].func; + postHookFunc(bl, tbl, target); + } + } + return; +} +void HP_clif_hat_effect_single(struct block_list *bl, uint16 effectId, bool enable) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_hat_effect_single_pre > 0) { + void (*preHookFunc) (struct block_list **bl, uint16 *effectId, bool *enable); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hat_effect_single_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_hat_effect_single_pre[hIndex].func; + preHookFunc(&bl, &effectId, &enable); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.hat_effect_single(bl, effectId, enable); + } + if (HPMHooks.count.HP_clif_hat_effect_single_post > 0) { + void (*postHookFunc) (struct block_list *bl, uint16 effectId, bool enable); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hat_effect_single_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_hat_effect_single_post[hIndex].func; + postHookFunc(bl, effectId, enable); + } + } + return; +} +bool HP_clif_pAttendanceDB(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_pAttendanceDB_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAttendanceDB_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pAttendanceDB_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.pAttendanceDB(); + } + if (HPMHooks.count.HP_clif_pAttendanceDB_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAttendanceDB_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pAttendanceDB_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_clif_attendancedb_libconfig_sub(struct config_setting_t *it, int n, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_attendancedb_libconfig_sub_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, int *n, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_attendancedb_libconfig_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_attendancedb_libconfig_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &n, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.attendancedb_libconfig_sub(it, n, source); + } + if (HPMHooks.count.HP_clif_attendancedb_libconfig_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int n, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_attendancedb_libconfig_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_attendancedb_libconfig_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, n, source); + } + } + return retVal___; +} +bool HP_clif_attendance_timediff(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_attendance_timediff_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_attendance_timediff_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_attendance_timediff_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.attendance_timediff(sd); + } + if (HPMHooks.count.HP_clif_attendance_timediff_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_attendance_timediff_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_attendance_timediff_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +time_t HP_clif_attendance_getendtime(void) { +/* Unknown return type 'time_t'. Initializing to '0'. */ + int hIndex = 0; + time_t retVal___ = 0; + if (HPMHooks.count.HP_clif_attendance_getendtime_pre > 0) { + time_t (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_attendance_getendtime_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_attendance_getendtime_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.attendance_getendtime(); + } + if (HPMHooks.count.HP_clif_attendance_getendtime_post > 0) { + time_t (*postHookFunc) (time_t retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_attendance_getendtime_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_attendance_getendtime_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_clif_pOpenUIRequest(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pOpenUIRequest_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOpenUIRequest_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pOpenUIRequest_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pOpenUIRequest(fd, sd); + } + if (HPMHooks.count.HP_clif_pOpenUIRequest_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOpenUIRequest_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pOpenUIRequest_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_open_ui(struct map_session_data *sd, int8 UIType) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_open_ui_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *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); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + 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); + 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); + } + } + return; +} +void HP_clif_pAttendanceRewardRequest(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pAttendanceRewardRequest_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAttendanceRewardRequest_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pAttendanceRewardRequest_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAttendanceRewardRequest(fd, sd); + } + if (HPMHooks.count.HP_clif_pAttendanceRewardRequest_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAttendanceRewardRequest_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pAttendanceRewardRequest_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_ui_action(struct map_session_data *sd, int32 UIType, int32 data) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_ui_action_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int32 *UIType, int32 *data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ui_action_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_ui_action_pre[hIndex].func; + preHookFunc(&sd, &UIType, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.ui_action(sd, UIType, data); + } + if (HPMHooks.count.HP_clif_ui_action_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int32 UIType, int32 data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ui_action_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_ui_action_post[hIndex].func; + postHookFunc(sd, UIType, data); + } + } + return; +} /* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; @@ -29222,15 +29565,15 @@ int HP_guild_send_memberinfoshort(struct map_session_data *sd, int online) { } return retVal___; } -int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class) { +int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_guild_recv_memberinfoshort_pre > 0) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class, uint32 *last_login); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &online, &lv, &class); + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &online, &lv, &class, &last_login); } if (*HPMforce_return) { *HPMforce_return = false; @@ -29238,13 +29581,13 @@ int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int } } { - retVal___ = HPMHooks.source.guild.recv_memberinfoshort(guild_id, account_id, char_id, online, lv, class); + retVal___ = HPMHooks.source.guild.recv_memberinfoshort(guild_id, account_id, char_id, online, lv, class, last_login); } if (HPMHooks.count.HP_guild_recv_memberinfoshort_post > 0) { - int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class); + int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login); for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_post[hIndex].func; - retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class, last_login); } } return retVal___; @@ -62202,33 +62545,139 @@ int HP_pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) { } return retVal___; } -int HP_pet_read_db(void) { +void HP_pet_read_db(void) { int hIndex = 0; - int retVal___ = 0; if (HPMHooks.count.HP_pet_read_db_pre > 0) { - int (*preHookFunc) (void); + void (*preHookFunc) (void); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pet_read_db_pre[hIndex].func; - retVal___ = preHookFunc(); + preHookFunc(); } if (*HPMforce_return) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pet.read_db(); + HPMHooks.source.pet.read_db(); } if (HPMHooks.count.HP_pet_read_db_post > 0) { - int (*postHookFunc) (int retVal___); + void (*postHookFunc) (void); for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pet_read_db_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + postHookFunc(); + } + } + return; +} +int HP_pet_read_db_libconfig(const char *filename, bool ignore_missing) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pet_read_db_libconfig_pre > 0) { + int (*preHookFunc) (const char **filename, bool *ignore_missing); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_libconfig_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pet_read_db_libconfig_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &ignore_missing); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.read_db_libconfig(filename, ignore_missing); + } + if (HPMHooks.count.HP_pet_read_db_libconfig_post > 0) { + int (*postHookFunc) (int retVal___, const char *filename, bool ignore_missing); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_libconfig_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pet_read_db_libconfig_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, ignore_missing); + } + } + return retVal___; +} +int HP_pet_read_db_sub(struct config_setting_t *it, int n, const char *source) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pet_read_db_sub_pre > 0) { + int (*preHookFunc) (struct config_setting_t **it, int *n, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pet_read_db_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &n, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.read_db_sub(it, n, source); + } + if (HPMHooks.count.HP_pet_read_db_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *it, int n, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pet_read_db_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, n, source); + } + } + return retVal___; +} +bool HP_pet_read_db_sub_intimacy(int idx, struct config_setting_t *t) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pet_read_db_sub_intimacy_pre > 0) { + bool (*preHookFunc) (int *idx, struct config_setting_t **t); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_sub_intimacy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pet_read_db_sub_intimacy_pre[hIndex].func; + retVal___ = preHookFunc(&idx, &t); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.read_db_sub_intimacy(idx, t); + } + if (HPMHooks.count.HP_pet_read_db_sub_intimacy_post > 0) { + bool (*postHookFunc) (bool retVal___, int idx, struct config_setting_t *t); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_sub_intimacy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pet_read_db_sub_intimacy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, idx, t); } } return retVal___; } +void HP_pet_read_db_clear(void) { + int hIndex = 0; + if (HPMHooks.count.HP_pet_read_db_clear_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_clear_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pet_read_db_clear_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pet.read_db_clear(); + } + if (HPMHooks.count.HP_pet_read_db_clear_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_clear_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pet_read_db_clear_post[hIndex].func; + postHookFunc(); + } + } + return; +} /* quest_interface */ void HP_quest_init(bool minimal) { int hIndex = 0; |