diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking.c | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Defs.inc | 328 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc | 49 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc | 15 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | 337 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.sources.inc | 1 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 353 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 89 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 2552 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.sources.inc | 1 | ||||
-rw-r--r-- | src/plugins/Makefile.in | 2 | ||||
-rw-r--r-- | src/plugins/constdb2doc.c | 2 | ||||
-rw-r--r-- | src/plugins/db2sql.c | 4 | ||||
-rw-r--r-- | src/plugins/script_mapquit.c | 2 |
14 files changed, 3525 insertions, 214 deletions
diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c index e3b694c2b..b477cb5c3 100644 --- a/src/plugins/HPMHooking.c +++ b/src/plugins/HPMHooking.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2018 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -48,6 +48,7 @@ PRAGMA_GCC5(GCC diagnostic ignored "-Wdiscarded-qualifiers") #define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking_char.sources.inc" #include "char/char.h" #include "char/geoip.h" +#include "char/int_achievement.h" #include "char/int_auction.h" #include "char/int_clan.h" #include "char/int_elemental.h" @@ -71,6 +72,7 @@ PRAGMA_GCC5(GCC diagnostic ignored "-Wdiscarded-qualifiers") #define HPM_HOOKS_INCLUDE "HPMHooking/HPMHooking_map.Hooks.inc" #define HPM_POINTS_INCLUDE "HPMHooking/HPMHooking_map.HookingPoints.inc" #define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking_map.sources.inc" +#include "map/achievement.h" #include "map/atcommand.h" #include "map/battle.h" #include "map/battleground.h" diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 691401277..c5de44fa9 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); @@ -330,16 +436,16 @@ typedef void (*HPMHOOK_post_bg_config_read) (void); #ifdef MAP_BUYINGSTORE_H /* buyingstore */ typedef bool (*HPMHOOK_pre_buyingstore_setup) (struct map_session_data **sd, unsigned char *slots); typedef bool (*HPMHOOK_post_buyingstore_setup) (bool retVal___, struct map_session_data *sd, unsigned char slots); -typedef void (*HPMHOOK_pre_buyingstore_create) (struct map_session_data **sd, int *zenylimit, unsigned char *result, const char **storename, const uint8 **itemlist, unsigned int *count); -typedef void (*HPMHOOK_post_buyingstore_create) (struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const uint8 *itemlist, unsigned int count); +typedef void (*HPMHOOK_pre_buyingstore_create) (struct map_session_data **sd, int *zenylimit, unsigned char *result, const char **storename, const struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub **itemlist, unsigned int *count); +typedef void (*HPMHOOK_post_buyingstore_create) (struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub *itemlist, unsigned int count); typedef void (*HPMHOOK_pre_buyingstore_close) (struct map_session_data **sd); typedef void (*HPMHOOK_post_buyingstore_close) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_buyingstore_open) (struct map_session_data **sd, int *account_id); typedef void (*HPMHOOK_post_buyingstore_open) (struct map_session_data *sd, int account_id); -typedef void (*HPMHOOK_pre_buyingstore_trade) (struct map_session_data **sd, int *account_id, unsigned int *buyer_id, const uint8 **itemlist, unsigned int *count); -typedef void (*HPMHOOK_post_buyingstore_trade) (struct map_session_data *sd, int account_id, unsigned int buyer_id, const uint8 *itemlist, unsigned int count); -typedef bool (*HPMHOOK_pre_buyingstore_search) (struct map_session_data **sd, unsigned short *nameid); -typedef bool (*HPMHOOK_post_buyingstore_search) (bool retVal___, struct map_session_data *sd, unsigned short nameid); +typedef void (*HPMHOOK_pre_buyingstore_trade) (struct map_session_data **sd, int *account_id, unsigned int *buyer_id, const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub **itemlist, unsigned int *count); +typedef void (*HPMHOOK_post_buyingstore_trade) (struct map_session_data *sd, int account_id, unsigned int buyer_id, const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub *itemlist, unsigned int count); +typedef bool (*HPMHOOK_pre_buyingstore_search) (struct map_session_data **sd, int *nameid); +typedef bool (*HPMHOOK_post_buyingstore_search) (bool retVal___, struct map_session_data *sd, int nameid); typedef bool (*HPMHOOK_pre_buyingstore_searchall) (struct map_session_data **sd, const struct s_search_store_search **s); typedef bool (*HPMHOOK_post_buyingstore_searchall) (bool retVal___, struct map_session_data *sd, const struct s_search_store_search *s); typedef unsigned int (*HPMHOOK_pre_buyingstore_getuid) (void); @@ -1010,6 +1116,8 @@ typedef void (*HPMHOOK_pre_clif_delitem) (struct map_session_data **sd, int *n, typedef void (*HPMHOOK_post_clif_delitem) (struct map_session_data *sd, int n, int amount, short reason); typedef void (*HPMHOOK_pre_clif_takeitem) (struct block_list **src, struct block_list **dst); typedef void (*HPMHOOK_post_clif_takeitem) (struct block_list *src, struct block_list *dst); +typedef void (*HPMHOOK_pre_clif_item_movefailed) (struct map_session_data **sd, int *n); +typedef void (*HPMHOOK_post_clif_item_movefailed) (struct map_session_data *sd, int n); typedef void (*HPMHOOK_pre_clif_item_equip) (short *idx, struct EQUIPITEM_INFO **p, struct item **i, struct item_data **id, int *eqp_pos); typedef void (*HPMHOOK_post_clif_item_equip) (short idx, struct EQUIPITEM_INFO *p, struct item *i, struct item_data *id, int eqp_pos); typedef void (*HPMHOOK_pre_clif_item_normal) (short *idx, struct NORMALITEM_INFO **p, struct item **i, struct item_data **id); @@ -1030,10 +1138,8 @@ typedef void (*HPMHOOK_pre_clif_unequipitemack) (struct map_session_data **sd, i typedef void (*HPMHOOK_post_clif_unequipitemack) (struct map_session_data *sd, int n, int pos, enum e_UNEQUIP_ITEM_ACK result); typedef void (*HPMHOOK_pre_clif_useitemack) (struct map_session_data **sd, int *index, int *amount, bool *ok); typedef void (*HPMHOOK_post_clif_useitemack) (struct map_session_data *sd, int index, int amount, bool ok); -typedef void (*HPMHOOK_pre_clif_addcards) (unsigned char **buf, struct item **item); -typedef void (*HPMHOOK_post_clif_addcards) (unsigned char *buf, struct item *item); -typedef void (*HPMHOOK_pre_clif_addcards2) (unsigned short **cards, struct item **item); -typedef void (*HPMHOOK_post_clif_addcards2) (unsigned short *cards, struct item *item); +typedef void (*HPMHOOK_pre_clif_addcards) (struct EQUIPSLOTINFO **buf, struct item **item); +typedef void (*HPMHOOK_post_clif_addcards) (struct EQUIPSLOTINFO *buf, struct item *item); typedef void (*HPMHOOK_pre_clif_item_sub) (unsigned char **buf, int *n, struct item **i, struct item_data **id, int *equip); typedef void (*HPMHOOK_post_clif_item_sub) (unsigned char *buf, int n, struct item *i, struct item_data *id, int equip); typedef void (*HPMHOOK_pre_clif_getareachar_item) (struct map_session_data **sd, struct flooritem_data **fitem); @@ -1042,10 +1148,12 @@ typedef void (*HPMHOOK_pre_clif_cart_additem_ack) (struct map_session_data **sd, typedef void (*HPMHOOK_post_clif_cart_additem_ack) (struct map_session_data *sd, int flag); typedef void (*HPMHOOK_pre_clif_cashshop_load) (void); typedef void (*HPMHOOK_post_clif_cashshop_load) (void); -typedef void (*HPMHOOK_pre_clif_package_announce) (struct map_session_data **sd, unsigned short *nameid, unsigned short *containerid); -typedef void (*HPMHOOK_post_clif_package_announce) (struct map_session_data *sd, unsigned short nameid, unsigned short containerid); -typedef void (*HPMHOOK_pre_clif_item_drop_announce) (struct map_session_data **sd, unsigned short *nameid, char **monsterName); -typedef void (*HPMHOOK_post_clif_item_drop_announce) (struct map_session_data *sd, unsigned short nameid, char *monsterName); +typedef void (*HPMHOOK_pre_clif_cashShopSchedule) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_cashShopSchedule) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_package_announce) (struct map_session_data **sd, int *nameid, int *containerid); +typedef void (*HPMHOOK_post_clif_package_announce) (struct map_session_data *sd, int nameid, int containerid); +typedef void (*HPMHOOK_pre_clif_item_drop_announce) (struct map_session_data **sd, int *nameid, char **monsterName); +typedef void (*HPMHOOK_post_clif_item_drop_announce) (struct map_session_data *sd, int nameid, char *monsterName); typedef void (*HPMHOOK_pre_clif_clearunit_single) (int *id, clr_type *type, int *fd); typedef void (*HPMHOOK_post_clif_clearunit_single) (int id, clr_type type, int fd); typedef void (*HPMHOOK_pre_clif_clearunit_area) (struct block_list **bl, clr_type *type); @@ -1122,8 +1230,8 @@ typedef void (*HPMHOOK_pre_clif_map_type) (struct map_session_data **sd, enum ma typedef void (*HPMHOOK_post_clif_map_type) (struct map_session_data *sd, enum map_type type); typedef void (*HPMHOOK_pre_clif_maptypeproperty2) (struct block_list **bl, enum send_target *t); typedef void (*HPMHOOK_post_clif_maptypeproperty2) (struct block_list *bl, enum send_target t); -typedef void (*HPMHOOK_pre_clif_changemapserver) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port); -typedef void (*HPMHOOK_post_clif_changemapserver) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port); +typedef void (*HPMHOOK_pre_clif_changemapserver) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port, char **dnsHost); +typedef void (*HPMHOOK_post_clif_changemapserver) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port, char *dnsHost); typedef void (*HPMHOOK_pre_clif_changemapserver_airship) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port); typedef void (*HPMHOOK_post_clif_changemapserver_airship) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port); typedef void (*HPMHOOK_pre_clif_npcbuysell) (struct map_session_data **sd, int *id); @@ -1192,8 +1300,8 @@ typedef int (*HPMHOOK_pre_clif_outsight) (struct block_list **bl, va_list ap); typedef int (*HPMHOOK_post_clif_outsight) (int retVal___, struct block_list *bl, va_list ap); typedef void (*HPMHOOK_pre_clif_skillcastcancel) (struct block_list **bl); typedef void (*HPMHOOK_post_clif_skillcastcancel) (struct block_list *bl); -typedef void (*HPMHOOK_pre_clif_skill_fail) (struct map_session_data **sd, uint16 *skill_id, enum useskill_fail_cause *cause, int *btype); -typedef void (*HPMHOOK_post_clif_skill_fail) (struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype); +typedef void (*HPMHOOK_pre_clif_skill_fail) (struct map_session_data **sd, uint16 *skill_id, enum useskill_fail_cause *cause, int *btype, int32 *item_id); +typedef void (*HPMHOOK_post_clif_skill_fail) (struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype, int32 item_id); typedef void (*HPMHOOK_pre_clif_skill_cooldown) (struct map_session_data **sd, uint16 *skill_id, unsigned int *duration); typedef void (*HPMHOOK_post_clif_skill_cooldown) (struct map_session_data *sd, uint16 skill_id, unsigned int duration); typedef void (*HPMHOOK_pre_clif_skill_memomessage) (struct map_session_data **sd, int *type); @@ -1256,8 +1364,8 @@ typedef int (*HPMHOOK_pre_clif_hpmeter_sub) (struct block_list **bl, va_list ap) typedef int (*HPMHOOK_post_clif_hpmeter_sub) (int retVal___, struct block_list *bl, va_list ap); typedef void (*HPMHOOK_pre_clif_upgrademessage) (int *fd, int *result, int *item_id); typedef void (*HPMHOOK_post_clif_upgrademessage) (int fd, int result, int item_id); -typedef void (*HPMHOOK_pre_clif_get_weapon_view) (struct map_session_data **sd, unsigned short **rhand, unsigned short **lhand); -typedef void (*HPMHOOK_post_clif_get_weapon_view) (struct map_session_data *sd, unsigned short *rhand, unsigned short *lhand); +typedef void (*HPMHOOK_pre_clif_get_weapon_view) (struct map_session_data **sd, int **rhand, int **lhand); +typedef void (*HPMHOOK_post_clif_get_weapon_view) (struct map_session_data *sd, int *rhand, int *lhand); typedef void (*HPMHOOK_pre_clif_gospel_info) (struct map_session_data **sd, int *type); typedef void (*HPMHOOK_post_clif_gospel_info) (struct map_session_data *sd, int type); typedef void (*HPMHOOK_pre_clif_feel_req) (int *fd, struct map_session_data **sd, uint16 *skill_lv); @@ -1460,6 +1568,8 @@ typedef void (*HPMHOOK_pre_clif_msgtable_skill) (struct map_session_data **sd, u typedef void (*HPMHOOK_post_clif_msgtable_skill) (struct map_session_data *sd, uint16 skill_id, enum clif_messages msg_id); typedef void (*HPMHOOK_pre_clif_msgtable_str) (struct map_session_data **sd, enum clif_messages *p1, const char **value); typedef void (*HPMHOOK_post_clif_msgtable_str) (struct map_session_data *sd, enum clif_messages p1, const char *value); +typedef void (*HPMHOOK_pre_clif_msgtable_str_color) (struct map_session_data **sd, enum clif_messages *p1, const char **value, uint32 *color); +typedef void (*HPMHOOK_post_clif_msgtable_str_color) (struct map_session_data *sd, enum clif_messages p1, const char *value, uint32 color); typedef void (*HPMHOOK_pre_clif_msgtable_color) (struct map_session_data **sd, enum clif_messages *p1, uint32 *color); typedef void (*HPMHOOK_post_clif_msgtable_color) (struct map_session_data *sd, enum clif_messages p1, uint32 color); typedef void (*HPMHOOK_pre_clif_message) (const int *fd, const char **mes); @@ -1506,6 +1616,8 @@ typedef void (*HPMHOOK_pre_clif_buyvending) (struct map_session_data **sd, int * typedef void (*HPMHOOK_post_clif_buyvending) (struct map_session_data *sd, int index, int amount, int fail); typedef void (*HPMHOOK_pre_clif_openvending) (struct map_session_data **sd, int *id, struct s_vending **vending_list); typedef void (*HPMHOOK_post_clif_openvending) (struct map_session_data *sd, int id, struct s_vending *vending_list); +typedef void (*HPMHOOK_pre_clif_openvendingAck) (int *fd, int *result); +typedef void (*HPMHOOK_post_clif_openvendingAck) (int fd, int result); typedef void (*HPMHOOK_pre_clif_vendingreport) (struct map_session_data **sd, int *index, int *amount, uint32 *char_id, int *zeny); typedef void (*HPMHOOK_post_clif_vendingreport) (struct map_session_data *sd, int index, int amount, uint32 char_id, int zeny); typedef void (*HPMHOOK_pre_clif_storagelist) (struct map_session_data **sd, struct item **items, int *items_length); @@ -1582,10 +1694,10 @@ typedef void (*HPMHOOK_pre_clif_guild_invite) (struct map_session_data **sd, str typedef void (*HPMHOOK_post_clif_guild_invite) (struct map_session_data *sd, struct guild *g); typedef void (*HPMHOOK_pre_clif_guild_inviteack) (struct map_session_data **sd, int *flag); typedef void (*HPMHOOK_post_clif_guild_inviteack) (struct map_session_data *sd, int flag); -typedef void (*HPMHOOK_pre_clif_guild_leave) (struct map_session_data **sd, const char **name, const char **mes); -typedef void (*HPMHOOK_post_clif_guild_leave) (struct map_session_data *sd, const char *name, const char *mes); -typedef void (*HPMHOOK_pre_clif_guild_expulsion) (struct map_session_data **sd, const char **name, const char **mes, int *account_id); -typedef void (*HPMHOOK_post_clif_guild_expulsion) (struct map_session_data *sd, const char *name, const char *mes, int account_id); +typedef void (*HPMHOOK_pre_clif_guild_leave) (struct map_session_data **sd, const char **name, int *char_id, const char **mes); +typedef void (*HPMHOOK_post_clif_guild_leave) (struct map_session_data *sd, const char *name, int char_id, const char *mes); +typedef void (*HPMHOOK_pre_clif_guild_expulsion) (struct map_session_data **sd, const char **name, int *char_id, const char **mes, int *account_id); +typedef void (*HPMHOOK_post_clif_guild_expulsion) (struct map_session_data *sd, const char *name, int char_id, const char *mes, int account_id); typedef void (*HPMHOOK_pre_clif_guild_positionchanged) (struct guild **g, int *idx); typedef void (*HPMHOOK_post_clif_guild_positionchanged) (struct guild *g, int idx); typedef void (*HPMHOOK_pre_clif_guild_memberpositionchanged) (struct guild **g, int *idx); @@ -1620,6 +1732,10 @@ typedef void (*HPMHOOK_pre_clif_guild_positioninfolist) (struct map_session_data typedef void (*HPMHOOK_post_clif_guild_positioninfolist) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_guild_expulsionlist) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_guild_expulsionlist) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_set_position) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_set_position) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_position_selected) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_position_selected) (struct map_session_data *sd); typedef bool (*HPMHOOK_pre_clif_validate_emblem) (const uint8 **emblem, unsigned long *emblem_len); typedef bool (*HPMHOOK_post_clif_validate_emblem) (bool retVal___, const uint8 *emblem, unsigned long emblem_len); typedef void (*HPMHOOK_pre_clif_bg_hp) (struct map_session_data **sd); @@ -1798,12 +1914,12 @@ typedef void (*HPMHOOK_pre_clif_buyingstore_itemlist) (struct map_session_data * typedef void (*HPMHOOK_post_clif_buyingstore_itemlist) (struct map_session_data *sd, struct map_session_data *pl_sd); typedef void (*HPMHOOK_pre_clif_buyingstore_trade_failed_buyer) (struct map_session_data **sd, short *result); typedef void (*HPMHOOK_post_clif_buyingstore_trade_failed_buyer) (struct map_session_data *sd, short result); -typedef void (*HPMHOOK_pre_clif_buyingstore_update_item) (struct map_session_data **sd, unsigned short *nameid, unsigned short *amount, uint32 *char_id, int *zeny); -typedef void (*HPMHOOK_post_clif_buyingstore_update_item) (struct map_session_data *sd, unsigned short nameid, unsigned short amount, uint32 char_id, int zeny); +typedef void (*HPMHOOK_pre_clif_buyingstore_update_item) (struct map_session_data **sd, int *nameid, unsigned short *amount, uint32 *char_id, int *zeny); +typedef void (*HPMHOOK_post_clif_buyingstore_update_item) (struct map_session_data *sd, int nameid, unsigned short amount, uint32 char_id, int zeny); typedef void (*HPMHOOK_pre_clif_buyingstore_delete_item) (struct map_session_data **sd, short *index, unsigned short *amount, int *price); typedef void (*HPMHOOK_post_clif_buyingstore_delete_item) (struct map_session_data *sd, short index, unsigned short amount, int price); -typedef void (*HPMHOOK_pre_clif_buyingstore_trade_failed_seller) (struct map_session_data **sd, short *result, unsigned short *nameid); -typedef void (*HPMHOOK_post_clif_buyingstore_trade_failed_seller) (struct map_session_data *sd, short result, unsigned short nameid); +typedef void (*HPMHOOK_pre_clif_buyingstore_trade_failed_seller) (struct map_session_data **sd, short *result, int *nameid); +typedef void (*HPMHOOK_post_clif_buyingstore_trade_failed_seller) (struct map_session_data *sd, short result, int nameid); typedef void (*HPMHOOK_pre_clif_search_store_info_ack) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_search_store_info_ack) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_search_store_info_failed) (struct map_session_data **sd, unsigned char *reason); @@ -1866,8 +1982,8 @@ typedef void (*HPMHOOK_pre_clif_npc_market_purchase_ack) (struct map_session_dat typedef void (*HPMHOOK_post_clif_npc_market_purchase_ack) (struct map_session_data *sd, const struct itemlist *item_list, unsigned char response); typedef bool (*HPMHOOK_pre_clif_parse_roulette_db) (void); typedef bool (*HPMHOOK_post_clif_parse_roulette_db) (bool retVal___); -typedef void (*HPMHOOK_pre_clif_roulette_generate_ack) (struct map_session_data **sd, unsigned char *result, short *stage, short *prizeIdx, short *bonusItemID); -typedef void (*HPMHOOK_post_clif_roulette_generate_ack) (struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, short bonusItemID); +typedef void (*HPMHOOK_pre_clif_roulette_generate_ack) (struct map_session_data **sd, unsigned char *result, short *stage, short *prizeIdx, int *bonusItemID); +typedef void (*HPMHOOK_post_clif_roulette_generate_ack) (struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, int bonusItemID); typedef void (*HPMHOOK_pre_clif_openmergeitem) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_openmergeitem) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_cancelmergeitem) (int *fd, struct map_session_data **sd); @@ -1882,6 +1998,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); @@ -2358,8 +2486,8 @@ typedef void (*HPMHOOK_pre_clif_rodex_open_write_mail) (int *fd, const char **re typedef void (*HPMHOOK_post_clif_rodex_open_write_mail) (int fd, const char *receiver_name, int8 result); typedef void (*HPMHOOK_pre_clif_pRodexAddItem) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pRodexAddItem) (int fd, struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_rodex_add_item_result) (struct map_session_data **sd, int16 *idx, int16 *amount, int8 *result); -typedef void (*HPMHOOK_post_clif_rodex_add_item_result) (struct map_session_data *sd, int16 idx, int16 amount, int8 result); +typedef void (*HPMHOOK_pre_clif_rodex_add_item_result) (struct map_session_data **sd, int16 *idx, int16 *amount, enum rodex_add_item *result); +typedef void (*HPMHOOK_post_clif_rodex_add_item_result) (struct map_session_data *sd, int16 idx, int16 amount, enum rodex_add_item result); typedef void (*HPMHOOK_pre_clif_pRodexRemoveItem) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pRodexRemoveItem) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_rodex_remove_item_result) (struct map_session_data **sd, int16 *idx, int16 *amount); @@ -2398,12 +2526,12 @@ typedef void (*HPMHOOK_pre_clif_pRodexRefreshMaillist) (int *fd, struct map_sess typedef void (*HPMHOOK_post_clif_pRodexRefreshMaillist) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pRodexRequestZeny) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pRodexRequestZeny) (int fd, struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_rodex_request_zeny) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, int8 *result); -typedef void (*HPMHOOK_post_clif_rodex_request_zeny) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result); +typedef void (*HPMHOOK_pre_clif_rodex_request_zeny) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, enum rodex_get_zeny *result); +typedef void (*HPMHOOK_post_clif_rodex_request_zeny) (struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_zeny result); typedef void (*HPMHOOK_pre_clif_pRodexRequestItems) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pRodexRequestItems) (int fd, struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_rodex_request_items) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, int8 *result); -typedef void (*HPMHOOK_post_clif_rodex_request_items) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result); +typedef void (*HPMHOOK_pre_clif_rodex_request_items) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, enum rodex_get_items *result); +typedef void (*HPMHOOK_post_clif_rodex_request_items) (struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_items result); typedef void (*HPMHOOK_pre_clif_rodex_icon) (int *fd, bool *show); typedef void (*HPMHOOK_post_clif_rodex_icon) (int fd, bool show); typedef void (*HPMHOOK_pre_clif_skill_scale) (struct block_list **bl, int *src_id, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *casttime); @@ -2422,6 +2550,10 @@ typedef void (*HPMHOOK_pre_clif_hat_effect) (struct block_list **bl, struct bloc typedef void (*HPMHOOK_post_clif_hat_effect) (struct block_list *bl, struct block_list *tbl, enum send_target target); typedef void (*HPMHOOK_pre_clif_hat_effect_single) (struct block_list **bl, uint16 *effectId, bool *enable); typedef void (*HPMHOOK_post_clif_hat_effect_single) (struct block_list *bl, uint16 effectId, bool enable); +typedef void (*HPMHOOK_pre_clif_overweight_percent) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_overweight_percent) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pChangeDress) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pChangeDress) (int fd, struct map_session_data *sd); typedef bool (*HPMHOOK_pre_clif_pAttendanceDB) (void); typedef bool (*HPMHOOK_post_clif_pAttendanceDB) (bool retVal___); typedef bool (*HPMHOOK_pre_clif_attendancedb_libconfig_sub) (struct config_setting_t **it, int *n, const char **source); @@ -2452,10 +2584,12 @@ typedef bool (*HPMHOOK_pre_clif_stylist_read_db_libconfig_sub) (struct config_se typedef bool (*HPMHOOK_post_clif_stylist_read_db_libconfig_sub) (bool retVal___, struct config_setting_t *it, int idx, const char *source); typedef bool (*HPMHOOK_pre_clif_style_change_validate_requirements) (struct map_session_data **sd, int *type, int16 *idx); typedef bool (*HPMHOOK_post_clif_style_change_validate_requirements) (bool retVal___, struct map_session_data *sd, int type, int16 idx); -typedef void (*HPMHOOK_pre_clif_stylist_send_rodexitem) (struct map_session_data **sd, int16 *itemid); -typedef void (*HPMHOOK_post_clif_stylist_send_rodexitem) (struct map_session_data *sd, int16 itemid); +typedef void (*HPMHOOK_pre_clif_stylist_send_rodexitem) (struct map_session_data **sd, int *itemid); +typedef void (*HPMHOOK_post_clif_stylist_send_rodexitem) (struct map_session_data *sd, int itemid); typedef void (*HPMHOOK_pre_clif_pReqStyleChange) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pReqStyleChange) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pReqStyleChange2) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pReqStyleChange2) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_cz_req_style_change_sub) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem); typedef void (*HPMHOOK_post_clif_cz_req_style_change_sub) (struct map_session_data *sd, int type, int16 idx, bool isitem); typedef void (*HPMHOOK_pre_clif_style_change_response) (struct map_session_data **sd, enum stylist_shop *flag); @@ -2464,6 +2598,8 @@ typedef void (*HPMHOOK_pre_clif_pPetEvolution) (int *fd, struct map_session_data typedef void (*HPMHOOK_post_clif_pPetEvolution) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_petEvolutionResult) (int *fd, enum pet_evolution_result *result); typedef void (*HPMHOOK_post_clif_petEvolutionResult) (int fd, enum pet_evolution_result result); +typedef void (*HPMHOOK_pre_clif_party_dead_notification) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_party_dead_notification) (struct map_session_data *sd); #endif // MAP_CLIF_H #ifdef COMMON_CORE_H /* cmdline */ typedef void (*HPMHOOK_pre_cmdline_init) (void); @@ -2991,6 +3127,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); @@ -3278,8 +3430,8 @@ typedef int (*HPMHOOK_pre_inter_pet_delete_) (int *pet_id); typedef int (*HPMHOOK_post_inter_pet_delete_) (int retVal___, int pet_id); typedef int (*HPMHOOK_pre_inter_pet_parse_frommap) (int *fd); typedef int (*HPMHOOK_post_inter_pet_parse_frommap) (int retVal___, int fd); -typedef struct s_pet* (*HPMHOOK_pre_inter_pet_create) (int *account_id, int *char_id, short *pet_class, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name); -typedef struct s_pet* (*HPMHOOK_post_inter_pet_create) (struct s_pet* retVal___, int account_id, int char_id, short pet_class, short pet_lv, short pet_egg_id, short pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name); +typedef struct s_pet* (*HPMHOOK_pre_inter_pet_create) (int *account_id, int *char_id, short *pet_class, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name); +typedef struct s_pet* (*HPMHOOK_post_inter_pet_create) (struct s_pet* retVal___, int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name); typedef struct s_pet* (*HPMHOOK_pre_inter_pet_load) (int *account_id, int *char_id, int *pet_id); typedef struct s_pet* (*HPMHOOK_post_inter_pet_load) (struct s_pet* retVal___, int account_id, int char_id, int pet_id); #endif // CHAR_INT_PET_H @@ -3340,8 +3492,8 @@ typedef bool (*HPMHOOK_post_inter_storage_retrieve_bound_items) (bool retVal___, #ifdef MAP_INTIF_H /* intif */ typedef int (*HPMHOOK_pre_intif_parse) (int *fd); typedef int (*HPMHOOK_post_intif_parse) (int retVal___, int fd); -typedef int (*HPMHOOK_pre_intif_create_pet) (int *account_id, int *char_id, short *pet_type, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name); -typedef int (*HPMHOOK_post_intif_create_pet) (int retVal___, int account_id, int char_id, short pet_type, short pet_lv, short pet_egg_id, short pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name); +typedef int (*HPMHOOK_pre_intif_create_pet) (int *account_id, int *char_id, short *pet_type, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name); +typedef int (*HPMHOOK_post_intif_create_pet) (int retVal___, int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name); typedef int (*HPMHOOK_pre_intif_broadcast) (const char **mes, int *len, int *type); typedef int (*HPMHOOK_post_intif_broadcast) (int retVal___, const char *mes, int len, int type); typedef int (*HPMHOOK_pre_intif_broadcast2) (const char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY); @@ -3494,6 +3646,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); @@ -3632,6 +3788,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); @@ -3814,8 +3972,8 @@ typedef int (*HPMHOOK_pre_itemdb_options_final_sub) (union DBKey *key, struct DB typedef int (*HPMHOOK_post_itemdb_options_final_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); typedef void (*HPMHOOK_pre_itemdb_clear) (bool *total); typedef void (*HPMHOOK_post_itemdb_clear) (bool total); -typedef struct item_combo* (*HPMHOOK_pre_itemdb_id2combo) (unsigned short *id); -typedef struct item_combo* (*HPMHOOK_post_itemdb_id2combo) (struct item_combo* retVal___, unsigned short id); +typedef struct item_combo* (*HPMHOOK_pre_itemdb_id2combo) (int *id); +typedef struct item_combo* (*HPMHOOK_post_itemdb_id2combo) (struct item_combo* retVal___, int id); typedef bool (*HPMHOOK_pre_itemdb_is_item_usable) (struct item_data **item); typedef bool (*HPMHOOK_post_itemdb_is_item_usable) (bool retVal___, struct item_data *item); typedef bool (*HPMHOOK_pre_itemdb_lookup_const) (const struct config_setting_t **it, const char **name, int **value); @@ -4502,8 +4660,8 @@ typedef int (*HPMHOOK_pre_map_sql_close) (void); typedef int (*HPMHOOK_post_map_sql_close) (int retVal___); typedef bool (*HPMHOOK_pre_map_zone_mf_cache) (int *m, char **flag, char **params); typedef bool (*HPMHOOK_post_map_zone_mf_cache) (bool retVal___, int m, char *flag, char *params); -typedef unsigned short (*HPMHOOK_pre_map_zone_str2itemid) (const char **name); -typedef unsigned short (*HPMHOOK_post_map_zone_str2itemid) (unsigned short retVal___, const char *name); +typedef int (*HPMHOOK_pre_map_zone_str2itemid) (const char **name); +typedef int (*HPMHOOK_post_map_zone_str2itemid) (int retVal___, const char *name); typedef unsigned short (*HPMHOOK_pre_map_zone_str2skillid) (const char **name); typedef unsigned short (*HPMHOOK_post_map_zone_str2skillid) (unsigned short retVal___, const char *name); typedef enum bl_type (*HPMHOOK_pre_map_zone_bl_type) (const char **entry, enum map_zone_skill_subtype **subtype); @@ -4554,6 +4712,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); @@ -5184,6 +5352,12 @@ typedef void (*HPMHOOK_pre_mob_load) (bool *minimal); typedef void (*HPMHOOK_post_mob_load) (bool minimal); typedef void (*HPMHOOK_pre_mob_clear_spawninfo) (void); typedef void (*HPMHOOK_post_mob_clear_spawninfo) (void); +typedef struct item_drop_ratio* (*HPMHOOK_pre_mob_get_item_drop_ratio) (int *nameid); +typedef struct item_drop_ratio* (*HPMHOOK_post_mob_get_item_drop_ratio) (struct item_drop_ratio* retVal___, int nameid); +typedef void (*HPMHOOK_pre_mob_set_item_drop_ratio) (int *nameid, struct item_drop_ratio **ratio); +typedef void (*HPMHOOK_post_mob_set_item_drop_ratio) (int nameid, struct item_drop_ratio *ratio); +typedef int (*HPMHOOK_pre_mob_final_ratio_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_mob_final_ratio_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); typedef void (*HPMHOOK_pre_mob_destroy_mob_db) (int *index); typedef void (*HPMHOOK_post_mob_destroy_mob_db) (int index); typedef bool (*HPMHOOK_pre_mob_skill_db_libconfig) (const char **filename, bool *ignore_missing); @@ -5976,10 +6150,10 @@ typedef int (*HPMHOOK_pre_pc_inventory_rental_end) (int *tid, int64 *tick, int * typedef int (*HPMHOOK_post_pc_inventory_rental_end) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef void (*HPMHOOK_pre_pc_check_skilltree) (struct map_session_data **sd, int *skill_id); typedef void (*HPMHOOK_post_pc_check_skilltree) (struct map_session_data *sd, int skill_id); -typedef int (*HPMHOOK_pre_pc_bonus_autospell) (struct s_autospell **spell, int *max, short *id, short *lv, short *rate, short *flag, short *card_id); -typedef int (*HPMHOOK_post_pc_bonus_autospell) (int retVal___, struct s_autospell *spell, int max, short id, short lv, short rate, short flag, short card_id); -typedef int (*HPMHOOK_pre_pc_bonus_autospell_onskill) (struct s_autospell **spell, int *max, short *src_skill, short *id, short *lv, short *rate, short *card_id); -typedef int (*HPMHOOK_post_pc_bonus_autospell_onskill) (int retVal___, struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, short card_id); +typedef int (*HPMHOOK_pre_pc_bonus_autospell) (struct s_autospell **spell, int *max, short *id, short *lv, short *rate, short *flag, int *card_id); +typedef int (*HPMHOOK_post_pc_bonus_autospell) (int retVal___, struct s_autospell *spell, int max, short id, short lv, short rate, short flag, int card_id); +typedef int (*HPMHOOK_pre_pc_bonus_autospell_onskill) (struct s_autospell **spell, int *max, short *src_skill, short *id, short *lv, short *rate, int *card_id); +typedef int (*HPMHOOK_post_pc_bonus_autospell_onskill) (int retVal___, struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, int card_id); typedef int (*HPMHOOK_pre_pc_bonus_addeff) (struct s_addeffect **effect, int *max, enum sc_type *id, int16 *rate, int16 *arrow_rate, uint8 *flag, uint16 *duration); typedef int (*HPMHOOK_post_pc_bonus_addeff) (int retVal___, struct s_addeffect *effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration); typedef int (*HPMHOOK_pre_pc_bonus_addeff_onskill) (struct s_addeffectonskill **effect, int *max, enum sc_type *id, short *rate, short *skill_id, unsigned char *target); @@ -6078,6 +6252,8 @@ typedef bool (*HPMHOOK_pre_pc_check_basicskill) (struct map_session_data **sd, i typedef bool (*HPMHOOK_post_pc_check_basicskill) (bool retVal___, struct map_session_data *sd, int level); typedef bool (*HPMHOOK_pre_pc_isDeathPenaltyJob) (uint16 *job); typedef bool (*HPMHOOK_post_pc_isDeathPenaltyJob) (bool retVal___, uint16 job); +typedef bool (*HPMHOOK_pre_pc_has_second_costume) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_pc_has_second_costume) (bool retVal___, struct map_session_data *sd); #endif // MAP_PC_H #ifdef MAP_NPC_H /* libpcre */ typedef pcre* (*HPMHOOK_pre_libpcre_compile) (const char **pattern, int *options, const char ***errptr, int **erroffset, const unsigned char **tableptr); @@ -6132,8 +6308,8 @@ typedef int (*HPMHOOK_pre_pet_birth_process) (struct map_session_data **sd, stru typedef int (*HPMHOOK_post_pet_birth_process) (int retVal___, struct map_session_data *sd, struct s_pet *petinfo); typedef int (*HPMHOOK_pre_pet_recv_petdata) (int *account_id, struct s_pet **p, int *flag); typedef int (*HPMHOOK_post_pet_recv_petdata) (int retVal___, int account_id, struct s_pet *p, int flag); -typedef int (*HPMHOOK_pre_pet_select_egg) (struct map_session_data **sd, short *egg_index); -typedef int (*HPMHOOK_post_pet_select_egg) (int retVal___, struct map_session_data *sd, short egg_index); +typedef int (*HPMHOOK_pre_pet_select_egg) (struct map_session_data **sd, int *egg_index); +typedef int (*HPMHOOK_post_pet_select_egg) (int retVal___, struct map_session_data *sd, int egg_index); typedef int (*HPMHOOK_pre_pet_catch_process1) (struct map_session_data **sd, int *target_class); typedef int (*HPMHOOK_post_pet_catch_process1) (int retVal___, struct map_session_data *sd, int target_class); typedef int (*HPMHOOK_pre_pet_catch_process2) (struct map_session_data **sd, int *target_id); @@ -6250,6 +6426,30 @@ typedef int (*HPMHOOK_pre_quest_read_db) (void); typedef int (*HPMHOOK_post_quest_read_db) (int retVal___); typedef struct quest_db* (*HPMHOOK_pre_quest_read_db_sub) (struct config_setting_t **cs, int *n, const char **source); typedef struct quest_db* (*HPMHOOK_post_quest_read_db_sub) (struct quest_db* retVal___, struct config_setting_t *cs, int n, const char *source); +typedef int (*HPMHOOK_pre_quest_questinfo_validate_icon) (int *icon); +typedef int (*HPMHOOK_post_quest_questinfo_validate_icon) (int retVal___, int icon); +typedef void (*HPMHOOK_pre_quest_questinfo_refresh) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_quest_questinfo_refresh) (struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_job) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_job) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_sex) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_sex) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_baselevel) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_baselevel) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_joblevel) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_joblevel) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_items) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_items) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_homunculus_level) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_homunculus_level) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_homunculus_type) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_homunculus_type) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_quests) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_quests) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef void (*HPMHOOK_pre_quest_questinfo_vector_clear) (int *m); +typedef void (*HPMHOOK_post_quest_questinfo_vector_clear) (int m); #endif // MAP_QUEST_H #ifdef COMMON_RANDOM_H /* rnd */ typedef void (*HPMHOOK_pre_rnd_init) (void); @@ -6500,8 +6700,8 @@ typedef const char* (*HPMHOOK_pre_script_parse_expr) (const char **p); typedef const char* (*HPMHOOK_post_script_parse_expr) (const char* retVal___, const char *p); typedef const char* (*HPMHOOK_pre_script_parse_line) (const char **p); typedef const char* (*HPMHOOK_post_script_parse_line) (const char* retVal___, const char *p); -typedef void (*HPMHOOK_pre_script_read_constdb) (void); -typedef void (*HPMHOOK_post_script_read_constdb) (void); +typedef void (*HPMHOOK_pre_script_read_constdb) (bool *reload); +typedef void (*HPMHOOK_post_script_read_constdb) (bool reload); typedef void (*HPMHOOK_pre_script_constdb_comment) (const char **comment); typedef void (*HPMHOOK_post_script_constdb_comment) (const char *comment); typedef void (*HPMHOOK_pre_script_load_parameters) (void); @@ -6676,8 +6876,8 @@ typedef void (*HPMHOOK_post_script_run_item_unequip_script) (struct map_session_ #ifdef MAP_SEARCHSTORE_H /* searchstore */ typedef bool (*HPMHOOK_pre_searchstore_open) (struct map_session_data **sd, unsigned int *uses, unsigned short *effect); typedef bool (*HPMHOOK_post_searchstore_open) (bool retVal___, struct map_session_data *sd, unsigned int uses, unsigned short effect); -typedef void (*HPMHOOK_pre_searchstore_query) (struct map_session_data **sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const unsigned short **itemlist, unsigned int *item_count, const unsigned short **cardlist, unsigned int *card_count); -typedef void (*HPMHOOK_post_searchstore_query) (struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const unsigned short *itemlist, unsigned int item_count, const unsigned short *cardlist, unsigned int card_count); +typedef void (*HPMHOOK_pre_searchstore_query) (struct map_session_data **sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const uint32 **itemlist, unsigned int *item_count, const uint32 **cardlist, unsigned int *card_count); +typedef void (*HPMHOOK_post_searchstore_query) (struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const uint32 *itemlist, unsigned int item_count, const uint32 *cardlist, unsigned int card_count); typedef bool (*HPMHOOK_pre_searchstore_querynext) (struct map_session_data **sd); typedef bool (*HPMHOOK_post_searchstore_querynext) (bool retVal___, struct map_session_data *sd); typedef void (*HPMHOOK_pre_searchstore_next) (struct map_session_data **sd); @@ -6686,14 +6886,14 @@ typedef void (*HPMHOOK_pre_searchstore_clear) (struct map_session_data **sd); typedef void (*HPMHOOK_post_searchstore_clear) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_searchstore_close) (struct map_session_data **sd); typedef void (*HPMHOOK_post_searchstore_close) (struct map_session_data *sd); -typedef void (*HPMHOOK_pre_searchstore_click) (struct map_session_data **sd, int *account_id, int *store_id, unsigned short *nameid); -typedef void (*HPMHOOK_post_searchstore_click) (struct map_session_data *sd, int account_id, int store_id, unsigned short nameid); +typedef void (*HPMHOOK_pre_searchstore_click) (struct map_session_data **sd, int *account_id, int *store_id, int *nameid); +typedef void (*HPMHOOK_post_searchstore_click) (struct map_session_data *sd, int account_id, int store_id, int nameid); typedef bool (*HPMHOOK_pre_searchstore_queryremote) (struct map_session_data **sd, int *account_id); typedef bool (*HPMHOOK_post_searchstore_queryremote) (bool retVal___, struct map_session_data *sd, int account_id); typedef void (*HPMHOOK_pre_searchstore_clearremote) (struct map_session_data **sd); typedef void (*HPMHOOK_post_searchstore_clearremote) (struct map_session_data *sd); -typedef bool (*HPMHOOK_pre_searchstore_result) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short **card, unsigned char *refine, const struct item_option **option); -typedef bool (*HPMHOOK_post_searchstore_result) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine, const struct item_option *option); +typedef bool (*HPMHOOK_pre_searchstore_result) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, int *nameid, unsigned short *amount, unsigned int *price, const int **card, unsigned char *refine, const struct item_option **option); +typedef bool (*HPMHOOK_post_searchstore_result) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine, const struct item_option *option); #endif // MAP_SEARCHSTORE_H #ifdef COMMON_SHOWMSG_H /* showmsg */ typedef void (*HPMHOOK_pre_showmsg_init) (void); @@ -7032,8 +7232,8 @@ typedef int (*HPMHOOK_pre_skill_unit_timer_sub) (union DBKey *key, struct DBData typedef int (*HPMHOOK_post_skill_unit_timer_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); typedef void (*HPMHOOK_pre_skill_init_unit_layout) (void); typedef void (*HPMHOOK_post_skill_init_unit_layout) (void); -typedef void (*HPMHOOK_pre_skill_init_unit_layout_unknown) (int *skill_idx); -typedef void (*HPMHOOK_post_skill_init_unit_layout_unknown) (int skill_idx); +typedef void (*HPMHOOK_pre_skill_init_unit_layout_unknown) (int *skill_idx, int *pos); +typedef void (*HPMHOOK_post_skill_init_unit_layout_unknown) (int skill_idx, int pos); typedef void (*HPMHOOK_pre_skill_validate_hittype) (struct config_setting_t **conf, struct s_skill_db **sk); typedef void (*HPMHOOK_post_skill_validate_hittype) (struct config_setting_t *conf, struct s_skill_db *sk); typedef void (*HPMHOOK_pre_skill_validate_skilltype) (struct config_setting_t **conf, struct s_skill_db **sk); @@ -7890,8 +8090,8 @@ typedef void (*HPMHOOK_pre_vending_list) (struct map_session_data **sd, unsigned typedef void (*HPMHOOK_post_vending_list) (struct map_session_data *sd, unsigned int id); typedef void (*HPMHOOK_pre_vending_purchase) (struct map_session_data **sd, int *aid, unsigned int *uid, const uint8 **data, int *count); typedef void (*HPMHOOK_post_vending_purchase) (struct map_session_data *sd, int aid, unsigned int uid, const uint8 *data, int count); -typedef bool (*HPMHOOK_pre_vending_search) (struct map_session_data **sd, unsigned short *nameid); -typedef bool (*HPMHOOK_post_vending_search) (bool retVal___, struct map_session_data *sd, unsigned short nameid); +typedef bool (*HPMHOOK_pre_vending_search) (struct map_session_data **sd, int *nameid); +typedef bool (*HPMHOOK_post_vending_search) (bool retVal___, struct map_session_data *sd, int nameid); typedef bool (*HPMHOOK_pre_vending_searchall) (struct map_session_data **sd, const struct s_search_store_search **s); typedef bool (*HPMHOOK_post_vending_searchall) (bool retVal___, struct map_session_data *sd, const struct s_search_store_search *s); #endif // MAP_VENDING_H 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 ad57bce86..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; @@ -9271,11 +9472,11 @@ int HP_inter_pet_parse_frommap(int fd) { } return retVal___; } -struct s_pet* HP_inter_pet_create(int account_id, int char_id, short pet_class, short pet_lv, short pet_egg_id, short pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name) { +struct s_pet* HP_inter_pet_create(int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name) { int hIndex = 0; struct s_pet* retVal___ = NULL; if (HPMHooks.count.HP_inter_pet_create_pre > 0) { - struct s_pet* (*preHookFunc) (int *account_id, int *char_id, short *pet_class, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name); + struct s_pet* (*preHookFunc) (int *account_id, int *char_id, short *pet_class, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_pet_create_pre[hIndex].func; @@ -9290,7 +9491,7 @@ struct s_pet* HP_inter_pet_create(int account_id, int char_id, short pet_class, retVal___ = HPMHooks.source.inter_pet.create(account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); } if (HPMHooks.count.HP_inter_pet_create_post > 0) { - struct s_pet* (*postHookFunc) (struct s_pet* retVal___, int account_id, int char_id, short pet_class, short pet_lv, short pet_egg_id, short pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name); + struct s_pet* (*postHookFunc) (struct s_pet* retVal___, int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name); for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_pet_create_post[hIndex].func; retVal___ = postHookFunc(retVal___, account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); @@ -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 94e86df4d..d875ab6e2 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; @@ -604,6 +708,8 @@ struct { struct HPMHookPoint *HP_clif_delitem_post; struct HPMHookPoint *HP_clif_takeitem_pre; struct HPMHookPoint *HP_clif_takeitem_post; + struct HPMHookPoint *HP_clif_item_movefailed_pre; + struct HPMHookPoint *HP_clif_item_movefailed_post; struct HPMHookPoint *HP_clif_item_equip_pre; struct HPMHookPoint *HP_clif_item_equip_post; struct HPMHookPoint *HP_clif_item_normal_pre; @@ -626,8 +732,6 @@ struct { struct HPMHookPoint *HP_clif_useitemack_post; struct HPMHookPoint *HP_clif_addcards_pre; struct HPMHookPoint *HP_clif_addcards_post; - struct HPMHookPoint *HP_clif_addcards2_pre; - struct HPMHookPoint *HP_clif_addcards2_post; struct HPMHookPoint *HP_clif_item_sub_pre; struct HPMHookPoint *HP_clif_item_sub_post; struct HPMHookPoint *HP_clif_getareachar_item_pre; @@ -636,6 +740,8 @@ struct { struct HPMHookPoint *HP_clif_cart_additem_ack_post; struct HPMHookPoint *HP_clif_cashshop_load_pre; struct HPMHookPoint *HP_clif_cashshop_load_post; + struct HPMHookPoint *HP_clif_cashShopSchedule_pre; + struct HPMHookPoint *HP_clif_cashShopSchedule_post; struct HPMHookPoint *HP_clif_package_announce_pre; struct HPMHookPoint *HP_clif_package_announce_post; struct HPMHookPoint *HP_clif_item_drop_announce_pre; @@ -1054,6 +1160,8 @@ struct { struct HPMHookPoint *HP_clif_msgtable_skill_post; struct HPMHookPoint *HP_clif_msgtable_str_pre; struct HPMHookPoint *HP_clif_msgtable_str_post; + struct HPMHookPoint *HP_clif_msgtable_str_color_pre; + struct HPMHookPoint *HP_clif_msgtable_str_color_post; struct HPMHookPoint *HP_clif_msgtable_color_pre; struct HPMHookPoint *HP_clif_msgtable_color_post; struct HPMHookPoint *HP_clif_message_pre; @@ -1100,6 +1208,8 @@ struct { struct HPMHookPoint *HP_clif_buyvending_post; struct HPMHookPoint *HP_clif_openvending_pre; struct HPMHookPoint *HP_clif_openvending_post; + struct HPMHookPoint *HP_clif_openvendingAck_pre; + struct HPMHookPoint *HP_clif_openvendingAck_post; struct HPMHookPoint *HP_clif_vendingreport_pre; struct HPMHookPoint *HP_clif_vendingreport_post; struct HPMHookPoint *HP_clif_storagelist_pre; @@ -1214,6 +1324,10 @@ struct { struct HPMHookPoint *HP_clif_guild_positioninfolist_post; struct HPMHookPoint *HP_clif_guild_expulsionlist_pre; struct HPMHookPoint *HP_clif_guild_expulsionlist_post; + struct HPMHookPoint *HP_clif_guild_set_position_pre; + struct HPMHookPoint *HP_clif_guild_set_position_post; + struct HPMHookPoint *HP_clif_guild_position_selected_pre; + struct HPMHookPoint *HP_clif_guild_position_selected_post; struct HPMHookPoint *HP_clif_validate_emblem_pre; struct HPMHookPoint *HP_clif_validate_emblem_post; struct HPMHookPoint *HP_clif_bg_hp_pre; @@ -1476,6 +1590,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; @@ -2016,6 +2142,10 @@ struct { struct HPMHookPoint *HP_clif_hat_effect_post; struct HPMHookPoint *HP_clif_hat_effect_single_pre; struct HPMHookPoint *HP_clif_hat_effect_single_post; + struct HPMHookPoint *HP_clif_overweight_percent_pre; + struct HPMHookPoint *HP_clif_overweight_percent_post; + struct HPMHookPoint *HP_clif_pChangeDress_pre; + struct HPMHookPoint *HP_clif_pChangeDress_post; struct HPMHookPoint *HP_clif_pAttendanceDB_pre; struct HPMHookPoint *HP_clif_pAttendanceDB_post; struct HPMHookPoint *HP_clif_attendancedb_libconfig_sub_pre; @@ -2050,6 +2180,8 @@ struct { struct HPMHookPoint *HP_clif_stylist_send_rodexitem_post; struct HPMHookPoint *HP_clif_pReqStyleChange_pre; struct HPMHookPoint *HP_clif_pReqStyleChange_post; + struct HPMHookPoint *HP_clif_pReqStyleChange2_pre; + struct HPMHookPoint *HP_clif_pReqStyleChange2_post; struct HPMHookPoint *HP_clif_cz_req_style_change_sub_pre; struct HPMHookPoint *HP_clif_cz_req_style_change_sub_post; struct HPMHookPoint *HP_clif_style_change_response_pre; @@ -2058,6 +2190,8 @@ struct { struct HPMHookPoint *HP_clif_pPetEvolution_post; struct HPMHookPoint *HP_clif_petEvolutionResult_pre; struct HPMHookPoint *HP_clif_petEvolutionResult_post; + struct HPMHookPoint *HP_clif_party_dead_notification_pre; + struct HPMHookPoint *HP_clif_party_dead_notification_post; struct HPMHookPoint *HP_cmdline_init_pre; struct HPMHookPoint *HP_cmdline_init_post; struct HPMHookPoint *HP_cmdline_final_pre; @@ -2708,6 +2842,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; @@ -2846,6 +2984,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; @@ -3796,6 +3936,12 @@ struct { struct HPMHookPoint *HP_mob_load_post; struct HPMHookPoint *HP_mob_clear_spawninfo_pre; struct HPMHookPoint *HP_mob_clear_spawninfo_post; + struct HPMHookPoint *HP_mob_get_item_drop_ratio_pre; + struct HPMHookPoint *HP_mob_get_item_drop_ratio_post; + struct HPMHookPoint *HP_mob_set_item_drop_ratio_pre; + struct HPMHookPoint *HP_mob_set_item_drop_ratio_post; + struct HPMHookPoint *HP_mob_final_ratio_sub_pre; + struct HPMHookPoint *HP_mob_final_ratio_sub_post; struct HPMHookPoint *HP_mob_destroy_mob_db_pre; struct HPMHookPoint *HP_mob_destroy_mob_db_post; struct HPMHookPoint *HP_mob_skill_db_libconfig_pre; @@ -4674,6 +4820,8 @@ struct { struct HPMHookPoint *HP_pc_check_basicskill_post; struct HPMHookPoint *HP_pc_isDeathPenaltyJob_pre; struct HPMHookPoint *HP_pc_isDeathPenaltyJob_post; + struct HPMHookPoint *HP_pc_has_second_costume_pre; + struct HPMHookPoint *HP_pc_has_second_costume_post; struct HPMHookPoint *HP_libpcre_compile_pre; struct HPMHookPoint *HP_libpcre_compile_post; struct HPMHookPoint *HP_libpcre_study_pre; @@ -4806,6 +4954,30 @@ struct { struct HPMHookPoint *HP_quest_read_db_post; struct HPMHookPoint *HP_quest_read_db_sub_pre; struct HPMHookPoint *HP_quest_read_db_sub_post; + struct HPMHookPoint *HP_quest_questinfo_validate_icon_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_icon_post; + struct HPMHookPoint *HP_quest_questinfo_refresh_pre; + struct HPMHookPoint *HP_quest_questinfo_refresh_post; + struct HPMHookPoint *HP_quest_questinfo_validate_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_post; + struct HPMHookPoint *HP_quest_questinfo_validate_job_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_job_post; + struct HPMHookPoint *HP_quest_questinfo_validate_sex_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_sex_post; + struct HPMHookPoint *HP_quest_questinfo_validate_baselevel_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_baselevel_post; + struct HPMHookPoint *HP_quest_questinfo_validate_joblevel_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_joblevel_post; + struct HPMHookPoint *HP_quest_questinfo_validate_items_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_items_post; + struct HPMHookPoint *HP_quest_questinfo_validate_homunculus_level_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_homunculus_level_post; + struct HPMHookPoint *HP_quest_questinfo_validate_homunculus_type_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_homunculus_type_post; + struct HPMHookPoint *HP_quest_questinfo_validate_quests_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_quests_post; + struct HPMHookPoint *HP_quest_questinfo_vector_clear_pre; + struct HPMHookPoint *HP_quest_questinfo_vector_clear_post; struct HPMHookPoint *HP_rnd_init_pre; struct HPMHookPoint *HP_rnd_init_post; struct HPMHookPoint *HP_rnd_final_pre; @@ -6421,6 +6593,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; @@ -6993,6 +7269,8 @@ struct { int HP_clif_delitem_post; int HP_clif_takeitem_pre; int HP_clif_takeitem_post; + int HP_clif_item_movefailed_pre; + int HP_clif_item_movefailed_post; int HP_clif_item_equip_pre; int HP_clif_item_equip_post; int HP_clif_item_normal_pre; @@ -7015,8 +7293,6 @@ struct { int HP_clif_useitemack_post; int HP_clif_addcards_pre; int HP_clif_addcards_post; - int HP_clif_addcards2_pre; - int HP_clif_addcards2_post; int HP_clif_item_sub_pre; int HP_clif_item_sub_post; int HP_clif_getareachar_item_pre; @@ -7025,6 +7301,8 @@ struct { int HP_clif_cart_additem_ack_post; int HP_clif_cashshop_load_pre; int HP_clif_cashshop_load_post; + int HP_clif_cashShopSchedule_pre; + int HP_clif_cashShopSchedule_post; int HP_clif_package_announce_pre; int HP_clif_package_announce_post; int HP_clif_item_drop_announce_pre; @@ -7443,6 +7721,8 @@ struct { int HP_clif_msgtable_skill_post; int HP_clif_msgtable_str_pre; int HP_clif_msgtable_str_post; + int HP_clif_msgtable_str_color_pre; + int HP_clif_msgtable_str_color_post; int HP_clif_msgtable_color_pre; int HP_clif_msgtable_color_post; int HP_clif_message_pre; @@ -7489,6 +7769,8 @@ struct { int HP_clif_buyvending_post; int HP_clif_openvending_pre; int HP_clif_openvending_post; + int HP_clif_openvendingAck_pre; + int HP_clif_openvendingAck_post; int HP_clif_vendingreport_pre; int HP_clif_vendingreport_post; int HP_clif_storagelist_pre; @@ -7603,6 +7885,10 @@ struct { int HP_clif_guild_positioninfolist_post; int HP_clif_guild_expulsionlist_pre; int HP_clif_guild_expulsionlist_post; + int HP_clif_guild_set_position_pre; + int HP_clif_guild_set_position_post; + int HP_clif_guild_position_selected_pre; + int HP_clif_guild_position_selected_post; int HP_clif_validate_emblem_pre; int HP_clif_validate_emblem_post; int HP_clif_bg_hp_pre; @@ -7865,6 +8151,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; @@ -8405,6 +8703,10 @@ struct { int HP_clif_hat_effect_post; int HP_clif_hat_effect_single_pre; int HP_clif_hat_effect_single_post; + int HP_clif_overweight_percent_pre; + int HP_clif_overweight_percent_post; + int HP_clif_pChangeDress_pre; + int HP_clif_pChangeDress_post; int HP_clif_pAttendanceDB_pre; int HP_clif_pAttendanceDB_post; int HP_clif_attendancedb_libconfig_sub_pre; @@ -8439,6 +8741,8 @@ struct { int HP_clif_stylist_send_rodexitem_post; int HP_clif_pReqStyleChange_pre; int HP_clif_pReqStyleChange_post; + int HP_clif_pReqStyleChange2_pre; + int HP_clif_pReqStyleChange2_post; int HP_clif_cz_req_style_change_sub_pre; int HP_clif_cz_req_style_change_sub_post; int HP_clif_style_change_response_pre; @@ -8447,6 +8751,8 @@ struct { int HP_clif_pPetEvolution_post; int HP_clif_petEvolutionResult_pre; int HP_clif_petEvolutionResult_post; + int HP_clif_party_dead_notification_pre; + int HP_clif_party_dead_notification_post; int HP_cmdline_init_pre; int HP_cmdline_init_post; int HP_cmdline_final_pre; @@ -9097,6 +9403,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; @@ -9235,6 +9545,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; @@ -10185,6 +10497,12 @@ struct { int HP_mob_load_post; int HP_mob_clear_spawninfo_pre; int HP_mob_clear_spawninfo_post; + int HP_mob_get_item_drop_ratio_pre; + int HP_mob_get_item_drop_ratio_post; + int HP_mob_set_item_drop_ratio_pre; + int HP_mob_set_item_drop_ratio_post; + int HP_mob_final_ratio_sub_pre; + int HP_mob_final_ratio_sub_post; int HP_mob_destroy_mob_db_pre; int HP_mob_destroy_mob_db_post; int HP_mob_skill_db_libconfig_pre; @@ -11063,6 +11381,8 @@ struct { int HP_pc_check_basicskill_post; int HP_pc_isDeathPenaltyJob_pre; int HP_pc_isDeathPenaltyJob_post; + int HP_pc_has_second_costume_pre; + int HP_pc_has_second_costume_post; int HP_libpcre_compile_pre; int HP_libpcre_compile_post; int HP_libpcre_study_pre; @@ -11195,6 +11515,30 @@ struct { int HP_quest_read_db_post; int HP_quest_read_db_sub_pre; int HP_quest_read_db_sub_post; + int HP_quest_questinfo_validate_icon_pre; + int HP_quest_questinfo_validate_icon_post; + int HP_quest_questinfo_refresh_pre; + int HP_quest_questinfo_refresh_post; + int HP_quest_questinfo_validate_pre; + int HP_quest_questinfo_validate_post; + int HP_quest_questinfo_validate_job_pre; + int HP_quest_questinfo_validate_job_post; + int HP_quest_questinfo_validate_sex_pre; + int HP_quest_questinfo_validate_sex_post; + int HP_quest_questinfo_validate_baselevel_pre; + int HP_quest_questinfo_validate_baselevel_post; + int HP_quest_questinfo_validate_joblevel_pre; + int HP_quest_questinfo_validate_joblevel_post; + int HP_quest_questinfo_validate_items_pre; + int HP_quest_questinfo_validate_items_post; + int HP_quest_questinfo_validate_homunculus_level_pre; + int HP_quest_questinfo_validate_homunculus_level_post; + int HP_quest_questinfo_validate_homunculus_type_pre; + int HP_quest_questinfo_validate_homunculus_type_post; + int HP_quest_questinfo_validate_quests_pre; + int HP_quest_questinfo_validate_quests_post; + int HP_quest_questinfo_vector_clear_pre; + int HP_quest_questinfo_vector_clear_post; int HP_rnd_init_pre; int HP_rnd_init_post; int HP_rnd_final_pre; @@ -12805,6 +13149,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 9135ed08d..0088847b1 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) }, @@ -325,6 +378,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->dropitem, HP_clif_dropitem) }, { HP_POP(clif->delitem, HP_clif_delitem) }, { HP_POP(clif->takeitem, HP_clif_takeitem) }, + { HP_POP(clif->item_movefailed, HP_clif_item_movefailed) }, { HP_POP(clif->item_equip, HP_clif_item_equip) }, { HP_POP(clif->item_normal, HP_clif_item_normal) }, { HP_POP(clif->arrowequip, HP_clif_arrowequip) }, @@ -336,11 +390,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->unequipitemack, HP_clif_unequipitemack) }, { HP_POP(clif->useitemack, HP_clif_useitemack) }, { HP_POP(clif->addcards, HP_clif_addcards) }, - { HP_POP(clif->addcards2, HP_clif_addcards2) }, { HP_POP(clif->item_sub, HP_clif_item_sub) }, { HP_POP(clif->getareachar_item, HP_clif_getareachar_item) }, { HP_POP(clif->cart_additem_ack, HP_clif_cart_additem_ack) }, { HP_POP(clif->cashshop_load, HP_clif_cashshop_load) }, + { HP_POP(clif->cashShopSchedule, HP_clif_cashShopSchedule) }, { HP_POP(clif->package_announce, HP_clif_package_announce) }, { HP_POP(clif->item_drop_announce, HP_clif_item_drop_announce) }, { HP_POP(clif->clearunit_single, HP_clif_clearunit_single) }, @@ -550,6 +604,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->msgtable_num, HP_clif_msgtable_num) }, { HP_POP(clif->msgtable_skill, HP_clif_msgtable_skill) }, { HP_POP(clif->msgtable_str, HP_clif_msgtable_str) }, + { HP_POP(clif->msgtable_str_color, HP_clif_msgtable_str_color) }, { HP_POP(clif->msgtable_color, HP_clif_msgtable_color) }, { HP_POP(clif->message, HP_clif_message) }, { HP_POP(clif->messageln, HP_clif_messageln) }, @@ -573,6 +628,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->vendinglist, HP_clif_vendinglist) }, { HP_POP(clif->buyvending, HP_clif_buyvending) }, { HP_POP(clif->openvending, HP_clif_openvending) }, + { HP_POP(clif->openvendingAck, HP_clif_openvendingAck) }, { HP_POP(clif->vendingreport, HP_clif_vendingreport) }, { HP_POP(clif->storagelist, HP_clif_storagelist) }, { HP_POP(clif->updatestorageamount, HP_clif_updatestorageamount) }, @@ -630,6 +686,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->guild_positionnamelist, HP_clif_guild_positionnamelist) }, { HP_POP(clif->guild_positioninfolist, HP_clif_guild_positioninfolist) }, { HP_POP(clif->guild_expulsionlist, HP_clif_guild_expulsionlist) }, + { HP_POP(clif->guild_set_position, HP_clif_guild_set_position) }, + { HP_POP(clif->guild_position_selected, HP_clif_guild_position_selected) }, { HP_POP(clif->validate_emblem, HP_clif_validate_emblem) }, { HP_POP(clif->bg_hp, HP_clif_bg_hp) }, { HP_POP(clif->bg_xy, HP_clif_bg_xy) }, @@ -761,6 +819,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) }, @@ -1031,6 +1095,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pClanMessage, HP_clif_pClanMessage) }, { HP_POP(clif->hat_effect, HP_clif_hat_effect) }, { HP_POP(clif->hat_effect_single, HP_clif_hat_effect_single) }, + { HP_POP(clif->overweight_percent, HP_clif_overweight_percent) }, + { HP_POP(clif->pChangeDress, HP_clif_pChangeDress) }, { HP_POP(clif->pAttendanceDB, HP_clif_pAttendanceDB) }, { HP_POP(clif->attendancedb_libconfig_sub, HP_clif_attendancedb_libconfig_sub) }, { HP_POP(clif->attendance_timediff, HP_clif_attendance_timediff) }, @@ -1048,10 +1114,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->style_change_validate_requirements, HP_clif_style_change_validate_requirements) }, { HP_POP(clif->stylist_send_rodexitem, HP_clif_stylist_send_rodexitem) }, { HP_POP(clif->pReqStyleChange, HP_clif_pReqStyleChange) }, + { HP_POP(clif->pReqStyleChange2, HP_clif_pReqStyleChange2) }, { HP_POP(clif->cz_req_style_change_sub, HP_clif_cz_req_style_change_sub) }, { HP_POP(clif->style_change_response, HP_clif_style_change_response) }, { HP_POP(clif->pPetEvolution, HP_clif_pPetEvolution) }, { HP_POP(clif->petEvolutionResult, HP_clif_petEvolutionResult) }, + { HP_POP(clif->party_dead_notification, HP_clif_party_dead_notification) }, /* cmdline_interface */ { HP_POP(cmdline->init, HP_cmdline_init) }, { HP_POP(cmdline->final, HP_cmdline_final) }, @@ -1390,6 +1458,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) }, @@ -1459,6 +1529,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) }, @@ -1946,6 +2017,9 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->readdb_itemratio, HP_mob_readdb_itemratio) }, { HP_POP(mob->load, HP_mob_load) }, { HP_POP(mob->clear_spawninfo, HP_mob_clear_spawninfo) }, + { HP_POP(mob->get_item_drop_ratio, HP_mob_get_item_drop_ratio) }, + { HP_POP(mob->set_item_drop_ratio, HP_mob_set_item_drop_ratio) }, + { HP_POP(mob->final_ratio_sub, HP_mob_final_ratio_sub) }, { HP_POP(mob->destroy_mob_db, HP_mob_destroy_mob_db) }, { HP_POP(mob->skill_db_libconfig, HP_mob_skill_db_libconfig) }, { HP_POP(mob->skill_db_libconfig_sub, HP_mob_skill_db_libconfig_sub) }, @@ -2393,6 +2467,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->check_supernovice_call, HP_pc_check_supernovice_call) }, { HP_POP(pc->check_basicskill, HP_pc_check_basicskill) }, { HP_POP(pc->isDeathPenaltyJob, HP_pc_isDeathPenaltyJob) }, + { HP_POP(pc->has_second_costume, HP_pc_has_second_costume) }, /* pcre_interface */ { HP_POP(libpcre->compile, HP_libpcre_compile) }, { HP_POP(libpcre->study, HP_libpcre_study) }, @@ -2462,6 +2537,18 @@ struct HookingPointData HookingPoints[] = { { HP_POP(quest->clear, HP_quest_clear) }, { HP_POP(quest->read_db, HP_quest_read_db) }, { HP_POP(quest->read_db_sub, HP_quest_read_db_sub) }, + { HP_POP(quest->questinfo_validate_icon, HP_quest_questinfo_validate_icon) }, + { HP_POP(quest->questinfo_refresh, HP_quest_questinfo_refresh) }, + { HP_POP(quest->questinfo_validate, HP_quest_questinfo_validate) }, + { HP_POP(quest->questinfo_validate_job, HP_quest_questinfo_validate_job) }, + { HP_POP(quest->questinfo_validate_sex, HP_quest_questinfo_validate_sex) }, + { HP_POP(quest->questinfo_validate_baselevel, HP_quest_questinfo_validate_baselevel) }, + { HP_POP(quest->questinfo_validate_joblevel, HP_quest_questinfo_validate_joblevel) }, + { HP_POP(quest->questinfo_validate_items, HP_quest_questinfo_validate_items) }, + { HP_POP(quest->questinfo_validate_homunculus_level, HP_quest_questinfo_validate_homunculus_level) }, + { HP_POP(quest->questinfo_validate_homunculus_type, HP_quest_questinfo_validate_homunculus_type) }, + { HP_POP(quest->questinfo_validate_quests, HP_quest_questinfo_validate_quests) }, + { HP_POP(quest->questinfo_vector_clear, HP_quest_questinfo_vector_clear) }, /* rnd_interface */ { HP_POP(rnd->init, HP_rnd_init) }, { HP_POP(rnd->final, HP_rnd_final) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index c055c6c09..3b21eb3e6 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; @@ -3526,10 +4905,10 @@ bool HP_buyingstore_setup(struct map_session_data *sd, unsigned char slots) { } return retVal___; } -void HP_buyingstore_create(struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const uint8 *itemlist, unsigned int count) { +void HP_buyingstore_create(struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub *itemlist, unsigned int count) { int hIndex = 0; if (HPMHooks.count.HP_buyingstore_create_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int *zenylimit, unsigned char *result, const char **storename, const uint8 **itemlist, unsigned int *count); + void (*preHookFunc) (struct map_session_data **sd, int *zenylimit, unsigned char *result, const char **storename, const struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub **itemlist, unsigned int *count); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_buyingstore_create_pre[hIndex].func; @@ -3544,7 +4923,7 @@ void HP_buyingstore_create(struct map_session_data *sd, int zenylimit, unsigned HPMHooks.source.buyingstore.create(sd, zenylimit, result, storename, itemlist, count); } if (HPMHooks.count.HP_buyingstore_create_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const uint8 *itemlist, unsigned int count); + void (*postHookFunc) (struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub *itemlist, unsigned int count); for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_buyingstore_create_post[hIndex].func; postHookFunc(sd, zenylimit, result, storename, itemlist, count); @@ -3604,10 +4983,10 @@ void HP_buyingstore_open(struct map_session_data *sd, int account_id) { } return; } -void HP_buyingstore_trade(struct map_session_data *sd, int account_id, unsigned int buyer_id, const uint8 *itemlist, unsigned int count) { +void HP_buyingstore_trade(struct map_session_data *sd, int account_id, unsigned int buyer_id, const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub *itemlist, unsigned int count) { int hIndex = 0; if (HPMHooks.count.HP_buyingstore_trade_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int *account_id, unsigned int *buyer_id, const uint8 **itemlist, unsigned int *count); + void (*preHookFunc) (struct map_session_data **sd, int *account_id, unsigned int *buyer_id, const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub **itemlist, unsigned int *count); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_trade_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_buyingstore_trade_pre[hIndex].func; @@ -3622,7 +5001,7 @@ void HP_buyingstore_trade(struct map_session_data *sd, int account_id, unsigned HPMHooks.source.buyingstore.trade(sd, account_id, buyer_id, itemlist, count); } if (HPMHooks.count.HP_buyingstore_trade_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int account_id, unsigned int buyer_id, const uint8 *itemlist, unsigned int count); + void (*postHookFunc) (struct map_session_data *sd, int account_id, unsigned int buyer_id, const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub *itemlist, unsigned int count); for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_trade_post; hIndex++) { postHookFunc = HPMHooks.list.HP_buyingstore_trade_post[hIndex].func; postHookFunc(sd, account_id, buyer_id, itemlist, count); @@ -3630,11 +5009,11 @@ void HP_buyingstore_trade(struct map_session_data *sd, int account_id, unsigned } return; } -bool HP_buyingstore_search(struct map_session_data *sd, unsigned short nameid) { +bool HP_buyingstore_search(struct map_session_data *sd, int nameid) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_buyingstore_search_pre > 0) { - bool (*preHookFunc) (struct map_session_data **sd, unsigned short *nameid); + bool (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_search_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_buyingstore_search_pre[hIndex].func; @@ -3649,7 +5028,7 @@ bool HP_buyingstore_search(struct map_session_data *sd, unsigned short nameid) { retVal___ = HPMHooks.source.buyingstore.search(sd, nameid); } if (HPMHooks.count.HP_buyingstore_search_post > 0) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned short nameid); + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int nameid); for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_search_post; hIndex++) { postHookFunc = HPMHooks.list.HP_buyingstore_search_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, nameid); @@ -7834,6 +9213,32 @@ void HP_clif_takeitem(struct block_list *src, struct block_list *dst) { } return; } +void HP_clif_item_movefailed(struct map_session_data *sd, int n) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_item_movefailed_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *n); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_movefailed_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_item_movefailed_pre[hIndex].func; + preHookFunc(&sd, &n); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_movefailed(sd, n); + } + if (HPMHooks.count.HP_clif_item_movefailed_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int n); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_movefailed_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_item_movefailed_post[hIndex].func; + postHookFunc(sd, n); + } + } + return; +} void HP_clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *i, struct item_data *id, int eqp_pos) { int hIndex = 0; if (HPMHooks.count.HP_clif_item_equip_pre > 0) { @@ -8094,10 +9499,10 @@ void HP_clif_useitemack(struct map_session_data *sd, int index, int amount, bool } return; } -void HP_clif_addcards(unsigned char *buf, struct item *item) { +void HP_clif_addcards(struct EQUIPSLOTINFO *buf, struct item *item) { int hIndex = 0; if (HPMHooks.count.HP_clif_addcards_pre > 0) { - void (*preHookFunc) (unsigned char **buf, struct item **item); + void (*preHookFunc) (struct EQUIPSLOTINFO **buf, struct item **item); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_addcards_pre[hIndex].func; @@ -8112,7 +9517,7 @@ void HP_clif_addcards(unsigned char *buf, struct item *item) { HPMHooks.source.clif.addcards(buf, item); } if (HPMHooks.count.HP_clif_addcards_post > 0) { - void (*postHookFunc) (unsigned char *buf, struct item *item); + void (*postHookFunc) (struct EQUIPSLOTINFO *buf, struct item *item); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_addcards_post[hIndex].func; postHookFunc(buf, item); @@ -8120,32 +9525,6 @@ void HP_clif_addcards(unsigned char *buf, struct item *item) { } return; } -void HP_clif_addcards2(unsigned short *cards, struct item *item) { - int hIndex = 0; - if (HPMHooks.count.HP_clif_addcards2_pre > 0) { - void (*preHookFunc) (unsigned short **cards, struct item **item); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards2_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_addcards2_pre[hIndex].func; - preHookFunc(&cards, &item); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.clif.addcards2(cards, item); - } - if (HPMHooks.count.HP_clif_addcards2_post > 0) { - void (*postHookFunc) (unsigned short *cards, struct item *item); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards2_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_addcards2_post[hIndex].func; - postHookFunc(cards, item); - } - } - return; -} void HP_clif_item_sub(unsigned char *buf, int n, struct item *i, struct item_data *id, int equip) { int hIndex = 0; if (HPMHooks.count.HP_clif_item_sub_pre > 0) { @@ -8250,10 +9629,36 @@ void HP_clif_cashshop_load(void) { } return; } -void HP_clif_package_announce(struct map_session_data *sd, unsigned short nameid, unsigned short containerid) { +void HP_clif_cashShopSchedule(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_cashShopSchedule_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopSchedule_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_cashShopSchedule_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cashShopSchedule(fd, sd); + } + if (HPMHooks.count.HP_clif_cashShopSchedule_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopSchedule_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_cashShopSchedule_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_package_announce(struct map_session_data *sd, int nameid, int containerid) { int hIndex = 0; if (HPMHooks.count.HP_clif_package_announce_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, unsigned short *nameid, unsigned short *containerid); + void (*preHookFunc) (struct map_session_data **sd, int *nameid, int *containerid); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_package_announce_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_package_announce_pre[hIndex].func; @@ -8268,7 +9673,7 @@ void HP_clif_package_announce(struct map_session_data *sd, unsigned short nameid HPMHooks.source.clif.package_announce(sd, nameid, containerid); } if (HPMHooks.count.HP_clif_package_announce_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, unsigned short nameid, unsigned short containerid); + void (*postHookFunc) (struct map_session_data *sd, int nameid, int containerid); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_package_announce_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_package_announce_post[hIndex].func; postHookFunc(sd, nameid, containerid); @@ -8276,10 +9681,10 @@ void HP_clif_package_announce(struct map_session_data *sd, unsigned short nameid } return; } -void HP_clif_item_drop_announce(struct map_session_data *sd, unsigned short nameid, char *monsterName) { +void HP_clif_item_drop_announce(struct map_session_data *sd, int nameid, char *monsterName) { int hIndex = 0; if (HPMHooks.count.HP_clif_item_drop_announce_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, unsigned short *nameid, char **monsterName); + void (*preHookFunc) (struct map_session_data **sd, int *nameid, char **monsterName); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_drop_announce_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_item_drop_announce_pre[hIndex].func; @@ -8294,7 +9699,7 @@ void HP_clif_item_drop_announce(struct map_session_data *sd, unsigned short name HPMHooks.source.clif.item_drop_announce(sd, nameid, monsterName); } if (HPMHooks.count.HP_clif_item_drop_announce_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, unsigned short nameid, char *monsterName); + void (*postHookFunc) (struct map_session_data *sd, int nameid, char *monsterName); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_drop_announce_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_item_drop_announce_post[hIndex].func; postHookFunc(sd, nameid, monsterName); @@ -9300,14 +10705,14 @@ void HP_clif_maptypeproperty2(struct block_list *bl, enum send_target t) { } return; } -void HP_clif_changemapserver(struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port) { +void HP_clif_changemapserver(struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port, char *dnsHost) { int hIndex = 0; if (HPMHooks.count.HP_clif_changemapserver_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port); + void (*preHookFunc) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port, char **dnsHost); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapserver_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_changemapserver_pre[hIndex].func; - preHookFunc(&sd, &map_index, &x, &y, &ip, &port); + preHookFunc(&sd, &map_index, &x, &y, &ip, &port, &dnsHost); } if (*HPMforce_return) { *HPMforce_return = false; @@ -9315,13 +10720,13 @@ void HP_clif_changemapserver(struct map_session_data *sd, unsigned short map_ind } } { - HPMHooks.source.clif.changemapserver(sd, map_index, x, y, ip, port); + HPMHooks.source.clif.changemapserver(sd, map_index, x, y, ip, port, dnsHost); } if (HPMHooks.count.HP_clif_changemapserver_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port); + void (*postHookFunc) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port, char *dnsHost); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapserver_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_changemapserver_post[hIndex].func; - postHookFunc(sd, map_index, x, y, ip, port); + postHookFunc(sd, map_index, x, y, ip, port, dnsHost); } } return; @@ -10225,14 +11630,14 @@ void HP_clif_skillcastcancel(struct block_list *bl) { } return; } -void HP_clif_skill_fail(struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype) { +void HP_clif_skill_fail(struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype, int32 item_id) { int hIndex = 0; if (HPMHooks.count.HP_clif_skill_fail_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, enum useskill_fail_cause *cause, int *btype); + void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, enum useskill_fail_cause *cause, int *btype, int32 *item_id); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_fail_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_skill_fail_pre[hIndex].func; - preHookFunc(&sd, &skill_id, &cause, &btype); + preHookFunc(&sd, &skill_id, &cause, &btype, &item_id); } if (*HPMforce_return) { *HPMforce_return = false; @@ -10240,13 +11645,13 @@ void HP_clif_skill_fail(struct map_session_data *sd, uint16 skill_id, enum usesk } } { - HPMHooks.source.clif.skill_fail(sd, skill_id, cause, btype); + HPMHooks.source.clif.skill_fail(sd, skill_id, cause, btype, item_id); } if (HPMHooks.count.HP_clif_skill_fail_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype); + void (*postHookFunc) (struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype, int32 item_id); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_fail_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_skill_fail_post[hIndex].func; - postHookFunc(sd, skill_id, cause, btype); + postHookFunc(sd, skill_id, cause, btype, item_id); } } return; @@ -11065,10 +12470,10 @@ void HP_clif_upgrademessage(int fd, int result, int item_id) { } return; } -void HP_clif_get_weapon_view(struct map_session_data *sd, unsigned short *rhand, unsigned short *lhand) { +void HP_clif_get_weapon_view(struct map_session_data *sd, int *rhand, int *lhand) { int hIndex = 0; if (HPMHooks.count.HP_clif_get_weapon_view_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, unsigned short **rhand, unsigned short **lhand); + void (*preHookFunc) (struct map_session_data **sd, int **rhand, int **lhand); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_weapon_view_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_get_weapon_view_pre[hIndex].func; @@ -11083,7 +12488,7 @@ void HP_clif_get_weapon_view(struct map_session_data *sd, unsigned short *rhand, HPMHooks.source.clif.get_weapon_view(sd, rhand, lhand); } if (HPMHooks.count.HP_clif_get_weapon_view_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, unsigned short *rhand, unsigned short *lhand); + void (*postHookFunc) (struct map_session_data *sd, int *rhand, int *lhand); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_weapon_view_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_get_weapon_view_post[hIndex].func; postHookFunc(sd, rhand, lhand); @@ -13726,6 +15131,32 @@ void HP_clif_msgtable_str(struct map_session_data *sd, enum clif_messages p1, co } return; } +void HP_clif_msgtable_str_color(struct map_session_data *sd, enum clif_messages p1, const char *value, uint32 color) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_msgtable_str_color_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum clif_messages *p1, const char **value, uint32 *color); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_str_color_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_msgtable_str_color_pre[hIndex].func; + preHookFunc(&sd, &p1, &value, &color); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.msgtable_str_color(sd, p1, value, color); + } + if (HPMHooks.count.HP_clif_msgtable_str_color_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum clif_messages p1, const char *value, uint32 color); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_str_color_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_msgtable_str_color_post[hIndex].func; + postHookFunc(sd, p1, value, color); + } + } + return; +} void HP_clif_msgtable_color(struct map_session_data *sd, enum clif_messages p1, uint32 color) { int hIndex = 0; if (HPMHooks.count.HP_clif_msgtable_color_pre > 0) { @@ -14326,6 +15757,32 @@ void HP_clif_openvending(struct map_session_data *sd, int id, struct s_vending * } return; } +void HP_clif_openvendingAck(int fd, int result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_openvendingAck_pre > 0) { + void (*preHookFunc) (int *fd, int *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvendingAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_openvendingAck_pre[hIndex].func; + preHookFunc(&fd, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.openvendingAck(fd, result); + } + if (HPMHooks.count.HP_clif_openvendingAck_post > 0) { + void (*postHookFunc) (int fd, int result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvendingAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_openvendingAck_post[hIndex].func; + postHookFunc(fd, result); + } + } + return; +} void HP_clif_vendingreport(struct map_session_data *sd, int index, int amount, uint32 char_id, int zeny) { int hIndex = 0; if (HPMHooks.count.HP_clif_vendingreport_pre > 0) { @@ -15314,14 +16771,14 @@ void HP_clif_guild_inviteack(struct map_session_data *sd, int flag) { } return; } -void HP_clif_guild_leave(struct map_session_data *sd, const char *name, const char *mes) { +void HP_clif_guild_leave(struct map_session_data *sd, const char *name, int char_id, const char *mes) { int hIndex = 0; if (HPMHooks.count.HP_clif_guild_leave_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, const char **name, const char **mes); + void (*preHookFunc) (struct map_session_data **sd, const char **name, int *char_id, const char **mes); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_leave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_guild_leave_pre[hIndex].func; - preHookFunc(&sd, &name, &mes); + preHookFunc(&sd, &name, &char_id, &mes); } if (*HPMforce_return) { *HPMforce_return = false; @@ -15329,25 +16786,25 @@ void HP_clif_guild_leave(struct map_session_data *sd, const char *name, const ch } } { - HPMHooks.source.clif.guild_leave(sd, name, mes); + HPMHooks.source.clif.guild_leave(sd, name, char_id, mes); } if (HPMHooks.count.HP_clif_guild_leave_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, const char *name, const char *mes); + void (*postHookFunc) (struct map_session_data *sd, const char *name, int char_id, const char *mes); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_leave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_leave_post[hIndex].func; - postHookFunc(sd, name, mes); + postHookFunc(sd, name, char_id, mes); } } return; } -void HP_clif_guild_expulsion(struct map_session_data *sd, const char *name, const char *mes, int account_id) { +void HP_clif_guild_expulsion(struct map_session_data *sd, const char *name, int char_id, const char *mes, int account_id) { int hIndex = 0; if (HPMHooks.count.HP_clif_guild_expulsion_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, const char **name, const char **mes, int *account_id); + void (*preHookFunc) (struct map_session_data **sd, const char **name, int *char_id, const char **mes, int *account_id); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsion_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_guild_expulsion_pre[hIndex].func; - preHookFunc(&sd, &name, &mes, &account_id); + preHookFunc(&sd, &name, &char_id, &mes, &account_id); } if (*HPMforce_return) { *HPMforce_return = false; @@ -15355,13 +16812,13 @@ void HP_clif_guild_expulsion(struct map_session_data *sd, const char *name, cons } } { - HPMHooks.source.clif.guild_expulsion(sd, name, mes, account_id); + HPMHooks.source.clif.guild_expulsion(sd, name, char_id, mes, account_id); } if (HPMHooks.count.HP_clif_guild_expulsion_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, const char *name, const char *mes, int account_id); + void (*postHookFunc) (struct map_session_data *sd, const char *name, int char_id, const char *mes, int account_id); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsion_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_expulsion_post[hIndex].func; - postHookFunc(sd, name, mes, account_id); + postHookFunc(sd, name, char_id, mes, account_id); } } return; @@ -15808,6 +17265,58 @@ void HP_clif_guild_expulsionlist(struct map_session_data *sd) { } return; } +void HP_clif_guild_set_position(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_guild_set_position_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_set_position_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_guild_set_position_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_set_position(sd); + } + if (HPMHooks.count.HP_clif_guild_set_position_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_set_position_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_guild_set_position_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_guild_position_selected(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_guild_position_selected_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_position_selected_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_guild_position_selected_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_position_selected(sd); + } + if (HPMHooks.count.HP_clif_guild_position_selected_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_position_selected_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_guild_position_selected_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} bool HP_clif_validate_emblem(const uint8 *emblem, unsigned long emblem_len) { int hIndex = 0; bool retVal___ = false; @@ -18131,10 +19640,10 @@ void HP_clif_buyingstore_trade_failed_buyer(struct map_session_data *sd, short r } return; } -void HP_clif_buyingstore_update_item(struct map_session_data *sd, unsigned short nameid, unsigned short amount, uint32 char_id, int zeny) { +void HP_clif_buyingstore_update_item(struct map_session_data *sd, int nameid, unsigned short amount, uint32 char_id, int zeny) { int hIndex = 0; if (HPMHooks.count.HP_clif_buyingstore_update_item_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, unsigned short *nameid, unsigned short *amount, uint32 *char_id, int *zeny); + void (*preHookFunc) (struct map_session_data **sd, int *nameid, unsigned short *amount, uint32 *char_id, int *zeny); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_update_item_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_buyingstore_update_item_pre[hIndex].func; @@ -18149,7 +19658,7 @@ void HP_clif_buyingstore_update_item(struct map_session_data *sd, unsigned short HPMHooks.source.clif.buyingstore_update_item(sd, nameid, amount, char_id, zeny); } if (HPMHooks.count.HP_clif_buyingstore_update_item_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, unsigned short nameid, unsigned short amount, uint32 char_id, int zeny); + void (*postHookFunc) (struct map_session_data *sd, int nameid, unsigned short amount, uint32 char_id, int zeny); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_update_item_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_buyingstore_update_item_post[hIndex].func; postHookFunc(sd, nameid, amount, char_id, zeny); @@ -18183,10 +19692,10 @@ void HP_clif_buyingstore_delete_item(struct map_session_data *sd, short index, u } return; } -void HP_clif_buyingstore_trade_failed_seller(struct map_session_data *sd, short result, unsigned short nameid) { +void HP_clif_buyingstore_trade_failed_seller(struct map_session_data *sd, short result, int nameid) { int hIndex = 0; if (HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, short *result, unsigned short *nameid); + void (*preHookFunc) (struct map_session_data **sd, short *result, int *nameid); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_buyingstore_trade_failed_seller_pre[hIndex].func; @@ -18201,7 +19710,7 @@ void HP_clif_buyingstore_trade_failed_seller(struct map_session_data *sd, short HPMHooks.source.clif.buyingstore_trade_failed_seller(sd, result, nameid); } if (HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, short result, unsigned short nameid); + void (*postHookFunc) (struct map_session_data *sd, short result, int nameid); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_buyingstore_trade_failed_seller_post[hIndex].func; postHookFunc(sd, result, nameid); @@ -19019,10 +20528,10 @@ bool HP_clif_parse_roulette_db(void) { } return retVal___; } -void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, short bonusItemID) { +void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, int bonusItemID) { int hIndex = 0; if (HPMHooks.count.HP_clif_roulette_generate_ack_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, unsigned char *result, short *stage, short *prizeIdx, short *bonusItemID); + void (*preHookFunc) (struct map_session_data **sd, unsigned char *result, short *stage, short *prizeIdx, int *bonusItemID); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_roulette_generate_ack_pre[hIndex].func; @@ -19037,7 +20546,7 @@ void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char re HPMHooks.source.clif.roulette_generate_ack(sd, result, stage, prizeIdx, bonusItemID); } if (HPMHooks.count.HP_clif_roulette_generate_ack_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, short bonusItemID); + void (*postHookFunc) (struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, int bonusItemID); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_roulette_generate_ack_post[hIndex].func; postHookFunc(sd, result, stage, prizeIdx, bonusItemID); @@ -19230,6 +20739,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) { @@ -25420,10 +27085,10 @@ void HP_clif_pRodexAddItem(int fd, struct map_session_data *sd) { } return; } -void HP_clif_rodex_add_item_result(struct map_session_data *sd, int16 idx, int16 amount, int8 result) { +void HP_clif_rodex_add_item_result(struct map_session_data *sd, int16 idx, int16 amount, enum rodex_add_item result) { int hIndex = 0; if (HPMHooks.count.HP_clif_rodex_add_item_result_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int16 *idx, int16 *amount, int8 *result); + void (*preHookFunc) (struct map_session_data **sd, int16 *idx, int16 *amount, enum rodex_add_item *result); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_add_item_result_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_rodex_add_item_result_pre[hIndex].func; @@ -25438,7 +27103,7 @@ void HP_clif_rodex_add_item_result(struct map_session_data *sd, int16 idx, int16 HPMHooks.source.clif.rodex_add_item_result(sd, idx, amount, result); } if (HPMHooks.count.HP_clif_rodex_add_item_result_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int16 idx, int16 amount, int8 result); + void (*postHookFunc) (struct map_session_data *sd, int16 idx, int16 amount, enum rodex_add_item result); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_add_item_result_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_rodex_add_item_result_post[hIndex].func; postHookFunc(sd, idx, amount, result); @@ -25940,10 +27605,10 @@ void HP_clif_pRodexRequestZeny(int fd, struct map_session_data *sd) { } return; } -void HP_clif_rodex_request_zeny(struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result) { +void HP_clif_rodex_request_zeny(struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_zeny result) { int hIndex = 0; if (HPMHooks.count.HP_clif_rodex_request_zeny_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, int8 *result); + void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, enum rodex_get_zeny *result); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_request_zeny_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_rodex_request_zeny_pre[hIndex].func; @@ -25958,7 +27623,7 @@ void HP_clif_rodex_request_zeny(struct map_session_data *sd, int8 opentype, int6 HPMHooks.source.clif.rodex_request_zeny(sd, opentype, mail_id, result); } if (HPMHooks.count.HP_clif_rodex_request_zeny_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result); + void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_zeny result); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_request_zeny_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_rodex_request_zeny_post[hIndex].func; postHookFunc(sd, opentype, mail_id, result); @@ -25992,10 +27657,10 @@ void HP_clif_pRodexRequestItems(int fd, struct map_session_data *sd) { } return; } -void HP_clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result) { +void HP_clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_items result) { int hIndex = 0; if (HPMHooks.count.HP_clif_rodex_request_items_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, int8 *result); + void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, enum rodex_get_items *result); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_request_items_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_rodex_request_items_pre[hIndex].func; @@ -26010,7 +27675,7 @@ void HP_clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int HPMHooks.source.clif.rodex_request_items(sd, opentype, mail_id, result); } if (HPMHooks.count.HP_clif_rodex_request_items_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result); + void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_items result); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_request_items_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_rodex_request_items_post[hIndex].func; postHookFunc(sd, opentype, mail_id, result); @@ -26252,6 +27917,58 @@ void HP_clif_hat_effect_single(struct block_list *bl, uint16 effectId, bool enab } return; } +void HP_clif_overweight_percent(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_overweight_percent_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_overweight_percent_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_overweight_percent_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.overweight_percent(sd); + } + if (HPMHooks.count.HP_clif_overweight_percent_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_overweight_percent_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_overweight_percent_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_pChangeDress(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pChangeDress_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeDress_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pChangeDress_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pChangeDress(fd, sd); + } + if (HPMHooks.count.HP_clif_pChangeDress_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeDress_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pChangeDress_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} bool HP_clif_pAttendanceDB(void) { int hIndex = 0; bool retVal___ = false; @@ -26649,10 +28366,10 @@ bool HP_clif_style_change_validate_requirements(struct map_session_data *sd, int } return retVal___; } -void HP_clif_stylist_send_rodexitem(struct map_session_data *sd, int16 itemid) { +void HP_clif_stylist_send_rodexitem(struct map_session_data *sd, int itemid) { int hIndex = 0; if (HPMHooks.count.HP_clif_stylist_send_rodexitem_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int16 *itemid); + void (*preHookFunc) (struct map_session_data **sd, int *itemid); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_send_rodexitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_stylist_send_rodexitem_pre[hIndex].func; @@ -26667,7 +28384,7 @@ void HP_clif_stylist_send_rodexitem(struct map_session_data *sd, int16 itemid) { HPMHooks.source.clif.stylist_send_rodexitem(sd, itemid); } if (HPMHooks.count.HP_clif_stylist_send_rodexitem_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int16 itemid); + void (*postHookFunc) (struct map_session_data *sd, int itemid); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_send_rodexitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_stylist_send_rodexitem_post[hIndex].func; postHookFunc(sd, itemid); @@ -26701,6 +28418,32 @@ void HP_clif_pReqStyleChange(int fd, struct map_session_data *sd) { } return; } +void HP_clif_pReqStyleChange2(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pReqStyleChange2_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqStyleChange2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pReqStyleChange2_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pReqStyleChange2(fd, sd); + } + if (HPMHooks.count.HP_clif_pReqStyleChange2_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqStyleChange2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pReqStyleChange2_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} void HP_clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int16 idx, bool isitem) { int hIndex = 0; if (HPMHooks.count.HP_clif_cz_req_style_change_sub_pre > 0) { @@ -26805,6 +28548,32 @@ void HP_clif_petEvolutionResult(int fd, enum pet_evolution_result result) { } return; } +void HP_clif_party_dead_notification(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_party_dead_notification_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_dead_notification_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_party_dead_notification_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_dead_notification(sd); + } + if (HPMHooks.count.HP_clif_party_dead_notification_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_dead_notification_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_party_dead_notification_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} /* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; @@ -33527,11 +35296,11 @@ int HP_intif_parse(int fd) { } return retVal___; } -int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_lv, short pet_egg_id, short pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name) { +int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_intif_create_pet_pre > 0) { - int (*preHookFunc) (int *account_id, int *char_id, short *pet_type, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name); + int (*preHookFunc) (int *account_id, int *char_id, short *pet_type, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_intif_create_pet_pre[hIndex].func; @@ -33546,7 +35315,7 @@ int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_l retVal___ = HPMHooks.source.intif.create_pet(account_id, char_id, pet_type, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); } if (HPMHooks.count.HP_intif_create_pet_post > 0) { - int (*postHookFunc) (int retVal___, int account_id, int char_id, short pet_type, short pet_lv, short pet_egg_id, short pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name); + int (*postHookFunc) (int retVal___, int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name); for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_create_pet_post[hIndex].func; retVal___ = postHookFunc(retVal___, account_id, char_id, pet_type, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); @@ -35601,6 +37370,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) { @@ -37402,6 +39223,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; @@ -39528,11 +41375,11 @@ void HP_itemdb_clear(bool total) { } return; } -struct item_combo* HP_itemdb_id2combo(unsigned short id) { +struct item_combo* HP_itemdb_id2combo(int id) { int hIndex = 0; struct item_combo* retVal___ = NULL; if (HPMHooks.count.HP_itemdb_id2combo_pre > 0) { - struct item_combo* (*preHookFunc) (unsigned short *id); + struct item_combo* (*preHookFunc) (int *id); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_id2combo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_id2combo_pre[hIndex].func; @@ -39547,7 +41394,7 @@ struct item_combo* HP_itemdb_id2combo(unsigned short id) { retVal___ = HPMHooks.source.itemdb.id2combo(id); } if (HPMHooks.count.HP_itemdb_id2combo_post > 0) { - struct item_combo* (*postHookFunc) (struct item_combo* retVal___, unsigned short id); + struct item_combo* (*postHookFunc) (struct item_combo* retVal___, int id); for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_id2combo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_id2combo_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); @@ -45614,11 +47461,11 @@ bool HP_map_zone_mf_cache(int m, char *flag, char *params) { } return retVal___; } -unsigned short HP_map_zone_str2itemid(const char *name) { +int HP_map_zone_str2itemid(const char *name) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_map_zone_str2itemid_pre > 0) { - unsigned short (*preHookFunc) (const char **name); + int (*preHookFunc) (const char **name); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2itemid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_zone_str2itemid_pre[hIndex].func; @@ -45633,7 +47480,7 @@ unsigned short HP_map_zone_str2itemid(const char *name) { retVal___ = HPMHooks.source.map.zone_str2itemid(name); } if (HPMHooks.count.HP_map_zone_str2itemid_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, const char *name); + int (*postHookFunc) (int retVal___, const char *name); for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2itemid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_zone_str2itemid_post[hIndex].func; retVal___ = postHookFunc(retVal___, name); @@ -50373,6 +52220,92 @@ void HP_mob_clear_spawninfo(void) { } return; } +struct item_drop_ratio* HP_mob_get_item_drop_ratio(int nameid) { + int hIndex = 0; + struct item_drop_ratio* retVal___ = NULL; + if (HPMHooks.count.HP_mob_get_item_drop_ratio_pre > 0) { + struct item_drop_ratio* (*preHookFunc) (int *nameid); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_item_drop_ratio_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_get_item_drop_ratio_pre[hIndex].func; + retVal___ = preHookFunc(&nameid); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.get_item_drop_ratio(nameid); + } + if (HPMHooks.count.HP_mob_get_item_drop_ratio_post > 0) { + struct item_drop_ratio* (*postHookFunc) (struct item_drop_ratio* retVal___, int nameid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_item_drop_ratio_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_get_item_drop_ratio_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nameid); + } + } + return retVal___; +} +void HP_mob_set_item_drop_ratio(int nameid, struct item_drop_ratio *ratio) { + int hIndex = 0; + if (HPMHooks.count.HP_mob_set_item_drop_ratio_pre > 0) { + void (*preHookFunc) (int *nameid, struct item_drop_ratio **ratio); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_set_item_drop_ratio_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_set_item_drop_ratio_pre[hIndex].func; + preHookFunc(&nameid, &ratio); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.set_item_drop_ratio(nameid, ratio); + } + if (HPMHooks.count.HP_mob_set_item_drop_ratio_post > 0) { + void (*postHookFunc) (int nameid, struct item_drop_ratio *ratio); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_set_item_drop_ratio_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_set_item_drop_ratio_post[hIndex].func; + postHookFunc(nameid, ratio); + } + } + return; +} +int HP_mob_final_ratio_sub(union DBKey key, struct DBData *data, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_mob_final_ratio_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_ratio_sub_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_final_ratio_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, &data, ap___copy); + va_end(ap___copy); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.final_ratio_sub(key, data, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_mob_final_ratio_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_ratio_sub_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_final_ratio_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} void HP_mob_destroy_mob_db(int index) { int hIndex = 0; if (HPMHooks.count.HP_mob_destroy_mob_db_pre > 0) { @@ -60863,11 +62796,11 @@ void HP_pc_check_skilltree(struct map_session_data *sd, int skill_id) { } return; } -int HP_pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv, short rate, short flag, short card_id) { +int HP_pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv, short rate, short flag, int card_id) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_pc_bonus_autospell_pre > 0) { - int (*preHookFunc) (struct s_autospell **spell, int *max, short *id, short *lv, short *rate, short *flag, short *card_id); + int (*preHookFunc) (struct s_autospell **spell, int *max, short *id, short *lv, short *rate, short *flag, int *card_id); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_bonus_autospell_pre[hIndex].func; @@ -60882,7 +62815,7 @@ int HP_pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv retVal___ = HPMHooks.source.pc.bonus_autospell(spell, max, id, lv, rate, flag, card_id); } if (HPMHooks.count.HP_pc_bonus_autospell_post > 0) { - int (*postHookFunc) (int retVal___, struct s_autospell *spell, int max, short id, short lv, short rate, short flag, short card_id); + int (*postHookFunc) (int retVal___, struct s_autospell *spell, int max, short id, short lv, short rate, short flag, int card_id); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_bonus_autospell_post[hIndex].func; retVal___ = postHookFunc(retVal___, spell, max, id, lv, rate, flag, card_id); @@ -60890,11 +62823,11 @@ int HP_pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv } return retVal___; } -int HP_pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, short card_id) { +int HP_pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, int card_id) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_pc_bonus_autospell_onskill_pre > 0) { - int (*preHookFunc) (struct s_autospell **spell, int *max, short *src_skill, short *id, short *lv, short *rate, short *card_id); + int (*preHookFunc) (struct s_autospell **spell, int *max, short *src_skill, short *id, short *lv, short *rate, int *card_id); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_onskill_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_bonus_autospell_onskill_pre[hIndex].func; @@ -60909,7 +62842,7 @@ int HP_pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_ retVal___ = HPMHooks.source.pc.bonus_autospell_onskill(spell, max, src_skill, id, lv, rate, card_id); } if (HPMHooks.count.HP_pc_bonus_autospell_onskill_post > 0) { - int (*postHookFunc) (int retVal___, struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, short card_id); + int (*postHookFunc) (int retVal___, struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, int card_id); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_onskill_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_bonus_autospell_onskill_post[hIndex].func; retVal___ = postHookFunc(retVal___, spell, max, src_skill, id, lv, rate, card_id); @@ -62244,6 +64177,33 @@ bool HP_pc_isDeathPenaltyJob(uint16 job) { } return retVal___; } +bool HP_pc_has_second_costume(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_has_second_costume_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_has_second_costume_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_has_second_costume_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.has_second_costume(sd); + } + if (HPMHooks.count.HP_pc_has_second_costume_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_has_second_costume_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_has_second_costume_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} /* pcre_interface */ pcre* HP_libpcre_compile(const char *pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr) { int hIndex = 0; @@ -62918,11 +64878,11 @@ int HP_pet_recv_petdata(int account_id, struct s_pet *p, int flag) { } return retVal___; } -int HP_pet_select_egg(struct map_session_data *sd, short egg_index) { +int HP_pet_select_egg(struct map_session_data *sd, int egg_index) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_pet_select_egg_pre > 0) { - int (*preHookFunc) (struct map_session_data **sd, short *egg_index); + int (*preHookFunc) (struct map_session_data **sd, int *egg_index); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_select_egg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pet_select_egg_pre[hIndex].func; @@ -62937,7 +64897,7 @@ int HP_pet_select_egg(struct map_session_data *sd, short egg_index) { retVal___ = HPMHooks.source.pet.select_egg(sd, egg_index); } if (HPMHooks.count.HP_pet_select_egg_post > 0) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, short egg_index); + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int egg_index); for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_select_egg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pet_select_egg_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, egg_index); @@ -64036,6 +65996,328 @@ struct quest_db* HP_quest_read_db_sub(struct config_setting_t *cs, int n, const } return retVal___; } +int HP_quest_questinfo_validate_icon(int icon) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_quest_questinfo_validate_icon_pre > 0) { + int (*preHookFunc) (int *icon); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_icon_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_icon_pre[hIndex].func; + retVal___ = preHookFunc(&icon); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_icon(icon); + } + if (HPMHooks.count.HP_quest_questinfo_validate_icon_post > 0) { + int (*postHookFunc) (int retVal___, int icon); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_icon_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_icon_post[hIndex].func; + retVal___ = postHookFunc(retVal___, icon); + } + } + return retVal___; +} +void HP_quest_questinfo_refresh(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_quest_questinfo_refresh_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_refresh_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_refresh_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.quest.questinfo_refresh(sd); + } + if (HPMHooks.count.HP_quest_questinfo_refresh_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_refresh_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_refresh_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +bool HP_quest_questinfo_validate(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +bool HP_quest_questinfo_validate_job(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_job_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_job_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_job_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_job(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_job_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_job_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_job_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +bool HP_quest_questinfo_validate_sex(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_sex_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_sex_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_sex_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_sex(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_sex_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_sex_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_sex_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +bool HP_quest_questinfo_validate_baselevel(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_baselevel_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_baselevel_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_baselevel_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_baselevel(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_baselevel_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_baselevel_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_baselevel_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +bool HP_quest_questinfo_validate_joblevel(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_joblevel_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_joblevel_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_joblevel_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_joblevel(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_joblevel_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_joblevel_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_joblevel_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +bool HP_quest_questinfo_validate_items(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_items_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_items_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_items_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_items(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_items_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_items_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_items_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +bool HP_quest_questinfo_validate_homunculus_level(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_homunculus_level_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_homunculus_level_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_homunculus_level_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_homunculus_level(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_homunculus_level_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_homunculus_level_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_homunculus_level_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +bool HP_quest_questinfo_validate_homunculus_type(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_homunculus_type_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_homunculus_type_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_homunculus_type_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_homunculus_type(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_homunculus_type_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_homunculus_type_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_homunculus_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +bool HP_quest_questinfo_validate_quests(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_quests_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_quests_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_quests_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_quests(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_quests_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_quests_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_quests_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +void HP_quest_questinfo_vector_clear(int m) { + int hIndex = 0; + if (HPMHooks.count.HP_quest_questinfo_vector_clear_pre > 0) { + void (*preHookFunc) (int *m); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_vector_clear_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_vector_clear_pre[hIndex].func; + preHookFunc(&m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.quest.questinfo_vector_clear(m); + } + if (HPMHooks.count.HP_quest_questinfo_vector_clear_post > 0) { + void (*postHookFunc) (int m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_vector_clear_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_vector_clear_post[hIndex].func; + postHookFunc(m); + } + } + return; +} /* rnd_interface */ void HP_rnd_init(void) { int hIndex = 0; @@ -67280,14 +69562,14 @@ const char* HP_script_parse_line(const char *p) { } return retVal___; } -void HP_script_read_constdb(void) { +void HP_script_read_constdb(bool reload) { int hIndex = 0; if (HPMHooks.count.HP_script_read_constdb_pre > 0) { - void (*preHookFunc) (void); + void (*preHookFunc) (bool *reload); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_read_constdb_pre[hIndex].func; - preHookFunc(); + preHookFunc(&reload); } if (*HPMforce_return) { *HPMforce_return = false; @@ -67295,13 +69577,13 @@ void HP_script_read_constdb(void) { } } { - HPMHooks.source.script.read_constdb(); + HPMHooks.source.script.read_constdb(reload); } if (HPMHooks.count.HP_script_read_constdb_post > 0) { - void (*postHookFunc) (void); + void (*postHookFunc) (bool reload); for (hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_read_constdb_post[hIndex].func; - postHookFunc(); + postHookFunc(reload); } } return; @@ -69749,10 +72031,10 @@ bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigne } return retVal___; } -void HP_searchstore_query(struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const unsigned short *itemlist, unsigned int item_count, const unsigned short *cardlist, unsigned int card_count) { +void HP_searchstore_query(struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const uint32 *itemlist, unsigned int item_count, const uint32 *cardlist, unsigned int card_count) { int hIndex = 0; if (HPMHooks.count.HP_searchstore_query_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const unsigned short **itemlist, unsigned int *item_count, const unsigned short **cardlist, unsigned int *card_count); + void (*preHookFunc) (struct map_session_data **sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const uint32 **itemlist, unsigned int *item_count, const uint32 **cardlist, unsigned int *card_count); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_query_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_searchstore_query_pre[hIndex].func; @@ -69767,7 +72049,7 @@ void HP_searchstore_query(struct map_session_data *sd, unsigned char type, unsig HPMHooks.source.searchstore.query(sd, type, min_price, max_price, itemlist, item_count, cardlist, card_count); } if (HPMHooks.count.HP_searchstore_query_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const unsigned short *itemlist, unsigned int item_count, const unsigned short *cardlist, unsigned int card_count); + void (*postHookFunc) (struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const uint32 *itemlist, unsigned int item_count, const uint32 *cardlist, unsigned int card_count); for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_query_post; hIndex++) { postHookFunc = HPMHooks.list.HP_searchstore_query_post[hIndex].func; postHookFunc(sd, type, min_price, max_price, itemlist, item_count, cardlist, card_count); @@ -69880,10 +72162,10 @@ void HP_searchstore_close(struct map_session_data *sd) { } return; } -void HP_searchstore_click(struct map_session_data *sd, int account_id, int store_id, unsigned short nameid) { +void HP_searchstore_click(struct map_session_data *sd, int account_id, int store_id, int nameid) { int hIndex = 0; if (HPMHooks.count.HP_searchstore_click_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int *account_id, int *store_id, unsigned short *nameid); + void (*preHookFunc) (struct map_session_data **sd, int *account_id, int *store_id, int *nameid); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_click_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_searchstore_click_pre[hIndex].func; @@ -69898,7 +72180,7 @@ void HP_searchstore_click(struct map_session_data *sd, int account_id, int store HPMHooks.source.searchstore.click(sd, account_id, store_id, nameid); } if (HPMHooks.count.HP_searchstore_click_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int account_id, int store_id, unsigned short nameid); + void (*postHookFunc) (struct map_session_data *sd, int account_id, int store_id, int nameid); for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_click_post; hIndex++) { postHookFunc = HPMHooks.list.HP_searchstore_click_post[hIndex].func; postHookFunc(sd, account_id, store_id, nameid); @@ -69959,11 +72241,11 @@ void HP_searchstore_clearremote(struct map_session_data *sd) { } return; } -bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine, const struct item_option *option) { +bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine, const struct item_option *option) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_searchstore_result_pre > 0) { - bool (*preHookFunc) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short **card, unsigned char *refine, const struct item_option **option); + bool (*preHookFunc) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, int *nameid, unsigned short *amount, unsigned int *price, const int **card, unsigned char *refine, const struct item_option **option); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_searchstore_result_pre[hIndex].func; @@ -69978,7 +72260,7 @@ bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, i retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine, option); } if (HPMHooks.count.HP_searchstore_result_post > 0) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine, const struct item_option *option); + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine, const struct item_option *option); for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_post; hIndex++) { postHookFunc = HPMHooks.list.HP_searchstore_result_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, store_id, account_id, store_name, nameid, amount, price, card, refine, option); @@ -74625,14 +76907,14 @@ void HP_skill_init_unit_layout(void) { } return; } -void HP_skill_init_unit_layout_unknown(int skill_idx) { +void HP_skill_init_unit_layout_unknown(int skill_idx, int pos) { int hIndex = 0; if (HPMHooks.count.HP_skill_init_unit_layout_unknown_pre > 0) { - void (*preHookFunc) (int *skill_idx); + void (*preHookFunc) (int *skill_idx, int *pos); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_init_unit_layout_unknown_pre[hIndex].func; - preHookFunc(&skill_idx); + preHookFunc(&skill_idx, &pos); } if (*HPMforce_return) { *HPMforce_return = false; @@ -74640,13 +76922,13 @@ void HP_skill_init_unit_layout_unknown(int skill_idx) { } } { - HPMHooks.source.skill.init_unit_layout_unknown(skill_idx); + HPMHooks.source.skill.init_unit_layout_unknown(skill_idx, pos); } if (HPMHooks.count.HP_skill_init_unit_layout_unknown_post > 0) { - void (*postHookFunc) (int skill_idx); + void (*postHookFunc) (int skill_idx, int pos); for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_init_unit_layout_unknown_post[hIndex].func; - postHookFunc(skill_idx); + postHookFunc(skill_idx, pos); } } return; @@ -85814,11 +88096,11 @@ void HP_vending_purchase(struct map_session_data *sd, int aid, unsigned int uid, } return; } -bool HP_vending_search(struct map_session_data *sd, unsigned short nameid) { +bool HP_vending_search(struct map_session_data *sd, int nameid) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_vending_search_pre > 0) { - bool (*preHookFunc) (struct map_session_data **sd, unsigned short *nameid); + bool (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_search_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_vending_search_pre[hIndex].func; @@ -85833,7 +88115,7 @@ bool HP_vending_search(struct map_session_data *sd, unsigned short nameid) { retVal___ = HPMHooks.source.vending.search(sd, nameid); } if (HPMHooks.count.HP_vending_search_post > 0) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned short nameid); + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int nameid); for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_search_post; hIndex++) { postHookFunc = HPMHooks.list.HP_vending_search_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, nameid); 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; diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index ef3f1124b..e90a04f8b 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -1,7 +1,7 @@ # This file is part of Hercules. # http://herc.ws - http://github.com/HerculesWS/Hercules # -# Copyright (C) 2013-2016 Hercules Dev Team +# Copyright (C) 2013-2018 Hercules Dev Team # # Hercules is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/plugins/constdb2doc.c b/src/plugins/constdb2doc.c index d211c46e2..3f681ea1a 100644 --- a/src/plugins/constdb2doc.c +++ b/src/plugins/constdb2doc.c @@ -86,7 +86,7 @@ void constdb2doc_constdb(void) /* Run */ fprintf(out_fp, "## Constants (db/constants.conf)\n\n"); - script->read_constdb(); + script->read_constdb(false); fprintf(out_fp, "\n"); fprintf(out_fp, "## Hardcoded Constants (source)\n\n"); diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index 38e5ead5d..57e68432e 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -242,7 +242,7 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source) StrBuf->Init(&buf); // id - StrBuf->Printf(&buf, "'%u',", it->nameid); + StrBuf->Printf(&buf, "'%u',", (uint32)it->nameid); // name_english SQL->EscapeString(NULL, e_name, it->name); @@ -449,7 +449,7 @@ void itemdb2sql_tableheader(void) "\n" "DROP TABLE IF EXISTS `%s`;\n" "CREATE TABLE `%s` (\n" - " `id` smallint(5) UNSIGNED NOT NULL DEFAULT '0',\n" + " `id` int(11) UNSIGNED NOT NULL DEFAULT '0',\n" " `name_english` varchar(50) NOT NULL DEFAULT '',\n" " `name_japanese` varchar(50) NOT NULL DEFAULT '',\n" " `type` tinyint(2) UNSIGNED NOT NULL DEFAULT '0',\n" diff --git a/src/plugins/script_mapquit.c b/src/plugins/script_mapquit.c index 767292f2d..b212ce1c6 100644 --- a/src/plugins/script_mapquit.c +++ b/src/plugins/script_mapquit.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2014-2015 Hercules Dev Team + * Copyright (C) 2014-2018 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by |