summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2018-07-28 03:22:23 +0200
committerHerculesWSAPI <dev@herc.ws>2018-07-28 03:22:23 +0200
commitbc42485f6fde4d70b8b25fe2a8bfc41c9906d3a0 (patch)
treee62e3c74bac9cc885fbe20785b0481dfe3179fcf /src/plugins/HPMHooking
parent621611e6e90af0c5551b4daca75ba1267d8e8478 (diff)
downloadhercules-bc42485f6fde4d70b8b25fe2a8bfc41c9906d3a0.tar.gz
hercules-bc42485f6fde4d70b8b25fe2a8bfc41c9906d3a0.tar.bz2
hercules-bc42485f6fde4d70b8b25fe2a8bfc41c9906d3a0.tar.xz
hercules-bc42485f6fde4d70b8b25fe2a8bfc41c9906d3a0.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc150
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc49
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc15
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc331
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.sources.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc245
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc62
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc1613
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.sources.inc1
9 files changed, 2466 insertions, 1 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 7f1145146..e3fbb178e 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -73,6 +73,112 @@ typedef bool (*HPMHOOK_post_account_db_sql_iter_next) (bool retVal___, AccountDB
typedef bool (*HPMHOOK_pre_account_db_read_inter) (AccountDB_SQL **db, const char **filename, bool *imported);
typedef bool (*HPMHOOK_post_account_db_read_inter) (bool retVal___, AccountDB_SQL *db, const char *filename, bool imported);
#endif // LOGIN_ACCOUNT_H
+#ifdef MAP_ACHIEVEMENT_H /* achievement */
+typedef void (*HPMHOOK_pre_achievement_init) (bool *minimal);
+typedef void (*HPMHOOK_post_achievement_init) (bool minimal);
+typedef void (*HPMHOOK_pre_achievement_final) (void);
+typedef void (*HPMHOOK_post_achievement_final) (void);
+typedef int (*HPMHOOK_pre_achievement_db_finalize) (union DBKey *key, struct DBData **data, va_list args);
+typedef int (*HPMHOOK_post_achievement_db_finalize) (int retVal___, union DBKey key, struct DBData *data, va_list args);
+typedef void (*HPMHOOK_pre_achievement_readdb) (void);
+typedef void (*HPMHOOK_post_achievement_readdb) (void);
+typedef bool (*HPMHOOK_pre_achievement_readdb_objectives_sub) (const struct config_setting_t **conf, int *index, struct achievement_data **entry);
+typedef bool (*HPMHOOK_post_achievement_readdb_objectives_sub) (bool retVal___, const struct config_setting_t *conf, int index, struct achievement_data *entry);
+typedef bool (*HPMHOOK_pre_achievement_readdb_objectives) (const struct config_setting_t **conf, struct achievement_data **entry);
+typedef bool (*HPMHOOK_post_achievement_readdb_objectives) (bool retVal___, const struct config_setting_t *conf, struct achievement_data *entry);
+typedef bool (*HPMHOOK_pre_achievement_readdb_validate_criteria_mobid) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx);
+typedef bool (*HPMHOOK_post_achievement_readdb_validate_criteria_mobid) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx);
+typedef bool (*HPMHOOK_pre_achievement_readdb_validate_criteria_jobid) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx);
+typedef bool (*HPMHOOK_post_achievement_readdb_validate_criteria_jobid) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx);
+typedef bool (*HPMHOOK_pre_achievement_readdb_validate_criteria_itemid) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx);
+typedef bool (*HPMHOOK_post_achievement_readdb_validate_criteria_itemid) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx);
+typedef bool (*HPMHOOK_pre_achievement_readdb_validate_criteria_statustype) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx);
+typedef bool (*HPMHOOK_post_achievement_readdb_validate_criteria_statustype) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx);
+typedef bool (*HPMHOOK_pre_achievement_readdb_validate_criteria_itemtype) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx);
+typedef bool (*HPMHOOK_post_achievement_readdb_validate_criteria_itemtype) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx);
+typedef bool (*HPMHOOK_pre_achievement_readdb_validate_criteria_weaponlv) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx);
+typedef bool (*HPMHOOK_post_achievement_readdb_validate_criteria_weaponlv) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx);
+typedef bool (*HPMHOOK_pre_achievement_readdb_validate_criteria_achievement) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx);
+typedef bool (*HPMHOOK_post_achievement_readdb_validate_criteria_achievement) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx);
+typedef bool (*HPMHOOK_pre_achievement_readdb_rewards) (const struct config_setting_t **conf, struct achievement_data **entry, const char **source);
+typedef bool (*HPMHOOK_post_achievement_readdb_rewards) (bool retVal___, const struct config_setting_t *conf, struct achievement_data *entry, const char *source);
+typedef void (*HPMHOOK_pre_achievement_readdb_validate_reward_items) (const struct config_setting_t **t, struct achievement_data **entry);
+typedef void (*HPMHOOK_post_achievement_readdb_validate_reward_items) (const struct config_setting_t *t, struct achievement_data *entry);
+typedef bool (*HPMHOOK_pre_achievement_readdb_validate_reward_item_sub) (const struct config_setting_t **t, int *element, struct achievement_data **entry);
+typedef bool (*HPMHOOK_post_achievement_readdb_validate_reward_item_sub) (bool retVal___, const struct config_setting_t *t, int element, struct achievement_data *entry);
+typedef void (*HPMHOOK_pre_achievement_readdb_validate_reward_bonus) (const struct config_setting_t **t, struct achievement_data **entry, const char **source);
+typedef void (*HPMHOOK_post_achievement_readdb_validate_reward_bonus) (const struct config_setting_t *t, struct achievement_data *entry, const char *source);
+typedef void (*HPMHOOK_pre_achievement_readdb_validate_reward_titleid) (const struct config_setting_t **t, struct achievement_data **entry);
+typedef void (*HPMHOOK_post_achievement_readdb_validate_reward_titleid) (const struct config_setting_t *t, struct achievement_data *entry);
+typedef void (*HPMHOOK_pre_achievement_readdb_additional_fields) (const struct config_setting_t **conf, struct achievement_data **entry, const char **source);
+typedef void (*HPMHOOK_post_achievement_readdb_additional_fields) (const struct config_setting_t *conf, struct achievement_data *entry, const char *source);
+typedef void (*HPMHOOK_pre_achievement_readdb_ranks) (void);
+typedef void (*HPMHOOK_post_achievement_readdb_ranks) (void);
+typedef const struct achievement_data* (*HPMHOOK_pre_achievement_get) (int *aid);
+typedef const struct achievement_data* (*HPMHOOK_post_achievement_get) (const struct achievement_data* retVal___, int aid);
+typedef struct achievement* (*HPMHOOK_pre_achievement_ensure) (struct map_session_data **sd, const struct achievement_data **ad);
+typedef struct achievement* (*HPMHOOK_post_achievement_ensure) (struct achievement* retVal___, struct map_session_data *sd, const struct achievement_data *ad);
+typedef void (*HPMHOOK_pre_achievement_calculate_totals) (const struct map_session_data **sd, int **points, int **completed, int **rank, int **curr_rank_points);
+typedef void (*HPMHOOK_post_achievement_calculate_totals) (const struct map_session_data *sd, int *points, int *completed, int *rank, int *curr_rank_points);
+typedef bool (*HPMHOOK_pre_achievement_check_complete) (struct map_session_data **sd, const struct achievement_data **ad);
+typedef bool (*HPMHOOK_post_achievement_check_complete) (bool retVal___, struct map_session_data *sd, const struct achievement_data *ad);
+typedef void (*HPMHOOK_pre_achievement_progress_add) (struct map_session_data **sd, const struct achievement_data **ad, unsigned int *obj_idx, int *progress);
+typedef void (*HPMHOOK_post_achievement_progress_add) (struct map_session_data *sd, const struct achievement_data *ad, unsigned int obj_idx, int progress);
+typedef void (*HPMHOOK_pre_achievement_progress_set) (struct map_session_data **sd, const struct achievement_data **ad, unsigned int *obj_idx, int *progress);
+typedef void (*HPMHOOK_post_achievement_progress_set) (struct map_session_data *sd, const struct achievement_data *ad, unsigned int obj_idx, int progress);
+typedef bool (*HPMHOOK_pre_achievement_check_criteria) (const struct achievement_objective **objective, const struct achievement_objective **criteria);
+typedef bool (*HPMHOOK_post_achievement_check_criteria) (bool retVal___, const struct achievement_objective *objective, const struct achievement_objective *criteria);
+typedef bool (*HPMHOOK_pre_achievement_validate) (struct map_session_data **sd, int *aid, unsigned int *obj_idx, int *progress, bool *additive);
+typedef bool (*HPMHOOK_post_achievement_validate) (bool retVal___, struct map_session_data *sd, int aid, unsigned int obj_idx, int progress, bool additive);
+typedef int (*HPMHOOK_pre_achievement_validate_type) (struct map_session_data **sd, enum achievement_types *type, const struct achievement_objective **criteria, bool *additive);
+typedef int (*HPMHOOK_post_achievement_validate_type) (int retVal___, struct map_session_data *sd, enum achievement_types type, const struct achievement_objective *criteria, bool additive);
+typedef void (*HPMHOOK_pre_achievement_validate_mob_kill) (struct map_session_data **sd, int *mob_id);
+typedef void (*HPMHOOK_post_achievement_validate_mob_kill) (struct map_session_data *sd, int mob_id);
+typedef void (*HPMHOOK_pre_achievement_validate_mob_damage) (struct map_session_data **sd, unsigned int *damage, bool *received);
+typedef void (*HPMHOOK_post_achievement_validate_mob_damage) (struct map_session_data *sd, unsigned int damage, bool received);
+typedef void (*HPMHOOK_pre_achievement_validate_pc_kill) (struct map_session_data **sd, struct map_session_data **dstsd);
+typedef void (*HPMHOOK_post_achievement_validate_pc_kill) (struct map_session_data *sd, struct map_session_data *dstsd);
+typedef void (*HPMHOOK_pre_achievement_validate_pc_damage) (struct map_session_data **sd, struct map_session_data **dstsd, unsigned int *damage);
+typedef void (*HPMHOOK_post_achievement_validate_pc_damage) (struct map_session_data *sd, struct map_session_data *dstsd, unsigned int damage);
+typedef void (*HPMHOOK_pre_achievement_validate_jobchange) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_achievement_validate_jobchange) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_achievement_validate_stats) (struct map_session_data **sd, enum status_point_types *stat_type, int *progress);
+typedef void (*HPMHOOK_post_achievement_validate_stats) (struct map_session_data *sd, enum status_point_types stat_type, int progress);
+typedef void (*HPMHOOK_pre_achievement_validate_chatroom_create) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_achievement_validate_chatroom_create) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_achievement_validate_chatroom_members) (struct map_session_data **sd, int *progress);
+typedef void (*HPMHOOK_post_achievement_validate_chatroom_members) (struct map_session_data *sd, int progress);
+typedef void (*HPMHOOK_pre_achievement_validate_friend_add) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_achievement_validate_friend_add) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_achievement_validate_party_create) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_achievement_validate_party_create) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_achievement_validate_marry) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_achievement_validate_marry) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_achievement_validate_adopt) (struct map_session_data **sd, bool *parent);
+typedef void (*HPMHOOK_post_achievement_validate_adopt) (struct map_session_data *sd, bool parent);
+typedef void (*HPMHOOK_pre_achievement_validate_zeny) (struct map_session_data **sd, int *amount);
+typedef void (*HPMHOOK_post_achievement_validate_zeny) (struct map_session_data *sd, int amount);
+typedef void (*HPMHOOK_pre_achievement_validate_refine) (struct map_session_data **sd, unsigned int *idx, bool *success);
+typedef void (*HPMHOOK_post_achievement_validate_refine) (struct map_session_data *sd, unsigned int idx, bool success);
+typedef void (*HPMHOOK_pre_achievement_validate_item_get) (struct map_session_data **sd, int *nameid, int *amount);
+typedef void (*HPMHOOK_post_achievement_validate_item_get) (struct map_session_data *sd, int nameid, int amount);
+typedef void (*HPMHOOK_pre_achievement_validate_item_sell) (struct map_session_data **sd, int *nameid, int *amount);
+typedef void (*HPMHOOK_post_achievement_validate_item_sell) (struct map_session_data *sd, int nameid, int amount);
+typedef void (*HPMHOOK_pre_achievement_validate_achieve) (struct map_session_data **sd, int *achid);
+typedef void (*HPMHOOK_post_achievement_validate_achieve) (struct map_session_data *sd, int achid);
+typedef void (*HPMHOOK_pre_achievement_validate_taming) (struct map_session_data **sd, int *class);
+typedef void (*HPMHOOK_post_achievement_validate_taming) (struct map_session_data *sd, int class);
+typedef void (*HPMHOOK_pre_achievement_validate_achievement_rank) (struct map_session_data **sd, int *rank);
+typedef void (*HPMHOOK_post_achievement_validate_achievement_rank) (struct map_session_data *sd, int rank);
+typedef bool (*HPMHOOK_pre_achievement_type_requires_criteria) (enum achievement_types *type);
+typedef bool (*HPMHOOK_post_achievement_type_requires_criteria) (bool retVal___, enum achievement_types type);
+typedef void (*HPMHOOK_pre_achievement_init_titles) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_achievement_init_titles) (struct map_session_data *sd);
+typedef bool (*HPMHOOK_pre_achievement_check_title) (struct map_session_data **sd, int *title_id);
+typedef bool (*HPMHOOK_post_achievement_check_title) (bool retVal___, struct map_session_data *sd, int title_id);
+typedef void (*HPMHOOK_pre_achievement_get_rewards) (struct map_session_data **sd, const struct achievement_data **ad);
+typedef void (*HPMHOOK_post_achievement_get_rewards) (struct map_session_data *sd, const struct achievement_data *ad);
+#endif // MAP_ACHIEVEMENT_H
#ifdef MAP_ATCOMMAND_H /* atcommand */
typedef void (*HPMHOOK_pre_atcommand_init) (bool *minimal);
typedef void (*HPMHOOK_post_atcommand_init) (bool minimal);
@@ -1884,6 +1990,18 @@ typedef void (*HPMHOOK_pre_clif_navigate_to) (struct map_session_data **sd, cons
typedef void (*HPMHOOK_post_clif_navigate_to) (struct map_session_data *sd, const char *mapname, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id);
typedef unsigned char (*HPMHOOK_pre_clif_bl_type) (struct block_list **bl);
typedef unsigned char (*HPMHOOK_post_clif_bl_type) (unsigned char retVal___, struct block_list *bl);
+typedef void (*HPMHOOK_pre_clif_achievement_send_list) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_achievement_send_list) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_achievement_send_update) (int *fd, struct map_session_data **sd, const struct achievement_data **ad);
+typedef void (*HPMHOOK_post_clif_achievement_send_update) (int fd, struct map_session_data *sd, const struct achievement_data *ad);
+typedef void (*HPMHOOK_pre_clif_pAchievementGetReward) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pAchievementGetReward) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_achievement_reward_ack) (int *fd, struct map_session_data **sd, const struct achievement_data **ad);
+typedef void (*HPMHOOK_post_clif_achievement_reward_ack) (int fd, struct map_session_data *sd, const struct achievement_data *ad);
+typedef void (*HPMHOOK_pre_clif_change_title_ack) (int *fd, struct map_session_data **sd, int *title_id);
+typedef void (*HPMHOOK_post_clif_change_title_ack) (int fd, struct map_session_data *sd, int title_id);
+typedef void (*HPMHOOK_pre_clif_pChangeTitle) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pChangeTitle) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pWantToConnection) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pWantToConnection) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pLoadEndAck) (int *fd, struct map_session_data **sd);
@@ -2993,6 +3111,22 @@ typedef bool (*HPMHOOK_post_instance_valid) (bool retVal___, int instance_id);
typedef int (*HPMHOOK_pre_instance_destroy_timer) (int *tid, int64 *tick, int *id, intptr_t *data);
typedef int (*HPMHOOK_post_instance_destroy_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data);
#endif // MAP_INSTANCE_H
+#ifdef CHAR_INT_ACHIEVEMENT_H /* inter_achievement */
+typedef int (*HPMHOOK_pre_inter_achievement_sql_init) (void);
+typedef int (*HPMHOOK_post_inter_achievement_sql_init) (int retVal___);
+typedef void (*HPMHOOK_pre_inter_achievement_sql_final) (void);
+typedef void (*HPMHOOK_post_inter_achievement_sql_final) (void);
+typedef int (*HPMHOOK_pre_inter_achievement_tosql) (int *char_id, struct char_achievements **cp, const struct char_achievements **p);
+typedef int (*HPMHOOK_post_inter_achievement_tosql) (int retVal___, int char_id, struct char_achievements *cp, const struct char_achievements *p);
+typedef bool (*HPMHOOK_pre_inter_achievement_fromsql) (int *char_id, struct char_achievements **a);
+typedef bool (*HPMHOOK_post_inter_achievement_fromsql) (bool retVal___, int char_id, struct char_achievements *a);
+typedef struct DBData (*HPMHOOK_pre_inter_achievement_ensure_char_achievements) (union DBKey *key, va_list args);
+typedef struct DBData (*HPMHOOK_post_inter_achievement_ensure_char_achievements) (struct DBData retVal___, union DBKey key, va_list args);
+typedef int (*HPMHOOK_pre_inter_achievement_char_achievements_clear) (union DBKey *key, struct DBData **data, va_list args);
+typedef int (*HPMHOOK_post_inter_achievement_char_achievements_clear) (int retVal___, union DBKey key, struct DBData *data, va_list args);
+typedef int (*HPMHOOK_pre_inter_achievement_parse_frommap) (int *fd);
+typedef int (*HPMHOOK_post_inter_achievement_parse_frommap) (int retVal___, int fd);
+#endif // CHAR_INT_ACHIEVEMENT_H
#ifdef CHAR_INT_AUCTION_H /* inter_auction */
typedef int (*HPMHOOK_pre_inter_auction_count) (int *char_id, bool *buy);
typedef int (*HPMHOOK_post_inter_auction_count) (int retVal___, int char_id, bool buy);
@@ -3496,6 +3630,10 @@ typedef void (*HPMHOOK_pre_intif_request_accinfo) (int *u_fd, int *aid, int *gro
typedef void (*HPMHOOK_post_intif_request_accinfo) (int u_fd, int aid, int group_lv, char *query);
typedef int (*HPMHOOK_pre_intif_CheckForCharServer) (void);
typedef int (*HPMHOOK_post_intif_CheckForCharServer) (int retVal___);
+typedef void (*HPMHOOK_pre_intif_achievements_request) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_intif_achievements_request) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_intif_achievements_save) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_intif_achievements_save) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_intif_pWisMessage) (int *fd);
typedef void (*HPMHOOK_post_intif_pWisMessage) (int fd);
typedef void (*HPMHOOK_pre_intif_pWisEnd) (int *fd);
@@ -3634,6 +3772,8 @@ typedef void (*HPMHOOK_pre_intif_pRodexCheckName) (int *fd);
typedef void (*HPMHOOK_post_intif_pRodexCheckName) (int fd);
typedef void (*HPMHOOK_pre_intif_pRecvClanMemberAction) (int *fd);
typedef void (*HPMHOOK_post_intif_pRecvClanMemberAction) (int fd);
+typedef void (*HPMHOOK_pre_intif_pAchievementsLoad) (int *fd);
+typedef void (*HPMHOOK_post_intif_pAchievementsLoad) (int fd);
#endif // MAP_INTIF_H
#ifdef LOGIN_IPBAN_H /* ipban */
typedef void (*HPMHOOK_pre_ipban_init) (void);
@@ -4556,6 +4696,16 @@ typedef int (*HPMHOOK_pre_mapif_send) (int *fd, unsigned char **buf, unsigned in
typedef int (*HPMHOOK_post_mapif_send) (int retVal___, int fd, unsigned char *buf, unsigned int len);
typedef void (*HPMHOOK_pre_mapif_send_users_count) (int *users);
typedef void (*HPMHOOK_post_mapif_send_users_count) (int users);
+typedef void (*HPMHOOK_pre_mapif_pLoadAchievements) (int *fd);
+typedef void (*HPMHOOK_post_mapif_pLoadAchievements) (int fd);
+typedef void (*HPMHOOK_pre_mapif_sAchievementsToMap) (int *fd, int *char_id, const struct char_achievements **p);
+typedef void (*HPMHOOK_post_mapif_sAchievementsToMap) (int fd, int char_id, const struct char_achievements *p);
+typedef void (*HPMHOOK_pre_mapif_pSaveAchievements) (int *fd);
+typedef void (*HPMHOOK_post_mapif_pSaveAchievements) (int fd);
+typedef void (*HPMHOOK_pre_mapif_achievement_load) (int *fd, int *char_id);
+typedef void (*HPMHOOK_post_mapif_achievement_load) (int fd, int char_id);
+typedef void (*HPMHOOK_pre_mapif_achievement_save) (int *char_id, struct char_achievements **p);
+typedef void (*HPMHOOK_post_mapif_achievement_save) (int char_id, struct char_achievements *p);
typedef void (*HPMHOOK_pre_mapif_auction_message) (int *char_id, unsigned char *result);
typedef void (*HPMHOOK_post_mapif_auction_message) (int char_id, unsigned char result);
typedef void (*HPMHOOK_pre_mapif_auction_sendlist) (int *fd, int *char_id, short *count, short *pages, unsigned char **buf);
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index d77174ef5..2b0291453 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -448,6 +448,20 @@ struct {
struct HPMHookPoint *HP_geoip_final_post;
struct HPMHookPoint *HP_geoip_init_pre;
struct HPMHookPoint *HP_geoip_init_post;
+ struct HPMHookPoint *HP_inter_achievement_sql_init_pre;
+ struct HPMHookPoint *HP_inter_achievement_sql_init_post;
+ struct HPMHookPoint *HP_inter_achievement_sql_final_pre;
+ struct HPMHookPoint *HP_inter_achievement_sql_final_post;
+ struct HPMHookPoint *HP_inter_achievement_tosql_pre;
+ struct HPMHookPoint *HP_inter_achievement_tosql_post;
+ struct HPMHookPoint *HP_inter_achievement_fromsql_pre;
+ struct HPMHookPoint *HP_inter_achievement_fromsql_post;
+ struct HPMHookPoint *HP_inter_achievement_ensure_char_achievements_pre;
+ struct HPMHookPoint *HP_inter_achievement_ensure_char_achievements_post;
+ struct HPMHookPoint *HP_inter_achievement_char_achievements_clear_pre;
+ struct HPMHookPoint *HP_inter_achievement_char_achievements_clear_post;
+ struct HPMHookPoint *HP_inter_achievement_parse_frommap_pre;
+ struct HPMHookPoint *HP_inter_achievement_parse_frommap_post;
struct HPMHookPoint *HP_inter_auction_count_pre;
struct HPMHookPoint *HP_inter_auction_count_post;
struct HPMHookPoint *HP_inter_auction_save_pre;
@@ -952,6 +966,16 @@ struct {
struct HPMHookPoint *HP_mapif_send_post;
struct HPMHookPoint *HP_mapif_send_users_count_pre;
struct HPMHookPoint *HP_mapif_send_users_count_post;
+ struct HPMHookPoint *HP_mapif_pLoadAchievements_pre;
+ struct HPMHookPoint *HP_mapif_pLoadAchievements_post;
+ struct HPMHookPoint *HP_mapif_sAchievementsToMap_pre;
+ struct HPMHookPoint *HP_mapif_sAchievementsToMap_post;
+ struct HPMHookPoint *HP_mapif_pSaveAchievements_pre;
+ struct HPMHookPoint *HP_mapif_pSaveAchievements_post;
+ struct HPMHookPoint *HP_mapif_achievement_load_pre;
+ struct HPMHookPoint *HP_mapif_achievement_load_post;
+ struct HPMHookPoint *HP_mapif_achievement_save_pre;
+ struct HPMHookPoint *HP_mapif_achievement_save_post;
struct HPMHookPoint *HP_mapif_auction_message_pre;
struct HPMHookPoint *HP_mapif_auction_message_post;
struct HPMHookPoint *HP_mapif_auction_sendlist_pre;
@@ -2047,6 +2071,20 @@ struct {
int HP_geoip_final_post;
int HP_geoip_init_pre;
int HP_geoip_init_post;
+ int HP_inter_achievement_sql_init_pre;
+ int HP_inter_achievement_sql_init_post;
+ int HP_inter_achievement_sql_final_pre;
+ int HP_inter_achievement_sql_final_post;
+ int HP_inter_achievement_tosql_pre;
+ int HP_inter_achievement_tosql_post;
+ int HP_inter_achievement_fromsql_pre;
+ int HP_inter_achievement_fromsql_post;
+ int HP_inter_achievement_ensure_char_achievements_pre;
+ int HP_inter_achievement_ensure_char_achievements_post;
+ int HP_inter_achievement_char_achievements_clear_pre;
+ int HP_inter_achievement_char_achievements_clear_post;
+ int HP_inter_achievement_parse_frommap_pre;
+ int HP_inter_achievement_parse_frommap_post;
int HP_inter_auction_count_pre;
int HP_inter_auction_count_post;
int HP_inter_auction_save_pre;
@@ -2551,6 +2589,16 @@ struct {
int HP_mapif_send_post;
int HP_mapif_send_users_count_pre;
int HP_mapif_send_users_count_post;
+ int HP_mapif_pLoadAchievements_pre;
+ int HP_mapif_pLoadAchievements_post;
+ int HP_mapif_sAchievementsToMap_pre;
+ int HP_mapif_sAchievementsToMap_post;
+ int HP_mapif_pSaveAchievements_pre;
+ int HP_mapif_pSaveAchievements_post;
+ int HP_mapif_achievement_load_pre;
+ int HP_mapif_achievement_load_post;
+ int HP_mapif_achievement_save_pre;
+ int HP_mapif_achievement_save_post;
int HP_mapif_auction_message_pre;
int HP_mapif_auction_message_post;
int HP_mapif_auction_sendlist_pre;
@@ -3232,6 +3280,7 @@ struct {
struct db_interface DB;
struct des_interface des;
struct geoip_interface geoip;
+ struct inter_achievement_interface inter_achievement;
struct inter_auction_interface inter_auction;
struct inter_clan_interface inter_clan;
struct inter_elemental_interface inter_elemental;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index d91cc43c8..cb6ae1bb8 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -245,6 +245,14 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(geoip->getcountry, HP_geoip_getcountry) },
{ HP_POP(geoip->final, HP_geoip_final) },
{ HP_POP(geoip->init, HP_geoip_init) },
+/* inter_achievement_interface */
+ { HP_POP(inter_achievement->sql_init, HP_inter_achievement_sql_init) },
+ { HP_POP(inter_achievement->sql_final, HP_inter_achievement_sql_final) },
+ { HP_POP(inter_achievement->tosql, HP_inter_achievement_tosql) },
+ { HP_POP(inter_achievement->fromsql, HP_inter_achievement_fromsql) },
+ { HP_POP(inter_achievement->ensure_char_achievements, HP_inter_achievement_ensure_char_achievements) },
+ { HP_POP(inter_achievement->char_achievements_clear, HP_inter_achievement_char_achievements_clear) },
+ { HP_POP(inter_achievement->parse_frommap, HP_inter_achievement_parse_frommap) },
/* inter_auction_interface */
{ HP_POP(inter_auction->count, HP_inter_auction_count) },
{ HP_POP(inter_auction->save, HP_inter_auction_save) },
@@ -513,6 +521,11 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mapif->sendallwos, HP_mapif_sendallwos) },
{ HP_POP(mapif->send, HP_mapif_send) },
{ HP_POP(mapif->send_users_count, HP_mapif_send_users_count) },
+ { HP_POP(mapif->pLoadAchievements, HP_mapif_pLoadAchievements) },
+ { HP_POP(mapif->sAchievementsToMap, HP_mapif_sAchievementsToMap) },
+ { HP_POP(mapif->pSaveAchievements, HP_mapif_pSaveAchievements) },
+ { HP_POP(mapif->achievement_load, HP_mapif_achievement_load) },
+ { HP_POP(mapif->achievement_save, HP_mapif_achievement_save) },
{ HP_POP(mapif->auction_message, HP_mapif_auction_message) },
{ HP_POP(mapif->auction_sendlist, HP_mapif_auction_sendlist) },
{ HP_POP(mapif->parse_auction_requestlist, HP_mapif_parse_auction_requestlist) },
@@ -865,4 +878,4 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(timer->final, HP_timer_final) },
};
-int HookingPointsLenMax = 42;
+int HookingPointsLenMax = 43;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index 831c9da63..767c7d24e 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -5640,6 +5640,207 @@ void HP_geoip_init(void) {
}
return;
}
+/* inter_achievement_interface */
+int HP_inter_achievement_sql_init(void) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_inter_achievement_sql_init_pre > 0) {
+ int (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_sql_init_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_inter_achievement_sql_init_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.inter_achievement.sql_init();
+ }
+ if (HPMHooks.count.HP_inter_achievement_sql_init_post > 0) {
+ int (*postHookFunc) (int retVal___);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_sql_init_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_inter_achievement_sql_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_inter_achievement_sql_final(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_inter_achievement_sql_final_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_sql_final_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_inter_achievement_sql_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.inter_achievement.sql_final();
+ }
+ if (HPMHooks.count.HP_inter_achievement_sql_final_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_sql_final_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_inter_achievement_sql_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_inter_achievement_tosql(int char_id, struct char_achievements *cp, const struct char_achievements *p) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_inter_achievement_tosql_pre > 0) {
+ int (*preHookFunc) (int *char_id, struct char_achievements **cp, const struct char_achievements **p);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_tosql_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_inter_achievement_tosql_pre[hIndex].func;
+ retVal___ = preHookFunc(&char_id, &cp, &p);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.inter_achievement.tosql(char_id, cp, p);
+ }
+ if (HPMHooks.count.HP_inter_achievement_tosql_post > 0) {
+ int (*postHookFunc) (int retVal___, int char_id, struct char_achievements *cp, const struct char_achievements *p);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_tosql_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_inter_achievement_tosql_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, char_id, cp, p);
+ }
+ }
+ return retVal___;
+}
+bool HP_inter_achievement_fromsql(int char_id, struct char_achievements *a) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_inter_achievement_fromsql_pre > 0) {
+ bool (*preHookFunc) (int *char_id, struct char_achievements **a);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_fromsql_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_inter_achievement_fromsql_pre[hIndex].func;
+ retVal___ = preHookFunc(&char_id, &a);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.inter_achievement.fromsql(char_id, a);
+ }
+ if (HPMHooks.count.HP_inter_achievement_fromsql_post > 0) {
+ bool (*postHookFunc) (bool retVal___, int char_id, struct char_achievements *a);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_fromsql_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_inter_achievement_fromsql_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, char_id, a);
+ }
+ }
+ return retVal___;
+}
+struct DBData HP_inter_achievement_ensure_char_achievements(union DBKey key, va_list args) {
+ int hIndex = 0;
+ struct DBData retVal___ = { 0 };
+ if (HPMHooks.count.HP_inter_achievement_ensure_char_achievements_pre > 0) {
+ struct DBData (*preHookFunc) (union DBKey *key, va_list args);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_ensure_char_achievements_pre; hIndex++) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_inter_achievement_ensure_char_achievements_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, args___copy);
+ va_end(args___copy);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.inter_achievement.ensure_char_achievements(key, args___copy);
+ va_end(args___copy);
+ }
+ if (HPMHooks.count.HP_inter_achievement_ensure_char_achievements_post > 0) {
+ struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey key, va_list args);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_ensure_char_achievements_post; hIndex++) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_inter_achievement_ensure_char_achievements_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, key, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_inter_achievement_char_achievements_clear(union DBKey key, struct DBData *data, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_inter_achievement_char_achievements_clear_pre > 0) {
+ int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list args);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_char_achievements_clear_pre; hIndex++) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_inter_achievement_char_achievements_clear_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, &data, args___copy);
+ va_end(args___copy);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.inter_achievement.char_achievements_clear(key, data, args___copy);
+ va_end(args___copy);
+ }
+ if (HPMHooks.count.HP_inter_achievement_char_achievements_clear_post > 0) {
+ int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list args);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_char_achievements_clear_post; hIndex++) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_inter_achievement_char_achievements_clear_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, key, data, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_inter_achievement_parse_frommap(int fd) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_inter_achievement_parse_frommap_pre > 0) {
+ int (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_parse_frommap_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_inter_achievement_parse_frommap_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.inter_achievement.parse_frommap(fd);
+ }
+ if (HPMHooks.count.HP_inter_achievement_parse_frommap_post > 0) {
+ int (*postHookFunc) (int retVal___, int fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_parse_frommap_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_inter_achievement_parse_frommap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fd);
+ }
+ }
+ return retVal___;
+}
/* inter_auction_interface */
int HP_inter_auction_count(int char_id, bool buy) {
int hIndex = 0;
@@ -12430,6 +12631,136 @@ void HP_mapif_send_users_count(int users) {
}
return;
}
+void HP_mapif_pLoadAchievements(int fd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_mapif_pLoadAchievements_pre > 0) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pLoadAchievements_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mapif_pLoadAchievements_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapif.pLoadAchievements(fd);
+ }
+ if (HPMHooks.count.HP_mapif_pLoadAchievements_post > 0) {
+ void (*postHookFunc) (int fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pLoadAchievements_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mapif_pLoadAchievements_post[hIndex].func;
+ postHookFunc(fd);
+ }
+ }
+ return;
+}
+void HP_mapif_sAchievementsToMap(int fd, int char_id, const struct char_achievements *p) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_mapif_sAchievementsToMap_pre > 0) {
+ void (*preHookFunc) (int *fd, int *char_id, const struct char_achievements **p);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sAchievementsToMap_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mapif_sAchievementsToMap_pre[hIndex].func;
+ preHookFunc(&fd, &char_id, &p);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapif.sAchievementsToMap(fd, char_id, p);
+ }
+ if (HPMHooks.count.HP_mapif_sAchievementsToMap_post > 0) {
+ void (*postHookFunc) (int fd, int char_id, const struct char_achievements *p);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sAchievementsToMap_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mapif_sAchievementsToMap_post[hIndex].func;
+ postHookFunc(fd, char_id, p);
+ }
+ }
+ return;
+}
+void HP_mapif_pSaveAchievements(int fd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_mapif_pSaveAchievements_pre > 0) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pSaveAchievements_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mapif_pSaveAchievements_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapif.pSaveAchievements(fd);
+ }
+ if (HPMHooks.count.HP_mapif_pSaveAchievements_post > 0) {
+ void (*postHookFunc) (int fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pSaveAchievements_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mapif_pSaveAchievements_post[hIndex].func;
+ postHookFunc(fd);
+ }
+ }
+ return;
+}
+void HP_mapif_achievement_load(int fd, int char_id) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_mapif_achievement_load_pre > 0) {
+ void (*preHookFunc) (int *fd, int *char_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_achievement_load_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mapif_achievement_load_pre[hIndex].func;
+ preHookFunc(&fd, &char_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapif.achievement_load(fd, char_id);
+ }
+ if (HPMHooks.count.HP_mapif_achievement_load_post > 0) {
+ void (*postHookFunc) (int fd, int char_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_achievement_load_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mapif_achievement_load_post[hIndex].func;
+ postHookFunc(fd, char_id);
+ }
+ }
+ return;
+}
+void HP_mapif_achievement_save(int char_id, struct char_achievements *p) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_mapif_achievement_save_pre > 0) {
+ void (*preHookFunc) (int *char_id, struct char_achievements **p);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_achievement_save_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mapif_achievement_save_pre[hIndex].func;
+ preHookFunc(&char_id, &p);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapif.achievement_save(char_id, p);
+ }
+ if (HPMHooks.count.HP_mapif_achievement_save_post > 0) {
+ void (*postHookFunc) (int char_id, struct char_achievements *p);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_achievement_save_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mapif_achievement_save_post[hIndex].func;
+ postHookFunc(char_id, p);
+ }
+ }
+ return;
+}
void HP_mapif_auction_message(int char_id, unsigned char result) {
int hIndex = 0;
if (HPMHooks.count.HP_mapif_auction_message_pre > 0) {
diff --git a/src/plugins/HPMHooking/HPMHooking_char.sources.inc b/src/plugins/HPMHooking/HPMHooking_char.sources.inc
index 9ba9e129e..0d69cd755 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.sources.inc
@@ -33,6 +33,7 @@ HPMHooks.source.core = *core;
HPMHooks.source.DB = *DB;
HPMHooks.source.des = *des;
HPMHooks.source.geoip = *geoip;
+HPMHooks.source.inter_achievement = *inter_achievement;
HPMHooks.source.inter_auction = *inter_auction;
HPMHooks.source.inter_clan = *inter_clan;
HPMHooks.source.inter_elemental = *inter_elemental;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 6ab215bfc..fadab9ea7 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -32,6 +32,110 @@ struct {
struct HPMHookPoint *HP_HCache_check_post;
struct HPMHookPoint *HP_HCache_open_pre;
struct HPMHookPoint *HP_HCache_open_post;
+ struct HPMHookPoint *HP_achievement_init_pre;
+ struct HPMHookPoint *HP_achievement_init_post;
+ struct HPMHookPoint *HP_achievement_final_pre;
+ struct HPMHookPoint *HP_achievement_final_post;
+ struct HPMHookPoint *HP_achievement_db_finalize_pre;
+ struct HPMHookPoint *HP_achievement_db_finalize_post;
+ struct HPMHookPoint *HP_achievement_readdb_pre;
+ struct HPMHookPoint *HP_achievement_readdb_post;
+ struct HPMHookPoint *HP_achievement_readdb_objectives_sub_pre;
+ struct HPMHookPoint *HP_achievement_readdb_objectives_sub_post;
+ struct HPMHookPoint *HP_achievement_readdb_objectives_pre;
+ struct HPMHookPoint *HP_achievement_readdb_objectives_post;
+ struct HPMHookPoint *HP_achievement_readdb_validate_criteria_mobid_pre;
+ struct HPMHookPoint *HP_achievement_readdb_validate_criteria_mobid_post;
+ struct HPMHookPoint *HP_achievement_readdb_validate_criteria_jobid_pre;
+ struct HPMHookPoint *HP_achievement_readdb_validate_criteria_jobid_post;
+ struct HPMHookPoint *HP_achievement_readdb_validate_criteria_itemid_pre;
+ struct HPMHookPoint *HP_achievement_readdb_validate_criteria_itemid_post;
+ struct HPMHookPoint *HP_achievement_readdb_validate_criteria_statustype_pre;
+ struct HPMHookPoint *HP_achievement_readdb_validate_criteria_statustype_post;
+ struct HPMHookPoint *HP_achievement_readdb_validate_criteria_itemtype_pre;
+ struct HPMHookPoint *HP_achievement_readdb_validate_criteria_itemtype_post;
+ struct HPMHookPoint *HP_achievement_readdb_validate_criteria_weaponlv_pre;
+ struct HPMHookPoint *HP_achievement_readdb_validate_criteria_weaponlv_post;
+ struct HPMHookPoint *HP_achievement_readdb_validate_criteria_achievement_pre;
+ struct HPMHookPoint *HP_achievement_readdb_validate_criteria_achievement_post;
+ struct HPMHookPoint *HP_achievement_readdb_rewards_pre;
+ struct HPMHookPoint *HP_achievement_readdb_rewards_post;
+ struct HPMHookPoint *HP_achievement_readdb_validate_reward_items_pre;
+ struct HPMHookPoint *HP_achievement_readdb_validate_reward_items_post;
+ struct HPMHookPoint *HP_achievement_readdb_validate_reward_item_sub_pre;
+ struct HPMHookPoint *HP_achievement_readdb_validate_reward_item_sub_post;
+ struct HPMHookPoint *HP_achievement_readdb_validate_reward_bonus_pre;
+ struct HPMHookPoint *HP_achievement_readdb_validate_reward_bonus_post;
+ struct HPMHookPoint *HP_achievement_readdb_validate_reward_titleid_pre;
+ struct HPMHookPoint *HP_achievement_readdb_validate_reward_titleid_post;
+ struct HPMHookPoint *HP_achievement_readdb_additional_fields_pre;
+ struct HPMHookPoint *HP_achievement_readdb_additional_fields_post;
+ struct HPMHookPoint *HP_achievement_readdb_ranks_pre;
+ struct HPMHookPoint *HP_achievement_readdb_ranks_post;
+ struct HPMHookPoint *HP_achievement_get_pre;
+ struct HPMHookPoint *HP_achievement_get_post;
+ struct HPMHookPoint *HP_achievement_ensure_pre;
+ struct HPMHookPoint *HP_achievement_ensure_post;
+ struct HPMHookPoint *HP_achievement_calculate_totals_pre;
+ struct HPMHookPoint *HP_achievement_calculate_totals_post;
+ struct HPMHookPoint *HP_achievement_check_complete_pre;
+ struct HPMHookPoint *HP_achievement_check_complete_post;
+ struct HPMHookPoint *HP_achievement_progress_add_pre;
+ struct HPMHookPoint *HP_achievement_progress_add_post;
+ struct HPMHookPoint *HP_achievement_progress_set_pre;
+ struct HPMHookPoint *HP_achievement_progress_set_post;
+ struct HPMHookPoint *HP_achievement_check_criteria_pre;
+ struct HPMHookPoint *HP_achievement_check_criteria_post;
+ struct HPMHookPoint *HP_achievement_validate_pre;
+ struct HPMHookPoint *HP_achievement_validate_post;
+ struct HPMHookPoint *HP_achievement_validate_type_pre;
+ struct HPMHookPoint *HP_achievement_validate_type_post;
+ struct HPMHookPoint *HP_achievement_validate_mob_kill_pre;
+ struct HPMHookPoint *HP_achievement_validate_mob_kill_post;
+ struct HPMHookPoint *HP_achievement_validate_mob_damage_pre;
+ struct HPMHookPoint *HP_achievement_validate_mob_damage_post;
+ struct HPMHookPoint *HP_achievement_validate_pc_kill_pre;
+ struct HPMHookPoint *HP_achievement_validate_pc_kill_post;
+ struct HPMHookPoint *HP_achievement_validate_pc_damage_pre;
+ struct HPMHookPoint *HP_achievement_validate_pc_damage_post;
+ struct HPMHookPoint *HP_achievement_validate_jobchange_pre;
+ struct HPMHookPoint *HP_achievement_validate_jobchange_post;
+ struct HPMHookPoint *HP_achievement_validate_stats_pre;
+ struct HPMHookPoint *HP_achievement_validate_stats_post;
+ struct HPMHookPoint *HP_achievement_validate_chatroom_create_pre;
+ struct HPMHookPoint *HP_achievement_validate_chatroom_create_post;
+ struct HPMHookPoint *HP_achievement_validate_chatroom_members_pre;
+ struct HPMHookPoint *HP_achievement_validate_chatroom_members_post;
+ struct HPMHookPoint *HP_achievement_validate_friend_add_pre;
+ struct HPMHookPoint *HP_achievement_validate_friend_add_post;
+ struct HPMHookPoint *HP_achievement_validate_party_create_pre;
+ struct HPMHookPoint *HP_achievement_validate_party_create_post;
+ struct HPMHookPoint *HP_achievement_validate_marry_pre;
+ struct HPMHookPoint *HP_achievement_validate_marry_post;
+ struct HPMHookPoint *HP_achievement_validate_adopt_pre;
+ struct HPMHookPoint *HP_achievement_validate_adopt_post;
+ struct HPMHookPoint *HP_achievement_validate_zeny_pre;
+ struct HPMHookPoint *HP_achievement_validate_zeny_post;
+ struct HPMHookPoint *HP_achievement_validate_refine_pre;
+ struct HPMHookPoint *HP_achievement_validate_refine_post;
+ struct HPMHookPoint *HP_achievement_validate_item_get_pre;
+ struct HPMHookPoint *HP_achievement_validate_item_get_post;
+ struct HPMHookPoint *HP_achievement_validate_item_sell_pre;
+ struct HPMHookPoint *HP_achievement_validate_item_sell_post;
+ struct HPMHookPoint *HP_achievement_validate_achieve_pre;
+ struct HPMHookPoint *HP_achievement_validate_achieve_post;
+ struct HPMHookPoint *HP_achievement_validate_taming_pre;
+ struct HPMHookPoint *HP_achievement_validate_taming_post;
+ struct HPMHookPoint *HP_achievement_validate_achievement_rank_pre;
+ struct HPMHookPoint *HP_achievement_validate_achievement_rank_post;
+ struct HPMHookPoint *HP_achievement_type_requires_criteria_pre;
+ struct HPMHookPoint *HP_achievement_type_requires_criteria_post;
+ struct HPMHookPoint *HP_achievement_init_titles_pre;
+ struct HPMHookPoint *HP_achievement_init_titles_post;
+ struct HPMHookPoint *HP_achievement_check_title_pre;
+ struct HPMHookPoint *HP_achievement_check_title_post;
+ struct HPMHookPoint *HP_achievement_get_rewards_pre;
+ struct HPMHookPoint *HP_achievement_get_rewards_post;
struct HPMHookPoint *HP_atcommand_init_pre;
struct HPMHookPoint *HP_atcommand_init_post;
struct HPMHookPoint *HP_atcommand_final_pre;
@@ -1478,6 +1582,18 @@ struct {
struct HPMHookPoint *HP_clif_navigate_to_post;
struct HPMHookPoint *HP_clif_bl_type_pre;
struct HPMHookPoint *HP_clif_bl_type_post;
+ struct HPMHookPoint *HP_clif_achievement_send_list_pre;
+ struct HPMHookPoint *HP_clif_achievement_send_list_post;
+ struct HPMHookPoint *HP_clif_achievement_send_update_pre;
+ struct HPMHookPoint *HP_clif_achievement_send_update_post;
+ struct HPMHookPoint *HP_clif_pAchievementGetReward_pre;
+ struct HPMHookPoint *HP_clif_pAchievementGetReward_post;
+ struct HPMHookPoint *HP_clif_achievement_reward_ack_pre;
+ struct HPMHookPoint *HP_clif_achievement_reward_ack_post;
+ struct HPMHookPoint *HP_clif_change_title_ack_pre;
+ struct HPMHookPoint *HP_clif_change_title_ack_post;
+ struct HPMHookPoint *HP_clif_pChangeTitle_pre;
+ struct HPMHookPoint *HP_clif_pChangeTitle_post;
struct HPMHookPoint *HP_clif_pWantToConnection_pre;
struct HPMHookPoint *HP_clif_pWantToConnection_post;
struct HPMHookPoint *HP_clif_pLoadEndAck_pre;
@@ -2710,6 +2826,10 @@ struct {
struct HPMHookPoint *HP_intif_request_accinfo_post;
struct HPMHookPoint *HP_intif_CheckForCharServer_pre;
struct HPMHookPoint *HP_intif_CheckForCharServer_post;
+ struct HPMHookPoint *HP_intif_achievements_request_pre;
+ struct HPMHookPoint *HP_intif_achievements_request_post;
+ struct HPMHookPoint *HP_intif_achievements_save_pre;
+ struct HPMHookPoint *HP_intif_achievements_save_post;
struct HPMHookPoint *HP_intif_pWisMessage_pre;
struct HPMHookPoint *HP_intif_pWisMessage_post;
struct HPMHookPoint *HP_intif_pWisEnd_pre;
@@ -2848,6 +2968,8 @@ struct {
struct HPMHookPoint *HP_intif_pRodexCheckName_post;
struct HPMHookPoint *HP_intif_pRecvClanMemberAction_pre;
struct HPMHookPoint *HP_intif_pRecvClanMemberAction_post;
+ struct HPMHookPoint *HP_intif_pAchievementsLoad_pre;
+ struct HPMHookPoint *HP_intif_pAchievementsLoad_post;
struct HPMHookPoint *HP_ircbot_init_pre;
struct HPMHookPoint *HP_ircbot_init_post;
struct HPMHookPoint *HP_ircbot_final_pre;
@@ -6455,6 +6577,110 @@ struct {
int HP_HCache_check_post;
int HP_HCache_open_pre;
int HP_HCache_open_post;
+ int HP_achievement_init_pre;
+ int HP_achievement_init_post;
+ int HP_achievement_final_pre;
+ int HP_achievement_final_post;
+ int HP_achievement_db_finalize_pre;
+ int HP_achievement_db_finalize_post;
+ int HP_achievement_readdb_pre;
+ int HP_achievement_readdb_post;
+ int HP_achievement_readdb_objectives_sub_pre;
+ int HP_achievement_readdb_objectives_sub_post;
+ int HP_achievement_readdb_objectives_pre;
+ int HP_achievement_readdb_objectives_post;
+ int HP_achievement_readdb_validate_criteria_mobid_pre;
+ int HP_achievement_readdb_validate_criteria_mobid_post;
+ int HP_achievement_readdb_validate_criteria_jobid_pre;
+ int HP_achievement_readdb_validate_criteria_jobid_post;
+ int HP_achievement_readdb_validate_criteria_itemid_pre;
+ int HP_achievement_readdb_validate_criteria_itemid_post;
+ int HP_achievement_readdb_validate_criteria_statustype_pre;
+ int HP_achievement_readdb_validate_criteria_statustype_post;
+ int HP_achievement_readdb_validate_criteria_itemtype_pre;
+ int HP_achievement_readdb_validate_criteria_itemtype_post;
+ int HP_achievement_readdb_validate_criteria_weaponlv_pre;
+ int HP_achievement_readdb_validate_criteria_weaponlv_post;
+ int HP_achievement_readdb_validate_criteria_achievement_pre;
+ int HP_achievement_readdb_validate_criteria_achievement_post;
+ int HP_achievement_readdb_rewards_pre;
+ int HP_achievement_readdb_rewards_post;
+ int HP_achievement_readdb_validate_reward_items_pre;
+ int HP_achievement_readdb_validate_reward_items_post;
+ int HP_achievement_readdb_validate_reward_item_sub_pre;
+ int HP_achievement_readdb_validate_reward_item_sub_post;
+ int HP_achievement_readdb_validate_reward_bonus_pre;
+ int HP_achievement_readdb_validate_reward_bonus_post;
+ int HP_achievement_readdb_validate_reward_titleid_pre;
+ int HP_achievement_readdb_validate_reward_titleid_post;
+ int HP_achievement_readdb_additional_fields_pre;
+ int HP_achievement_readdb_additional_fields_post;
+ int HP_achievement_readdb_ranks_pre;
+ int HP_achievement_readdb_ranks_post;
+ int HP_achievement_get_pre;
+ int HP_achievement_get_post;
+ int HP_achievement_ensure_pre;
+ int HP_achievement_ensure_post;
+ int HP_achievement_calculate_totals_pre;
+ int HP_achievement_calculate_totals_post;
+ int HP_achievement_check_complete_pre;
+ int HP_achievement_check_complete_post;
+ int HP_achievement_progress_add_pre;
+ int HP_achievement_progress_add_post;
+ int HP_achievement_progress_set_pre;
+ int HP_achievement_progress_set_post;
+ int HP_achievement_check_criteria_pre;
+ int HP_achievement_check_criteria_post;
+ int HP_achievement_validate_pre;
+ int HP_achievement_validate_post;
+ int HP_achievement_validate_type_pre;
+ int HP_achievement_validate_type_post;
+ int HP_achievement_validate_mob_kill_pre;
+ int HP_achievement_validate_mob_kill_post;
+ int HP_achievement_validate_mob_damage_pre;
+ int HP_achievement_validate_mob_damage_post;
+ int HP_achievement_validate_pc_kill_pre;
+ int HP_achievement_validate_pc_kill_post;
+ int HP_achievement_validate_pc_damage_pre;
+ int HP_achievement_validate_pc_damage_post;
+ int HP_achievement_validate_jobchange_pre;
+ int HP_achievement_validate_jobchange_post;
+ int HP_achievement_validate_stats_pre;
+ int HP_achievement_validate_stats_post;
+ int HP_achievement_validate_chatroom_create_pre;
+ int HP_achievement_validate_chatroom_create_post;
+ int HP_achievement_validate_chatroom_members_pre;
+ int HP_achievement_validate_chatroom_members_post;
+ int HP_achievement_validate_friend_add_pre;
+ int HP_achievement_validate_friend_add_post;
+ int HP_achievement_validate_party_create_pre;
+ int HP_achievement_validate_party_create_post;
+ int HP_achievement_validate_marry_pre;
+ int HP_achievement_validate_marry_post;
+ int HP_achievement_validate_adopt_pre;
+ int HP_achievement_validate_adopt_post;
+ int HP_achievement_validate_zeny_pre;
+ int HP_achievement_validate_zeny_post;
+ int HP_achievement_validate_refine_pre;
+ int HP_achievement_validate_refine_post;
+ int HP_achievement_validate_item_get_pre;
+ int HP_achievement_validate_item_get_post;
+ int HP_achievement_validate_item_sell_pre;
+ int HP_achievement_validate_item_sell_post;
+ int HP_achievement_validate_achieve_pre;
+ int HP_achievement_validate_achieve_post;
+ int HP_achievement_validate_taming_pre;
+ int HP_achievement_validate_taming_post;
+ int HP_achievement_validate_achievement_rank_pre;
+ int HP_achievement_validate_achievement_rank_post;
+ int HP_achievement_type_requires_criteria_pre;
+ int HP_achievement_type_requires_criteria_post;
+ int HP_achievement_init_titles_pre;
+ int HP_achievement_init_titles_post;
+ int HP_achievement_check_title_pre;
+ int HP_achievement_check_title_post;
+ int HP_achievement_get_rewards_pre;
+ int HP_achievement_get_rewards_post;
int HP_atcommand_init_pre;
int HP_atcommand_init_post;
int HP_atcommand_final_pre;
@@ -7901,6 +8127,18 @@ struct {
int HP_clif_navigate_to_post;
int HP_clif_bl_type_pre;
int HP_clif_bl_type_post;
+ int HP_clif_achievement_send_list_pre;
+ int HP_clif_achievement_send_list_post;
+ int HP_clif_achievement_send_update_pre;
+ int HP_clif_achievement_send_update_post;
+ int HP_clif_pAchievementGetReward_pre;
+ int HP_clif_pAchievementGetReward_post;
+ int HP_clif_achievement_reward_ack_pre;
+ int HP_clif_achievement_reward_ack_post;
+ int HP_clif_change_title_ack_pre;
+ int HP_clif_change_title_ack_post;
+ int HP_clif_pChangeTitle_pre;
+ int HP_clif_pChangeTitle_post;
int HP_clif_pWantToConnection_pre;
int HP_clif_pWantToConnection_post;
int HP_clif_pLoadEndAck_pre;
@@ -9133,6 +9371,10 @@ struct {
int HP_intif_request_accinfo_post;
int HP_intif_CheckForCharServer_pre;
int HP_intif_CheckForCharServer_post;
+ int HP_intif_achievements_request_pre;
+ int HP_intif_achievements_request_post;
+ int HP_intif_achievements_save_pre;
+ int HP_intif_achievements_save_post;
int HP_intif_pWisMessage_pre;
int HP_intif_pWisMessage_post;
int HP_intif_pWisEnd_pre;
@@ -9271,6 +9513,8 @@ struct {
int HP_intif_pRodexCheckName_post;
int HP_intif_pRecvClanMemberAction_pre;
int HP_intif_pRecvClanMemberAction_post;
+ int HP_intif_pAchievementsLoad_pre;
+ int HP_intif_pAchievementsLoad_post;
int HP_ircbot_init_pre;
int HP_ircbot_init_post;
int HP_ircbot_final_pre;
@@ -12873,6 +13117,7 @@ struct {
struct {
struct HCache_interface HCache;
+ struct achievement_interface achievement;
struct atcommand_interface atcommand;
struct battle_interface battle;
struct battleground_interface bg;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 43c9c8e6d..57728fbc4 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -30,6 +30,59 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(HCache->init, HP_HCache_init) },
{ HP_POP(HCache->check, HP_HCache_check) },
{ HP_POP(HCache->open, HP_HCache_open) },
+/* achievement_interface */
+ { HP_POP(achievement->init, HP_achievement_init) },
+ { HP_POP(achievement->final, HP_achievement_final) },
+ { HP_POP(achievement->db_finalize, HP_achievement_db_finalize) },
+ { HP_POP(achievement->readdb, HP_achievement_readdb) },
+ { HP_POP(achievement->readdb_objectives_sub, HP_achievement_readdb_objectives_sub) },
+ { HP_POP(achievement->readdb_objectives, HP_achievement_readdb_objectives) },
+ { HP_POP(achievement->readdb_validate_criteria_mobid, HP_achievement_readdb_validate_criteria_mobid) },
+ { HP_POP(achievement->readdb_validate_criteria_jobid, HP_achievement_readdb_validate_criteria_jobid) },
+ { HP_POP(achievement->readdb_validate_criteria_itemid, HP_achievement_readdb_validate_criteria_itemid) },
+ { HP_POP(achievement->readdb_validate_criteria_statustype, HP_achievement_readdb_validate_criteria_statustype) },
+ { HP_POP(achievement->readdb_validate_criteria_itemtype, HP_achievement_readdb_validate_criteria_itemtype) },
+ { HP_POP(achievement->readdb_validate_criteria_weaponlv, HP_achievement_readdb_validate_criteria_weaponlv) },
+ { HP_POP(achievement->readdb_validate_criteria_achievement, HP_achievement_readdb_validate_criteria_achievement) },
+ { HP_POP(achievement->readdb_rewards, HP_achievement_readdb_rewards) },
+ { HP_POP(achievement->readdb_validate_reward_items, HP_achievement_readdb_validate_reward_items) },
+ { HP_POP(achievement->readdb_validate_reward_item_sub, HP_achievement_readdb_validate_reward_item_sub) },
+ { HP_POP(achievement->readdb_validate_reward_bonus, HP_achievement_readdb_validate_reward_bonus) },
+ { HP_POP(achievement->readdb_validate_reward_titleid, HP_achievement_readdb_validate_reward_titleid) },
+ { HP_POP(achievement->readdb_additional_fields, HP_achievement_readdb_additional_fields) },
+ { HP_POP(achievement->readdb_ranks, HP_achievement_readdb_ranks) },
+ { HP_POP(achievement->get, HP_achievement_get) },
+ { HP_POP(achievement->ensure, HP_achievement_ensure) },
+ { HP_POP(achievement->calculate_totals, HP_achievement_calculate_totals) },
+ { HP_POP(achievement->check_complete, HP_achievement_check_complete) },
+ { HP_POP(achievement->progress_add, HP_achievement_progress_add) },
+ { HP_POP(achievement->progress_set, HP_achievement_progress_set) },
+ { HP_POP(achievement->check_criteria, HP_achievement_check_criteria) },
+ { HP_POP(achievement->validate, HP_achievement_validate) },
+ { HP_POP(achievement->validate_type, HP_achievement_validate_type) },
+ { HP_POP(achievement->validate_mob_kill, HP_achievement_validate_mob_kill) },
+ { HP_POP(achievement->validate_mob_damage, HP_achievement_validate_mob_damage) },
+ { HP_POP(achievement->validate_pc_kill, HP_achievement_validate_pc_kill) },
+ { HP_POP(achievement->validate_pc_damage, HP_achievement_validate_pc_damage) },
+ { HP_POP(achievement->validate_jobchange, HP_achievement_validate_jobchange) },
+ { HP_POP(achievement->validate_stats, HP_achievement_validate_stats) },
+ { HP_POP(achievement->validate_chatroom_create, HP_achievement_validate_chatroom_create) },
+ { HP_POP(achievement->validate_chatroom_members, HP_achievement_validate_chatroom_members) },
+ { HP_POP(achievement->validate_friend_add, HP_achievement_validate_friend_add) },
+ { HP_POP(achievement->validate_party_create, HP_achievement_validate_party_create) },
+ { HP_POP(achievement->validate_marry, HP_achievement_validate_marry) },
+ { HP_POP(achievement->validate_adopt, HP_achievement_validate_adopt) },
+ { HP_POP(achievement->validate_zeny, HP_achievement_validate_zeny) },
+ { HP_POP(achievement->validate_refine, HP_achievement_validate_refine) },
+ { HP_POP(achievement->validate_item_get, HP_achievement_validate_item_get) },
+ { HP_POP(achievement->validate_item_sell, HP_achievement_validate_item_sell) },
+ { HP_POP(achievement->validate_achieve, HP_achievement_validate_achieve) },
+ { HP_POP(achievement->validate_taming, HP_achievement_validate_taming) },
+ { HP_POP(achievement->validate_achievement_rank, HP_achievement_validate_achievement_rank) },
+ { HP_POP(achievement->type_requires_criteria, HP_achievement_type_requires_criteria) },
+ { HP_POP(achievement->init_titles, HP_achievement_init_titles) },
+ { HP_POP(achievement->check_title, HP_achievement_check_title) },
+ { HP_POP(achievement->get_rewards, HP_achievement_get_rewards) },
/* atcommand_interface */
{ HP_POP(atcommand->init, HP_atcommand_init) },
{ HP_POP(atcommand->final, HP_atcommand_final) },
@@ -762,6 +815,12 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->isdisguised, HP_clif_isdisguised) },
{ HP_POP(clif->navigate_to, HP_clif_navigate_to) },
{ HP_POP(clif->bl_type, HP_clif_bl_type) },
+ { HP_POP(clif->achievement_send_list, HP_clif_achievement_send_list) },
+ { HP_POP(clif->achievement_send_update, HP_clif_achievement_send_update) },
+ { HP_POP(clif->pAchievementGetReward, HP_clif_pAchievementGetReward) },
+ { HP_POP(clif->achievement_reward_ack, HP_clif_achievement_reward_ack) },
+ { HP_POP(clif->change_title_ack, HP_clif_change_title_ack) },
+ { HP_POP(clif->pChangeTitle, HP_clif_pChangeTitle) },
{ HP_POP(clif->pWantToConnection, HP_clif_pWantToConnection) },
{ HP_POP(clif->pLoadEndAck, HP_clif_pLoadEndAck) },
{ HP_POP(clif->pTickSend, HP_clif_pTickSend) },
@@ -1391,6 +1450,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(intif->clan_membercount, HP_intif_clan_membercount) },
{ HP_POP(intif->request_accinfo, HP_intif_request_accinfo) },
{ HP_POP(intif->CheckForCharServer, HP_intif_CheckForCharServer) },
+ { HP_POP(intif->achievements_request, HP_intif_achievements_request) },
+ { HP_POP(intif->achievements_save, HP_intif_achievements_save) },
{ HP_POP(intif->pWisMessage, HP_intif_pWisMessage) },
{ HP_POP(intif->pWisEnd, HP_intif_pWisEnd) },
{ HP_POP(intif->pWisToGM_sub, HP_intif_pWisToGM_sub) },
@@ -1460,6 +1521,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(intif->pRodexSendMail, HP_intif_pRodexSendMail) },
{ HP_POP(intif->pRodexCheckName, HP_intif_pRodexCheckName) },
{ HP_POP(intif->pRecvClanMemberAction, HP_intif_pRecvClanMemberAction) },
+ { HP_POP(intif->pAchievementsLoad, HP_intif_pAchievementsLoad) },
/* irc_bot_interface */
{ HP_POP(ircbot->init, HP_ircbot_init) },
{ HP_POP(ircbot->final, HP_ircbot_final) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index ca35225c6..e224a10bc 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -106,6 +106,1385 @@ FILE* HP_HCache_open(const char *file, const char *opt) {
}
return retVal___;
}
+/* achievement_interface */
+void HP_achievement_init(bool minimal) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_init_pre > 0) {
+ void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_init_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_init_pre[hIndex].func;
+ preHookFunc(&minimal);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.init(minimal);
+ }
+ if (HPMHooks.count.HP_achievement_init_post > 0) {
+ void (*postHookFunc) (bool minimal);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_init_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_init_post[hIndex].func;
+ postHookFunc(minimal);
+ }
+ }
+ return;
+}
+void HP_achievement_final(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_final_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_final_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.final();
+ }
+ if (HPMHooks.count.HP_achievement_final_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_final_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_achievement_db_finalize(union DBKey key, struct DBData *data, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_achievement_db_finalize_pre > 0) {
+ int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list args);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_db_finalize_pre; hIndex++) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_achievement_db_finalize_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, &data, args___copy);
+ va_end(args___copy);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.achievement.db_finalize(key, data, args___copy);
+ va_end(args___copy);
+ }
+ if (HPMHooks.count.HP_achievement_db_finalize_post > 0) {
+ int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list args);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_db_finalize_post; hIndex++) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_achievement_db_finalize_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, key, data, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_achievement_readdb(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_readdb_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.readdb();
+ }
+ if (HPMHooks.count.HP_achievement_readdb_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_achievement_readdb_objectives_sub(const struct config_setting_t *conf, int index, struct achievement_data *entry) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_achievement_readdb_objectives_sub_pre > 0) {
+ bool (*preHookFunc) (const struct config_setting_t **conf, int *index, struct achievement_data **entry);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_objectives_sub_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_objectives_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&conf, &index, &entry);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.readdb_objectives_sub(conf, index, entry);
+ }
+ if (HPMHooks.count.HP_achievement_readdb_objectives_sub_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const struct config_setting_t *conf, int index, struct achievement_data *entry);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_objectives_sub_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_objectives_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, conf, index, entry);
+ }
+ }
+ return retVal___;
+}
+bool HP_achievement_readdb_objectives(const struct config_setting_t *conf, struct achievement_data *entry) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_achievement_readdb_objectives_pre > 0) {
+ bool (*preHookFunc) (const struct config_setting_t **conf, struct achievement_data **entry);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_objectives_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_objectives_pre[hIndex].func;
+ retVal___ = preHookFunc(&conf, &entry);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.readdb_objectives(conf, entry);
+ }
+ if (HPMHooks.count.HP_achievement_readdb_objectives_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const struct config_setting_t *conf, struct achievement_data *entry);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_objectives_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_objectives_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, conf, entry);
+ }
+ }
+ return retVal___;
+}
+bool HP_achievement_readdb_validate_criteria_mobid(const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_achievement_readdb_validate_criteria_mobid_pre > 0) {
+ bool (*preHookFunc) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_mobid_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_mobid_pre[hIndex].func;
+ retVal___ = preHookFunc(&t, &obj, &type, &entry_id, &obj_idx);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.readdb_validate_criteria_mobid(t, obj, type, entry_id, obj_idx);
+ }
+ if (HPMHooks.count.HP_achievement_readdb_validate_criteria_mobid_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_mobid_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_mobid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, t, obj, type, entry_id, obj_idx);
+ }
+ }
+ return retVal___;
+}
+bool HP_achievement_readdb_validate_criteria_jobid(const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_achievement_readdb_validate_criteria_jobid_pre > 0) {
+ bool (*preHookFunc) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_jobid_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_jobid_pre[hIndex].func;
+ retVal___ = preHookFunc(&t, &obj, &type, &entry_id, &obj_idx);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.readdb_validate_criteria_jobid(t, obj, type, entry_id, obj_idx);
+ }
+ if (HPMHooks.count.HP_achievement_readdb_validate_criteria_jobid_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_jobid_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_jobid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, t, obj, type, entry_id, obj_idx);
+ }
+ }
+ return retVal___;
+}
+bool HP_achievement_readdb_validate_criteria_itemid(const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_achievement_readdb_validate_criteria_itemid_pre > 0) {
+ bool (*preHookFunc) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_itemid_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_itemid_pre[hIndex].func;
+ retVal___ = preHookFunc(&t, &obj, &type, &entry_id, &obj_idx);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.readdb_validate_criteria_itemid(t, obj, type, entry_id, obj_idx);
+ }
+ if (HPMHooks.count.HP_achievement_readdb_validate_criteria_itemid_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_itemid_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_itemid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, t, obj, type, entry_id, obj_idx);
+ }
+ }
+ return retVal___;
+}
+bool HP_achievement_readdb_validate_criteria_statustype(const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_achievement_readdb_validate_criteria_statustype_pre > 0) {
+ bool (*preHookFunc) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_statustype_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_statustype_pre[hIndex].func;
+ retVal___ = preHookFunc(&t, &obj, &type, &entry_id, &obj_idx);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.readdb_validate_criteria_statustype(t, obj, type, entry_id, obj_idx);
+ }
+ if (HPMHooks.count.HP_achievement_readdb_validate_criteria_statustype_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_statustype_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_statustype_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, t, obj, type, entry_id, obj_idx);
+ }
+ }
+ return retVal___;
+}
+bool HP_achievement_readdb_validate_criteria_itemtype(const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_achievement_readdb_validate_criteria_itemtype_pre > 0) {
+ bool (*preHookFunc) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_itemtype_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_itemtype_pre[hIndex].func;
+ retVal___ = preHookFunc(&t, &obj, &type, &entry_id, &obj_idx);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.readdb_validate_criteria_itemtype(t, obj, type, entry_id, obj_idx);
+ }
+ if (HPMHooks.count.HP_achievement_readdb_validate_criteria_itemtype_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_itemtype_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_itemtype_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, t, obj, type, entry_id, obj_idx);
+ }
+ }
+ return retVal___;
+}
+bool HP_achievement_readdb_validate_criteria_weaponlv(const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_achievement_readdb_validate_criteria_weaponlv_pre > 0) {
+ bool (*preHookFunc) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_weaponlv_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_weaponlv_pre[hIndex].func;
+ retVal___ = preHookFunc(&t, &obj, &type, &entry_id, &obj_idx);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.readdb_validate_criteria_weaponlv(t, obj, type, entry_id, obj_idx);
+ }
+ if (HPMHooks.count.HP_achievement_readdb_validate_criteria_weaponlv_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_weaponlv_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_weaponlv_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, t, obj, type, entry_id, obj_idx);
+ }
+ }
+ return retVal___;
+}
+bool HP_achievement_readdb_validate_criteria_achievement(const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_achievement_readdb_validate_criteria_achievement_pre > 0) {
+ bool (*preHookFunc) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_achievement_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_achievement_pre[hIndex].func;
+ retVal___ = preHookFunc(&t, &obj, &type, &entry_id, &obj_idx);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.readdb_validate_criteria_achievement(t, obj, type, entry_id, obj_idx);
+ }
+ if (HPMHooks.count.HP_achievement_readdb_validate_criteria_achievement_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_achievement_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_achievement_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, t, obj, type, entry_id, obj_idx);
+ }
+ }
+ return retVal___;
+}
+bool HP_achievement_readdb_rewards(const struct config_setting_t *conf, struct achievement_data *entry, const char *source) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_achievement_readdb_rewards_pre > 0) {
+ bool (*preHookFunc) (const struct config_setting_t **conf, struct achievement_data **entry, const char **source);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_rewards_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_rewards_pre[hIndex].func;
+ retVal___ = preHookFunc(&conf, &entry, &source);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.readdb_rewards(conf, entry, source);
+ }
+ if (HPMHooks.count.HP_achievement_readdb_rewards_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const struct config_setting_t *conf, struct achievement_data *entry, const char *source);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_rewards_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_rewards_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, conf, entry, source);
+ }
+ }
+ return retVal___;
+}
+void HP_achievement_readdb_validate_reward_items(const struct config_setting_t *t, struct achievement_data *entry) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_readdb_validate_reward_items_pre > 0) {
+ void (*preHookFunc) (const struct config_setting_t **t, struct achievement_data **entry);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_reward_items_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_reward_items_pre[hIndex].func;
+ preHookFunc(&t, &entry);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.readdb_validate_reward_items(t, entry);
+ }
+ if (HPMHooks.count.HP_achievement_readdb_validate_reward_items_post > 0) {
+ void (*postHookFunc) (const struct config_setting_t *t, struct achievement_data *entry);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_reward_items_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_reward_items_post[hIndex].func;
+ postHookFunc(t, entry);
+ }
+ }
+ return;
+}
+bool HP_achievement_readdb_validate_reward_item_sub(const struct config_setting_t *t, int element, struct achievement_data *entry) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_achievement_readdb_validate_reward_item_sub_pre > 0) {
+ bool (*preHookFunc) (const struct config_setting_t **t, int *element, struct achievement_data **entry);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_reward_item_sub_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_reward_item_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&t, &element, &entry);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.readdb_validate_reward_item_sub(t, element, entry);
+ }
+ if (HPMHooks.count.HP_achievement_readdb_validate_reward_item_sub_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const struct config_setting_t *t, int element, struct achievement_data *entry);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_reward_item_sub_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_reward_item_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, t, element, entry);
+ }
+ }
+ return retVal___;
+}
+void HP_achievement_readdb_validate_reward_bonus(const struct config_setting_t *t, struct achievement_data *entry, const char *source) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_readdb_validate_reward_bonus_pre > 0) {
+ void (*preHookFunc) (const struct config_setting_t **t, struct achievement_data **entry, const char **source);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_reward_bonus_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_reward_bonus_pre[hIndex].func;
+ preHookFunc(&t, &entry, &source);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.readdb_validate_reward_bonus(t, entry, source);
+ }
+ if (HPMHooks.count.HP_achievement_readdb_validate_reward_bonus_post > 0) {
+ void (*postHookFunc) (const struct config_setting_t *t, struct achievement_data *entry, const char *source);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_reward_bonus_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_reward_bonus_post[hIndex].func;
+ postHookFunc(t, entry, source);
+ }
+ }
+ return;
+}
+void HP_achievement_readdb_validate_reward_titleid(const struct config_setting_t *t, struct achievement_data *entry) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_readdb_validate_reward_titleid_pre > 0) {
+ void (*preHookFunc) (const struct config_setting_t **t, struct achievement_data **entry);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_reward_titleid_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_reward_titleid_pre[hIndex].func;
+ preHookFunc(&t, &entry);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.readdb_validate_reward_titleid(t, entry);
+ }
+ if (HPMHooks.count.HP_achievement_readdb_validate_reward_titleid_post > 0) {
+ void (*postHookFunc) (const struct config_setting_t *t, struct achievement_data *entry);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_reward_titleid_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_reward_titleid_post[hIndex].func;
+ postHookFunc(t, entry);
+ }
+ }
+ return;
+}
+void HP_achievement_readdb_additional_fields(const struct config_setting_t *conf, struct achievement_data *entry, const char *source) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_readdb_additional_fields_pre > 0) {
+ void (*preHookFunc) (const struct config_setting_t **conf, struct achievement_data **entry, const char **source);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_additional_fields_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_additional_fields_pre[hIndex].func;
+ preHookFunc(&conf, &entry, &source);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.readdb_additional_fields(conf, entry, source);
+ }
+ if (HPMHooks.count.HP_achievement_readdb_additional_fields_post > 0) {
+ void (*postHookFunc) (const struct config_setting_t *conf, struct achievement_data *entry, const char *source);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_additional_fields_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_additional_fields_post[hIndex].func;
+ postHookFunc(conf, entry, source);
+ }
+ }
+ return;
+}
+void HP_achievement_readdb_ranks(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_readdb_ranks_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_ranks_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_readdb_ranks_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.readdb_ranks();
+ }
+ if (HPMHooks.count.HP_achievement_readdb_ranks_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_ranks_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_readdb_ranks_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+const struct achievement_data* HP_achievement_get(int aid) {
+ int hIndex = 0;
+ const struct achievement_data* retVal___ = NULL;
+ if (HPMHooks.count.HP_achievement_get_pre > 0) {
+ const struct achievement_data* (*preHookFunc) (int *aid);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_get_pre[hIndex].func;
+ retVal___ = preHookFunc(&aid);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.get(aid);
+ }
+ if (HPMHooks.count.HP_achievement_get_post > 0) {
+ const struct achievement_data* (*postHookFunc) (const struct achievement_data* retVal___, int aid);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_get_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, aid);
+ }
+ }
+ return retVal___;
+}
+struct achievement* HP_achievement_ensure(struct map_session_data *sd, const struct achievement_data *ad) {
+ int hIndex = 0;
+ struct achievement* retVal___ = NULL;
+ if (HPMHooks.count.HP_achievement_ensure_pre > 0) {
+ struct achievement* (*preHookFunc) (struct map_session_data **sd, const struct achievement_data **ad);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_ensure_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_ensure_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, &ad);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.ensure(sd, ad);
+ }
+ if (HPMHooks.count.HP_achievement_ensure_post > 0) {
+ struct achievement* (*postHookFunc) (struct achievement* retVal___, struct map_session_data *sd, const struct achievement_data *ad);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_ensure_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_ensure_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, ad);
+ }
+ }
+ return retVal___;
+}
+void HP_achievement_calculate_totals(const struct map_session_data *sd, int *points, int *completed, int *rank, int *curr_rank_points) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_calculate_totals_pre > 0) {
+ void (*preHookFunc) (const struct map_session_data **sd, int **points, int **completed, int **rank, int **curr_rank_points);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_calculate_totals_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_calculate_totals_pre[hIndex].func;
+ preHookFunc(&sd, &points, &completed, &rank, &curr_rank_points);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.calculate_totals(sd, points, completed, rank, curr_rank_points);
+ }
+ if (HPMHooks.count.HP_achievement_calculate_totals_post > 0) {
+ void (*postHookFunc) (const struct map_session_data *sd, int *points, int *completed, int *rank, int *curr_rank_points);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_calculate_totals_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_calculate_totals_post[hIndex].func;
+ postHookFunc(sd, points, completed, rank, curr_rank_points);
+ }
+ }
+ return;
+}
+bool HP_achievement_check_complete(struct map_session_data *sd, const struct achievement_data *ad) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_achievement_check_complete_pre > 0) {
+ bool (*preHookFunc) (struct map_session_data **sd, const struct achievement_data **ad);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_check_complete_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_check_complete_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, &ad);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.check_complete(sd, ad);
+ }
+ if (HPMHooks.count.HP_achievement_check_complete_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const struct achievement_data *ad);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_check_complete_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_check_complete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, ad);
+ }
+ }
+ return retVal___;
+}
+void HP_achievement_progress_add(struct map_session_data *sd, const struct achievement_data *ad, unsigned int obj_idx, int progress) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_progress_add_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, const struct achievement_data **ad, unsigned int *obj_idx, int *progress);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_progress_add_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_progress_add_pre[hIndex].func;
+ preHookFunc(&sd, &ad, &obj_idx, &progress);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.progress_add(sd, ad, obj_idx, progress);
+ }
+ if (HPMHooks.count.HP_achievement_progress_add_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, const struct achievement_data *ad, unsigned int obj_idx, int progress);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_progress_add_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_progress_add_post[hIndex].func;
+ postHookFunc(sd, ad, obj_idx, progress);
+ }
+ }
+ return;
+}
+void HP_achievement_progress_set(struct map_session_data *sd, const struct achievement_data *ad, unsigned int obj_idx, int progress) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_progress_set_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, const struct achievement_data **ad, unsigned int *obj_idx, int *progress);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_progress_set_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_progress_set_pre[hIndex].func;
+ preHookFunc(&sd, &ad, &obj_idx, &progress);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.progress_set(sd, ad, obj_idx, progress);
+ }
+ if (HPMHooks.count.HP_achievement_progress_set_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, const struct achievement_data *ad, unsigned int obj_idx, int progress);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_progress_set_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_progress_set_post[hIndex].func;
+ postHookFunc(sd, ad, obj_idx, progress);
+ }
+ }
+ return;
+}
+bool HP_achievement_check_criteria(const struct achievement_objective *objective, const struct achievement_objective *criteria) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_achievement_check_criteria_pre > 0) {
+ bool (*preHookFunc) (const struct achievement_objective **objective, const struct achievement_objective **criteria);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_check_criteria_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_check_criteria_pre[hIndex].func;
+ retVal___ = preHookFunc(&objective, &criteria);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.check_criteria(objective, criteria);
+ }
+ if (HPMHooks.count.HP_achievement_check_criteria_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const struct achievement_objective *objective, const struct achievement_objective *criteria);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_check_criteria_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_check_criteria_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, objective, criteria);
+ }
+ }
+ return retVal___;
+}
+bool HP_achievement_validate(struct map_session_data *sd, int aid, unsigned int obj_idx, int progress, bool additive) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_achievement_validate_pre > 0) {
+ bool (*preHookFunc) (struct map_session_data **sd, int *aid, unsigned int *obj_idx, int *progress, bool *additive);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, &aid, &obj_idx, &progress, &additive);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.validate(sd, aid, obj_idx, progress, additive);
+ }
+ if (HPMHooks.count.HP_achievement_validate_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int aid, unsigned int obj_idx, int progress, bool additive);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, aid, obj_idx, progress, additive);
+ }
+ }
+ return retVal___;
+}
+int HP_achievement_validate_type(struct map_session_data *sd, enum achievement_types type, const struct achievement_objective *criteria, bool additive) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_achievement_validate_type_pre > 0) {
+ int (*preHookFunc) (struct map_session_data **sd, enum achievement_types *type, const struct achievement_objective **criteria, bool *additive);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_type_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_type_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, &type, &criteria, &additive);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.validate_type(sd, type, criteria, additive);
+ }
+ if (HPMHooks.count.HP_achievement_validate_type_post > 0) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum achievement_types type, const struct achievement_objective *criteria, bool additive);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_type_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_type_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, type, criteria, additive);
+ }
+ }
+ return retVal___;
+}
+void HP_achievement_validate_mob_kill(struct map_session_data *sd, int mob_id) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_mob_kill_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *mob_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_mob_kill_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_mob_kill_pre[hIndex].func;
+ preHookFunc(&sd, &mob_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_mob_kill(sd, mob_id);
+ }
+ if (HPMHooks.count.HP_achievement_validate_mob_kill_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int mob_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_mob_kill_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_mob_kill_post[hIndex].func;
+ postHookFunc(sd, mob_id);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_mob_damage(struct map_session_data *sd, unsigned int damage, bool received) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_mob_damage_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, unsigned int *damage, bool *received);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_mob_damage_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_mob_damage_pre[hIndex].func;
+ preHookFunc(&sd, &damage, &received);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_mob_damage(sd, damage, received);
+ }
+ if (HPMHooks.count.HP_achievement_validate_mob_damage_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned int damage, bool received);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_mob_damage_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_mob_damage_post[hIndex].func;
+ postHookFunc(sd, damage, received);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_pc_kill(struct map_session_data *sd, struct map_session_data *dstsd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_pc_kill_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **dstsd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_pc_kill_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_pc_kill_pre[hIndex].func;
+ preHookFunc(&sd, &dstsd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_pc_kill(sd, dstsd);
+ }
+ if (HPMHooks.count.HP_achievement_validate_pc_kill_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_pc_kill_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_pc_kill_post[hIndex].func;
+ postHookFunc(sd, dstsd);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_pc_damage(struct map_session_data *sd, struct map_session_data *dstsd, unsigned int damage) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_pc_damage_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **dstsd, unsigned int *damage);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_pc_damage_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_pc_damage_pre[hIndex].func;
+ preHookFunc(&sd, &dstsd, &damage);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_pc_damage(sd, dstsd, damage);
+ }
+ if (HPMHooks.count.HP_achievement_validate_pc_damage_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd, unsigned int damage);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_pc_damage_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_pc_damage_post[hIndex].func;
+ postHookFunc(sd, dstsd, damage);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_jobchange(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_jobchange_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_jobchange_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_jobchange_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_jobchange(sd);
+ }
+ if (HPMHooks.count.HP_achievement_validate_jobchange_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_jobchange_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_jobchange_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_stats(struct map_session_data *sd, enum status_point_types stat_type, int progress) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_stats_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, enum status_point_types *stat_type, int *progress);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_stats_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_stats_pre[hIndex].func;
+ preHookFunc(&sd, &stat_type, &progress);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_stats(sd, stat_type, progress);
+ }
+ if (HPMHooks.count.HP_achievement_validate_stats_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, enum status_point_types stat_type, int progress);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_stats_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_stats_post[hIndex].func;
+ postHookFunc(sd, stat_type, progress);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_chatroom_create(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_chatroom_create_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_chatroom_create_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_chatroom_create_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_chatroom_create(sd);
+ }
+ if (HPMHooks.count.HP_achievement_validate_chatroom_create_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_chatroom_create_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_chatroom_create_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_chatroom_members(struct map_session_data *sd, int progress) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_chatroom_members_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *progress);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_chatroom_members_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_chatroom_members_pre[hIndex].func;
+ preHookFunc(&sd, &progress);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_chatroom_members(sd, progress);
+ }
+ if (HPMHooks.count.HP_achievement_validate_chatroom_members_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int progress);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_chatroom_members_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_chatroom_members_post[hIndex].func;
+ postHookFunc(sd, progress);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_friend_add(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_friend_add_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_friend_add_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_friend_add_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_friend_add(sd);
+ }
+ if (HPMHooks.count.HP_achievement_validate_friend_add_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_friend_add_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_friend_add_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_party_create(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_party_create_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_party_create_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_party_create_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_party_create(sd);
+ }
+ if (HPMHooks.count.HP_achievement_validate_party_create_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_party_create_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_party_create_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_marry(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_marry_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_marry_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_marry_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_marry(sd);
+ }
+ if (HPMHooks.count.HP_achievement_validate_marry_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_marry_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_marry_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_adopt(struct map_session_data *sd, bool parent) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_adopt_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, bool *parent);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_adopt_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_adopt_pre[hIndex].func;
+ preHookFunc(&sd, &parent);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_adopt(sd, parent);
+ }
+ if (HPMHooks.count.HP_achievement_validate_adopt_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, bool parent);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_adopt_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_adopt_post[hIndex].func;
+ postHookFunc(sd, parent);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_zeny(struct map_session_data *sd, int amount) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_zeny_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *amount);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_zeny_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_zeny_pre[hIndex].func;
+ preHookFunc(&sd, &amount);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_zeny(sd, amount);
+ }
+ if (HPMHooks.count.HP_achievement_validate_zeny_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int amount);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_zeny_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_zeny_post[hIndex].func;
+ postHookFunc(sd, amount);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_refine(struct map_session_data *sd, unsigned int idx, bool success) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_refine_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, unsigned int *idx, bool *success);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_refine_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_refine_pre[hIndex].func;
+ preHookFunc(&sd, &idx, &success);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_refine(sd, idx, success);
+ }
+ if (HPMHooks.count.HP_achievement_validate_refine_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned int idx, bool success);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_refine_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_refine_post[hIndex].func;
+ postHookFunc(sd, idx, success);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_item_get(struct map_session_data *sd, int nameid, int amount) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_item_get_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *nameid, int *amount);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_item_get_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_item_get_pre[hIndex].func;
+ preHookFunc(&sd, &nameid, &amount);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_item_get(sd, nameid, amount);
+ }
+ if (HPMHooks.count.HP_achievement_validate_item_get_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int nameid, int amount);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_item_get_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_item_get_post[hIndex].func;
+ postHookFunc(sd, nameid, amount);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_item_sell(struct map_session_data *sd, int nameid, int amount) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_item_sell_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *nameid, int *amount);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_item_sell_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_item_sell_pre[hIndex].func;
+ preHookFunc(&sd, &nameid, &amount);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_item_sell(sd, nameid, amount);
+ }
+ if (HPMHooks.count.HP_achievement_validate_item_sell_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int nameid, int amount);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_item_sell_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_item_sell_post[hIndex].func;
+ postHookFunc(sd, nameid, amount);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_achieve(struct map_session_data *sd, int achid) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_achieve_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *achid);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_achieve_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_achieve_pre[hIndex].func;
+ preHookFunc(&sd, &achid);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_achieve(sd, achid);
+ }
+ if (HPMHooks.count.HP_achievement_validate_achieve_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int achid);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_achieve_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_achieve_post[hIndex].func;
+ postHookFunc(sd, achid);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_taming(struct map_session_data *sd, int class) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_taming_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *class);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_taming_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_taming_pre[hIndex].func;
+ preHookFunc(&sd, &class);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_taming(sd, class);
+ }
+ if (HPMHooks.count.HP_achievement_validate_taming_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int class);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_taming_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_taming_post[hIndex].func;
+ postHookFunc(sd, class);
+ }
+ }
+ return;
+}
+void HP_achievement_validate_achievement_rank(struct map_session_data *sd, int rank) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_validate_achievement_rank_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *rank);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_achievement_rank_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_validate_achievement_rank_pre[hIndex].func;
+ preHookFunc(&sd, &rank);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.validate_achievement_rank(sd, rank);
+ }
+ if (HPMHooks.count.HP_achievement_validate_achievement_rank_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int rank);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_achievement_rank_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_validate_achievement_rank_post[hIndex].func;
+ postHookFunc(sd, rank);
+ }
+ }
+ return;
+}
+bool HP_achievement_type_requires_criteria(enum achievement_types type) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_achievement_type_requires_criteria_pre > 0) {
+ bool (*preHookFunc) (enum achievement_types *type);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_type_requires_criteria_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_type_requires_criteria_pre[hIndex].func;
+ retVal___ = preHookFunc(&type);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.type_requires_criteria(type);
+ }
+ if (HPMHooks.count.HP_achievement_type_requires_criteria_post > 0) {
+ bool (*postHookFunc) (bool retVal___, enum achievement_types type);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_type_requires_criteria_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_type_requires_criteria_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, type);
+ }
+ }
+ return retVal___;
+}
+void HP_achievement_init_titles(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_init_titles_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_init_titles_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_init_titles_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.init_titles(sd);
+ }
+ if (HPMHooks.count.HP_achievement_init_titles_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_init_titles_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_init_titles_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+bool HP_achievement_check_title(struct map_session_data *sd, int title_id) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_achievement_check_title_pre > 0) {
+ bool (*preHookFunc) (struct map_session_data **sd, int *title_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_check_title_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_check_title_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, &title_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.achievement.check_title(sd, title_id);
+ }
+ if (HPMHooks.count.HP_achievement_check_title_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int title_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_check_title_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_check_title_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, title_id);
+ }
+ }
+ return retVal___;
+}
+void HP_achievement_get_rewards(struct map_session_data *sd, const struct achievement_data *ad) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_achievement_get_rewards_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, const struct achievement_data **ad);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_rewards_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_achievement_get_rewards_pre[hIndex].func;
+ preHookFunc(&sd, &ad);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.achievement.get_rewards(sd, ad);
+ }
+ if (HPMHooks.count.HP_achievement_get_rewards_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, const struct achievement_data *ad);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_rewards_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_achievement_get_rewards_post[hIndex].func;
+ postHookFunc(sd, ad);
+ }
+ }
+ return;
+}
/* atcommand_interface */
void HP_atcommand_init(bool minimal) {
int hIndex = 0;
@@ -19256,6 +20635,162 @@ unsigned char HP_clif_bl_type(struct block_list *bl) {
}
return retVal___;
}
+void HP_clif_achievement_send_list(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_achievement_send_list_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_achievement_send_list_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_achievement_send_list_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.achievement_send_list(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_achievement_send_list_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_achievement_send_list_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_achievement_send_list_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_achievement_send_update(int fd, struct map_session_data *sd, const struct achievement_data *ad) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_achievement_send_update_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd, const struct achievement_data **ad);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_achievement_send_update_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_achievement_send_update_pre[hIndex].func;
+ preHookFunc(&fd, &sd, &ad);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.achievement_send_update(fd, sd, ad);
+ }
+ if (HPMHooks.count.HP_clif_achievement_send_update_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd, const struct achievement_data *ad);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_achievement_send_update_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_achievement_send_update_post[hIndex].func;
+ postHookFunc(fd, sd, ad);
+ }
+ }
+ return;
+}
+void HP_clif_pAchievementGetReward(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pAchievementGetReward_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAchievementGetReward_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pAchievementGetReward_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pAchievementGetReward(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pAchievementGetReward_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAchievementGetReward_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pAchievementGetReward_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_achievement_reward_ack(int fd, struct map_session_data *sd, const struct achievement_data *ad) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_achievement_reward_ack_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd, const struct achievement_data **ad);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_achievement_reward_ack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_achievement_reward_ack_pre[hIndex].func;
+ preHookFunc(&fd, &sd, &ad);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.achievement_reward_ack(fd, sd, ad);
+ }
+ if (HPMHooks.count.HP_clif_achievement_reward_ack_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd, const struct achievement_data *ad);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_achievement_reward_ack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_achievement_reward_ack_post[hIndex].func;
+ postHookFunc(fd, sd, ad);
+ }
+ }
+ return;
+}
+void HP_clif_change_title_ack(int fd, struct map_session_data *sd, int title_id) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_change_title_ack_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd, int *title_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_change_title_ack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_change_title_ack_pre[hIndex].func;
+ preHookFunc(&fd, &sd, &title_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.change_title_ack(fd, sd, title_id);
+ }
+ if (HPMHooks.count.HP_clif_change_title_ack_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd, int title_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_change_title_ack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_change_title_ack_post[hIndex].func;
+ postHookFunc(fd, sd, title_id);
+ }
+ }
+ return;
+}
+void HP_clif_pChangeTitle(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pChangeTitle_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeTitle_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pChangeTitle_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pChangeTitle(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pChangeTitle_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeTitle_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pChangeTitle_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
void HP_clif_pWantToConnection(int fd, struct map_session_data *sd) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_pWantToConnection_pre > 0) {
@@ -35627,6 +37162,58 @@ int HP_intif_CheckForCharServer(void) {
}
return retVal___;
}
+void HP_intif_achievements_request(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_intif_achievements_request_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_achievements_request_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_intif_achievements_request_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.achievements_request(sd);
+ }
+ if (HPMHooks.count.HP_intif_achievements_request_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_achievements_request_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_intif_achievements_request_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_intif_achievements_save(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_intif_achievements_save_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_achievements_save_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_intif_achievements_save_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.achievements_save(sd);
+ }
+ if (HPMHooks.count.HP_intif_achievements_save_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_achievements_save_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_intif_achievements_save_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
void HP_intif_pWisMessage(int fd) {
int hIndex = 0;
if (HPMHooks.count.HP_intif_pWisMessage_pre > 0) {
@@ -37428,6 +39015,32 @@ void HP_intif_pRecvClanMemberAction(int fd) {
}
return;
}
+void HP_intif_pAchievementsLoad(int fd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_intif_pAchievementsLoad_pre > 0) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAchievementsLoad_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_intif_pAchievementsLoad_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pAchievementsLoad(fd);
+ }
+ if (HPMHooks.count.HP_intif_pAchievementsLoad_post > 0) {
+ void (*postHookFunc) (int fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAchievementsLoad_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_intif_pAchievementsLoad_post[hIndex].func;
+ postHookFunc(fd);
+ }
+ }
+ return;
+}
/* irc_bot_interface */
void HP_ircbot_init(bool minimal) {
int hIndex = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.sources.inc b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
index e6f305726..151a5d8a1 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
@@ -26,6 +26,7 @@
/* GENERATED FILE DO NOT EDIT */
HPMHooks.source.HCache = *HCache;
+HPMHooks.source.achievement = *achievement;
HPMHooks.source.atcommand = *atcommand;
HPMHooks.source.battle = *battle;
HPMHooks.source.bg = *bg;