diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Defs.inc | 28 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | 12 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 40 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 10 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 259 | ||||
-rw-r--r-- | src/plugins/db2sql.c | 4 |
6 files changed, 316 insertions, 37 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 57abf25e0..7042a43a7 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -396,8 +396,8 @@ typedef int (*HPMHOOK_pre_chr_rename_char_sql) (struct char_session_data **sd, i typedef int (*HPMHOOK_post_chr_rename_char_sql) (int retVal___, struct char_session_data *sd, int char_id); typedef int (*HPMHOOK_pre_chr_check_char_name) (char **name, char **esc_name); typedef int (*HPMHOOK_post_chr_check_char_name) (int retVal___, char *name, char *esc_name); -typedef int (*HPMHOOK_pre_chr_make_new_char_sql) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, short *starting_job); -typedef int (*HPMHOOK_post_chr_make_new_char_sql) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job); +typedef int (*HPMHOOK_pre_chr_make_new_char_sql) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, short *starting_job, uint8 *sex); +typedef int (*HPMHOOK_post_chr_make_new_char_sql) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex); typedef int (*HPMHOOK_pre_chr_divorce_char_sql) (int *partner_id1, int *partner_id2); typedef int (*HPMHOOK_post_chr_divorce_char_sql) (int retVal___, int partner_id1, int partner_id2); typedef int (*HPMHOOK_pre_chr_count_users) (void); @@ -974,8 +974,8 @@ typedef void (*HPMHOOK_pre_clif_refreshlook) (struct block_list **bl, int *id, i typedef void (*HPMHOOK_post_clif_refreshlook) (struct block_list *bl, int id, int type, int val, enum send_target target); typedef void (*HPMHOOK_pre_clif_sendlook) (struct block_list **bl, int *id, int *type, int *val, int *val2, enum send_target *target); typedef void (*HPMHOOK_post_clif_sendlook) (struct block_list *bl, int id, int type, int val, int val2, enum send_target target); -typedef void (*HPMHOOK_pre_clif_class_change) (struct block_list **bl, int *class_, int *type); -typedef void (*HPMHOOK_post_clif_class_change) (struct block_list *bl, int class_, int type); +typedef void (*HPMHOOK_pre_clif_class_change) (struct block_list **bl, int *class_, int *type, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_class_change) (struct block_list *bl, int class_, int type, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_skill_delunit) (struct skill_unit **su); typedef void (*HPMHOOK_post_clif_skill_delunit) (struct skill_unit *su); typedef void (*HPMHOOK_pre_clif_skillunit_update) (struct block_list **bl); @@ -2222,8 +2222,8 @@ typedef void (*HPMHOOK_pre_clif_pNPCMarketClosed) (int *fd, struct map_session_d typedef void (*HPMHOOK_post_clif_pNPCMarketClosed) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pNPCMarketPurchase) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pNPCMarketPurchase) (int fd, struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_add_random_options) (unsigned char **buf, struct item **item); -typedef void (*HPMHOOK_post_clif_add_random_options) (unsigned char *buf, struct item *item); +typedef int (*HPMHOOK_pre_clif_add_item_options) (struct ItemOptions **buf, const struct item **it); +typedef int (*HPMHOOK_post_clif_add_item_options) (int retVal___, struct ItemOptions *buf, const struct item *it); typedef void (*HPMHOOK_pre_clif_pHotkeyRowShift) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pHotkeyRowShift) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_dressroom_open) (struct map_session_data **sd, int *view); @@ -3300,6 +3300,8 @@ typedef void (*HPMHOOK_pre_itemdb_read_chains) (void); typedef void (*HPMHOOK_post_itemdb_read_chains) (void); typedef void (*HPMHOOK_pre_itemdb_read_packages) (void); typedef void (*HPMHOOK_post_itemdb_read_packages) (void); +typedef void (*HPMHOOK_pre_itemdb_read_options) (void); +typedef void (*HPMHOOK_post_itemdb_read_options) (void); typedef void (*HPMHOOK_pre_itemdb_write_cached_packages) (const char **config_filename); typedef void (*HPMHOOK_post_itemdb_write_cached_packages) (const char *config_filename); typedef bool (*HPMHOOK_pre_itemdb_read_cached_packages) (const char **config_filename); @@ -3316,6 +3318,8 @@ typedef struct item_data* (*HPMHOOK_pre_itemdb_search) (int *nameid); typedef struct item_data* (*HPMHOOK_post_itemdb_search) (struct item_data* retVal___, int nameid); typedef struct item_data* (*HPMHOOK_pre_itemdb_exists) (int *nameid); typedef struct item_data* (*HPMHOOK_post_itemdb_exists) (struct item_data* retVal___, int nameid); +typedef struct item_option* (*HPMHOOK_pre_itemdb_option_exists) (int *idx); +typedef struct item_option* (*HPMHOOK_post_itemdb_option_exists) (struct item_option* retVal___, int idx); typedef bool (*HPMHOOK_pre_itemdb_in_group) (struct item_group **group, int *nameid); typedef bool (*HPMHOOK_post_itemdb_in_group) (bool retVal___, struct item_group *group, int nameid); typedef int (*HPMHOOK_pre_itemdb_group_item) (struct item_group **group); @@ -3380,6 +3384,8 @@ typedef int (*HPMHOOK_pre_itemdb_gendercheck) (struct item_data **id); typedef int (*HPMHOOK_post_itemdb_gendercheck) (int retVal___, struct item_data *id); typedef int (*HPMHOOK_pre_itemdb_validate_entry) (struct item_data **entry, int *n, const char **source); typedef int (*HPMHOOK_post_itemdb_validate_entry) (int retVal___, struct item_data *entry, int n, const char *source); +typedef void (*HPMHOOK_pre_itemdb_readdb_options_additional_fields) (struct item_option **ito, struct config_setting_t **t, const char **source); +typedef void (*HPMHOOK_post_itemdb_readdb_options_additional_fields) (struct item_option *ito, struct config_setting_t *t, const char *source); typedef void (*HPMHOOK_pre_itemdb_readdb_additional_fields) (int *itemid, struct config_setting_t **it, int *n, const char **source); typedef void (*HPMHOOK_post_itemdb_readdb_additional_fields) (int itemid, struct config_setting_t *it, int n, const char *source); typedef void (*HPMHOOK_pre_itemdb_readdb_job_sub) (struct item_data **id, struct config_setting_t **t); @@ -3396,6 +3402,8 @@ typedef void (*HPMHOOK_pre_itemdb_destroy_item_data) (struct item_data **self, i typedef void (*HPMHOOK_post_itemdb_destroy_item_data) (struct item_data *self, int free_self); typedef int (*HPMHOOK_pre_itemdb_final_sub) (union DBKey *key, struct DBData **data, va_list ap); typedef int (*HPMHOOK_post_itemdb_final_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_itemdb_options_final_sub) (union DBKey *key, struct DBData **data, va_list ap); +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); @@ -5790,6 +5798,8 @@ typedef struct script_data* (*HPMHOOK_pre_script_get_val) (struct script_state * typedef struct script_data* (*HPMHOOK_post_script_get_val) (struct script_data* retVal___, struct script_state *st, struct script_data *data); typedef char* (*HPMHOOK_pre_script_get_val_ref_str) (struct script_state **st, struct reg_db **n, struct script_data **data); typedef char* (*HPMHOOK_post_script_get_val_ref_str) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); +typedef char* (*HPMHOOK_pre_script_get_val_pc_ref_str) (struct script_state **st, struct reg_db **n, struct script_data **data); +typedef char* (*HPMHOOK_post_script_get_val_pc_ref_str) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); typedef char* (*HPMHOOK_pre_script_get_val_scope_str) (struct script_state **st, struct reg_db **n, struct script_data **data); typedef char* (*HPMHOOK_post_script_get_val_scope_str) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); typedef char* (*HPMHOOK_pre_script_get_val_npc_str) (struct script_state **st, struct reg_db **n, struct script_data **data); @@ -5798,6 +5808,8 @@ typedef char* (*HPMHOOK_pre_script_get_val_instance_str) (struct script_state ** typedef char* (*HPMHOOK_post_script_get_val_instance_str) (char* retVal___, struct script_state *st, const char *name, struct script_data *data); typedef int (*HPMHOOK_pre_script_get_val_ref_num) (struct script_state **st, struct reg_db **n, struct script_data **data); typedef int (*HPMHOOK_post_script_get_val_ref_num) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); +typedef int (*HPMHOOK_pre_script_get_val_pc_ref_num) (struct script_state **st, struct reg_db **n, struct script_data **data); +typedef int (*HPMHOOK_post_script_get_val_pc_ref_num) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); typedef int (*HPMHOOK_pre_script_get_val_scope_num) (struct script_state **st, struct reg_db **n, struct script_data **data); typedef int (*HPMHOOK_post_script_get_val_scope_num) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); typedef int (*HPMHOOK_pre_script_get_val_npc_num) (struct script_state **st, struct reg_db **n, struct script_data **data); @@ -5952,6 +5964,8 @@ typedef int (*HPMHOOK_pre_script_set_reg) (struct script_state **st, struct map_ typedef int (*HPMHOOK_post_script_set_reg) (int retVal___, struct script_state *st, struct map_session_data *sd, int64 num, const char *name, const void *value, struct reg_db *ref); typedef void (*HPMHOOK_pre_script_set_reg_ref_str) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); typedef void (*HPMHOOK_post_script_set_reg_ref_str) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); +typedef void (*HPMHOOK_pre_script_set_reg_pc_ref_str) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); +typedef void (*HPMHOOK_post_script_set_reg_pc_ref_str) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); typedef void (*HPMHOOK_pre_script_set_reg_scope_str) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); typedef void (*HPMHOOK_post_script_set_reg_scope_str) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); typedef void (*HPMHOOK_pre_script_set_reg_npc_str) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); @@ -5960,6 +5974,8 @@ typedef void (*HPMHOOK_pre_script_set_reg_instance_str) (struct script_state **s typedef void (*HPMHOOK_post_script_set_reg_instance_str) (struct script_state *st, int64 num, const char *name, const char *str); typedef void (*HPMHOOK_pre_script_set_reg_ref_num) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); typedef void (*HPMHOOK_post_script_set_reg_ref_num) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); +typedef void (*HPMHOOK_pre_script_set_reg_pc_ref_num) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); +typedef void (*HPMHOOK_post_script_set_reg_pc_ref_num) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); typedef void (*HPMHOOK_pre_script_set_reg_scope_num) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); typedef void (*HPMHOOK_post_script_set_reg_scope_num) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); typedef void (*HPMHOOK_pre_script_set_reg_npc_num) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index e2108c8f8..3942693da 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -744,15 +744,15 @@ int HP_chr_check_char_name(char *name, char *esc_name) { } return retVal___; } -int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job) { +int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_chr_make_new_char_sql_pre ) { - int (*preHookFunc) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, short *starting_job); + int (*preHookFunc) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, short *starting_job, uint8 *sex); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_chr_make_new_char_sql_pre[hIndex].func; - retVal___ = preHookFunc(&sd, &name_, &str, &agi, &vit, &int_, &dex, &luk, &slot, &hair_color, &hair_style, &starting_job); + retVal___ = preHookFunc(&sd, &name_, &str, &agi, &vit, &int_, &dex, &luk, &slot, &hair_color, &hair_style, &starting_job, &sex); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -760,13 +760,13 @@ int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, in } } { - retVal___ = HPMHooks.source.chr.make_new_char_sql(sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style, starting_job); + retVal___ = HPMHooks.source.chr.make_new_char_sql(sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style, starting_job, sex); } if( HPMHooks.count.HP_chr_make_new_char_sql_post ) { - int (*postHookFunc) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job); + int (*postHookFunc) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex); for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_chr_make_new_char_sql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style, starting_job); + retVal___ = postHookFunc(retVal___, sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style, starting_job, sex); } } return retVal___; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index bd055cac2..762acb747 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1860,8 +1860,8 @@ struct { struct HPMHookPoint *HP_clif_pNPCMarketClosed_post; struct HPMHookPoint *HP_clif_pNPCMarketPurchase_pre; struct HPMHookPoint *HP_clif_pNPCMarketPurchase_post; - struct HPMHookPoint *HP_clif_add_random_options_pre; - struct HPMHookPoint *HP_clif_add_random_options_post; + struct HPMHookPoint *HP_clif_add_item_options_pre; + struct HPMHookPoint *HP_clif_add_item_options_post; struct HPMHookPoint *HP_clif_pHotkeyRowShift_pre; struct HPMHookPoint *HP_clif_pHotkeyRowShift_post; struct HPMHookPoint *HP_clif_dressroom_open_pre; @@ -2682,6 +2682,8 @@ struct { struct HPMHookPoint *HP_itemdb_read_chains_post; struct HPMHookPoint *HP_itemdb_read_packages_pre; struct HPMHookPoint *HP_itemdb_read_packages_post; + struct HPMHookPoint *HP_itemdb_read_options_pre; + struct HPMHookPoint *HP_itemdb_read_options_post; struct HPMHookPoint *HP_itemdb_write_cached_packages_pre; struct HPMHookPoint *HP_itemdb_write_cached_packages_post; struct HPMHookPoint *HP_itemdb_read_cached_packages_pre; @@ -2698,6 +2700,8 @@ struct { struct HPMHookPoint *HP_itemdb_search_post; struct HPMHookPoint *HP_itemdb_exists_pre; struct HPMHookPoint *HP_itemdb_exists_post; + struct HPMHookPoint *HP_itemdb_option_exists_pre; + struct HPMHookPoint *HP_itemdb_option_exists_post; struct HPMHookPoint *HP_itemdb_in_group_pre; struct HPMHookPoint *HP_itemdb_in_group_post; struct HPMHookPoint *HP_itemdb_group_item_pre; @@ -2762,6 +2766,8 @@ struct { struct HPMHookPoint *HP_itemdb_gendercheck_post; struct HPMHookPoint *HP_itemdb_validate_entry_pre; struct HPMHookPoint *HP_itemdb_validate_entry_post; + struct HPMHookPoint *HP_itemdb_readdb_options_additional_fields_pre; + struct HPMHookPoint *HP_itemdb_readdb_options_additional_fields_post; struct HPMHookPoint *HP_itemdb_readdb_additional_fields_pre; struct HPMHookPoint *HP_itemdb_readdb_additional_fields_post; struct HPMHookPoint *HP_itemdb_readdb_job_sub_pre; @@ -2778,6 +2784,8 @@ struct { struct HPMHookPoint *HP_itemdb_destroy_item_data_post; struct HPMHookPoint *HP_itemdb_final_sub_pre; struct HPMHookPoint *HP_itemdb_final_sub_post; + struct HPMHookPoint *HP_itemdb_options_final_sub_pre; + struct HPMHookPoint *HP_itemdb_options_final_sub_post; struct HPMHookPoint *HP_itemdb_clear_pre; struct HPMHookPoint *HP_itemdb_clear_post; struct HPMHookPoint *HP_itemdb_id2combo_pre; @@ -4586,6 +4594,8 @@ struct { struct HPMHookPoint *HP_script_get_val_post; struct HPMHookPoint *HP_script_get_val_ref_str_pre; struct HPMHookPoint *HP_script_get_val_ref_str_post; + struct HPMHookPoint *HP_script_get_val_pc_ref_str_pre; + struct HPMHookPoint *HP_script_get_val_pc_ref_str_post; struct HPMHookPoint *HP_script_get_val_scope_str_pre; struct HPMHookPoint *HP_script_get_val_scope_str_post; struct HPMHookPoint *HP_script_get_val_npc_str_pre; @@ -4594,6 +4604,8 @@ struct { struct HPMHookPoint *HP_script_get_val_instance_str_post; struct HPMHookPoint *HP_script_get_val_ref_num_pre; struct HPMHookPoint *HP_script_get_val_ref_num_post; + struct HPMHookPoint *HP_script_get_val_pc_ref_num_pre; + struct HPMHookPoint *HP_script_get_val_pc_ref_num_post; struct HPMHookPoint *HP_script_get_val_scope_num_pre; struct HPMHookPoint *HP_script_get_val_scope_num_post; struct HPMHookPoint *HP_script_get_val_npc_num_pre; @@ -4748,6 +4760,8 @@ struct { struct HPMHookPoint *HP_script_set_reg_post; struct HPMHookPoint *HP_script_set_reg_ref_str_pre; struct HPMHookPoint *HP_script_set_reg_ref_str_post; + struct HPMHookPoint *HP_script_set_reg_pc_ref_str_pre; + struct HPMHookPoint *HP_script_set_reg_pc_ref_str_post; struct HPMHookPoint *HP_script_set_reg_scope_str_pre; struct HPMHookPoint *HP_script_set_reg_scope_str_post; struct HPMHookPoint *HP_script_set_reg_npc_str_pre; @@ -4756,6 +4770,8 @@ struct { struct HPMHookPoint *HP_script_set_reg_instance_str_post; struct HPMHookPoint *HP_script_set_reg_ref_num_pre; struct HPMHookPoint *HP_script_set_reg_ref_num_post; + struct HPMHookPoint *HP_script_set_reg_pc_ref_num_pre; + struct HPMHookPoint *HP_script_set_reg_pc_ref_num_post; struct HPMHookPoint *HP_script_set_reg_scope_num_pre; struct HPMHookPoint *HP_script_set_reg_scope_num_post; struct HPMHookPoint *HP_script_set_reg_npc_num_pre; @@ -7899,8 +7915,8 @@ struct { int HP_clif_pNPCMarketClosed_post; int HP_clif_pNPCMarketPurchase_pre; int HP_clif_pNPCMarketPurchase_post; - int HP_clif_add_random_options_pre; - int HP_clif_add_random_options_post; + int HP_clif_add_item_options_pre; + int HP_clif_add_item_options_post; int HP_clif_pHotkeyRowShift_pre; int HP_clif_pHotkeyRowShift_post; int HP_clif_dressroom_open_pre; @@ -8721,6 +8737,8 @@ struct { int HP_itemdb_read_chains_post; int HP_itemdb_read_packages_pre; int HP_itemdb_read_packages_post; + int HP_itemdb_read_options_pre; + int HP_itemdb_read_options_post; int HP_itemdb_write_cached_packages_pre; int HP_itemdb_write_cached_packages_post; int HP_itemdb_read_cached_packages_pre; @@ -8737,6 +8755,8 @@ struct { int HP_itemdb_search_post; int HP_itemdb_exists_pre; int HP_itemdb_exists_post; + int HP_itemdb_option_exists_pre; + int HP_itemdb_option_exists_post; int HP_itemdb_in_group_pre; int HP_itemdb_in_group_post; int HP_itemdb_group_item_pre; @@ -8801,6 +8821,8 @@ struct { int HP_itemdb_gendercheck_post; int HP_itemdb_validate_entry_pre; int HP_itemdb_validate_entry_post; + int HP_itemdb_readdb_options_additional_fields_pre; + int HP_itemdb_readdb_options_additional_fields_post; int HP_itemdb_readdb_additional_fields_pre; int HP_itemdb_readdb_additional_fields_post; int HP_itemdb_readdb_job_sub_pre; @@ -8817,6 +8839,8 @@ struct { int HP_itemdb_destroy_item_data_post; int HP_itemdb_final_sub_pre; int HP_itemdb_final_sub_post; + int HP_itemdb_options_final_sub_pre; + int HP_itemdb_options_final_sub_post; int HP_itemdb_clear_pre; int HP_itemdb_clear_post; int HP_itemdb_id2combo_pre; @@ -10625,6 +10649,8 @@ struct { int HP_script_get_val_post; int HP_script_get_val_ref_str_pre; int HP_script_get_val_ref_str_post; + int HP_script_get_val_pc_ref_str_pre; + int HP_script_get_val_pc_ref_str_post; int HP_script_get_val_scope_str_pre; int HP_script_get_val_scope_str_post; int HP_script_get_val_npc_str_pre; @@ -10633,6 +10659,8 @@ struct { int HP_script_get_val_instance_str_post; int HP_script_get_val_ref_num_pre; int HP_script_get_val_ref_num_post; + int HP_script_get_val_pc_ref_num_pre; + int HP_script_get_val_pc_ref_num_post; int HP_script_get_val_scope_num_pre; int HP_script_get_val_scope_num_post; int HP_script_get_val_npc_num_pre; @@ -10787,6 +10815,8 @@ struct { int HP_script_set_reg_post; int HP_script_set_reg_ref_str_pre; int HP_script_set_reg_ref_str_post; + int HP_script_set_reg_pc_ref_str_pre; + int HP_script_set_reg_pc_ref_str_post; int HP_script_set_reg_scope_str_pre; int HP_script_set_reg_scope_str_post; int HP_script_set_reg_npc_str_pre; @@ -10795,6 +10825,8 @@ struct { int HP_script_set_reg_instance_str_post; int HP_script_set_reg_ref_num_pre; int HP_script_set_reg_ref_num_post; + int HP_script_set_reg_pc_ref_num_pre; + int HP_script_set_reg_pc_ref_num_post; int HP_script_set_reg_scope_num_pre; int HP_script_set_reg_scope_num_post; int HP_script_set_reg_npc_num_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 53f65bcd3..65cd9ea82 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -952,7 +952,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pNPCShopClosed, HP_clif_pNPCShopClosed) }, { HP_POP(clif->pNPCMarketClosed, HP_clif_pNPCMarketClosed) }, { HP_POP(clif->pNPCMarketPurchase, HP_clif_pNPCMarketPurchase) }, - { HP_POP(clif->add_random_options, HP_clif_add_random_options) }, + { HP_POP(clif->add_item_options, HP_clif_add_item_options) }, { HP_POP(clif->pHotkeyRowShift, HP_clif_pHotkeyRowShift) }, { HP_POP(clif->dressroom_open, HP_clif_dressroom_open) }, { HP_POP(clif->pOneClick_ItemIdentify, HP_clif_pOneClick_ItemIdentify) }, @@ -1378,6 +1378,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->read_groups, HP_itemdb_read_groups) }, { HP_POP(itemdb->read_chains, HP_itemdb_read_chains) }, { HP_POP(itemdb->read_packages, HP_itemdb_read_packages) }, + { HP_POP(itemdb->read_options, HP_itemdb_read_options) }, { HP_POP(itemdb->write_cached_packages, HP_itemdb_write_cached_packages) }, { HP_POP(itemdb->read_cached_packages, HP_itemdb_read_cached_packages) }, { HP_POP(itemdb->name2id, HP_itemdb_name2id) }, @@ -1386,6 +1387,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->load, HP_itemdb_load) }, { HP_POP(itemdb->search, HP_itemdb_search) }, { HP_POP(itemdb->exists, HP_itemdb_exists) }, + { HP_POP(itemdb->option_exists, HP_itemdb_option_exists) }, { HP_POP(itemdb->in_group, HP_itemdb_in_group) }, { HP_POP(itemdb->group_item, HP_itemdb_group_item) }, { HP_POP(itemdb->chain_item, HP_itemdb_chain_item) }, @@ -1418,6 +1420,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->read_combos, HP_itemdb_read_combos) }, { HP_POP(itemdb->gendercheck, HP_itemdb_gendercheck) }, { HP_POP(itemdb->validate_entry, HP_itemdb_validate_entry) }, + { HP_POP(itemdb->readdb_options_additional_fields, HP_itemdb_readdb_options_additional_fields) }, { HP_POP(itemdb->readdb_additional_fields, HP_itemdb_readdb_additional_fields) }, { HP_POP(itemdb->readdb_job_sub, HP_itemdb_readdb_job_sub) }, { HP_POP(itemdb->readdb_libconfig_sub, HP_itemdb_readdb_libconfig_sub) }, @@ -1426,6 +1429,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->read, HP_itemdb_read) }, { HP_POP(itemdb->destroy_item_data, HP_itemdb_destroy_item_data) }, { HP_POP(itemdb->final_sub, HP_itemdb_final_sub) }, + { HP_POP(itemdb->options_final_sub, HP_itemdb_options_final_sub) }, { HP_POP(itemdb->clear, HP_itemdb_clear) }, { HP_POP(itemdb->id2combo, HP_itemdb_id2combo) }, { HP_POP(itemdb->is_item_usable, HP_itemdb_is_item_usable) }, @@ -2353,10 +2357,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->push_val, HP_script_push_val) }, { HP_POP(script->get_val, HP_script_get_val) }, { HP_POP(script->get_val_ref_str, HP_script_get_val_ref_str) }, + { HP_POP(script->get_val_pc_ref_str, HP_script_get_val_pc_ref_str) }, { HP_POP(script->get_val_scope_str, HP_script_get_val_scope_str) }, { HP_POP(script->get_val_npc_str, HP_script_get_val_npc_str) }, { HP_POP(script->get_val_instance_str, HP_script_get_val_instance_str) }, { HP_POP(script->get_val_ref_num, HP_script_get_val_ref_num) }, + { HP_POP(script->get_val_pc_ref_num, HP_script_get_val_pc_ref_num) }, { HP_POP(script->get_val_scope_num, HP_script_get_val_scope_num) }, { HP_POP(script->get_val_npc_num, HP_script_get_val_npc_num) }, { HP_POP(script->get_val_instance_num, HP_script_get_val_instance_num) }, @@ -2434,10 +2440,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->errorwarning_sub, HP_script_errorwarning_sub) }, { HP_POP(script->set_reg, HP_script_set_reg) }, { HP_POP(script->set_reg_ref_str, HP_script_set_reg_ref_str) }, + { HP_POP(script->set_reg_pc_ref_str, HP_script_set_reg_pc_ref_str) }, { HP_POP(script->set_reg_scope_str, HP_script_set_reg_scope_str) }, { HP_POP(script->set_reg_npc_str, HP_script_set_reg_npc_str) }, { HP_POP(script->set_reg_instance_str, HP_script_set_reg_instance_str) }, { HP_POP(script->set_reg_ref_num, HP_script_set_reg_ref_num) }, + { HP_POP(script->set_reg_pc_ref_num, HP_script_set_reg_pc_ref_num) }, { HP_POP(script->set_reg_scope_num, HP_script_set_reg_scope_num) }, { HP_POP(script->set_reg_npc_num, HP_script_set_reg_npc_num) }, { HP_POP(script->set_reg_instance_num, HP_script_set_reg_instance_num) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 654c902d8..3175bab5e 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -7917,14 +7917,14 @@ void HP_clif_sendlook(struct block_list *bl, int id, int type, int val, int val2 } return; } -void HP_clif_class_change(struct block_list *bl, int class_, int type) { +void HP_clif_class_change(struct block_list *bl, int class_, int type, struct map_session_data *sd) { int hIndex = 0; if( HPMHooks.count.HP_clif_class_change_pre ) { - void (*preHookFunc) (struct block_list **bl, int *class_, int *type); + void (*preHookFunc) (struct block_list **bl, int *class_, int *type, struct map_session_data **sd); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_class_change_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_clif_class_change_pre[hIndex].func; - preHookFunc(&bl, &class_, &type); + preHookFunc(&bl, &class_, &type, &sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -7932,13 +7932,13 @@ void HP_clif_class_change(struct block_list *bl, int class_, int type) { } } { - HPMHooks.source.clif.class_change(bl, class_, type); + HPMHooks.source.clif.class_change(bl, class_, type, sd); } if( HPMHooks.count.HP_clif_class_change_post ) { - void (*postHookFunc) (struct block_list *bl, int class_, int type); + void (*postHookFunc) (struct block_list *bl, int class_, int type, struct map_session_data *sd); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_class_change_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_class_change_post[hIndex].func; - postHookFunc(bl, class_, type); + postHookFunc(bl, class_, type, sd); } } return; @@ -24201,31 +24201,32 @@ void HP_clif_pNPCMarketPurchase(int fd, struct map_session_data *sd) { } return; } -void HP_clif_add_random_options(unsigned char *buf, struct item *item) { +int HP_clif_add_item_options(struct ItemOptions *buf, const struct item *it) { int hIndex = 0; - if( HPMHooks.count.HP_clif_add_random_options_pre ) { - void (*preHookFunc) (unsigned char **buf, struct item **item); + int retVal___ = 0; + if( HPMHooks.count.HP_clif_add_item_options_pre ) { + int (*preHookFunc) (struct ItemOptions **buf, const struct item **it); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_add_random_options_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_clif_add_random_options_pre[hIndex].func; - preHookFunc(&buf, &item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_add_item_options_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_add_item_options_pre[hIndex].func; + retVal___ = preHookFunc(&buf, &it); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.clif.add_random_options(buf, item); + retVal___ = HPMHooks.source.clif.add_item_options(buf, it); } - if( HPMHooks.count.HP_clif_add_random_options_post ) { - void (*postHookFunc) (unsigned char *buf, struct item *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_add_random_options_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_clif_add_random_options_post[hIndex].func; - postHookFunc(buf, item); + if( HPMHooks.count.HP_clif_add_item_options_post ) { + int (*postHookFunc) (int retVal___, struct ItemOptions *buf, const struct item *it); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_add_item_options_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_add_item_options_post[hIndex].func; + retVal___ = postHookFunc(retVal___, buf, it); } } - return; + return retVal___; } void HP_clif_pHotkeyRowShift(int fd, struct map_session_data *sd) { int hIndex = 0; @@ -35242,6 +35243,32 @@ void HP_itemdb_read_packages(void) { } return; } +void HP_itemdb_read_options(void) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_read_options_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_options_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_read_options_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.read_options(); + } + if( HPMHooks.count.HP_itemdb_read_options_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_options_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_read_options_post[hIndex].func; + postHookFunc(); + } + } + return; +} void HP_itemdb_write_cached_packages(const char *config_filename) { int hIndex = 0; if( HPMHooks.count.HP_itemdb_write_cached_packages_pre ) { @@ -35457,6 +35484,33 @@ struct item_data* HP_itemdb_exists(int nameid) { } return retVal___; } +struct item_option* HP_itemdb_option_exists(int idx) { + int hIndex = 0; + struct item_option* retVal___ = NULL; + if( HPMHooks.count.HP_itemdb_option_exists_pre ) { + struct item_option* (*preHookFunc) (int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_option_exists_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_option_exists_pre[hIndex].func; + retVal___ = preHookFunc(&idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.option_exists(idx); + } + if( HPMHooks.count.HP_itemdb_option_exists_post ) { + struct item_option* (*postHookFunc) (struct item_option* retVal___, int idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_option_exists_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_option_exists_post[hIndex].func; + retVal___ = postHookFunc(retVal___, idx); + } + } + return retVal___; +} bool HP_itemdb_in_group(struct item_group *group, int nameid) { int hIndex = 0; bool retVal___ = false; @@ -36328,6 +36382,32 @@ int HP_itemdb_validate_entry(struct item_data *entry, int n, const char *source) } return retVal___; } +void HP_itemdb_readdb_options_additional_fields(struct item_option *ito, struct config_setting_t *t, const char *source) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_readdb_options_additional_fields_pre ) { + void (*preHookFunc) (struct item_option **ito, struct config_setting_t **t, const char **source); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_options_additional_fields_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_readdb_options_additional_fields_pre[hIndex].func; + preHookFunc(&ito, &t, &source); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.readdb_options_additional_fields(ito, t, source); + } + if( HPMHooks.count.HP_itemdb_readdb_options_additional_fields_post ) { + void (*postHookFunc) (struct item_option *ito, struct config_setting_t *t, const char *source); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_options_additional_fields_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_readdb_options_additional_fields_post[hIndex].func; + postHookFunc(ito, t, source); + } + } + return; +} void HP_itemdb_readdb_additional_fields(int itemid, struct config_setting_t *it, int n, const char *source) { int hIndex = 0; if( HPMHooks.count.HP_itemdb_readdb_additional_fields_pre ) { @@ -36546,6 +36626,39 @@ int HP_itemdb_final_sub(union DBKey key, struct DBData *data, va_list ap) { } return retVal___; } +int HP_itemdb_options_final_sub(union DBKey key, struct DBData *data, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_itemdb_options_final_sub_pre ) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_options_final_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_itemdb_options_final_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.itemdb.options_final_sub(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_itemdb_options_final_sub_post ) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_options_final_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_itemdb_options_final_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} void HP_itemdb_clear(bool total) { int hIndex = 0; if( HPMHooks.count.HP_itemdb_clear_pre ) { @@ -61137,6 +61250,33 @@ char* HP_script_get_val_ref_str(struct script_state *st, struct reg_db *n, struc } return retVal___; } +char* HP_script_get_val_pc_ref_str(struct script_state *st, struct reg_db *n, struct script_data *data) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_script_get_val_pc_ref_str_pre ) { + char* (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pc_ref_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_get_val_pc_ref_str_pre[hIndex].func; + retVal___ = preHookFunc(&st, &n, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.get_val_pc_ref_str(st, n, data); + } + if( HPMHooks.count.HP_script_get_val_pc_ref_str_post ) { + char* (*postHookFunc) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pc_ref_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_get_val_pc_ref_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, n, data); + } + } + return retVal___; +} char* HP_script_get_val_scope_str(struct script_state *st, struct reg_db *n, struct script_data *data) { int hIndex = 0; char* retVal___ = NULL; @@ -61245,6 +61385,33 @@ int HP_script_get_val_ref_num(struct script_state *st, struct reg_db *n, struct } return retVal___; } +int HP_script_get_val_pc_ref_num(struct script_state *st, struct reg_db *n, struct script_data *data) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_script_get_val_pc_ref_num_pre ) { + int (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pc_ref_num_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_get_val_pc_ref_num_pre[hIndex].func; + retVal___ = preHookFunc(&st, &n, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.get_val_pc_ref_num(st, n, data); + } + if( HPMHooks.count.HP_script_get_val_pc_ref_num_post ) { + int (*postHookFunc) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pc_ref_num_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_get_val_pc_ref_num_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, n, data); + } + } + return retVal___; +} int HP_script_get_val_scope_num(struct script_state *st, struct reg_db *n, struct script_data *data) { int hIndex = 0; int retVal___ = 0; @@ -63289,6 +63456,32 @@ void HP_script_set_reg_ref_str(struct script_state *st, struct reg_db *n, int64 } return; } +void HP_script_set_reg_pc_ref_str(struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str) { + int hIndex = 0; + if( HPMHooks.count.HP_script_set_reg_pc_ref_str_pre ) { + void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pc_ref_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_set_reg_pc_ref_str_pre[hIndex].func; + preHookFunc(&st, &n, &num, &name, &str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.set_reg_pc_ref_str(st, n, num, name, str); + } + if( HPMHooks.count.HP_script_set_reg_pc_ref_str_post ) { + void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pc_ref_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_set_reg_pc_ref_str_post[hIndex].func; + postHookFunc(st, n, num, name, str); + } + } + return; +} void HP_script_set_reg_scope_str(struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str) { int hIndex = 0; if( HPMHooks.count.HP_script_set_reg_scope_str_pre ) { @@ -63393,6 +63586,32 @@ void HP_script_set_reg_ref_num(struct script_state *st, struct reg_db *n, int64 } return; } +void HP_script_set_reg_pc_ref_num(struct script_state *st, struct reg_db *n, int64 num, const char *name, int val) { + int hIndex = 0; + if( HPMHooks.count.HP_script_set_reg_pc_ref_num_pre ) { + void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pc_ref_num_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_set_reg_pc_ref_num_pre[hIndex].func; + preHookFunc(&st, &n, &num, &name, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.set_reg_pc_ref_num(st, n, num, name, val); + } + if( HPMHooks.count.HP_script_set_reg_pc_ref_num_post ) { + void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pc_ref_num_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_set_reg_pc_ref_num_post[hIndex].func; + postHookFunc(st, n, num, name, val); + } + } + return; +} void HP_script_set_reg_scope_num(struct script_state *st, struct reg_db *n, int64 num, const char *name, int val) { int hIndex = 0; if( HPMHooks.count.HP_script_set_reg_scope_num_pre ) { diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index f801e4147..33a62757a 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -320,6 +320,9 @@ 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); @@ -462,6 +465,7 @@ void itemdb2sql_tableheader(void) " `equip_level_min` smallint(5) UNSIGNED DEFAULT NULL,\n" " `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" " `bindonequip` tinyint(1) UNSIGNED DEFAULT NULL,\n" " `forceserial` tinyint(1) UNSIGNED DEFAULT NULL,\n" |