diff options
Diffstat (limited to 'src/plugins/HPMHooking')
15 files changed, 932 insertions, 134 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc new file mode 100644 index 000000000..84800ca49 --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc @@ -0,0 +1,7 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + +if( !(pincode = GET_SYMBOL("pincode") ) ) return false; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc new file mode 100644 index 000000000..4a940739f --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc @@ -0,0 +1,55 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + +struct { + struct HPMHookPoint *HP_pincode_handle_pre; + struct HPMHookPoint *HP_pincode_handle_post; + struct HPMHookPoint *HP_pincode_decrypt_pre; + struct HPMHookPoint *HP_pincode_decrypt_post; + struct HPMHookPoint *HP_pincode_error_pre; + struct HPMHookPoint *HP_pincode_error_post; + struct HPMHookPoint *HP_pincode_update_pre; + struct HPMHookPoint *HP_pincode_update_post; + struct HPMHookPoint *HP_pincode_sendstate_pre; + struct HPMHookPoint *HP_pincode_sendstate_post; + struct HPMHookPoint *HP_pincode_setnew_pre; + struct HPMHookPoint *HP_pincode_setnew_post; + struct HPMHookPoint *HP_pincode_change_pre; + struct HPMHookPoint *HP_pincode_change_post; + struct HPMHookPoint *HP_pincode_compare_pre; + struct HPMHookPoint *HP_pincode_compare_post; + struct HPMHookPoint *HP_pincode_check_pre; + struct HPMHookPoint *HP_pincode_check_post; + struct HPMHookPoint *HP_pincode_config_read_pre; + struct HPMHookPoint *HP_pincode_config_read_post; +} list; + +struct { + int HP_pincode_handle_pre; + int HP_pincode_handle_post; + int HP_pincode_decrypt_pre; + int HP_pincode_decrypt_post; + int HP_pincode_error_pre; + int HP_pincode_error_post; + int HP_pincode_update_pre; + int HP_pincode_update_post; + int HP_pincode_sendstate_pre; + int HP_pincode_sendstate_post; + int HP_pincode_setnew_pre; + int HP_pincode_setnew_post; + int HP_pincode_change_pre; + int HP_pincode_change_post; + int HP_pincode_compare_pre; + int HP_pincode_compare_post; + int HP_pincode_check_pre; + int HP_pincode_check_post; + int HP_pincode_config_read_pre; + int HP_pincode_config_read_post; +} count; + +struct { + struct pincode_interface pincode; +} source; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc new file mode 100644 index 000000000..11c3b86a7 --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc @@ -0,0 +1,21 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + +struct HookingPointData HookingPoints[] = { +/* pincode */ + { HP_POP(pincode->handle, HP_pincode_handle) }, + { HP_POP(pincode->decrypt, HP_pincode_decrypt) }, + { HP_POP(pincode->error, HP_pincode_error) }, + { HP_POP(pincode->update, HP_pincode_update) }, + { HP_POP(pincode->sendstate, HP_pincode_sendstate) }, + { HP_POP(pincode->setnew, HP_pincode_setnew) }, + { HP_POP(pincode->change, HP_pincode_change) }, + { HP_POP(pincode->compare, HP_pincode_compare) }, + { HP_POP(pincode->check, HP_pincode_check) }, + { HP_POP(pincode->config_read, HP_pincode_config_read) }, +}; + +int HookingPointsLenMax = 20; diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc new file mode 100644 index 000000000..d795ebb4a --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -0,0 +1,269 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + +/* pincode */ +void HP_pincode_handle(int fd, struct char_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_pincode_handle_pre ) { + void (*preHookFunc) (int *fd, struct char_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_handle_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_handle_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.handle(fd, sd); + } + if( HPMHooks.count.HP_pincode_handle_post ) { + void (*postHookFunc) (int *fd, struct char_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_handle_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_handle_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_pincode_decrypt(unsigned int userSeed, char *pin) { + int hIndex = 0; + if( HPMHooks.count.HP_pincode_decrypt_pre ) { + void (*preHookFunc) (unsigned int *userSeed, char *pin); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_decrypt_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_decrypt_pre[hIndex].func; + preHookFunc(&userSeed, pin); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.decrypt(userSeed, pin); + } + if( HPMHooks.count.HP_pincode_decrypt_post ) { + void (*postHookFunc) (unsigned int *userSeed, char *pin); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_decrypt_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_decrypt_post[hIndex].func; + postHookFunc(&userSeed, pin); + } + } + return; +} +void HP_pincode_error(int account_id) { + int hIndex = 0; + if( HPMHooks.count.HP_pincode_error_pre ) { + void (*preHookFunc) (int *account_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_error_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_error_pre[hIndex].func; + preHookFunc(&account_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.error(account_id); + } + if( HPMHooks.count.HP_pincode_error_post ) { + void (*postHookFunc) (int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_error_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_error_post[hIndex].func; + postHookFunc(&account_id); + } + } + return; +} +void HP_pincode_update(int account_id, char *pin) { + int hIndex = 0; + if( HPMHooks.count.HP_pincode_update_pre ) { + void (*preHookFunc) (int *account_id, char *pin); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_update_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_update_pre[hIndex].func; + preHookFunc(&account_id, pin); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.update(account_id, pin); + } + if( HPMHooks.count.HP_pincode_update_post ) { + void (*postHookFunc) (int *account_id, char *pin); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_update_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_update_post[hIndex].func; + postHookFunc(&account_id, pin); + } + } + return; +} +void HP_pincode_sendstate(int fd, struct char_session_data *sd, uint16 state) { + int hIndex = 0; + if( HPMHooks.count.HP_pincode_sendstate_pre ) { + void (*preHookFunc) (int *fd, struct char_session_data *sd, uint16 *state); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_sendstate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_sendstate_pre[hIndex].func; + preHookFunc(&fd, sd, &state); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.sendstate(fd, sd, state); + } + if( HPMHooks.count.HP_pincode_sendstate_post ) { + void (*postHookFunc) (int *fd, struct char_session_data *sd, uint16 *state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_sendstate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_sendstate_post[hIndex].func; + postHookFunc(&fd, sd, &state); + } + } + return; +} +void HP_pincode_setnew(int fd, struct char_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_pincode_setnew_pre ) { + void (*preHookFunc) (int *fd, struct char_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_setnew_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_setnew_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.setnew(fd, sd); + } + if( HPMHooks.count.HP_pincode_setnew_post ) { + void (*postHookFunc) (int *fd, struct char_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_setnew_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_setnew_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_pincode_change(int fd, struct char_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_pincode_change_pre ) { + void (*preHookFunc) (int *fd, struct char_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_change_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_change_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.change(fd, sd); + } + if( HPMHooks.count.HP_pincode_change_post ) { + void (*postHookFunc) (int *fd, struct char_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_change_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_change_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +int HP_pincode_compare(int fd, struct char_session_data *sd, char *pin) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_pincode_compare_pre ) { + int (*preHookFunc) (int *fd, struct char_session_data *sd, char *pin); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_compare_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_compare_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd, pin); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pincode.compare(fd, sd, pin); + } + if( HPMHooks.count.HP_pincode_compare_post ) { + int (*postHookFunc) (int retVal___, int *fd, struct char_session_data *sd, char *pin); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_compare_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_compare_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd, pin); + } + } + return retVal___; +} +void HP_pincode_check(int fd, struct char_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_pincode_check_pre ) { + void (*preHookFunc) (int *fd, struct char_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_check_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.check(fd, sd); + } + if( HPMHooks.count.HP_pincode_check_post ) { + void (*postHookFunc) (int *fd, struct char_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_check_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +bool HP_pincode_config_read(char *w1, char *w2) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_pincode_config_read_pre ) { + bool (*preHookFunc) (char *w1, char *w2); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_config_read_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pincode.config_read(w1, w2); + } + if( HPMHooks.count.HP_pincode_config_read_post ) { + bool (*postHookFunc) (bool retVal___, char *w1, char *w2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2); + } + } + return retVal___; +} diff --git a/src/plugins/HPMHooking/HPMHooking_char.sources.inc b/src/plugins/HPMHooking/HPMHooking_char.sources.inc new file mode 100644 index 000000000..fd5d2d2bf --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_char.sources.inc @@ -0,0 +1,7 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + +memcpy(&HPMHooks.source.pincode, pincode, sizeof(struct pincode_interface)); diff --git a/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc new file mode 100644 index 000000000..6dcfae29d --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc @@ -0,0 +1,6 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc new file mode 100644 index 000000000..4c380b367 --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc @@ -0,0 +1,14 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + +struct { +} list; + +struct { +} count; + +struct { +} source; diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc new file mode 100644 index 000000000..6752a4324 --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc @@ -0,0 +1,10 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + +struct HookingPointData HookingPoints[] = { +}; + +int HookingPointsLenMax = 0; diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc new file mode 100644 index 000000000..6dcfae29d --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc @@ -0,0 +1,6 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + diff --git a/src/plugins/HPMHooking/HPMHooking_login.sources.inc b/src/plugins/HPMHooking/HPMHooking_login.sources.inc new file mode 100644 index 000000000..6dcfae29d --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_login.sources.inc @@ -0,0 +1,6 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + diff --git a/src/plugins/HPMHooking/HPMHooking.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc index 8482b9f80..8482b9f80 100644 --- a/src/plugins/HPMHooking/HPMHooking.GetSymbol.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index d73525b70..81e0c1c2d 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -977,6 +977,8 @@ struct { struct HPMHookPoint *HP_clif_party_show_picker_post; struct HPMHookPoint *HP_clif_partyinvitationstate_pre; struct HPMHookPoint *HP_clif_partyinvitationstate_post; + struct HPMHookPoint *HP_clif_PartyLeaderChanged_pre; + struct HPMHookPoint *HP_clif_PartyLeaderChanged_post; struct HPMHookPoint *HP_clif_guild_created_pre; struct HPMHookPoint *HP_clif_guild_created_post; struct HPMHookPoint *HP_clif_guild_belonginfo_pre; @@ -1299,6 +1301,10 @@ struct { struct HPMHookPoint *HP_clif_npc_market_open_post; struct HPMHookPoint *HP_clif_npc_market_purchase_ack_pre; struct HPMHookPoint *HP_clif_npc_market_purchase_ack_post; + struct HPMHookPoint *HP_clif_parse_roulette_db_pre; + struct HPMHookPoint *HP_clif_parse_roulette_db_post; + struct HPMHookPoint *HP_clif_roulette_generate_ack_pre; + struct HPMHookPoint *HP_clif_roulette_generate_ack_post; struct HPMHookPoint *HP_clif_pWantToConnection_pre; struct HPMHookPoint *HP_clif_pWantToConnection_post; struct HPMHookPoint *HP_clif_pLoadEndAck_pre; @@ -1739,6 +1745,16 @@ struct { struct HPMHookPoint *HP_clif_pBankOpen_post; struct HPMHookPoint *HP_clif_pBankClose_pre; struct HPMHookPoint *HP_clif_pBankClose_post; + struct HPMHookPoint *HP_clif_pRouletteOpen_pre; + struct HPMHookPoint *HP_clif_pRouletteOpen_post; + struct HPMHookPoint *HP_clif_pRouletteInfo_pre; + struct HPMHookPoint *HP_clif_pRouletteInfo_post; + struct HPMHookPoint *HP_clif_pRouletteClose_pre; + struct HPMHookPoint *HP_clif_pRouletteClose_post; + struct HPMHookPoint *HP_clif_pRouletteGenerate_pre; + struct HPMHookPoint *HP_clif_pRouletteGenerate_post; + struct HPMHookPoint *HP_clif_pRouletteRecvItem_pre; + struct HPMHookPoint *HP_clif_pRouletteRecvItem_post; struct HPMHookPoint *HP_clif_pNPCShopClosed_pre; struct HPMHookPoint *HP_clif_pNPCShopClosed_post; struct HPMHookPoint *HP_clif_pNPCMarketClosed_pre; @@ -1999,10 +2015,8 @@ struct { struct HPMHookPoint *HP_guild_get_alliance_count_post; struct HPMHookPoint *HP_guild_castle_reconnect_sub_pre; struct HPMHookPoint *HP_guild_castle_reconnect_sub_post; - struct HPMHookPoint *HP_gstorage_id2storage_pre; - struct HPMHookPoint *HP_gstorage_id2storage_post; - struct HPMHookPoint *HP_gstorage_id2storage2_pre; - struct HPMHookPoint *HP_gstorage_id2storage2_post; + struct HPMHookPoint *HP_gstorage_ensure_pre; + struct HPMHookPoint *HP_gstorage_ensure_post; struct HPMHookPoint *HP_gstorage_init_pre; struct HPMHookPoint *HP_gstorage_init_post; struct HPMHookPoint *HP_gstorage_final_pre; @@ -2673,6 +2687,8 @@ struct { struct HPMHookPoint *HP_map_get_new_object_id_post; struct HPMHookPoint *HP_map_search_freecell_pre; struct HPMHookPoint *HP_map_search_freecell_post; + struct HPMHookPoint *HP_map_closest_freecell_pre; + struct HPMHookPoint *HP_map_closest_freecell_post; struct HPMHookPoint *HP_map_quit_pre; struct HPMHookPoint *HP_map_quit_post; struct HPMHookPoint *HP_map_addnpc_pre; @@ -3471,6 +3487,10 @@ struct { struct HPMHookPoint *HP_path_check_distance_post; struct HPMHookPoint *HP_path_distance_pre; struct HPMHookPoint *HP_path_distance_post; + struct HPMHookPoint *HP_path_check_distance_client_pre; + struct HPMHookPoint *HP_path_check_distance_client_post; + struct HPMHookPoint *HP_path_distance_client_pre; + struct HPMHookPoint *HP_path_distance_client_post; struct HPMHookPoint *HP_pcg_init_pre; struct HPMHookPoint *HP_pcg_init_post; struct HPMHookPoint *HP_pcg_final_pre; @@ -3707,10 +3727,14 @@ struct { struct HPMHookPoint *HP_pc_setcart_post; struct HPMHookPoint *HP_pc_setfalcon_pre; struct HPMHookPoint *HP_pc_setfalcon_post; - struct HPMHookPoint *HP_pc_setriding_pre; - struct HPMHookPoint *HP_pc_setriding_post; + struct HPMHookPoint *HP_pc_setridingpeco_pre; + struct HPMHookPoint *HP_pc_setridingpeco_post; struct HPMHookPoint *HP_pc_setmadogear_pre; struct HPMHookPoint *HP_pc_setmadogear_post; + struct HPMHookPoint *HP_pc_setridingdragon_pre; + struct HPMHookPoint *HP_pc_setridingdragon_post; + struct HPMHookPoint *HP_pc_setridingwug_pre; + struct HPMHookPoint *HP_pc_setridingwug_post; struct HPMHookPoint *HP_pc_changelook_pre; struct HPMHookPoint *HP_pc_changelook_post; struct HPMHookPoint *HP_pc_equiplookall_pre; @@ -4563,8 +4587,6 @@ struct { struct HPMHookPoint *HP_skill_greed_post; struct HPMHookPoint *HP_skill_destroy_trap_pre; struct HPMHookPoint *HP_skill_destroy_trap_post; - struct HPMHookPoint *HP_skill_icewall_block_pre; - struct HPMHookPoint *HP_skill_icewall_block_post; struct HPMHookPoint *HP_skill_unitgrouptickset_search_pre; struct HPMHookPoint *HP_skill_unitgrouptickset_search_post; struct HPMHookPoint *HP_skill_dance_switch_pre; @@ -4973,6 +4995,10 @@ struct { struct HPMHookPoint *HP_unit_stop_walking_post; struct HPMHookPoint *HP_unit_skilluse_id_pre; struct HPMHookPoint *HP_unit_skilluse_id_post; + struct HPMHookPoint *HP_unit_step_timer_pre; + struct HPMHookPoint *HP_unit_step_timer_post; + struct HPMHookPoint *HP_unit_stop_stepaction_pre; + struct HPMHookPoint *HP_unit_stop_stepaction_post; struct HPMHookPoint *HP_unit_is_walking_pre; struct HPMHookPoint *HP_unit_is_walking_post; struct HPMHookPoint *HP_unit_can_move_pre; @@ -6014,6 +6040,8 @@ struct { int HP_clif_party_show_picker_post; int HP_clif_partyinvitationstate_pre; int HP_clif_partyinvitationstate_post; + int HP_clif_PartyLeaderChanged_pre; + int HP_clif_PartyLeaderChanged_post; int HP_clif_guild_created_pre; int HP_clif_guild_created_post; int HP_clif_guild_belonginfo_pre; @@ -6336,6 +6364,10 @@ struct { int HP_clif_npc_market_open_post; int HP_clif_npc_market_purchase_ack_pre; int HP_clif_npc_market_purchase_ack_post; + int HP_clif_parse_roulette_db_pre; + int HP_clif_parse_roulette_db_post; + int HP_clif_roulette_generate_ack_pre; + int HP_clif_roulette_generate_ack_post; int HP_clif_pWantToConnection_pre; int HP_clif_pWantToConnection_post; int HP_clif_pLoadEndAck_pre; @@ -6776,6 +6808,16 @@ struct { int HP_clif_pBankOpen_post; int HP_clif_pBankClose_pre; int HP_clif_pBankClose_post; + int HP_clif_pRouletteOpen_pre; + int HP_clif_pRouletteOpen_post; + int HP_clif_pRouletteInfo_pre; + int HP_clif_pRouletteInfo_post; + int HP_clif_pRouletteClose_pre; + int HP_clif_pRouletteClose_post; + int HP_clif_pRouletteGenerate_pre; + int HP_clif_pRouletteGenerate_post; + int HP_clif_pRouletteRecvItem_pre; + int HP_clif_pRouletteRecvItem_post; int HP_clif_pNPCShopClosed_pre; int HP_clif_pNPCShopClosed_post; int HP_clif_pNPCMarketClosed_pre; @@ -7036,10 +7078,8 @@ struct { int HP_guild_get_alliance_count_post; int HP_guild_castle_reconnect_sub_pre; int HP_guild_castle_reconnect_sub_post; - int HP_gstorage_id2storage_pre; - int HP_gstorage_id2storage_post; - int HP_gstorage_id2storage2_pre; - int HP_gstorage_id2storage2_post; + int HP_gstorage_ensure_pre; + int HP_gstorage_ensure_post; int HP_gstorage_init_pre; int HP_gstorage_init_post; int HP_gstorage_final_pre; @@ -7710,6 +7750,8 @@ struct { int HP_map_get_new_object_id_post; int HP_map_search_freecell_pre; int HP_map_search_freecell_post; + int HP_map_closest_freecell_pre; + int HP_map_closest_freecell_post; int HP_map_quit_pre; int HP_map_quit_post; int HP_map_addnpc_pre; @@ -8508,6 +8550,10 @@ struct { int HP_path_check_distance_post; int HP_path_distance_pre; int HP_path_distance_post; + int HP_path_check_distance_client_pre; + int HP_path_check_distance_client_post; + int HP_path_distance_client_pre; + int HP_path_distance_client_post; int HP_pcg_init_pre; int HP_pcg_init_post; int HP_pcg_final_pre; @@ -8744,10 +8790,14 @@ struct { int HP_pc_setcart_post; int HP_pc_setfalcon_pre; int HP_pc_setfalcon_post; - int HP_pc_setriding_pre; - int HP_pc_setriding_post; + int HP_pc_setridingpeco_pre; + int HP_pc_setridingpeco_post; int HP_pc_setmadogear_pre; int HP_pc_setmadogear_post; + int HP_pc_setridingdragon_pre; + int HP_pc_setridingdragon_post; + int HP_pc_setridingwug_pre; + int HP_pc_setridingwug_post; int HP_pc_changelook_pre; int HP_pc_changelook_post; int HP_pc_equiplookall_pre; @@ -9600,8 +9650,6 @@ struct { int HP_skill_greed_post; int HP_skill_destroy_trap_pre; int HP_skill_destroy_trap_post; - int HP_skill_icewall_block_pre; - int HP_skill_icewall_block_post; int HP_skill_unitgrouptickset_search_pre; int HP_skill_unitgrouptickset_search_post; int HP_skill_dance_switch_pre; @@ -10010,6 +10058,10 @@ struct { int HP_unit_stop_walking_post; int HP_unit_skilluse_id_pre; int HP_unit_skilluse_id_post; + int HP_unit_step_timer_pre; + int HP_unit_step_timer_post; + int HP_unit_stop_stepaction_pre; + int HP_unit_stop_stepaction_post; int HP_unit_is_walking_pre; int HP_unit_is_walking_post; int HP_unit_can_move_pre; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 05d484d20..5fa0bff3f 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -498,6 +498,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->party_xy_remove, HP_clif_party_xy_remove) }, { HP_POP(clif->party_show_picker, HP_clif_party_show_picker) }, { HP_POP(clif->partyinvitationstate, HP_clif_partyinvitationstate) }, + { HP_POP(clif->PartyLeaderChanged, HP_clif_PartyLeaderChanged) }, { HP_POP(clif->guild_created, HP_clif_guild_created) }, { HP_POP(clif->guild_belonginfo, HP_clif_guild_belonginfo) }, { HP_POP(clif->guild_masterormember, HP_clif_guild_masterormember) }, @@ -659,6 +660,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->delay_damage_sub, HP_clif_delay_damage_sub) }, { HP_POP(clif->npc_market_open, HP_clif_npc_market_open) }, { HP_POP(clif->npc_market_purchase_ack, HP_clif_npc_market_purchase_ack) }, + { HP_POP(clif->parse_roulette_db, HP_clif_parse_roulette_db) }, + { HP_POP(clif->roulette_generate_ack, HP_clif_roulette_generate_ack) }, { HP_POP(clif->pWantToConnection, HP_clif_pWantToConnection) }, { HP_POP(clif->pLoadEndAck, HP_clif_pLoadEndAck) }, { HP_POP(clif->pTickSend, HP_clif_pTickSend) }, @@ -879,6 +882,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pBankCheck, HP_clif_pBankCheck) }, { HP_POP(clif->pBankOpen, HP_clif_pBankOpen) }, { HP_POP(clif->pBankClose, HP_clif_pBankClose) }, + { HP_POP(clif->pRouletteOpen, HP_clif_pRouletteOpen) }, + { HP_POP(clif->pRouletteInfo, HP_clif_pRouletteInfo) }, + { HP_POP(clif->pRouletteClose, HP_clif_pRouletteClose) }, + { HP_POP(clif->pRouletteGenerate, HP_clif_pRouletteGenerate) }, + { HP_POP(clif->pRouletteRecvItem, HP_clif_pRouletteRecvItem) }, { HP_POP(clif->pNPCShopClosed, HP_clif_pNPCShopClosed) }, { HP_POP(clif->pNPCMarketClosed, HP_clif_pNPCMarketClosed) }, { HP_POP(clif->pNPCMarketPurchase, HP_clif_pNPCMarketPurchase) }, @@ -1013,8 +1021,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(guild->get_alliance_count, HP_guild_get_alliance_count) }, { HP_POP(guild->castle_reconnect_sub, HP_guild_castle_reconnect_sub) }, /* gstorage */ - { HP_POP(gstorage->id2storage, HP_gstorage_id2storage) }, - { HP_POP(gstorage->id2storage2, HP_gstorage_id2storage2) }, + { HP_POP(gstorage->ensure, HP_gstorage_ensure) }, { HP_POP(gstorage->init, HP_gstorage_init) }, { HP_POP(gstorage->final, HP_gstorage_final) }, { HP_POP(gstorage->delete, HP_gstorage_delete) }, @@ -1358,6 +1365,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(map->find_skill_unit_oncell, HP_map_find_skill_unit_oncell) }, { HP_POP(map->get_new_object_id, HP_map_get_new_object_id) }, { HP_POP(map->search_freecell, HP_map_search_freecell) }, + { HP_POP(map->closest_freecell, HP_map_closest_freecell) }, { HP_POP(map->quit, HP_map_quit) }, { HP_POP(map->addnpc, HP_map_addnpc) }, { HP_POP(map->clearflooritem_timer, HP_map_clearflooritem_timer) }, @@ -1764,6 +1772,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(path->search_long, HP_path_search_long) }, { HP_POP(path->check_distance, HP_path_check_distance) }, { HP_POP(path->distance, HP_path_distance) }, + { HP_POP(path->check_distance_client, HP_path_check_distance_client) }, + { HP_POP(path->distance_client, HP_path_distance_client) }, /* pcg */ { HP_POP(pcg->init, HP_pcg_init) }, { HP_POP(pcg->final, HP_pcg_final) }, @@ -1884,8 +1894,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->setoption, HP_pc_setoption) }, { HP_POP(pc->setcart, HP_pc_setcart) }, { HP_POP(pc->setfalcon, HP_pc_setfalcon) }, - { HP_POP(pc->setriding, HP_pc_setriding) }, + { HP_POP(pc->setridingpeco, HP_pc_setridingpeco) }, { HP_POP(pc->setmadogear, HP_pc_setmadogear) }, + { HP_POP(pc->setridingdragon, HP_pc_setridingdragon) }, + { HP_POP(pc->setridingwug, HP_pc_setridingwug) }, { HP_POP(pc->changelook, HP_pc_changelook) }, { HP_POP(pc->equiplookall, HP_pc_equiplookall) }, { HP_POP(pc->readparam, HP_pc_readparam) }, @@ -2317,7 +2329,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->frostjoke_scream, HP_skill_frostjoke_scream) }, { HP_POP(skill->greed, HP_skill_greed) }, { HP_POP(skill->destroy_trap, HP_skill_destroy_trap) }, - { HP_POP(skill->icewall_block, HP_skill_icewall_block) }, { HP_POP(skill->unitgrouptickset_search, HP_skill_unitgrouptickset_search) }, { HP_POP(skill->dance_switch, HP_skill_dance_switch) }, { HP_POP(skill->check_condition_char_sub, HP_skill_check_condition_char_sub) }, @@ -2526,6 +2537,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(unit->warp, HP_unit_warp) }, { HP_POP(unit->stop_walking, HP_unit_stop_walking) }, { HP_POP(unit->skilluse_id, HP_unit_skilluse_id) }, + { HP_POP(unit->step_timer, HP_unit_step_timer) }, + { HP_POP(unit->stop_stepaction, HP_unit_stop_stepaction) }, { HP_POP(unit->is_walking, HP_unit_is_walking) }, { HP_POP(unit->can_move, HP_unit_can_move) }, { HP_POP(unit->resume_running, HP_unit_resume_running) }, diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 8f209fe5c..9b518d097 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -12937,6 +12937,32 @@ void HP_clif_partyinvitationstate(struct map_session_data *sd) { } return; } +void HP_clif_PartyLeaderChanged(struct map_session_data *sd, int prev_leader_aid, int new_leader_aid) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_PartyLeaderChanged_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *prev_leader_aid, int *new_leader_aid); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyLeaderChanged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_PartyLeaderChanged_pre[hIndex].func; + preHookFunc(sd, &prev_leader_aid, &new_leader_aid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PartyLeaderChanged(sd, prev_leader_aid, new_leader_aid); + } + if( HPMHooks.count.HP_clif_PartyLeaderChanged_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *prev_leader_aid, int *new_leader_aid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyLeaderChanged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_PartyLeaderChanged_post[hIndex].func; + postHookFunc(sd, &prev_leader_aid, &new_leader_aid); + } + } + return; +} void HP_clif_guild_created(struct map_session_data *sd, int flag) { int hIndex = 0; if( HPMHooks.count.HP_clif_guild_created_pre ) { @@ -17135,6 +17161,59 @@ void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, struct packet_ } return; } +bool HP_clif_parse_roulette_db(void) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_clif_parse_roulette_db_pre ) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_roulette_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_parse_roulette_db_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.parse_roulette_db(); + } + if( HPMHooks.count.HP_clif_parse_roulette_db_post ) { + bool (*postHookFunc) (bool retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_roulette_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_parse_roulette_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, short bonusItemID) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_roulette_generate_ack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned char *result, short *stage, short *prizeIdx, short *bonusItemID); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_roulette_generate_ack_pre[hIndex].func; + preHookFunc(sd, &result, &stage, &prizeIdx, &bonusItemID); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.roulette_generate_ack(sd, result, stage, prizeIdx, bonusItemID); + } + if( HPMHooks.count.HP_clif_roulette_generate_ack_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned char *result, short *stage, short *prizeIdx, short *bonusItemID); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_roulette_generate_ack_post[hIndex].func; + postHookFunc(sd, &result, &stage, &prizeIdx, &bonusItemID); + } + } + return; +} void HP_clif_pWantToConnection(int fd, struct map_session_data *sd) { int hIndex = 0; if( HPMHooks.count.HP_clif_pWantToConnection_pre ) { @@ -22855,6 +22934,136 @@ void HP_clif_pBankClose(int fd, struct map_session_data *sd) { } return; } +void HP_clif_pRouletteOpen(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRouletteOpen_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteOpen_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRouletteOpen_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRouletteOpen(fd, sd); + } + if( HPMHooks.count.HP_clif_pRouletteOpen_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteOpen_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRouletteOpen_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pRouletteInfo(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRouletteInfo_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteInfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRouletteInfo_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRouletteInfo(fd, sd); + } + if( HPMHooks.count.HP_clif_pRouletteInfo_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteInfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRouletteInfo_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pRouletteClose(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRouletteClose_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteClose_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRouletteClose_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRouletteClose(fd, sd); + } + if( HPMHooks.count.HP_clif_pRouletteClose_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteClose_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRouletteClose_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pRouletteGenerate(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRouletteGenerate_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteGenerate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRouletteGenerate_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRouletteGenerate(fd, sd); + } + if( HPMHooks.count.HP_clif_pRouletteGenerate_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteGenerate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRouletteGenerate_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pRouletteRecvItem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRouletteRecvItem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteRecvItem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRouletteRecvItem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRouletteRecvItem(fd, sd); + } + if( HPMHooks.count.HP_clif_pRouletteRecvItem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteRecvItem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRouletteRecvItem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} void HP_clif_pNPCShopClosed(int fd, struct map_session_data *sd) { int hIndex = 0; if( HPMHooks.count.HP_clif_pNPCShopClosed_pre ) { @@ -26404,14 +26613,14 @@ void HP_guild_castle_reconnect_sub(void *key, void *data, va_list ap) { return; } /* gstorage */ -struct guild_storage* HP_gstorage_id2storage(int guild_id) { +struct guild_storage* HP_gstorage_ensure(int guild_id) { int hIndex = 0; struct guild_storage* retVal___ = NULL; - if( HPMHooks.count.HP_gstorage_id2storage_pre ) { + if( HPMHooks.count.HP_gstorage_ensure_pre ) { struct guild_storage* (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_gstorage_id2storage_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_ensure_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_ensure_pre[hIndex].func; retVal___ = preHookFunc(&guild_id); } if( *HPMforce_return ) { @@ -26420,39 +26629,12 @@ struct guild_storage* HP_gstorage_id2storage(int guild_id) { } } { - retVal___ = HPMHooks.source.gstorage.id2storage(guild_id); + retVal___ = HPMHooks.source.gstorage.ensure(guild_id); } - if( HPMHooks.count.HP_gstorage_id2storage_post ) { + if( HPMHooks.count.HP_gstorage_ensure_post ) { struct guild_storage* (*postHookFunc) (struct guild_storage* retVal___, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_gstorage_id2storage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id); - } - } - return retVal___; -} -struct guild_storage* HP_gstorage_id2storage2(int guild_id) { - int hIndex = 0; - struct guild_storage* retVal___ = NULL; - if( HPMHooks.count.HP_gstorage_id2storage2_pre ) { - struct guild_storage* (*preHookFunc) (int *guild_id); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_gstorage_id2storage2_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.gstorage.id2storage2(guild_id); - } - if( HPMHooks.count.HP_gstorage_id2storage2_post ) { - struct guild_storage* (*postHookFunc) (struct guild_storage* retVal___, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_gstorage_id2storage2_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_ensure_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_ensure_post[hIndex].func; retVal___ = postHookFunc(retVal___, &guild_id); } } @@ -35299,15 +35481,15 @@ int HP_map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) { } return retVal___; } -int HP_map_count_oncell(int16 m, int16 x, int16 y, int type) { +int HP_map_count_oncell(int16 m, int16 x, int16 y, int type, int flag) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_map_count_oncell_pre ) { - int (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *type); + int (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *type, int *flag); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_oncell_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_map_count_oncell_pre[hIndex].func; - retVal___ = preHookFunc(&m, &x, &y, &type); + retVal___ = preHookFunc(&m, &x, &y, &type, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35315,13 +35497,13 @@ int HP_map_count_oncell(int16 m, int16 x, int16 y, int type) { } } { - retVal___ = HPMHooks.source.map.count_oncell(m, x, y, type); + retVal___ = HPMHooks.source.map.count_oncell(m, x, y, type, flag); } if( HPMHooks.count.HP_map_count_oncell_post ) { - int (*postHookFunc) (int retVal___, int16 *m, int16 *x, int16 *y, int *type); + int (*postHookFunc) (int retVal___, int16 *m, int16 *x, int16 *y, int *type, int *flag); for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_oncell_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_map_count_oncell_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &m, &x, &y, &type); + retVal___ = postHookFunc(retVal___, &m, &x, &y, &type, &flag); } } return retVal___; @@ -35407,6 +35589,33 @@ int HP_map_search_freecell(struct block_list *src, int16 m, int16 *x, int16 *y, } return retVal___; } +bool HP_map_closest_freecell(int16 m, int16 *x, int16 *y, int type, int flag) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_map_closest_freecell_pre ) { + bool (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *type, int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_closest_freecell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_closest_freecell_pre[hIndex].func; + retVal___ = preHookFunc(&m, x, y, &type, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.closest_freecell(m, x, y, type, flag); + } + if( HPMHooks.count.HP_map_closest_freecell_post ) { + bool (*postHookFunc) (bool retVal___, int16 *m, int16 *x, int16 *y, int *type, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_closest_freecell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_closest_freecell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, x, y, &type, &flag); + } + } + return retVal___; +} int HP_map_quit(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; @@ -46375,11 +46584,11 @@ bool HP_path_search_long(struct shootpath_data *spd, int16 m, int16 x0, int16 y0 } return retVal___; } -int HP_path_check_distance(int dx, int dy, int distance) { +bool HP_path_check_distance(int dx, int dy, int distance) { int hIndex = 0; - int retVal___ = 0; + bool retVal___ = false; if( HPMHooks.count.HP_path_check_distance_pre ) { - int (*preHookFunc) (int *dx, int *dy, int *distance); + bool (*preHookFunc) (int *dx, int *dy, int *distance); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_path_check_distance_pre[hIndex].func; @@ -46394,7 +46603,7 @@ int HP_path_check_distance(int dx, int dy, int distance) { retVal___ = HPMHooks.source.path.check_distance(dx, dy, distance); } if( HPMHooks.count.HP_path_check_distance_post ) { - int (*postHookFunc) (int retVal___, int *dx, int *dy, int *distance); + bool (*postHookFunc) (bool retVal___, int *dx, int *dy, int *distance); for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_path_check_distance_post[hIndex].func; retVal___ = postHookFunc(retVal___, &dx, &dy, &distance); @@ -46429,6 +46638,60 @@ unsigned int HP_path_distance(int dx, int dy) { } return retVal___; } +bool HP_path_check_distance_client(int dx, int dy, int distance) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_path_check_distance_client_pre ) { + bool (*preHookFunc) (int *dx, int *dy, int *distance); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_client_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_path_check_distance_client_pre[hIndex].func; + retVal___ = preHookFunc(&dx, &dy, &distance); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.path.check_distance_client(dx, dy, distance); + } + if( HPMHooks.count.HP_path_check_distance_client_post ) { + bool (*postHookFunc) (bool retVal___, int *dx, int *dy, int *distance); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_client_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_path_check_distance_client_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &dx, &dy, &distance); + } + } + return retVal___; +} +int HP_path_distance_client(int dx, int dy) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_path_distance_client_pre ) { + int (*preHookFunc) (int *dx, int *dy); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_client_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_path_distance_client_pre[hIndex].func; + retVal___ = preHookFunc(&dx, &dy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.path.distance_client(dx, dy); + } + if( HPMHooks.count.HP_path_distance_client_post ) { + int (*postHookFunc) (int retVal___, int *dx, int *dy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_client_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_path_distance_client_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &dx, &dy); + } + } + return retVal___; +} /* pcg */ void HP_pcg_init(void) { int hIndex = 0; @@ -49580,64 +49843,62 @@ int HP_pc_setcart(struct map_session_data *sd, int type) { } return retVal___; } -int HP_pc_setfalcon(struct map_session_data *sd, int flag) { +void HP_pc_setfalcon(struct map_session_data *sd, bool flag) { int hIndex = 0; - int retVal___ = 0; if( HPMHooks.count.HP_pc_setfalcon_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *flag); + void (*preHookFunc) (struct map_session_data *sd, bool *flag); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_pc_setfalcon_pre[hIndex].func; - retVal___ = preHookFunc(sd, &flag); + preHookFunc(sd, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.setfalcon(sd, flag); + HPMHooks.source.pc.setfalcon(sd, flag); } if( HPMHooks.count.HP_pc_setfalcon_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag); + void (*postHookFunc) (struct map_session_data *sd, bool *flag); for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_pc_setfalcon_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &flag); + postHookFunc(sd, &flag); } } - return retVal___; + return; } -int HP_pc_setriding(struct map_session_data *sd, int flag) { +void HP_pc_setridingpeco(struct map_session_data *sd, bool flag) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_setriding_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *flag); + if( HPMHooks.count.HP_pc_setridingpeco_pre ) { + void (*preHookFunc) (struct map_session_data *sd, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setriding_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setriding_pre[hIndex].func; - retVal___ = preHookFunc(sd, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingpeco_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setridingpeco_pre[hIndex].func; + preHookFunc(sd, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.setriding(sd, flag); + HPMHooks.source.pc.setridingpeco(sd, flag); } - if( HPMHooks.count.HP_pc_setriding_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setriding_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_setriding_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &flag); + if( HPMHooks.count.HP_pc_setridingpeco_post ) { + void (*postHookFunc) (struct map_session_data *sd, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingpeco_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setridingpeco_post[hIndex].func; + postHookFunc(sd, &flag); } } - return retVal___; + return; } -void HP_pc_setmadogear(struct map_session_data *sd, int flag) { +void HP_pc_setmadogear(struct map_session_data *sd, bool flag) { int hIndex = 0; if( HPMHooks.count.HP_pc_setmadogear_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *flag); + void (*preHookFunc) (struct map_session_data *sd, bool *flag); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_pc_setmadogear_pre[hIndex].func; @@ -49652,7 +49913,7 @@ void HP_pc_setmadogear(struct map_session_data *sd, int flag) { HPMHooks.source.pc.setmadogear(sd, flag); } if( HPMHooks.count.HP_pc_setmadogear_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *flag); + void (*postHookFunc) (struct map_session_data *sd, bool *flag); for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_pc_setmadogear_post[hIndex].func; postHookFunc(sd, &flag); @@ -49660,6 +49921,58 @@ void HP_pc_setmadogear(struct map_session_data *sd, int flag) { } return; } +void HP_pc_setridingdragon(struct map_session_data *sd, unsigned int type) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_setridingdragon_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned int *type); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingdragon_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setridingdragon_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.setridingdragon(sd, type); + } + if( HPMHooks.count.HP_pc_setridingdragon_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingdragon_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setridingdragon_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +void HP_pc_setridingwug(struct map_session_data *sd, bool flag) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_setridingwug_pre ) { + void (*preHookFunc) (struct map_session_data *sd, bool *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingwug_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setridingwug_pre[hIndex].func; + preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.setridingwug(sd, flag); + } + if( HPMHooks.count.HP_pc_setridingwug_post ) { + void (*postHookFunc) (struct map_session_data *sd, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingwug_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setridingwug_post[hIndex].func; + postHookFunc(sd, &flag); + } + } + return; +} int HP_pc_changelook(struct map_session_data *sd, int type, int val) { int hIndex = 0; int retVal___ = 0; @@ -61331,39 +61644,6 @@ int HP_skill_destroy_trap(struct block_list *bl, va_list ap) { } return retVal___; } -int HP_skill_icewall_block(struct block_list *bl, va_list ap) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_icewall_block_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_icewall_block_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_icewall_block_pre[hIndex].func; - retVal___ = preHookFunc(bl, 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.skill.icewall_block(bl, ap___copy); - va_end(ap___copy); - } - if( HPMHooks.count.HP_skill_icewall_block_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_icewall_block_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_icewall_block_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); - } - } - return retVal___; -} struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_list *bl, struct skill_unit_group *group, int64 tick) { int hIndex = 0; struct skill_unit_group_tickset* retVal___ = NULL; @@ -66920,6 +67200,59 @@ int HP_unit_skilluse_id(struct block_list *src, int target_id, uint16 skill_id, } return retVal___; } +int HP_unit_step_timer(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_unit_step_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_step_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_step_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.step_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_unit_step_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_step_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_step_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_unit_stop_stepaction(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_unit_stop_stepaction_pre ) { + void (*preHookFunc) (struct block_list *bl); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_stepaction_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_stop_stepaction_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.unit.stop_stepaction(bl); + } + if( HPMHooks.count.HP_unit_stop_stepaction_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_stepaction_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_stop_stepaction_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} int HP_unit_is_walking(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; @@ -67136,32 +67469,31 @@ int HP_unit_set_target(struct unit_data *ud, int target_id) { } return retVal___; } -int HP_unit_stop_attack(struct block_list *bl) { +void HP_unit_stop_attack(struct block_list *bl) { int hIndex = 0; - int retVal___ = 0; if( HPMHooks.count.HP_unit_stop_attack_pre ) { - int (*preHookFunc) (struct block_list *bl); + void (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_unit_stop_attack_pre[hIndex].func; - retVal___ = preHookFunc(bl); + preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.unit.stop_attack(bl); + HPMHooks.source.unit.stop_attack(bl); } if( HPMHooks.count.HP_unit_stop_attack_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl); + void (*postHookFunc) (struct block_list *bl); for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_unit_stop_attack_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + postHookFunc(bl); } } - return retVal___; + return; } int HP_unit_unattackable(struct block_list *bl) { int hIndex = 0; diff --git a/src/plugins/HPMHooking/HPMHooking.sources.inc b/src/plugins/HPMHooking/HPMHooking_map.sources.inc index 53bb6bcad..53bb6bcad 100644 --- a/src/plugins/HPMHooking/HPMHooking.sources.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.sources.inc |