diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Defs.inc | 76 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc | 52 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc | 13 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | 347 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 12 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 3 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 163 | ||||
-rw-r--r-- | src/plugins/db2sql.c | 15 |
8 files changed, 612 insertions, 69 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 3ec573b6f..9482e6c15 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -1180,8 +1180,8 @@ typedef void (*HPMHOOK_pre_clif_viewequip_ack) (struct map_session_data **sd, st typedef void (*HPMHOOK_post_clif_viewequip_ack) (struct map_session_data *sd, struct map_session_data *tsd); typedef void (*HPMHOOK_pre_clif_equpcheckbox) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_equpcheckbox) (struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_displayexp) (struct map_session_data **sd, unsigned int *exp, char *type, bool *is_quest); -typedef void (*HPMHOOK_post_clif_displayexp) (struct map_session_data *sd, unsigned int exp, char type, bool is_quest); +typedef void (*HPMHOOK_pre_clif_displayexp) (struct map_session_data **sd, uint64 *exp, char *type, bool *is_quest); +typedef void (*HPMHOOK_post_clif_displayexp) (struct map_session_data *sd, uint64 exp, char type, bool is_quest); typedef void (*HPMHOOK_pre_clif_font) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_font) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_progressbar) (struct map_session_data **sd, unsigned int *color, unsigned int *second); @@ -2260,6 +2260,8 @@ typedef void (*HPMHOOK_pre_clif_rodex_send_maillist) (int *fd, struct map_sessio typedef void (*HPMHOOK_post_clif_rodex_send_maillist) (int fd, struct map_session_data *sd, int8 open_type, int64 page_start); typedef void (*HPMHOOK_pre_clif_rodex_send_refresh) (int *fd, struct map_session_data **sd, int8 *open_type, int *count); typedef void (*HPMHOOK_post_clif_rodex_send_refresh) (int fd, struct map_session_data *sd, int8 open_type, int count); +typedef void (*HPMHOOK_pre_clif_rodex_send_mails_all) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_rodex_send_mails_all) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pRodexReadMail) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pRodexReadMail) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_rodex_read_mail) (struct map_session_data **sd, int8 *opentype, struct rodex_message **msg); @@ -2508,8 +2510,8 @@ typedef int (*HPMHOOK_pre_guild_getindex) (const struct guild **g, int *account_ typedef int (*HPMHOOK_post_guild_getindex) (int retVal___, const struct guild *g, int account_id, int char_id); typedef int (*HPMHOOK_pre_guild_getposition) (struct guild **g, struct map_session_data **sd); typedef int (*HPMHOOK_post_guild_getposition) (int retVal___, struct guild *g, struct map_session_data *sd); -typedef unsigned int (*HPMHOOK_pre_guild_payexp) (struct map_session_data **sd, unsigned int *exp); -typedef unsigned int (*HPMHOOK_post_guild_payexp) (unsigned int retVal___, struct map_session_data *sd, unsigned int exp); +typedef uint64 (*HPMHOOK_pre_guild_payexp) (struct map_session_data **sd, uint64 *exp); +typedef uint64 (*HPMHOOK_post_guild_payexp) (uint64 retVal___, struct map_session_data *sd, uint64 exp); typedef int (*HPMHOOK_pre_guild_getexp) (struct map_session_data **sd, int *exp); typedef int (*HPMHOOK_post_guild_getexp) (int retVal___, struct map_session_data *sd, int exp); typedef int (*HPMHOOK_pre_guild_create) (struct map_session_data **sd, const char **name); @@ -3510,6 +3512,8 @@ 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); typedef bool (*HPMHOOK_post_itemdb_lookup_const) (bool retVal___, const struct config_setting_t *it, const char *name, int *value); +typedef bool (*HPMHOOK_pre_itemdb_lookup_const_mask) (const struct config_setting_t **it, const char **name, int **value); +typedef bool (*HPMHOOK_post_itemdb_lookup_const_mask) (bool retVal___, const struct config_setting_t *it, const char *name, int *value); #endif // MAP_ITEMDB_H #ifdef LOGIN_LCLIF_H /* lclif */ typedef void (*HPMHOOK_pre_lclif_init) (void); @@ -3844,6 +3848,32 @@ typedef void (*HPMHOOK_pre_login_config_set_defaults) (void); typedef void (*HPMHOOK_post_login_config_set_defaults) (void); typedef bool (*HPMHOOK_pre_login_config_read) (const char **filename, bool *included); typedef bool (*HPMHOOK_post_login_config_read) (bool retVal___, const char *filename, bool included); +typedef bool (*HPMHOOK_pre_login_config_read_inter) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_inter) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_console) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_console) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_log) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_log) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_account) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_account) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_permission) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_permission) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_permission_hash) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_permission_hash) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_permission_blacklist) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_permission_blacklist) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_users) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_users) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef void (*HPMHOOK_pre_login_clear_dnsbl_servers) (void); +typedef void (*HPMHOOK_post_login_clear_dnsbl_servers) (void); +typedef void (*HPMHOOK_pre_login_config_set_dnsbl_servers) (struct config_setting_t **setting); +typedef void (*HPMHOOK_post_login_config_set_dnsbl_servers) (struct config_setting_t *setting); +typedef void (*HPMHOOK_pre_login_clear_client_hash_nodes) (void); +typedef void (*HPMHOOK_post_login_clear_client_hash_nodes) (void); +typedef void (*HPMHOOK_pre_login_config_set_md5hash) (struct config_setting_t **setting); +typedef void (*HPMHOOK_post_login_config_set_md5hash) (struct config_setting_t *setting); +typedef uint16 (*HPMHOOK_pre_login_convert_users_to_colors) (uint16 *users); +typedef uint16 (*HPMHOOK_post_login_convert_users_to_colors) (uint16 retVal___, uint16 users); #endif // LOGIN_LOGIN_H #ifdef CHAR_LOGINIF_H /* loginif */ typedef void (*HPMHOOK_pre_loginif_init) (void); @@ -5120,6 +5150,8 @@ typedef void (*HPMHOOK_pre_npc_market_delfromsql_sub) (const char **npcname, uns typedef void (*HPMHOOK_post_npc_market_delfromsql_sub) (const char *npcname, unsigned short index); typedef bool (*HPMHOOK_pre_npc_db_checkid) (const int *id); typedef bool (*HPMHOOK_post_npc_db_checkid) (bool retVal___, const int id); +typedef void (*HPMHOOK_pre_npc_refresh) (struct npc_data **nd); +typedef void (*HPMHOOK_post_npc_refresh) (struct npc_data *nd); typedef int (*HPMHOOK_pre_npc_secure_timeout_timer) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_npc_secure_timeout_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); #endif // MAP_NPC_H @@ -5416,16 +5448,16 @@ typedef int (*HPMHOOK_pre_pc_checkbaselevelup) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_checkbaselevelup) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_checkjoblevelup) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_checkjoblevelup) (int retVal___, struct map_session_data *sd); -typedef bool (*HPMHOOK_pre_pc_gainexp) (struct map_session_data **sd, struct block_list **src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest); -typedef bool (*HPMHOOK_post_pc_gainexp) (bool retVal___, struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest); -typedef unsigned int (*HPMHOOK_pre_pc_nextbaseexp) (const struct map_session_data **sd); -typedef unsigned int (*HPMHOOK_post_pc_nextbaseexp) (unsigned int retVal___, const struct map_session_data *sd); -typedef unsigned int (*HPMHOOK_pre_pc_thisbaseexp) (const struct map_session_data **sd); -typedef unsigned int (*HPMHOOK_post_pc_thisbaseexp) (unsigned int retVal___, const struct map_session_data *sd); -typedef unsigned int (*HPMHOOK_pre_pc_nextjobexp) (const struct map_session_data **sd); -typedef unsigned int (*HPMHOOK_post_pc_nextjobexp) (unsigned int retVal___, const struct map_session_data *sd); -typedef unsigned int (*HPMHOOK_pre_pc_thisjobexp) (const struct map_session_data **sd); -typedef unsigned int (*HPMHOOK_post_pc_thisjobexp) (unsigned int retVal___, const struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_pc_gainexp) (struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, bool *is_quest); +typedef bool (*HPMHOOK_post_pc_gainexp) (bool retVal___, struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest); +typedef uint64 (*HPMHOOK_pre_pc_nextbaseexp) (const struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_pc_nextbaseexp) (uint64 retVal___, const struct map_session_data *sd); +typedef uint64 (*HPMHOOK_pre_pc_thisbaseexp) (const struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_pc_thisbaseexp) (uint64 retVal___, const struct map_session_data *sd); +typedef uint64 (*HPMHOOK_pre_pc_nextjobexp) (const struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_pc_nextjobexp) (uint64 retVal___, const struct map_session_data *sd); +typedef uint64 (*HPMHOOK_pre_pc_thisjobexp) (const struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_pc_thisjobexp) (uint64 retVal___, const struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_gets_status_point) (int *level); typedef int (*HPMHOOK_post_pc_gets_status_point) (int retVal___, int level); typedef int (*HPMHOOK_pre_pc_need_status_point) (struct map_session_data **sd, int *type, int *val); @@ -5500,10 +5532,10 @@ typedef int (*HPMHOOK_pre_pc_changelook) (struct map_session_data **sd, int *typ typedef int (*HPMHOOK_post_pc_changelook) (int retVal___, struct map_session_data *sd, int type, int val); typedef int (*HPMHOOK_pre_pc_equiplookall) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_equiplookall) (int retVal___, struct map_session_data *sd); -typedef int (*HPMHOOK_pre_pc_readparam) (const struct map_session_data **sd, int *type); -typedef int (*HPMHOOK_post_pc_readparam) (int retVal___, const struct map_session_data *sd, int type); -typedef int (*HPMHOOK_pre_pc_setparam) (struct map_session_data **sd, int *type, int *val); -typedef int (*HPMHOOK_post_pc_setparam) (int retVal___, struct map_session_data *sd, int type, int val); +typedef int64 (*HPMHOOK_pre_pc_readparam) (const struct map_session_data **sd, int *type); +typedef int64 (*HPMHOOK_post_pc_readparam) (int64 retVal___, const struct map_session_data *sd, int type); +typedef int (*HPMHOOK_pre_pc_setparam) (struct map_session_data **sd, int *type, int64 *val); +typedef int (*HPMHOOK_post_pc_setparam) (int retVal___, struct map_session_data *sd, int type, int64 val); typedef int (*HPMHOOK_pre_pc_readreg) (struct map_session_data **sd, int64 *reg); typedef int (*HPMHOOK_post_pc_readreg) (int retVal___, struct map_session_data *sd, int64 reg); typedef void (*HPMHOOK_pre_pc_setreg) (struct map_session_data **sd, int64 *reg, int *val); @@ -5632,8 +5664,8 @@ typedef int (*HPMHOOK_pre_pc_bonus_addeff_onskill) (struct s_addeffectonskill ** typedef int (*HPMHOOK_post_pc_bonus_addeff_onskill) (int retVal___, struct s_addeffectonskill *effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target); typedef int (*HPMHOOK_pre_pc_bonus_item_drop) (struct s_add_drop **drop, const short *max, short *id, short *group, int *race, int *rate); typedef int (*HPMHOOK_post_pc_bonus_item_drop) (int retVal___, struct s_add_drop *drop, const short max, short id, short group, int race, int rate); -typedef void (*HPMHOOK_pre_pc_calcexp) (struct map_session_data **sd, unsigned int **base_exp, unsigned int **job_exp, struct block_list **src); -typedef void (*HPMHOOK_post_pc_calcexp) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src); +typedef void (*HPMHOOK_pre_pc_calcexp) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src); +typedef void (*HPMHOOK_post_pc_calcexp) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src); typedef int (*HPMHOOK_pre_pc_respawn_timer) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_pc_respawn_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef int (*HPMHOOK_pre_pc_jobchange_killclone) (struct block_list **bl, va_list ap); @@ -5890,8 +5922,8 @@ typedef void (*HPMHOOK_pre_rodex_final) (void); typedef void (*HPMHOOK_post_rodex_final) (void); typedef bool (*HPMHOOK_pre_rodex_isenabled) (void); typedef bool (*HPMHOOK_post_rodex_isenabled) (bool retVal___); -typedef void (*HPMHOOK_pre_rodex_open) (struct map_session_data **sd, int8 *open_type); -typedef void (*HPMHOOK_post_rodex_open) (struct map_session_data *sd, int8 open_type); +typedef void (*HPMHOOK_pre_rodex_open) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id); +typedef void (*HPMHOOK_post_rodex_open) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); typedef void (*HPMHOOK_pre_rodex_next_page) (struct map_session_data **sd, int8 *open_type, int64 *last_mail_id); typedef void (*HPMHOOK_post_rodex_next_page) (struct map_session_data *sd, int8 open_type, int64 last_mail_id); typedef void (*HPMHOOK_pre_rodex_refresh) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id); diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc index 57c1e0233..9c38c0c4c 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc @@ -376,6 +376,32 @@ struct { struct HPMHookPoint *HP_login_config_set_defaults_post; struct HPMHookPoint *HP_login_config_read_pre; struct HPMHookPoint *HP_login_config_read_post; + struct HPMHookPoint *HP_login_config_read_inter_pre; + struct HPMHookPoint *HP_login_config_read_inter_post; + struct HPMHookPoint *HP_login_config_read_console_pre; + struct HPMHookPoint *HP_login_config_read_console_post; + struct HPMHookPoint *HP_login_config_read_log_pre; + struct HPMHookPoint *HP_login_config_read_log_post; + struct HPMHookPoint *HP_login_config_read_account_pre; + struct HPMHookPoint *HP_login_config_read_account_post; + struct HPMHookPoint *HP_login_config_read_permission_pre; + struct HPMHookPoint *HP_login_config_read_permission_post; + struct HPMHookPoint *HP_login_config_read_permission_hash_pre; + struct HPMHookPoint *HP_login_config_read_permission_hash_post; + struct HPMHookPoint *HP_login_config_read_permission_blacklist_pre; + struct HPMHookPoint *HP_login_config_read_permission_blacklist_post; + struct HPMHookPoint *HP_login_config_read_users_pre; + struct HPMHookPoint *HP_login_config_read_users_post; + struct HPMHookPoint *HP_login_clear_dnsbl_servers_pre; + struct HPMHookPoint *HP_login_clear_dnsbl_servers_post; + struct HPMHookPoint *HP_login_config_set_dnsbl_servers_pre; + struct HPMHookPoint *HP_login_config_set_dnsbl_servers_post; + struct HPMHookPoint *HP_login_clear_client_hash_nodes_pre; + struct HPMHookPoint *HP_login_clear_client_hash_nodes_post; + struct HPMHookPoint *HP_login_config_set_md5hash_pre; + struct HPMHookPoint *HP_login_config_set_md5hash_post; + struct HPMHookPoint *HP_login_convert_users_to_colors_pre; + struct HPMHookPoint *HP_login_convert_users_to_colors_post; struct HPMHookPoint *HP_md5_string_pre; struct HPMHookPoint *HP_md5_string_post; struct HPMHookPoint *HP_md5_binary_pre; @@ -1049,6 +1075,32 @@ struct { int HP_login_config_set_defaults_post; int HP_login_config_read_pre; int HP_login_config_read_post; + int HP_login_config_read_inter_pre; + int HP_login_config_read_inter_post; + int HP_login_config_read_console_pre; + int HP_login_config_read_console_post; + int HP_login_config_read_log_pre; + int HP_login_config_read_log_post; + int HP_login_config_read_account_pre; + int HP_login_config_read_account_post; + int HP_login_config_read_permission_pre; + int HP_login_config_read_permission_post; + int HP_login_config_read_permission_hash_pre; + int HP_login_config_read_permission_hash_post; + int HP_login_config_read_permission_blacklist_pre; + int HP_login_config_read_permission_blacklist_post; + int HP_login_config_read_users_pre; + int HP_login_config_read_users_post; + int HP_login_clear_dnsbl_servers_pre; + int HP_login_clear_dnsbl_servers_post; + int HP_login_config_set_dnsbl_servers_pre; + int HP_login_config_set_dnsbl_servers_post; + int HP_login_clear_client_hash_nodes_pre; + int HP_login_clear_client_hash_nodes_post; + int HP_login_config_set_md5hash_pre; + int HP_login_config_set_md5hash_post; + int HP_login_convert_users_to_colors_pre; + int HP_login_convert_users_to_colors_post; int HP_md5_string_pre; int HP_md5_string_post; int HP_md5_binary_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc index 125c54a12..ba4b941a9 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc @@ -211,6 +211,19 @@ struct HookingPointData HookingPoints[] = { { HP_POP(login->parse_request_connection, HP_login_parse_request_connection) }, { HP_POP(login->config_set_defaults, HP_login_config_set_defaults) }, { HP_POP(login->config_read, HP_login_config_read) }, + { HP_POP(login->config_read_inter, HP_login_config_read_inter) }, + { HP_POP(login->config_read_console, HP_login_config_read_console) }, + { HP_POP(login->config_read_log, HP_login_config_read_log) }, + { HP_POP(login->config_read_account, HP_login_config_read_account) }, + { HP_POP(login->config_read_permission, HP_login_config_read_permission) }, + { HP_POP(login->config_read_permission_hash, HP_login_config_read_permission_hash) }, + { HP_POP(login->config_read_permission_blacklist, HP_login_config_read_permission_blacklist) }, + { HP_POP(login->config_read_users, HP_login_config_read_users) }, + { HP_POP(login->clear_dnsbl_servers, HP_login_clear_dnsbl_servers) }, + { HP_POP(login->config_set_dnsbl_servers, HP_login_config_set_dnsbl_servers) }, + { HP_POP(login->clear_client_hash_nodes, HP_login_clear_client_hash_nodes) }, + { HP_POP(login->config_set_md5hash, HP_login_config_set_md5hash) }, + { HP_POP(login->convert_users_to_colors, HP_login_convert_users_to_colors) }, /* md5_interface */ { HP_POP(md5->string, HP_md5_string) }, { HP_POP(md5->binary, HP_md5_binary) }, diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc index 964d46b0a..0dbf2e5ae 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc @@ -4716,6 +4716,353 @@ bool HP_login_config_read(const char *filename, bool included) { } return retVal___; } +bool HP_login_config_read_inter(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_inter_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_inter_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_inter_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_inter(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_inter_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_inter_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_inter_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_login_config_read_console(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_console_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_console_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_console_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_console(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_console_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_console_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_console_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_login_config_read_log(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_log_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_log_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_log_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_log(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_log_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_log_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_log_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_login_config_read_account(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_account_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_account_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_account_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_account(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_account_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_account_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_account_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_login_config_read_permission(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_permission_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_permission_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_permission(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_permission_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_permission_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_login_config_read_permission_hash(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_permission_hash_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_hash_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_permission_hash_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_permission_hash(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_permission_hash_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_hash_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_permission_hash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_login_config_read_permission_blacklist(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_permission_blacklist_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_blacklist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_permission_blacklist_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_permission_blacklist(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_permission_blacklist_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_blacklist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_permission_blacklist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_login_config_read_users(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_users_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_users_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_users_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_users(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_users_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_users_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_users_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +void HP_login_clear_dnsbl_servers(void) { + int hIndex = 0; + if (HPMHooks.count.HP_login_clear_dnsbl_servers_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_dnsbl_servers_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_clear_dnsbl_servers_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.clear_dnsbl_servers(); + } + if (HPMHooks.count.HP_login_clear_dnsbl_servers_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_dnsbl_servers_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_clear_dnsbl_servers_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_login_config_set_dnsbl_servers(struct config_setting_t *setting) { + int hIndex = 0; + if (HPMHooks.count.HP_login_config_set_dnsbl_servers_pre > 0) { + void (*preHookFunc) (struct config_setting_t **setting); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_dnsbl_servers_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_set_dnsbl_servers_pre[hIndex].func; + preHookFunc(&setting); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.config_set_dnsbl_servers(setting); + } + if (HPMHooks.count.HP_login_config_set_dnsbl_servers_post > 0) { + void (*postHookFunc) (struct config_setting_t *setting); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_dnsbl_servers_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_set_dnsbl_servers_post[hIndex].func; + postHookFunc(setting); + } + } + return; +} +void HP_login_clear_client_hash_nodes(void) { + int hIndex = 0; + if (HPMHooks.count.HP_login_clear_client_hash_nodes_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_client_hash_nodes_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_clear_client_hash_nodes_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.clear_client_hash_nodes(); + } + if (HPMHooks.count.HP_login_clear_client_hash_nodes_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_client_hash_nodes_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_clear_client_hash_nodes_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_login_config_set_md5hash(struct config_setting_t *setting) { + int hIndex = 0; + if (HPMHooks.count.HP_login_config_set_md5hash_pre > 0) { + void (*preHookFunc) (struct config_setting_t **setting); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_md5hash_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_set_md5hash_pre[hIndex].func; + preHookFunc(&setting); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.config_set_md5hash(setting); + } + if (HPMHooks.count.HP_login_config_set_md5hash_post > 0) { + void (*postHookFunc) (struct config_setting_t *setting); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_md5hash_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_set_md5hash_post[hIndex].func; + postHookFunc(setting); + } + } + return; +} +uint16 HP_login_convert_users_to_colors(uint16 users) { + int hIndex = 0; + uint16 retVal___ = 0; + if (HPMHooks.count.HP_login_convert_users_to_colors_pre > 0) { + uint16 (*preHookFunc) (uint16 *users); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_convert_users_to_colors_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_convert_users_to_colors_pre[hIndex].func; + retVal___ = preHookFunc(&users); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.convert_users_to_colors(users); + } + if (HPMHooks.count.HP_login_convert_users_to_colors_post > 0) { + uint16 (*postHookFunc) (uint16 retVal___, uint16 users); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_convert_users_to_colors_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_convert_users_to_colors_post[hIndex].func; + retVal___ = postHookFunc(retVal___, users); + } + } + return retVal___; +} /* md5_interface */ void HP_md5_string(const char *string, char *output) { int hIndex = 0; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index b7b161b6b..c3e6d5529 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1896,6 +1896,8 @@ struct { struct HPMHookPoint *HP_clif_rodex_send_maillist_post; struct HPMHookPoint *HP_clif_rodex_send_refresh_pre; struct HPMHookPoint *HP_clif_rodex_send_refresh_post; + struct HPMHookPoint *HP_clif_rodex_send_mails_all_pre; + struct HPMHookPoint *HP_clif_rodex_send_mails_all_post; struct HPMHookPoint *HP_clif_pRodexReadMail_pre; struct HPMHookPoint *HP_clif_pRodexReadMail_post; struct HPMHookPoint *HP_clif_rodex_read_mail_pre; @@ -2874,6 +2876,8 @@ struct { struct HPMHookPoint *HP_itemdb_is_item_usable_post; struct HPMHookPoint *HP_itemdb_lookup_const_pre; struct HPMHookPoint *HP_itemdb_lookup_const_post; + struct HPMHookPoint *HP_itemdb_lookup_const_mask_pre; + struct HPMHookPoint *HP_itemdb_lookup_const_mask_post; struct HPMHookPoint *HP_libconfig_read_pre; struct HPMHookPoint *HP_libconfig_read_post; struct HPMHookPoint *HP_libconfig_write_pre; @@ -3914,6 +3918,8 @@ struct { struct HPMHookPoint *HP_npc_market_delfromsql_sub_post; struct HPMHookPoint *HP_npc_db_checkid_pre; struct HPMHookPoint *HP_npc_db_checkid_post; + struct HPMHookPoint *HP_npc_refresh_pre; + struct HPMHookPoint *HP_npc_refresh_post; struct HPMHookPoint *HP_npc_secure_timeout_timer_pre; struct HPMHookPoint *HP_npc_secure_timeout_timer_post; struct HPMHookPoint *HP_nullpo_assert_report_pre; @@ -8091,6 +8097,8 @@ struct { int HP_clif_rodex_send_maillist_post; int HP_clif_rodex_send_refresh_pre; int HP_clif_rodex_send_refresh_post; + int HP_clif_rodex_send_mails_all_pre; + int HP_clif_rodex_send_mails_all_post; int HP_clif_pRodexReadMail_pre; int HP_clif_pRodexReadMail_post; int HP_clif_rodex_read_mail_pre; @@ -9069,6 +9077,8 @@ struct { int HP_itemdb_is_item_usable_post; int HP_itemdb_lookup_const_pre; int HP_itemdb_lookup_const_post; + int HP_itemdb_lookup_const_mask_pre; + int HP_itemdb_lookup_const_mask_post; int HP_libconfig_read_pre; int HP_libconfig_read_post; int HP_libconfig_write_pre; @@ -10109,6 +10119,8 @@ struct { int HP_npc_market_delfromsql_sub_post; int HP_npc_db_checkid_pre; int HP_npc_db_checkid_post; + int HP_npc_refresh_pre; + int HP_npc_refresh_post; int HP_npc_secure_timeout_timer_pre; int HP_npc_secure_timeout_timer_post; int HP_nullpo_assert_report_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 37a3efb19..15052b7f1 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -970,6 +970,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->rodex_send_mail_result, HP_clif_rodex_send_mail_result) }, { HP_POP(clif->rodex_send_maillist, HP_clif_rodex_send_maillist) }, { HP_POP(clif->rodex_send_refresh, HP_clif_rodex_send_refresh) }, + { HP_POP(clif->rodex_send_mails_all, HP_clif_rodex_send_mails_all) }, { HP_POP(clif->pRodexReadMail, HP_clif_pRodexReadMail) }, { HP_POP(clif->rodex_read_mail, HP_clif_rodex_read_mail) }, { HP_POP(clif->pRodexNextMaillist, HP_clif_pRodexNextMaillist) }, @@ -1474,6 +1475,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->id2combo, HP_itemdb_id2combo) }, { HP_POP(itemdb->is_item_usable, HP_itemdb_is_item_usable) }, { HP_POP(itemdb->lookup_const, HP_itemdb_lookup_const) }, + { HP_POP(itemdb->lookup_const_mask, HP_itemdb_lookup_const_mask) }, /* libconfig_interface */ { HP_POP(libconfig->read, HP_libconfig_read) }, { HP_POP(libconfig->write, HP_libconfig_write) }, @@ -2007,6 +2009,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(npc->market_delfromsql, HP_npc_market_delfromsql) }, { HP_POP(npc->market_delfromsql_sub, HP_npc_market_delfromsql_sub) }, { HP_POP(npc->db_checkid, HP_npc_db_checkid) }, + { HP_POP(npc->refresh, HP_npc_refresh) }, { HP_POP(npc->secure_timeout_timer, HP_npc_secure_timeout_timer) }, /* nullpo_interface */ { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index d16268841..69658949c 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -10602,10 +10602,10 @@ void HP_clif_equpcheckbox(struct map_session_data *sd) { } return; } -void HP_clif_displayexp(struct map_session_data *sd, unsigned int exp, char type, bool is_quest) { +void HP_clif_displayexp(struct map_session_data *sd, uint64 exp, char type, bool is_quest) { int hIndex = 0; if (HPMHooks.count.HP_clif_displayexp_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, unsigned int *exp, char *type, bool *is_quest); + void (*preHookFunc) (struct map_session_data **sd, uint64 *exp, char *type, bool *is_quest); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_displayexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_displayexp_pre[hIndex].func; @@ -10620,7 +10620,7 @@ void HP_clif_displayexp(struct map_session_data *sd, unsigned int exp, char type HPMHooks.source.clif.displayexp(sd, exp, type, is_quest); } if (HPMHooks.count.HP_clif_displayexp_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, unsigned int exp, char type, bool is_quest); + void (*postHookFunc) (struct map_session_data *sd, uint64 exp, char type, bool is_quest); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_displayexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_displayexp_post[hIndex].func; postHookFunc(sd, exp, type, is_quest); @@ -24671,6 +24671,32 @@ void HP_clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_t } return; } +void HP_clif_rodex_send_mails_all(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_send_mails_all_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_mails_all_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_send_mails_all_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_send_mails_all(fd, sd); + } + if (HPMHooks.count.HP_clif_rodex_send_mails_all_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_mails_all_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_send_mails_all_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} void HP_clif_pRodexReadMail(int fd, struct map_session_data *sd) { int hIndex = 0; if (HPMHooks.count.HP_clif_pRodexReadMail_pre > 0) { @@ -27645,11 +27671,11 @@ int HP_guild_getposition(struct guild *g, struct map_session_data *sd) { } return retVal___; } -unsigned int HP_guild_payexp(struct map_session_data *sd, unsigned int exp) { +uint64 HP_guild_payexp(struct map_session_data *sd, uint64 exp) { int hIndex = 0; - unsigned int retVal___ = 0; + uint64 retVal___ = 0; if (HPMHooks.count.HP_guild_payexp_pre > 0) { - unsigned int (*preHookFunc) (struct map_session_data **sd, unsigned int *exp); + uint64 (*preHookFunc) (struct map_session_data **sd, uint64 *exp); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_payexp_pre[hIndex].func; @@ -27664,7 +27690,7 @@ unsigned int HP_guild_payexp(struct map_session_data *sd, unsigned int exp) { retVal___ = HPMHooks.source.guild.payexp(sd, exp); } if (HPMHooks.count.HP_guild_payexp_post > 0) { - unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd, unsigned int exp); + uint64 (*postHookFunc) (uint64 retVal___, struct map_session_data *sd, uint64 exp); for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_payexp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, exp); @@ -37811,6 +37837,33 @@ bool HP_itemdb_lookup_const(const struct config_setting_t *it, const char *name, } return retVal___; } +bool HP_itemdb_lookup_const_mask(const struct config_setting_t *it, const char *name, int *value) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_lookup_const_mask_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **it, const char **name, int **value); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_lookup_const_mask_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_lookup_const_mask_pre[hIndex].func; + retVal___ = preHookFunc(&it, &name, &value); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.lookup_const_mask(it, name, value); + } + if (HPMHooks.count.HP_itemdb_lookup_const_mask_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *it, const char *name, int *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_lookup_const_mask_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_lookup_const_mask_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, name, value); + } + } + return retVal___; +} /* libconfig_interface */ int HP_libconfig_read(struct config_t *config, FILE *stream) { int hIndex = 0; @@ -52036,6 +52089,32 @@ bool HP_npc_db_checkid(const int id) { } return retVal___; } +void HP_npc_refresh(struct npc_data *nd) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_refresh_pre > 0) { + void (*preHookFunc) (struct npc_data **nd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_refresh_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_refresh_pre[hIndex].func; + preHookFunc(&nd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.refresh(nd); + } + if (HPMHooks.count.HP_npc_refresh_post > 0) { + void (*postHookFunc) (struct npc_data *nd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_refresh_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_refresh_post[hIndex].func; + postHookFunc(nd); + } + } + return; +} int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; @@ -55903,11 +55982,11 @@ int HP_pc_checkjoblevelup(struct map_session_data *sd) { } return retVal___; } -bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest) { +bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_pc_gainexp_pre > 0) { - bool (*preHookFunc) (struct map_session_data **sd, struct block_list **src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest); + bool (*preHookFunc) (struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, bool *is_quest); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_gainexp_pre[hIndex].func; @@ -55922,7 +56001,7 @@ bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned retVal___ = HPMHooks.source.pc.gainexp(sd, src, base_exp, job_exp, is_quest); } if (HPMHooks.count.HP_pc_gainexp_post > 0) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest); + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_gainexp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, src, base_exp, job_exp, is_quest); @@ -55930,11 +56009,11 @@ bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned } return retVal___; } -unsigned int HP_pc_nextbaseexp(const struct map_session_data *sd) { +uint64 HP_pc_nextbaseexp(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; + uint64 retVal___ = 0; if (HPMHooks.count.HP_pc_nextbaseexp_pre > 0) { - unsigned int (*preHookFunc) (const struct map_session_data **sd); + uint64 (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_nextbaseexp_pre[hIndex].func; @@ -55949,7 +56028,7 @@ unsigned int HP_pc_nextbaseexp(const struct map_session_data *sd) { retVal___ = HPMHooks.source.pc.nextbaseexp(sd); } if (HPMHooks.count.HP_pc_nextbaseexp_post > 0) { - unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd); + uint64 (*postHookFunc) (uint64 retVal___, const struct map_session_data *sd); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_nextbaseexp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); @@ -55957,11 +56036,11 @@ unsigned int HP_pc_nextbaseexp(const struct map_session_data *sd) { } return retVal___; } -unsigned int HP_pc_thisbaseexp(const struct map_session_data *sd) { +uint64 HP_pc_thisbaseexp(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; + uint64 retVal___ = 0; if (HPMHooks.count.HP_pc_thisbaseexp_pre > 0) { - unsigned int (*preHookFunc) (const struct map_session_data **sd); + uint64 (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_thisbaseexp_pre[hIndex].func; @@ -55976,7 +56055,7 @@ unsigned int HP_pc_thisbaseexp(const struct map_session_data *sd) { retVal___ = HPMHooks.source.pc.thisbaseexp(sd); } if (HPMHooks.count.HP_pc_thisbaseexp_post > 0) { - unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd); + uint64 (*postHookFunc) (uint64 retVal___, const struct map_session_data *sd); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_thisbaseexp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); @@ -55984,11 +56063,11 @@ unsigned int HP_pc_thisbaseexp(const struct map_session_data *sd) { } return retVal___; } -unsigned int HP_pc_nextjobexp(const struct map_session_data *sd) { +uint64 HP_pc_nextjobexp(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; + uint64 retVal___ = 0; if (HPMHooks.count.HP_pc_nextjobexp_pre > 0) { - unsigned int (*preHookFunc) (const struct map_session_data **sd); + uint64 (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_nextjobexp_pre[hIndex].func; @@ -56003,7 +56082,7 @@ unsigned int HP_pc_nextjobexp(const struct map_session_data *sd) { retVal___ = HPMHooks.source.pc.nextjobexp(sd); } if (HPMHooks.count.HP_pc_nextjobexp_post > 0) { - unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd); + uint64 (*postHookFunc) (uint64 retVal___, const struct map_session_data *sd); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_nextjobexp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); @@ -56011,11 +56090,11 @@ unsigned int HP_pc_nextjobexp(const struct map_session_data *sd) { } return retVal___; } -unsigned int HP_pc_thisjobexp(const struct map_session_data *sd) { +uint64 HP_pc_thisjobexp(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; + uint64 retVal___ = 0; if (HPMHooks.count.HP_pc_thisjobexp_pre > 0) { - unsigned int (*preHookFunc) (const struct map_session_data **sd); + uint64 (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_thisjobexp_pre[hIndex].func; @@ -56030,7 +56109,7 @@ unsigned int HP_pc_thisjobexp(const struct map_session_data *sd) { retVal___ = HPMHooks.source.pc.thisjobexp(sd); } if (HPMHooks.count.HP_pc_thisjobexp_post > 0) { - unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd); + uint64 (*postHookFunc) (uint64 retVal___, const struct map_session_data *sd); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_thisjobexp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); @@ -57027,11 +57106,11 @@ int HP_pc_equiplookall(struct map_session_data *sd) { } return retVal___; } -int HP_pc_readparam(const struct map_session_data *sd, int type) { +int64 HP_pc_readparam(const struct map_session_data *sd, int type) { int hIndex = 0; - int retVal___ = 0; + int64 retVal___ = 0; if (HPMHooks.count.HP_pc_readparam_pre > 0) { - int (*preHookFunc) (const struct map_session_data **sd, int *type); + int64 (*preHookFunc) (const struct map_session_data **sd, int *type); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_readparam_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_readparam_pre[hIndex].func; @@ -57046,7 +57125,7 @@ int HP_pc_readparam(const struct map_session_data *sd, int type) { retVal___ = HPMHooks.source.pc.readparam(sd, type); } if (HPMHooks.count.HP_pc_readparam_post > 0) { - int (*postHookFunc) (int retVal___, const struct map_session_data *sd, int type); + int64 (*postHookFunc) (int64 retVal___, const struct map_session_data *sd, int type); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_readparam_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_readparam_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, type); @@ -57054,11 +57133,11 @@ int HP_pc_readparam(const struct map_session_data *sd, int type) { } return retVal___; } -int HP_pc_setparam(struct map_session_data *sd, int type, int val) { +int HP_pc_setparam(struct map_session_data *sd, int type, int64 val) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_pc_setparam_pre > 0) { - int (*preHookFunc) (struct map_session_data **sd, int *type, int *val); + int (*preHookFunc) (struct map_session_data **sd, int *type, int64 *val); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setparam_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setparam_pre[hIndex].func; @@ -57073,7 +57152,7 @@ int HP_pc_setparam(struct map_session_data *sd, int type, int val) { retVal___ = HPMHooks.source.pc.setparam(sd, type, val); } if (HPMHooks.count.HP_pc_setparam_post > 0) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type, int val); + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type, int64 val); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setparam_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setparam_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, type, val); @@ -58799,10 +58878,10 @@ int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, sh } return retVal___; } -void HP_pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src) { +void HP_pc_calcexp(struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src) { int hIndex = 0; if (HPMHooks.count.HP_pc_calcexp_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, unsigned int **base_exp, unsigned int **job_exp, struct block_list **src); + void (*preHookFunc) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_calcexp_pre[hIndex].func; @@ -58817,7 +58896,7 @@ void HP_pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned HPMHooks.source.pc.calcexp(sd, base_exp, job_exp, src); } if (HPMHooks.count.HP_pc_calcexp_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src); + void (*postHookFunc) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_calcexp_post[hIndex].func; postHookFunc(sd, base_exp, job_exp, src); @@ -61866,14 +61945,14 @@ bool HP_rodex_isenabled(void) { } return retVal___; } -void HP_rodex_open(struct map_session_data *sd, int8 open_type) { +void HP_rodex_open(struct map_session_data *sd, int8 open_type, int64 first_mail_id) { int hIndex = 0; if (HPMHooks.count.HP_rodex_open_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int8 *open_type); + void (*preHookFunc) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rodex_open_pre[hIndex].func; - preHookFunc(&sd, &open_type); + preHookFunc(&sd, &open_type, &first_mail_id); } if (*HPMforce_return) { *HPMforce_return = false; @@ -61881,13 +61960,13 @@ void HP_rodex_open(struct map_session_data *sd, int8 open_type) { } } { - HPMHooks.source.rodex.open(sd, open_type); + HPMHooks.source.rodex.open(sd, open_type, first_mail_id); } if (HPMHooks.count.HP_rodex_open_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int8 open_type); + void (*postHookFunc) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rodex_open_post[hIndex].func; - postHookFunc(sd, open_type); + postHookFunc(sd, open_type, first_mail_id); } } return; diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index 33a62757a..38e5ead5d 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -255,6 +255,9 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source) // type StrBuf->Printf(&buf, "'%d',", it->flag.delay_consume ? IT_DELAYCONSUME : it->type); + // subtype + StrBuf->Printf(&buf, "'%d',", it->subtype); + // price_buy StrBuf->Printf(&buf, "'%d',", it->value_buy); @@ -294,10 +297,11 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source) StrBuf->Printf(&buf, "'%"PRIu64"',", ui64); // equip_upper - if (libconfig->setting_lookup_int(entry, "Upper", &i32) && i32 >= 0) + if (itemdb->lookup_const_mask(entry, "Upper", &i32) && i32 >= 0) ui32 = (uint32)i32; else ui32 = ITEMUPPER_ALL; + StrBuf->Printf(&buf, "'%u',", ui32); // equip_genders @@ -320,12 +324,12 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source) // refineable StrBuf->Printf(&buf, "'%d',", it->flag.no_refine?0:1); - + // disable_options StrBuf->Printf(&buf, "'%d',", it->flag.no_options?1:0); - // view - StrBuf->Printf(&buf, "'%d',", it->look); + // view_sprite + StrBuf->Printf(&buf, "'%d',", it->view_sprite); // bindonequip StrBuf->Printf(&buf, "'%d',", it->flag.bindonequip?1:0); @@ -449,6 +453,7 @@ void itemdb2sql_tableheader(void) " `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" + " `subtype` tinyint(2) UNSIGNED DEFAULT NULL,\n" " `price_buy` mediumint(10) DEFAULT NULL,\n" " `price_sell` mediumint(10) DEFAULT NULL,\n" " `weight` smallint(5) UNSIGNED DEFAULT NULL,\n" @@ -466,7 +471,7 @@ void itemdb2sql_tableheader(void) " `equip_level_max` smallint(5) UNSIGNED DEFAULT NULL,\n" " `refineable` tinyint(1) UNSIGNED DEFAULT NULL,\n" " `disable_options` tinyint(1) UNSIGNED DEFAULT NULL,\n" - " `view` smallint(3) UNSIGNED DEFAULT NULL,\n" + " `view_sprite` smallint(3) UNSIGNED DEFAULT NULL,\n" " `bindonequip` tinyint(1) UNSIGNED DEFAULT NULL,\n" " `forceserial` tinyint(1) UNSIGNED DEFAULT NULL,\n" " `buyingstore` tinyint(1) UNSIGNED DEFAULT NULL,\n" |