diff options
author | Haru <haru@dotalux.com> | 2016-12-02 20:55:11 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-12-03 15:38:59 +0100 |
commit | 2150e64f1df5f5586274a1fde49029c4444db641 (patch) | |
tree | 7f342a4bf53777ed740ce6600b0272bb09386e55 /src/plugins | |
parent | c1b4b0b2fb1066087e928e9440b40edd185b188e (diff) | |
download | hercules-2150e64f1df5f5586274a1fde49029c4444db641.tar.gz hercules-2150e64f1df5f5586274a1fde49029c4444db641.tar.bz2 hercules-2150e64f1df5f5586274a1fde49029c4444db641.tar.xz hercules-2150e64f1df5f5586274a1fde49029c4444db641.zip |
HPM Hooks Update
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Defs.inc | 58 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | 24 | ||||
-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 | 185 |
5 files changed, 158 insertions, 124 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index eb494a6c2..f721f5a37 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -2500,8 +2500,8 @@ typedef int (*HPMHOOK_pre_guild_check_alliance) (int *guild_id1, int *guild_id2, typedef int (*HPMHOOK_post_guild_check_alliance) (int retVal___, int guild_id1, int guild_id2, int flag); typedef int (*HPMHOOK_pre_guild_send_memberinfoshort) (struct map_session_data **sd, int *online); typedef int (*HPMHOOK_post_guild_send_memberinfoshort) (int retVal___, struct map_session_data *sd, int online); -typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_); -typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class_); +typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); +typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class); typedef int (*HPMHOOK_pre_guild_change_memberposition) (int *guild_id, int *account_id, int *char_id, short *idx); typedef int (*HPMHOOK_post_guild_change_memberposition) (int retVal___, int guild_id, int account_id, int char_id, short idx); typedef int (*HPMHOOK_pre_guild_memberposition_changed) (struct guild **g, int *idx, int *pos); @@ -2852,8 +2852,8 @@ typedef bool (*HPMHOOK_pre_inter_msg_config_read) (const char **cfg_name, bool * typedef bool (*HPMHOOK_post_inter_msg_config_read) (bool retVal___, const char *cfg_name, bool allow_override); typedef void (*HPMHOOK_pre_inter_do_final_msg) (void); typedef void (*HPMHOOK_post_inter_do_final_msg) (void); -typedef const char* (*HPMHOOK_pre_inter_job_name) (int *class_); -typedef const char* (*HPMHOOK_post_inter_job_name) (const char* retVal___, int class_); +typedef const char* (*HPMHOOK_pre_inter_job_name) (int *class); +typedef const char* (*HPMHOOK_post_inter_job_name) (const char* retVal___, int class); typedef void (*HPMHOOK_pre_inter_vmsg_to_fd) (int *fd, int *u_fd, int *aid, char **msg, va_list ap); typedef void (*HPMHOOK_post_inter_vmsg_to_fd) (int fd, int u_fd, int aid, char *msg, va_list ap); typedef void (*HPMHOOK_pre_inter_savereg) (int *account_id, int *char_id, const char **key, unsigned int *index, intptr_t *val, bool *is_string); @@ -3030,8 +3030,8 @@ typedef int (*HPMHOOK_pre_intif_guild_addmember) (int *guild_id, struct guild_me typedef int (*HPMHOOK_post_intif_guild_addmember) (int retVal___, int guild_id, struct guild_member *m); typedef int (*HPMHOOK_pre_intif_guild_leave) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes); typedef int (*HPMHOOK_post_intif_guild_leave) (int retVal___, int guild_id, int account_id, int char_id, int flag, const char *mes); -typedef int (*HPMHOOK_pre_intif_guild_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_); -typedef int (*HPMHOOK_post_intif_guild_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class_); +typedef int (*HPMHOOK_pre_intif_guild_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); +typedef int (*HPMHOOK_post_intif_guild_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class); typedef int (*HPMHOOK_pre_intif_guild_break) (int *guild_id); typedef int (*HPMHOOK_post_intif_guild_break) (int retVal___, int guild_id); typedef int (*HPMHOOK_pre_intif_guild_message) (int *guild_id, int *account_id, const char **mes, int *len); @@ -3334,8 +3334,8 @@ typedef const char* (*HPMHOOK_pre_itemdb_typename) (int *type); typedef const char* (*HPMHOOK_post_itemdb_typename) (const char* retVal___, int type); typedef void (*HPMHOOK_pre_itemdb_jobmask2mapid) (uint64 **bclass, uint64 *jobmask); typedef void (*HPMHOOK_post_itemdb_jobmask2mapid) (uint64 *bclass, uint64 jobmask); -typedef void (*HPMHOOK_pre_itemdb_jobid2mapid) (uint64 **bclass, int *job_id, bool *enable); -typedef void (*HPMHOOK_post_itemdb_jobid2mapid) (uint64 *bclass, int job_id, bool enable); +typedef void (*HPMHOOK_pre_itemdb_jobid2mapid) (uint64 **bclass, int *job_class, bool *enable); +typedef void (*HPMHOOK_post_itemdb_jobid2mapid) (uint64 *bclass, int job_class, bool enable); typedef void (*HPMHOOK_pre_itemdb_create_dummy_data) (void); typedef void (*HPMHOOK_post_itemdb_create_dummy_data) (void); typedef struct item_data* (*HPMHOOK_pre_itemdb_create_item_data) (int *nameid); @@ -4166,8 +4166,8 @@ typedef int (*HPMHOOK_pre_mapif_parse_GuildAddMember) (int *fd, int *guild_id, c typedef int (*HPMHOOK_post_mapif_parse_GuildAddMember) (int retVal___, int fd, int guild_id, const struct guild_member *m); typedef int (*HPMHOOK_pre_mapif_parse_GuildLeave) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag, const char **mes); typedef int (*HPMHOOK_post_mapif_parse_GuildLeave) (int retVal___, int fd, int guild_id, int account_id, int char_id, int flag, const char *mes); -typedef int (*HPMHOOK_pre_mapif_parse_GuildChangeMemberInfoShort) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_); -typedef int (*HPMHOOK_post_mapif_parse_GuildChangeMemberInfoShort) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int class_); +typedef int (*HPMHOOK_pre_mapif_parse_GuildChangeMemberInfoShort) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); +typedef int (*HPMHOOK_post_mapif_parse_GuildChangeMemberInfoShort) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class); typedef int (*HPMHOOK_pre_mapif_parse_BreakGuild) (int *fd, int *guild_id); typedef int (*HPMHOOK_post_mapif_parse_BreakGuild) (int retVal___, int fd, int guild_id); typedef int (*HPMHOOK_pre_mapif_parse_GuildMessage) (int *fd, int *guild_id, int *account_id, const char **mes, int *len); @@ -5142,8 +5142,8 @@ typedef void (*HPMHOOK_pre_pc_final) (void); typedef void (*HPMHOOK_post_pc_final) (void); typedef struct map_session_data* (*HPMHOOK_pre_pc_get_dummy_sd) (void); typedef struct map_session_data* (*HPMHOOK_post_pc_get_dummy_sd) (struct map_session_data* retVal___); -typedef int (*HPMHOOK_pre_pc_class2idx) (int *class_); -typedef int (*HPMHOOK_post_pc_class2idx) (int retVal___, int class_); +typedef int (*HPMHOOK_pre_pc_class2idx) (int *class); +typedef int (*HPMHOOK_post_pc_class2idx) (int retVal___, int class); typedef bool (*HPMHOOK_pre_pc_can_talk) (struct map_session_data **sd); typedef bool (*HPMHOOK_post_pc_can_talk) (bool retVal___, struct map_session_data *sd); typedef bool (*HPMHOOK_pre_pc_can_attack) (struct map_session_data **sd, int *target_id); @@ -5346,8 +5346,8 @@ typedef int (*HPMHOOK_pre_pc_itemheal) (struct map_session_data **sd, int *itemi typedef int (*HPMHOOK_post_pc_itemheal) (int retVal___, struct map_session_data *sd, int itemid, int hp, int sp); typedef int (*HPMHOOK_pre_pc_percentheal) (struct map_session_data **sd, int *hp, int *sp); typedef int (*HPMHOOK_post_pc_percentheal) (int retVal___, struct map_session_data *sd, int hp, int sp); -typedef int (*HPMHOOK_pre_pc_jobchange) (struct map_session_data **sd, int *job, int *upper); -typedef int (*HPMHOOK_post_pc_jobchange) (int retVal___, struct map_session_data *sd, int job, int upper); +typedef int (*HPMHOOK_pre_pc_jobchange) (struct map_session_data **sd, int *class, int *upper); +typedef int (*HPMHOOK_post_pc_jobchange) (int retVal___, struct map_session_data *sd, int class, int upper); typedef int (*HPMHOOK_pre_pc_setoption) (struct map_session_data **sd, int *type); typedef int (*HPMHOOK_post_pc_setoption) (int retVal___, struct map_session_data *sd, int type); typedef int (*HPMHOOK_pre_pc_setcart) (struct map_session_data **sd, int *type); @@ -5420,12 +5420,12 @@ typedef void (*HPMHOOK_pre_pc_setstand) (struct map_session_data **sd); typedef void (*HPMHOOK_post_pc_setstand) (struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_candrop) (struct map_session_data **sd, struct item **item); typedef int (*HPMHOOK_post_pc_candrop) (int retVal___, struct map_session_data *sd, struct item *item); -typedef int (*HPMHOOK_pre_pc_jobid2mapid) (unsigned short *b_class); -typedef int (*HPMHOOK_post_pc_jobid2mapid) (int retVal___, unsigned short b_class); +typedef int (*HPMHOOK_pre_pc_jobid2mapid) (int16 *class); +typedef int (*HPMHOOK_post_pc_jobid2mapid) (int retVal___, int16 class); typedef int (*HPMHOOK_pre_pc_mapid2jobid) (unsigned short *class_, int *sex); typedef int (*HPMHOOK_post_pc_mapid2jobid) (int retVal___, unsigned short class_, int sex); -typedef const char* (*HPMHOOK_pre_pc_job_name) (int *class_); -typedef const char* (*HPMHOOK_post_pc_job_name) (const char* retVal___, int class_); +typedef const char* (*HPMHOOK_pre_pc_job_name) (int *class); +typedef const char* (*HPMHOOK_post_pc_job_name) (const char* retVal___, int class); typedef void (*HPMHOOK_pre_pc_setinvincibletimer) (struct map_session_data **sd, int *val); typedef void (*HPMHOOK_post_pc_setinvincibletimer) (struct map_session_data *sd, int val); typedef void (*HPMHOOK_pre_pc_delinvincibletimer) (struct map_session_data **sd); @@ -5436,10 +5436,12 @@ typedef int (*HPMHOOK_pre_pc_delspiritball) (struct map_session_data **sd, int * typedef int (*HPMHOOK_post_pc_delspiritball) (int retVal___, struct map_session_data *sd, int count, int type); typedef int (*HPMHOOK_pre_pc_getmaxspiritball) (struct map_session_data **sd, int *min); typedef int (*HPMHOOK_post_pc_getmaxspiritball) (int retVal___, struct map_session_data *sd, int min); -typedef void (*HPMHOOK_pre_pc_addfame) (struct map_session_data **sd, int *count); -typedef void (*HPMHOOK_post_pc_addfame) (struct map_session_data *sd, int count); -typedef unsigned char (*HPMHOOK_pre_pc_famerank) (int *char_id, int *job); -typedef unsigned char (*HPMHOOK_post_pc_famerank) (unsigned char retVal___, int char_id, int job); +typedef void (*HPMHOOK_pre_pc_addfame) (struct map_session_data **sd, int *ranktype, int *count); +typedef void (*HPMHOOK_post_pc_addfame) (struct map_session_data *sd, int ranktype, int count); +typedef int (*HPMHOOK_pre_pc_fame_rank) (int *char_id, int *ranktype); +typedef int (*HPMHOOK_post_pc_fame_rank) (int retVal___, int char_id, int ranktype); +typedef int (*HPMHOOK_pre_pc_famelist_type) (uint16 *job_mapid); +typedef int (*HPMHOOK_post_pc_famelist_type) (int retVal___, uint16 job_mapid); typedef int (*HPMHOOK_pre_pc_set_hate_mob) (struct map_session_data **sd, int *pos, struct block_list **bl); typedef int (*HPMHOOK_post_pc_set_hate_mob) (int retVal___, struct map_session_data *sd, int pos, struct block_list *bl); typedef int (*HPMHOOK_pre_pc_readdb) (void); @@ -5454,8 +5456,8 @@ typedef int (*HPMHOOK_pre_pc_inventory_rental_clear) (struct map_session_data ** typedef int (*HPMHOOK_post_pc_inventory_rental_clear) (int retVal___, struct map_session_data *sd); typedef void (*HPMHOOK_pre_pc_inventory_rental_add) (struct map_session_data **sd, int *seconds); typedef void (*HPMHOOK_post_pc_inventory_rental_add) (struct map_session_data *sd, int seconds); -typedef int (*HPMHOOK_pre_pc_disguise) (struct map_session_data **sd, int *class_); -typedef int (*HPMHOOK_post_pc_disguise) (int retVal___, struct map_session_data *sd, int class_); +typedef int (*HPMHOOK_pre_pc_disguise) (struct map_session_data **sd, int *class); +typedef int (*HPMHOOK_post_pc_disguise) (int retVal___, struct map_session_data *sd, int class); typedef bool (*HPMHOOK_pre_pc_isautolooting) (struct map_session_data **sd, int *nameid); typedef bool (*HPMHOOK_post_pc_isautolooting) (bool retVal___, struct map_session_data *sd, int nameid); typedef void (*HPMHOOK_pre_pc_overheat) (struct map_session_data **sd, int *val); @@ -5548,8 +5550,8 @@ typedef int (*HPMHOOK_pre_pc_global_expiration_timer) (int *tid, int64 *tick, in typedef int (*HPMHOOK_post_pc_global_expiration_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef void (*HPMHOOK_pre_pc_expire_check) (struct map_session_data **sd); typedef void (*HPMHOOK_post_pc_expire_check) (struct map_session_data *sd); -typedef bool (*HPMHOOK_pre_pc_db_checkid) (unsigned int *class_); -typedef bool (*HPMHOOK_post_pc_db_checkid) (bool retVal___, unsigned int class_); +typedef bool (*HPMHOOK_pre_pc_db_checkid) (int *class); +typedef bool (*HPMHOOK_post_pc_db_checkid) (bool retVal___, int class); typedef void (*HPMHOOK_pre_pc_validate_levels) (void); typedef void (*HPMHOOK_post_pc_validate_levels) (void); typedef void (*HPMHOOK_pre_pc_autotrade_load) (void); @@ -6218,8 +6220,8 @@ typedef int (*HPMHOOK_pre_skill_get_unit_range) (uint16 *skill_id, uint16 *skill typedef int (*HPMHOOK_post_skill_get_unit_range) (int retVal___, uint16 skill_id, uint16 skill_lv); typedef int (*HPMHOOK_pre_skill_get_cooldown) (uint16 *skill_id, uint16 *skill_lv); typedef int (*HPMHOOK_post_skill_get_cooldown) (int retVal___, uint16 skill_id, uint16 skill_lv); -typedef int (*HPMHOOK_pre_skill_tree_get_max) (uint16 *skill_id, int *b_class); -typedef int (*HPMHOOK_post_skill_tree_get_max) (int retVal___, uint16 skill_id, int b_class); +typedef int (*HPMHOOK_pre_skill_tree_get_max) (uint16 *skill_id, int *class); +typedef int (*HPMHOOK_post_skill_tree_get_max) (int retVal___, uint16 skill_id, int class); typedef const char* (*HPMHOOK_pre_skill_get_name) (uint16 *skill_id); typedef const char* (*HPMHOOK_post_skill_get_name) (const char* retVal___, uint16 skill_id); typedef const char* (*HPMHOOK_pre_skill_get_desc) (uint16 *skill_id); diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index bab2c2721..222f013ee 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -6694,15 +6694,15 @@ void HP_inter_do_final_msg(void) { } return; } -const char* HP_inter_job_name(int class_) { +const char* HP_inter_job_name(int class) { int hIndex = 0; const char* retVal___ = NULL; if( HPMHooks.count.HP_inter_job_name_pre ) { - const char* (*preHookFunc) (int *class_); + const char* (*preHookFunc) (int *class); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_job_name_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_inter_job_name_pre[hIndex].func; - retVal___ = preHookFunc(&class_); + retVal___ = preHookFunc(&class); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6710,13 +6710,13 @@ const char* HP_inter_job_name(int class_) { } } { - retVal___ = HPMHooks.source.inter.job_name(class_); + retVal___ = HPMHooks.source.inter.job_name(class); } if( HPMHooks.count.HP_inter_job_name_post ) { - const char* (*postHookFunc) (const char* retVal___, int class_); + const char* (*postHookFunc) (const char* retVal___, int class); for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_job_name_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_inter_job_name_post[hIndex].func; - retVal___ = postHookFunc(retVal___, class_); + retVal___ = postHookFunc(retVal___, class); } } return retVal___; @@ -11873,15 +11873,15 @@ int HP_mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, } return retVal___; } -int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class_) { +int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_); + int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildChangeMemberInfoShort_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &online, &lv, &class_); + retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &online, &lv, &class); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11889,13 +11889,13 @@ int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_ } } { - retVal___ = HPMHooks.source.mapif.parse_GuildChangeMemberInfoShort(fd, guild_id, account_id, char_id, online, lv, class_); + retVal___ = HPMHooks.source.mapif.parse_GuildChangeMemberInfoShort(fd, guild_id, account_id, char_id, online, lv, class); } if( HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post ) { - int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int class_); + int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class); for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildChangeMemberInfoShort_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, char_id, online, lv, class_); + retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, char_id, online, lv, class); } } return retVal___; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 22f0b3a8a..03ad41edc 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -4266,8 +4266,10 @@ struct { struct HPMHookPoint *HP_pc_getmaxspiritball_post; struct HPMHookPoint *HP_pc_addfame_pre; struct HPMHookPoint *HP_pc_addfame_post; - struct HPMHookPoint *HP_pc_famerank_pre; - struct HPMHookPoint *HP_pc_famerank_post; + struct HPMHookPoint *HP_pc_fame_rank_pre; + struct HPMHookPoint *HP_pc_fame_rank_post; + struct HPMHookPoint *HP_pc_famelist_type_pre; + struct HPMHookPoint *HP_pc_famelist_type_post; struct HPMHookPoint *HP_pc_set_hate_mob_pre; struct HPMHookPoint *HP_pc_set_hate_mob_post; struct HPMHookPoint *HP_pc_readdb_pre; @@ -10303,8 +10305,10 @@ struct { int HP_pc_getmaxspiritball_post; int HP_pc_addfame_pre; int HP_pc_addfame_post; - int HP_pc_famerank_pre; - int HP_pc_famerank_post; + int HP_pc_fame_rank_pre; + int HP_pc_fame_rank_post; + int HP_pc_famelist_type_pre; + int HP_pc_famelist_type_post; int HP_pc_set_hate_mob_pre; int HP_pc_set_hate_mob_post; int HP_pc_readdb_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 0a3dc10fe..c199aa403 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -2188,7 +2188,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->delspiritball, HP_pc_delspiritball) }, { HP_POP(pc->getmaxspiritball, HP_pc_getmaxspiritball) }, { HP_POP(pc->addfame, HP_pc_addfame) }, - { HP_POP(pc->famerank, HP_pc_famerank) }, + { HP_POP(pc->fame_rank, HP_pc_fame_rank) }, + { HP_POP(pc->famelist_type, HP_pc_famelist_type) }, { HP_POP(pc->set_hate_mob, HP_pc_set_hate_mob) }, { HP_POP(pc->readdb, HP_pc_readdb) }, { HP_POP(pc->map_day_timer, HP_pc_map_day_timer) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 7b8fac984..240ef8346 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -27588,15 +27588,15 @@ int HP_guild_send_memberinfoshort(struct map_session_data *sd, int online) { } return retVal___; } -int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class_) { +int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_guild_recv_memberinfoshort_pre ) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_); + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &online, &lv, &class_); + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &online, &lv, &class); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -27604,13 +27604,13 @@ int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int } } { - retVal___ = HPMHooks.source.guild.recv_memberinfoshort(guild_id, account_id, char_id, online, lv, class_); + retVal___ = HPMHooks.source.guild.recv_memberinfoshort(guild_id, account_id, char_id, online, lv, class); } if( HPMHooks.count.HP_guild_recv_memberinfoshort_post ) { - int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class_); + int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class); for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_post[hIndex].func; - retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class_); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class); } } return retVal___; @@ -31727,15 +31727,15 @@ int HP_intif_guild_leave(int guild_id, int account_id, int char_id, int flag, co } return retVal___; } -int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class_) { +int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_intif_guild_memberinfoshort_pre ) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_); + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_intif_guild_memberinfoshort_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &online, &lv, &class_); + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &online, &lv, &class); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -31743,13 +31743,13 @@ int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, in } } { - retVal___ = HPMHooks.source.intif.guild_memberinfoshort(guild_id, account_id, char_id, online, lv, class_); + retVal___ = HPMHooks.source.intif.guild_memberinfoshort(guild_id, account_id, char_id, online, lv, class); } if( HPMHooks.count.HP_intif_guild_memberinfoshort_post ) { - int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class_); + int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class); for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_intif_guild_memberinfoshort_post[hIndex].func; - retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class_); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class); } } return retVal___; @@ -35710,14 +35710,14 @@ void HP_itemdb_jobmask2mapid(uint64 *bclass, uint64 jobmask) { } return; } -void HP_itemdb_jobid2mapid(uint64 *bclass, int job_id, bool enable) { +void HP_itemdb_jobid2mapid(uint64 *bclass, int job_class, bool enable) { int hIndex = 0; if( HPMHooks.count.HP_itemdb_jobid2mapid_pre ) { - void (*preHookFunc) (uint64 **bclass, int *job_id, bool *enable); + void (*preHookFunc) (uint64 **bclass, int *job_class, bool *enable); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobid2mapid_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_itemdb_jobid2mapid_pre[hIndex].func; - preHookFunc(&bclass, &job_id, &enable); + preHookFunc(&bclass, &job_class, &enable); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35725,13 +35725,13 @@ void HP_itemdb_jobid2mapid(uint64 *bclass, int job_id, bool enable) { } } { - HPMHooks.source.itemdb.jobid2mapid(bclass, job_id, enable); + HPMHooks.source.itemdb.jobid2mapid(bclass, job_class, enable); } if( HPMHooks.count.HP_itemdb_jobid2mapid_post ) { - void (*postHookFunc) (uint64 *bclass, int job_id, bool enable); + void (*postHookFunc) (uint64 *bclass, int job_class, bool enable); for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobid2mapid_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_itemdb_jobid2mapid_post[hIndex].func; - postHookFunc(bclass, job_id, enable); + postHookFunc(bclass, job_class, enable); } } return; @@ -52830,15 +52830,15 @@ struct map_session_data* HP_pc_get_dummy_sd(void) { } return retVal___; } -int HP_pc_class2idx(int class_) { +int HP_pc_class2idx(int class) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_pc_class2idx_pre ) { - int (*preHookFunc) (int *class_); + int (*preHookFunc) (int *class); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_class2idx_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_pc_class2idx_pre[hIndex].func; - retVal___ = preHookFunc(&class_); + retVal___ = preHookFunc(&class); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52846,13 +52846,13 @@ int HP_pc_class2idx(int class_) { } } { - retVal___ = HPMHooks.source.pc.class2idx(class_); + retVal___ = HPMHooks.source.pc.class2idx(class); } if( HPMHooks.count.HP_pc_class2idx_post ) { - int (*postHookFunc) (int retVal___, int class_); + int (*postHookFunc) (int retVal___, int class); for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_class2idx_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_pc_class2idx_post[hIndex].func; - retVal___ = postHookFunc(retVal___, class_); + retVal___ = postHookFunc(retVal___, class); } } return retVal___; @@ -55577,15 +55577,15 @@ int HP_pc_percentheal(struct map_session_data *sd, int hp, int sp) { } return retVal___; } -int HP_pc_jobchange(struct map_session_data *sd, int job, int upper) { +int HP_pc_jobchange(struct map_session_data *sd, int class, int upper) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_pc_jobchange_pre ) { - int (*preHookFunc) (struct map_session_data **sd, int *job, int *upper); + int (*preHookFunc) (struct map_session_data **sd, int *class, int *upper); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_pc_jobchange_pre[hIndex].func; - retVal___ = preHookFunc(&sd, &job, &upper); + retVal___ = preHookFunc(&sd, &class, &upper); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55593,13 +55593,13 @@ int HP_pc_jobchange(struct map_session_data *sd, int job, int upper) { } } { - retVal___ = HPMHooks.source.pc.jobchange(sd, job, upper); + retVal___ = HPMHooks.source.pc.jobchange(sd, class, upper); } if( HPMHooks.count.HP_pc_jobchange_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int job, int upper); + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int class, int upper); for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_pc_jobchange_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, job, upper); + retVal___ = postHookFunc(retVal___, sd, class, upper); } } return retVal___; @@ -56566,15 +56566,15 @@ int HP_pc_candrop(struct map_session_data *sd, struct item *item) { } return retVal___; } -int HP_pc_jobid2mapid(unsigned short b_class) { +int HP_pc_jobid2mapid(int16 class) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_pc_jobid2mapid_pre ) { - int (*preHookFunc) (unsigned short *b_class); + int (*preHookFunc) (int16 *class); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_pc_jobid2mapid_pre[hIndex].func; - retVal___ = preHookFunc(&b_class); + retVal___ = preHookFunc(&class); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56582,13 +56582,13 @@ int HP_pc_jobid2mapid(unsigned short b_class) { } } { - retVal___ = HPMHooks.source.pc.jobid2mapid(b_class); + retVal___ = HPMHooks.source.pc.jobid2mapid(class); } if( HPMHooks.count.HP_pc_jobid2mapid_post ) { - int (*postHookFunc) (int retVal___, unsigned short b_class); + int (*postHookFunc) (int retVal___, int16 class); for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_pc_jobid2mapid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, b_class); + retVal___ = postHookFunc(retVal___, class); } } return retVal___; @@ -56620,15 +56620,15 @@ int HP_pc_mapid2jobid(unsigned short class_, int sex) { } return retVal___; } -const char* HP_pc_job_name(int class_) { +const char* HP_pc_job_name(int class) { int hIndex = 0; const char* retVal___ = NULL; if( HPMHooks.count.HP_pc_job_name_pre ) { - const char* (*preHookFunc) (int *class_); + const char* (*preHookFunc) (int *class); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_job_name_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_pc_job_name_pre[hIndex].func; - retVal___ = preHookFunc(&class_); + retVal___ = preHookFunc(&class); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56636,13 +56636,13 @@ const char* HP_pc_job_name(int class_) { } } { - retVal___ = HPMHooks.source.pc.job_name(class_); + retVal___ = HPMHooks.source.pc.job_name(class); } if( HPMHooks.count.HP_pc_job_name_post ) { - const char* (*postHookFunc) (const char* retVal___, int class_); + const char* (*postHookFunc) (const char* retVal___, int class); for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_job_name_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_pc_job_name_post[hIndex].func; - retVal___ = postHookFunc(retVal___, class_); + retVal___ = postHookFunc(retVal___, class); } } return retVal___; @@ -56780,14 +56780,14 @@ int HP_pc_getmaxspiritball(struct map_session_data *sd, int min) { } return retVal___; } -void HP_pc_addfame(struct map_session_data *sd, int count) { +void HP_pc_addfame(struct map_session_data *sd, int ranktype, int count) { int hIndex = 0; if( HPMHooks.count.HP_pc_addfame_pre ) { - void (*preHookFunc) (struct map_session_data **sd, int *count); + void (*preHookFunc) (struct map_session_data **sd, int *ranktype, int *count); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addfame_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_pc_addfame_pre[hIndex].func; - preHookFunc(&sd, &count); + preHookFunc(&sd, &ranktype, &count); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56795,26 +56795,26 @@ void HP_pc_addfame(struct map_session_data *sd, int count) { } } { - HPMHooks.source.pc.addfame(sd, count); + HPMHooks.source.pc.addfame(sd, ranktype, count); } if( HPMHooks.count.HP_pc_addfame_post ) { - void (*postHookFunc) (struct map_session_data *sd, int count); + void (*postHookFunc) (struct map_session_data *sd, int ranktype, int count); for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addfame_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_pc_addfame_post[hIndex].func; - postHookFunc(sd, count); + postHookFunc(sd, ranktype, count); } } return; } -unsigned char HP_pc_famerank(int char_id, int job) { +int HP_pc_fame_rank(int char_id, int ranktype) { int hIndex = 0; - unsigned char retVal___ = 0; - if( HPMHooks.count.HP_pc_famerank_pre ) { - unsigned char (*preHookFunc) (int *char_id, int *job); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_fame_rank_pre ) { + int (*preHookFunc) (int *char_id, int *ranktype); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_famerank_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_famerank_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, &job); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_fame_rank_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_fame_rank_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &ranktype); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56822,13 +56822,40 @@ unsigned char HP_pc_famerank(int char_id, int job) { } } { - retVal___ = HPMHooks.source.pc.famerank(char_id, job); + retVal___ = HPMHooks.source.pc.fame_rank(char_id, ranktype); } - if( HPMHooks.count.HP_pc_famerank_post ) { - unsigned char (*postHookFunc) (unsigned char retVal___, int char_id, int job); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_famerank_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_famerank_post[hIndex].func; - retVal___ = postHookFunc(retVal___, char_id, job); + if( HPMHooks.count.HP_pc_fame_rank_post ) { + int (*postHookFunc) (int retVal___, int char_id, int ranktype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_fame_rank_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_fame_rank_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, ranktype); + } + } + return retVal___; +} +int HP_pc_famelist_type(uint16 job_mapid) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_pc_famelist_type_pre ) { + int (*preHookFunc) (uint16 *job_mapid); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_famelist_type_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_famelist_type_pre[hIndex].func; + retVal___ = preHookFunc(&job_mapid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.famelist_type(job_mapid); + } + if( HPMHooks.count.HP_pc_famelist_type_post ) { + int (*postHookFunc) (int retVal___, uint16 job_mapid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_famelist_type_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_famelist_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, job_mapid); } } return retVal___; @@ -57020,15 +57047,15 @@ void HP_pc_inventory_rental_add(struct map_session_data *sd, int seconds) { } return; } -int HP_pc_disguise(struct map_session_data *sd, int class_) { +int HP_pc_disguise(struct map_session_data *sd, int class) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_pc_disguise_pre ) { - int (*preHookFunc) (struct map_session_data **sd, int *class_); + int (*preHookFunc) (struct map_session_data **sd, int *class); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_disguise_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_pc_disguise_pre[hIndex].func; - retVal___ = preHookFunc(&sd, &class_); + retVal___ = preHookFunc(&sd, &class); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57036,13 +57063,13 @@ int HP_pc_disguise(struct map_session_data *sd, int class_) { } } { - retVal___ = HPMHooks.source.pc.disguise(sd, class_); + retVal___ = HPMHooks.source.pc.disguise(sd, class); } if( HPMHooks.count.HP_pc_disguise_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int class_); + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int class); for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_disguise_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_pc_disguise_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, class_); + retVal___ = postHookFunc(retVal___, sd, class); } } return retVal___; @@ -58298,15 +58325,15 @@ void HP_pc_expire_check(struct map_session_data *sd) { } return; } -bool HP_pc_db_checkid(unsigned int class_) { +bool HP_pc_db_checkid(int class) { int hIndex = 0; bool retVal___ = false; if( HPMHooks.count.HP_pc_db_checkid_pre ) { - bool (*preHookFunc) (unsigned int *class_); + bool (*preHookFunc) (int *class); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_db_checkid_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_pc_db_checkid_pre[hIndex].func; - retVal___ = preHookFunc(&class_); + retVal___ = preHookFunc(&class); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58314,13 +58341,13 @@ bool HP_pc_db_checkid(unsigned int class_) { } } { - retVal___ = HPMHooks.source.pc.db_checkid(class_); + retVal___ = HPMHooks.source.pc.db_checkid(class); } if( HPMHooks.count.HP_pc_db_checkid_post ) { - bool (*postHookFunc) (bool retVal___, unsigned int class_); + bool (*postHookFunc) (bool retVal___, int class); for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_db_checkid_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_pc_db_checkid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, class_); + retVal___ = postHookFunc(retVal___, class); } } return retVal___; @@ -66911,15 +66938,15 @@ int HP_skill_get_cooldown(uint16 skill_id, uint16 skill_lv) { } return retVal___; } -int HP_skill_tree_get_max(uint16 skill_id, int b_class) { +int HP_skill_tree_get_max(uint16 skill_id, int class) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_skill_tree_get_max_pre ) { - int (*preHookFunc) (uint16 *skill_id, int *b_class); + int (*preHookFunc) (uint16 *skill_id, int *class); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_tree_get_max_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_skill_tree_get_max_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &b_class); + retVal___ = preHookFunc(&skill_id, &class); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66927,13 +66954,13 @@ int HP_skill_tree_get_max(uint16 skill_id, int b_class) { } } { - retVal___ = HPMHooks.source.skill.tree_get_max(skill_id, b_class); + retVal___ = HPMHooks.source.skill.tree_get_max(skill_id, class); } if( HPMHooks.count.HP_skill_tree_get_max_post ) { - int (*postHookFunc) (int retVal___, uint16 skill_id, int b_class); + int (*postHookFunc) (int retVal___, uint16 skill_id, int class); for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_tree_get_max_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_skill_tree_get_max_post[hIndex].func; - retVal___ = postHookFunc(retVal___, skill_id, b_class); + retVal___ = postHookFunc(retVal___, skill_id, class); } } return retVal___; |