From a182a81fdcf5a9dec68cafdb8c4c42185e3f375e Mon Sep 17 00:00:00 2001 From: Haru Date: Fri, 7 Aug 2015 16:21:56 +0200 Subject: HPM Hooks Update Signed-off-by: Haru --- .../HPMHooking/HPMHooking_char.GetSymbol.inc | 16 + .../HPMHooking/HPMHooking_char.HPMHooksCore.inc | 968 + .../HPMHooking/HPMHooking_char.HookingPoints.inc | 254 + src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | 14101 +++++-- src/plugins/HPMHooking/HPMHooking_char.sources.inc | 16 + .../HPMHooking/HPMHooking_login.GetSymbol.inc | 15 + .../HPMHooking/HPMHooking_login.HPMHooksCore.inc | 931 + .../HPMHooking/HPMHooking_login.HookingPoints.inc | 244 + src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | 7681 +++- .../HPMHooking/HPMHooking_login.sources.inc | 15 + .../HPMHooking/HPMHooking_map.GetSymbol.inc | 16 + .../HPMHooking/HPMHooking_map.HPMHooksCore.inc | 968 + .../HPMHooking/HPMHooking_map.HookingPoints.inc | 254 + src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 40187 +++++++++++-------- src/plugins/HPMHooking/HPMHooking_map.sources.inc | 16 + 15 files changed, 44205 insertions(+), 21477 deletions(-) diff --git a/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc index af7df2980..b4cbd606f 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc @@ -4,7 +4,11 @@ // NOTE: This file was auto-generated and should never be manually edited, // as it will get overwritten. +if( !(HCache = GET_SYMBOL("HCache") ) ) return "HCache"; if( !(chr = GET_SYMBOL("chr") ) ) return "chr"; +if( !(cmdline = GET_SYMBOL("cmdline") ) ) return "cmdline"; +if( !(console = GET_SYMBOL("console") ) ) return "console"; +if( !(DB = GET_SYMBOL("DB") ) ) return "DB"; if( !(geoip = GET_SYMBOL("geoip") ) ) return "geoip"; if( !(inter_auction = GET_SYMBOL("inter_auction") ) ) return "inter_auction"; if( !(inter_elemental = GET_SYMBOL("inter_elemental") ) ) return "inter_elemental"; @@ -17,6 +21,18 @@ if( !(inter_party = GET_SYMBOL("inter_party") ) ) return "inter_party"; if( !(inter_pet = GET_SYMBOL("inter_pet") ) ) return "inter_pet"; if( !(inter_quest = GET_SYMBOL("inter_quest") ) ) return "inter_quest"; if( !(inter_storage = GET_SYMBOL("inter_storage") ) ) return "inter_storage"; +if( !(libconfig = GET_SYMBOL("libconfig") ) ) return "libconfig"; if( !(loginif = GET_SYMBOL("loginif") ) ) return "loginif"; +if( !(iMalloc = GET_SYMBOL("iMalloc") ) ) return "iMalloc"; if( !(mapif = GET_SYMBOL("mapif") ) ) return "mapif"; +if( !(mapindex = GET_SYMBOL("mapindex") ) ) return "mapindex"; +if( !(nullpo = GET_SYMBOL("nullpo") ) ) return "nullpo"; if( !(pincode = GET_SYMBOL("pincode") ) ) return "pincode"; +if( !(showmsg = GET_SYMBOL("showmsg") ) ) return "showmsg"; +if( !(sockt = GET_SYMBOL("sockt") ) ) return "sockt"; +if( !(SQL = GET_SYMBOL("SQL") ) ) return "SQL"; +if( !(StrBuf = GET_SYMBOL("StrBuf") ) ) return "StrBuf"; +if( !(strlib = GET_SYMBOL("strlib") ) ) return "strlib"; +if( !(sv = GET_SYMBOL("sv") ) ) return "sv"; +if( !(sysinfo = GET_SYMBOL("sysinfo") ) ) return "sysinfo"; +if( !(timer = GET_SYMBOL("timer") ) ) return "timer"; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc index bcda4332d..a9c9fbd5f 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc @@ -5,6 +5,12 @@ // as it will get overwritten. struct { + struct HPMHookPoint *HP_HCache_init_pre; + struct HPMHookPoint *HP_HCache_init_post; + struct HPMHookPoint *HP_HCache_check_pre; + struct HPMHookPoint *HP_HCache_check_post; + struct HPMHookPoint *HP_HCache_open_pre; + struct HPMHookPoint *HP_HCache_open_post; struct HPMHookPoint *HP_chr_waiting_disconnect_pre; struct HPMHookPoint *HP_chr_waiting_disconnect_post; struct HPMHookPoint *HP_chr_delete_char_sql_pre; @@ -323,6 +329,62 @@ struct { struct HPMHookPoint *HP_chr_config_dispatch_post; struct HPMHookPoint *HP_chr_config_read_pre; struct HPMHookPoint *HP_chr_config_read_post; + struct HPMHookPoint *HP_cmdline_init_pre; + struct HPMHookPoint *HP_cmdline_init_post; + struct HPMHookPoint *HP_cmdline_final_pre; + struct HPMHookPoint *HP_cmdline_final_post; + struct HPMHookPoint *HP_cmdline_arg_add_pre; + struct HPMHookPoint *HP_cmdline_arg_add_post; + struct HPMHookPoint *HP_cmdline_exec_pre; + struct HPMHookPoint *HP_cmdline_exec_post; + struct HPMHookPoint *HP_cmdline_arg_next_value_pre; + struct HPMHookPoint *HP_cmdline_arg_next_value_post; + struct HPMHookPoint *HP_cmdline_arg_source_pre; + struct HPMHookPoint *HP_cmdline_arg_source_post; + struct HPMHookPoint *HP_console_init_pre; + struct HPMHookPoint *HP_console_init_post; + struct HPMHookPoint *HP_console_final_pre; + struct HPMHookPoint *HP_console_final_post; + struct HPMHookPoint *HP_console_display_title_pre; + struct HPMHookPoint *HP_console_display_title_post; + struct HPMHookPoint *HP_DB_fix_options_pre; + struct HPMHookPoint *HP_DB_fix_options_post; + struct HPMHookPoint *HP_DB_default_cmp_pre; + struct HPMHookPoint *HP_DB_default_cmp_post; + struct HPMHookPoint *HP_DB_default_hash_pre; + struct HPMHookPoint *HP_DB_default_hash_post; + struct HPMHookPoint *HP_DB_default_release_pre; + struct HPMHookPoint *HP_DB_default_release_post; + struct HPMHookPoint *HP_DB_custom_release_pre; + struct HPMHookPoint *HP_DB_custom_release_post; + struct HPMHookPoint *HP_DB_alloc_pre; + struct HPMHookPoint *HP_DB_alloc_post; + struct HPMHookPoint *HP_DB_i2key_pre; + struct HPMHookPoint *HP_DB_i2key_post; + struct HPMHookPoint *HP_DB_ui2key_pre; + struct HPMHookPoint *HP_DB_ui2key_post; + struct HPMHookPoint *HP_DB_str2key_pre; + struct HPMHookPoint *HP_DB_str2key_post; + struct HPMHookPoint *HP_DB_i642key_pre; + struct HPMHookPoint *HP_DB_i642key_post; + struct HPMHookPoint *HP_DB_ui642key_pre; + struct HPMHookPoint *HP_DB_ui642key_post; + struct HPMHookPoint *HP_DB_i2data_pre; + struct HPMHookPoint *HP_DB_i2data_post; + struct HPMHookPoint *HP_DB_ui2data_pre; + struct HPMHookPoint *HP_DB_ui2data_post; + struct HPMHookPoint *HP_DB_ptr2data_pre; + struct HPMHookPoint *HP_DB_ptr2data_post; + struct HPMHookPoint *HP_DB_data2i_pre; + struct HPMHookPoint *HP_DB_data2i_post; + struct HPMHookPoint *HP_DB_data2ui_pre; + struct HPMHookPoint *HP_DB_data2ui_post; + struct HPMHookPoint *HP_DB_data2ptr_pre; + struct HPMHookPoint *HP_DB_data2ptr_post; + struct HPMHookPoint *HP_DB_init_pre; + struct HPMHookPoint *HP_DB_init_post; + struct HPMHookPoint *HP_DB_final_pre; + struct HPMHookPoint *HP_DB_final_post; struct HPMHookPoint *HP_geoip_getcountry_pre; struct HPMHookPoint *HP_geoip_getcountry_post; struct HPMHookPoint *HP_geoip_final_pre; @@ -521,6 +583,122 @@ struct { struct HPMHookPoint *HP_inter_storage_guild_storage_delete_post; struct HPMHookPoint *HP_inter_storage_parse_frommap_pre; struct HPMHookPoint *HP_inter_storage_parse_frommap_post; + struct HPMHookPoint *HP_libconfig_read_pre; + struct HPMHookPoint *HP_libconfig_read_post; + struct HPMHookPoint *HP_libconfig_write_pre; + struct HPMHookPoint *HP_libconfig_write_post; + struct HPMHookPoint *HP_libconfig_set_auto_convert_pre; + struct HPMHookPoint *HP_libconfig_set_auto_convert_post; + struct HPMHookPoint *HP_libconfig_get_auto_convert_pre; + struct HPMHookPoint *HP_libconfig_get_auto_convert_post; + struct HPMHookPoint *HP_libconfig_read_string_pre; + struct HPMHookPoint *HP_libconfig_read_string_post; + struct HPMHookPoint *HP_libconfig_read_file_src_pre; + struct HPMHookPoint *HP_libconfig_read_file_src_post; + struct HPMHookPoint *HP_libconfig_write_file_pre; + struct HPMHookPoint *HP_libconfig_write_file_post; + struct HPMHookPoint *HP_libconfig_set_destructor_pre; + struct HPMHookPoint *HP_libconfig_set_destructor_post; + struct HPMHookPoint *HP_libconfig_set_include_dir_pre; + struct HPMHookPoint *HP_libconfig_set_include_dir_post; + struct HPMHookPoint *HP_libconfig_init_pre; + struct HPMHookPoint *HP_libconfig_init_post; + struct HPMHookPoint *HP_libconfig_destroy_pre; + struct HPMHookPoint *HP_libconfig_destroy_post; + struct HPMHookPoint *HP_libconfig_setting_get_int_pre; + struct HPMHookPoint *HP_libconfig_setting_get_int_post; + struct HPMHookPoint *HP_libconfig_setting_get_int64_pre; + struct HPMHookPoint *HP_libconfig_setting_get_int64_post; + struct HPMHookPoint *HP_libconfig_setting_get_float_pre; + struct HPMHookPoint *HP_libconfig_setting_get_float_post; + struct HPMHookPoint *HP_libconfig_setting_get_bool_pre; + struct HPMHookPoint *HP_libconfig_setting_get_bool_post; + struct HPMHookPoint *HP_libconfig_setting_get_string_pre; + struct HPMHookPoint *HP_libconfig_setting_get_string_post; + struct HPMHookPoint *HP_libconfig_setting_lookup_int_pre; + struct HPMHookPoint *HP_libconfig_setting_lookup_int_post; + struct HPMHookPoint *HP_libconfig_setting_lookup_int64_pre; + struct HPMHookPoint *HP_libconfig_setting_lookup_int64_post; + struct HPMHookPoint *HP_libconfig_setting_lookup_float_pre; + struct HPMHookPoint *HP_libconfig_setting_lookup_float_post; + struct HPMHookPoint *HP_libconfig_setting_lookup_bool_pre; + struct HPMHookPoint *HP_libconfig_setting_lookup_bool_post; + struct HPMHookPoint *HP_libconfig_setting_lookup_string_pre; + struct HPMHookPoint *HP_libconfig_setting_lookup_string_post; + struct HPMHookPoint *HP_libconfig_setting_set_int_pre; + struct HPMHookPoint *HP_libconfig_setting_set_int_post; + struct HPMHookPoint *HP_libconfig_setting_set_int64_pre; + struct HPMHookPoint *HP_libconfig_setting_set_int64_post; + struct HPMHookPoint *HP_libconfig_setting_set_float_pre; + struct HPMHookPoint *HP_libconfig_setting_set_float_post; + struct HPMHookPoint *HP_libconfig_setting_set_bool_pre; + struct HPMHookPoint *HP_libconfig_setting_set_bool_post; + struct HPMHookPoint *HP_libconfig_setting_set_string_pre; + struct HPMHookPoint *HP_libconfig_setting_set_string_post; + struct HPMHookPoint *HP_libconfig_setting_set_format_pre; + struct HPMHookPoint *HP_libconfig_setting_set_format_post; + struct HPMHookPoint *HP_libconfig_setting_get_format_pre; + struct HPMHookPoint *HP_libconfig_setting_get_format_post; + struct HPMHookPoint *HP_libconfig_setting_get_int_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_int_elem_post; + struct HPMHookPoint *HP_libconfig_setting_get_int64_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_int64_elem_post; + struct HPMHookPoint *HP_libconfig_setting_get_float_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_float_elem_post; + struct HPMHookPoint *HP_libconfig_setting_get_bool_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_bool_elem_post; + struct HPMHookPoint *HP_libconfig_setting_get_string_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_string_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_int_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_set_int_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_int64_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_set_int64_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_float_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_set_float_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_bool_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_set_bool_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_string_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_set_string_elem_post; + struct HPMHookPoint *HP_libconfig_setting_index_pre; + struct HPMHookPoint *HP_libconfig_setting_index_post; + struct HPMHookPoint *HP_libconfig_setting_length_pre; + struct HPMHookPoint *HP_libconfig_setting_length_post; + struct HPMHookPoint *HP_libconfig_setting_get_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_elem_post; + struct HPMHookPoint *HP_libconfig_setting_get_member_pre; + struct HPMHookPoint *HP_libconfig_setting_get_member_post; + struct HPMHookPoint *HP_libconfig_setting_add_pre; + struct HPMHookPoint *HP_libconfig_setting_add_post; + struct HPMHookPoint *HP_libconfig_setting_remove_pre; + struct HPMHookPoint *HP_libconfig_setting_remove_post; + struct HPMHookPoint *HP_libconfig_setting_remove_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_remove_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_hook_pre; + struct HPMHookPoint *HP_libconfig_setting_set_hook_post; + struct HPMHookPoint *HP_libconfig_lookup_pre; + struct HPMHookPoint *HP_libconfig_lookup_post; + struct HPMHookPoint *HP_libconfig_lookup_from_pre; + struct HPMHookPoint *HP_libconfig_lookup_from_post; + struct HPMHookPoint *HP_libconfig_lookup_int_pre; + struct HPMHookPoint *HP_libconfig_lookup_int_post; + struct HPMHookPoint *HP_libconfig_lookup_int64_pre; + struct HPMHookPoint *HP_libconfig_lookup_int64_post; + struct HPMHookPoint *HP_libconfig_lookup_float_pre; + struct HPMHookPoint *HP_libconfig_lookup_float_post; + struct HPMHookPoint *HP_libconfig_lookup_bool_pre; + struct HPMHookPoint *HP_libconfig_lookup_bool_post; + struct HPMHookPoint *HP_libconfig_lookup_string_pre; + struct HPMHookPoint *HP_libconfig_lookup_string_post; + struct HPMHookPoint *HP_libconfig_read_file_pre; + struct HPMHookPoint *HP_libconfig_read_file_post; + struct HPMHookPoint *HP_libconfig_setting_copy_simple_pre; + struct HPMHookPoint *HP_libconfig_setting_copy_simple_post; + struct HPMHookPoint *HP_libconfig_setting_copy_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_copy_elem_post; + struct HPMHookPoint *HP_libconfig_setting_copy_aggregate_pre; + struct HPMHookPoint *HP_libconfig_setting_copy_aggregate_post; + struct HPMHookPoint *HP_libconfig_setting_copy_pre; + struct HPMHookPoint *HP_libconfig_setting_copy_post; struct HPMHookPoint *HP_loginif_init_pre; struct HPMHookPoint *HP_loginif_init_post; struct HPMHookPoint *HP_loginif_final_pre; @@ -547,6 +725,32 @@ struct { struct HPMHookPoint *HP_loginif_send_users_count_post; struct HPMHookPoint *HP_loginif_connect_to_server_pre; struct HPMHookPoint *HP_loginif_connect_to_server_post; + struct HPMHookPoint *HP_iMalloc_init_pre; + struct HPMHookPoint *HP_iMalloc_init_post; + struct HPMHookPoint *HP_iMalloc_final_pre; + struct HPMHookPoint *HP_iMalloc_final_post; + struct HPMHookPoint *HP_iMalloc_malloc_pre; + struct HPMHookPoint *HP_iMalloc_malloc_post; + struct HPMHookPoint *HP_iMalloc_calloc_pre; + struct HPMHookPoint *HP_iMalloc_calloc_post; + struct HPMHookPoint *HP_iMalloc_realloc_pre; + struct HPMHookPoint *HP_iMalloc_realloc_post; + struct HPMHookPoint *HP_iMalloc_reallocz_pre; + struct HPMHookPoint *HP_iMalloc_reallocz_post; + struct HPMHookPoint *HP_iMalloc_astrdup_pre; + struct HPMHookPoint *HP_iMalloc_astrdup_post; + struct HPMHookPoint *HP_iMalloc_free_pre; + struct HPMHookPoint *HP_iMalloc_free_post; + struct HPMHookPoint *HP_iMalloc_memory_check_pre; + struct HPMHookPoint *HP_iMalloc_memory_check_post; + struct HPMHookPoint *HP_iMalloc_verify_ptr_pre; + struct HPMHookPoint *HP_iMalloc_verify_ptr_post; + struct HPMHookPoint *HP_iMalloc_usage_pre; + struct HPMHookPoint *HP_iMalloc_usage_post; + struct HPMHookPoint *HP_iMalloc_post_shutdown_pre; + struct HPMHookPoint *HP_iMalloc_post_shutdown_post; + struct HPMHookPoint *HP_iMalloc_init_messages_pre; + struct HPMHookPoint *HP_iMalloc_init_messages_post; struct HPMHookPoint *HP_mapif_ban_pre; struct HPMHookPoint *HP_mapif_ban_post; struct HPMHookPoint *HP_mapif_server_init_pre; @@ -879,6 +1083,26 @@ struct { struct HPMHookPoint *HP_mapif_namechange_ack_post; struct HPMHookPoint *HP_mapif_parse_NameChangeRequest_pre; struct HPMHookPoint *HP_mapif_parse_NameChangeRequest_post; + struct HPMHookPoint *HP_mapindex_init_pre; + struct HPMHookPoint *HP_mapindex_init_post; + struct HPMHookPoint *HP_mapindex_final_pre; + struct HPMHookPoint *HP_mapindex_final_post; + struct HPMHookPoint *HP_mapindex_addmap_pre; + struct HPMHookPoint *HP_mapindex_addmap_post; + struct HPMHookPoint *HP_mapindex_removemap_pre; + struct HPMHookPoint *HP_mapindex_removemap_post; + struct HPMHookPoint *HP_mapindex_getmapname_pre; + struct HPMHookPoint *HP_mapindex_getmapname_post; + struct HPMHookPoint *HP_mapindex_getmapname_ext_pre; + struct HPMHookPoint *HP_mapindex_getmapname_ext_post; + struct HPMHookPoint *HP_mapindex_name2id_pre; + struct HPMHookPoint *HP_mapindex_name2id_post; + struct HPMHookPoint *HP_mapindex_id2name_pre; + struct HPMHookPoint *HP_mapindex_id2name_post; + struct HPMHookPoint *HP_mapindex_check_default_pre; + struct HPMHookPoint *HP_mapindex_check_default_post; + struct HPMHookPoint *HP_nullpo_assert_report_pre; + struct HPMHookPoint *HP_nullpo_assert_report_post; struct HPMHookPoint *HP_pincode_handle_pre; struct HPMHookPoint *HP_pincode_handle_post; struct HPMHookPoint *HP_pincode_decrypt_pre; @@ -899,9 +1123,267 @@ struct { struct HPMHookPoint *HP_pincode_check_post; struct HPMHookPoint *HP_pincode_config_read_pre; struct HPMHookPoint *HP_pincode_config_read_post; + struct HPMHookPoint *HP_showmsg_init_pre; + struct HPMHookPoint *HP_showmsg_init_post; + struct HPMHookPoint *HP_showmsg_final_pre; + struct HPMHookPoint *HP_showmsg_final_post; + struct HPMHookPoint *HP_showmsg_clearScreen_pre; + struct HPMHookPoint *HP_showmsg_clearScreen_post; + struct HPMHookPoint *HP_showmsg_showMessageV_pre; + struct HPMHookPoint *HP_showmsg_showMessageV_post; + struct HPMHookPoint *HP_sockt_init_pre; + struct HPMHookPoint *HP_sockt_init_post; + struct HPMHookPoint *HP_sockt_final_pre; + struct HPMHookPoint *HP_sockt_final_post; + struct HPMHookPoint *HP_sockt_perform_pre; + struct HPMHookPoint *HP_sockt_perform_post; + struct HPMHookPoint *HP_sockt_datasync_pre; + struct HPMHookPoint *HP_sockt_datasync_post; + struct HPMHookPoint *HP_sockt_make_listen_bind_pre; + struct HPMHookPoint *HP_sockt_make_listen_bind_post; + struct HPMHookPoint *HP_sockt_make_connection_pre; + struct HPMHookPoint *HP_sockt_make_connection_post; + struct HPMHookPoint *HP_sockt_realloc_fifo_pre; + struct HPMHookPoint *HP_sockt_realloc_fifo_post; + struct HPMHookPoint *HP_sockt_realloc_writefifo_pre; + struct HPMHookPoint *HP_sockt_realloc_writefifo_post; + struct HPMHookPoint *HP_sockt_wfifoset_pre; + struct HPMHookPoint *HP_sockt_wfifoset_post; + struct HPMHookPoint *HP_sockt_rfifoskip_pre; + struct HPMHookPoint *HP_sockt_rfifoskip_post; + struct HPMHookPoint *HP_sockt_close_pre; + struct HPMHookPoint *HP_sockt_close_post; + struct HPMHookPoint *HP_sockt_session_is_valid_pre; + struct HPMHookPoint *HP_sockt_session_is_valid_post; + struct HPMHookPoint *HP_sockt_session_is_active_pre; + struct HPMHookPoint *HP_sockt_session_is_active_post; + struct HPMHookPoint *HP_sockt_flush_pre; + struct HPMHookPoint *HP_sockt_flush_post; + struct HPMHookPoint *HP_sockt_flush_fifos_pre; + struct HPMHookPoint *HP_sockt_flush_fifos_post; + struct HPMHookPoint *HP_sockt_set_nonblocking_pre; + struct HPMHookPoint *HP_sockt_set_nonblocking_post; + struct HPMHookPoint *HP_sockt_set_defaultparse_pre; + struct HPMHookPoint *HP_sockt_set_defaultparse_post; + struct HPMHookPoint *HP_sockt_host2ip_pre; + struct HPMHookPoint *HP_sockt_host2ip_post; + struct HPMHookPoint *HP_sockt_ip2str_pre; + struct HPMHookPoint *HP_sockt_ip2str_post; + struct HPMHookPoint *HP_sockt_str2ip_pre; + struct HPMHookPoint *HP_sockt_str2ip_post; + struct HPMHookPoint *HP_sockt_ntows_pre; + struct HPMHookPoint *HP_sockt_ntows_post; + struct HPMHookPoint *HP_sockt_getips_pre; + struct HPMHookPoint *HP_sockt_getips_post; + struct HPMHookPoint *HP_sockt_eof_pre; + struct HPMHookPoint *HP_sockt_eof_post; + struct HPMHookPoint *HP_sockt_lan_subnet_check_pre; + struct HPMHookPoint *HP_sockt_lan_subnet_check_post; + struct HPMHookPoint *HP_sockt_allowed_ip_check_pre; + struct HPMHookPoint *HP_sockt_allowed_ip_check_post; + struct HPMHookPoint *HP_sockt_trusted_ip_check_pre; + struct HPMHookPoint *HP_sockt_trusted_ip_check_post; + struct HPMHookPoint *HP_sockt_net_config_read_sub_pre; + struct HPMHookPoint *HP_sockt_net_config_read_sub_post; + struct HPMHookPoint *HP_sockt_net_config_read_pre; + struct HPMHookPoint *HP_sockt_net_config_read_post; + struct HPMHookPoint *HP_SQL_Connect_pre; + struct HPMHookPoint *HP_SQL_Connect_post; + struct HPMHookPoint *HP_SQL_GetTimeout_pre; + struct HPMHookPoint *HP_SQL_GetTimeout_post; + struct HPMHookPoint *HP_SQL_GetColumnNames_pre; + struct HPMHookPoint *HP_SQL_GetColumnNames_post; + struct HPMHookPoint *HP_SQL_SetEncoding_pre; + struct HPMHookPoint *HP_SQL_SetEncoding_post; + struct HPMHookPoint *HP_SQL_Ping_pre; + struct HPMHookPoint *HP_SQL_Ping_post; + struct HPMHookPoint *HP_SQL_EscapeString_pre; + struct HPMHookPoint *HP_SQL_EscapeString_post; + struct HPMHookPoint *HP_SQL_EscapeStringLen_pre; + struct HPMHookPoint *HP_SQL_EscapeStringLen_post; + struct HPMHookPoint *HP_SQL_QueryV_pre; + struct HPMHookPoint *HP_SQL_QueryV_post; + struct HPMHookPoint *HP_SQL_QueryStr_pre; + struct HPMHookPoint *HP_SQL_QueryStr_post; + struct HPMHookPoint *HP_SQL_LastInsertId_pre; + struct HPMHookPoint *HP_SQL_LastInsertId_post; + struct HPMHookPoint *HP_SQL_NumColumns_pre; + struct HPMHookPoint *HP_SQL_NumColumns_post; + struct HPMHookPoint *HP_SQL_NumRows_pre; + struct HPMHookPoint *HP_SQL_NumRows_post; + struct HPMHookPoint *HP_SQL_NextRow_pre; + struct HPMHookPoint *HP_SQL_NextRow_post; + struct HPMHookPoint *HP_SQL_GetData_pre; + struct HPMHookPoint *HP_SQL_GetData_post; + struct HPMHookPoint *HP_SQL_FreeResult_pre; + struct HPMHookPoint *HP_SQL_FreeResult_post; + struct HPMHookPoint *HP_SQL_ShowDebug__pre; + struct HPMHookPoint *HP_SQL_ShowDebug__post; + struct HPMHookPoint *HP_SQL_Free_pre; + struct HPMHookPoint *HP_SQL_Free_post; + struct HPMHookPoint *HP_SQL_Malloc_pre; + struct HPMHookPoint *HP_SQL_Malloc_post; + struct HPMHookPoint *HP_SQL_StmtMalloc_pre; + struct HPMHookPoint *HP_SQL_StmtMalloc_post; + struct HPMHookPoint *HP_SQL_StmtPrepareV_pre; + struct HPMHookPoint *HP_SQL_StmtPrepareV_post; + struct HPMHookPoint *HP_SQL_StmtPrepareStr_pre; + struct HPMHookPoint *HP_SQL_StmtPrepareStr_post; + struct HPMHookPoint *HP_SQL_StmtNumParams_pre; + struct HPMHookPoint *HP_SQL_StmtNumParams_post; + struct HPMHookPoint *HP_SQL_StmtBindParam_pre; + struct HPMHookPoint *HP_SQL_StmtBindParam_post; + struct HPMHookPoint *HP_SQL_StmtExecute_pre; + struct HPMHookPoint *HP_SQL_StmtExecute_post; + struct HPMHookPoint *HP_SQL_StmtLastInsertId_pre; + struct HPMHookPoint *HP_SQL_StmtLastInsertId_post; + struct HPMHookPoint *HP_SQL_StmtNumColumns_pre; + struct HPMHookPoint *HP_SQL_StmtNumColumns_post; + struct HPMHookPoint *HP_SQL_StmtBindColumn_pre; + struct HPMHookPoint *HP_SQL_StmtBindColumn_post; + struct HPMHookPoint *HP_SQL_StmtNumRows_pre; + struct HPMHookPoint *HP_SQL_StmtNumRows_post; + struct HPMHookPoint *HP_SQL_StmtNextRow_pre; + struct HPMHookPoint *HP_SQL_StmtNextRow_post; + struct HPMHookPoint *HP_SQL_StmtFreeResult_pre; + struct HPMHookPoint *HP_SQL_StmtFreeResult_post; + struct HPMHookPoint *HP_SQL_StmtFree_pre; + struct HPMHookPoint *HP_SQL_StmtFree_post; + struct HPMHookPoint *HP_SQL_StmtShowDebug__pre; + struct HPMHookPoint *HP_SQL_StmtShowDebug__post; + struct HPMHookPoint *HP_StrBuf_Malloc_pre; + struct HPMHookPoint *HP_StrBuf_Malloc_post; + struct HPMHookPoint *HP_StrBuf_Init_pre; + struct HPMHookPoint *HP_StrBuf_Init_post; + struct HPMHookPoint *HP_StrBuf_Vprintf_pre; + struct HPMHookPoint *HP_StrBuf_Vprintf_post; + struct HPMHookPoint *HP_StrBuf_Append_pre; + struct HPMHookPoint *HP_StrBuf_Append_post; + struct HPMHookPoint *HP_StrBuf_AppendStr_pre; + struct HPMHookPoint *HP_StrBuf_AppendStr_post; + struct HPMHookPoint *HP_StrBuf_Length_pre; + struct HPMHookPoint *HP_StrBuf_Length_post; + struct HPMHookPoint *HP_StrBuf_Value_pre; + struct HPMHookPoint *HP_StrBuf_Value_post; + struct HPMHookPoint *HP_StrBuf_Clear_pre; + struct HPMHookPoint *HP_StrBuf_Clear_post; + struct HPMHookPoint *HP_StrBuf_Destroy_pre; + struct HPMHookPoint *HP_StrBuf_Destroy_post; + struct HPMHookPoint *HP_StrBuf_Free_pre; + struct HPMHookPoint *HP_StrBuf_Free_post; + struct HPMHookPoint *HP_strlib_jstrescape_pre; + struct HPMHookPoint *HP_strlib_jstrescape_post; + struct HPMHookPoint *HP_strlib_jstrescapecpy_pre; + struct HPMHookPoint *HP_strlib_jstrescapecpy_post; + struct HPMHookPoint *HP_strlib_jmemescapecpy_pre; + struct HPMHookPoint *HP_strlib_jmemescapecpy_post; + struct HPMHookPoint *HP_strlib_remove_control_chars__pre; + struct HPMHookPoint *HP_strlib_remove_control_chars__post; + struct HPMHookPoint *HP_strlib_trim__pre; + struct HPMHookPoint *HP_strlib_trim__post; + struct HPMHookPoint *HP_strlib_normalize_name__pre; + struct HPMHookPoint *HP_strlib_normalize_name__post; + struct HPMHookPoint *HP_strlib_stristr__pre; + struct HPMHookPoint *HP_strlib_stristr__post; + struct HPMHookPoint *HP_strlib_strnlen__pre; + struct HPMHookPoint *HP_strlib_strnlen__post; + struct HPMHookPoint *HP_strlib_strtok_r__pre; + struct HPMHookPoint *HP_strlib_strtok_r__post; + struct HPMHookPoint *HP_strlib_e_mail_check__pre; + struct HPMHookPoint *HP_strlib_e_mail_check__post; + struct HPMHookPoint *HP_strlib_config_switch__pre; + struct HPMHookPoint *HP_strlib_config_switch__post; + struct HPMHookPoint *HP_strlib_safestrncpy__pre; + struct HPMHookPoint *HP_strlib_safestrncpy__post; + struct HPMHookPoint *HP_strlib_safestrnlen__pre; + struct HPMHookPoint *HP_strlib_safestrnlen__post; + struct HPMHookPoint *HP_strlib_strline__pre; + struct HPMHookPoint *HP_strlib_strline__post; + struct HPMHookPoint *HP_strlib_bin2hex__pre; + struct HPMHookPoint *HP_strlib_bin2hex__post; + struct HPMHookPoint *HP_sv_parse_next_pre; + struct HPMHookPoint *HP_sv_parse_next_post; + struct HPMHookPoint *HP_sv_parse_pre; + struct HPMHookPoint *HP_sv_parse_post; + struct HPMHookPoint *HP_sv_split_pre; + struct HPMHookPoint *HP_sv_split_post; + struct HPMHookPoint *HP_sv_escape_c_pre; + struct HPMHookPoint *HP_sv_escape_c_post; + struct HPMHookPoint *HP_sv_unescape_c_pre; + struct HPMHookPoint *HP_sv_unescape_c_post; + struct HPMHookPoint *HP_sv_skip_escaped_c_pre; + struct HPMHookPoint *HP_sv_skip_escaped_c_post; + struct HPMHookPoint *HP_sv_readdb_pre; + struct HPMHookPoint *HP_sv_readdb_post; + struct HPMHookPoint *HP_sysinfo_getpagesize_pre; + struct HPMHookPoint *HP_sysinfo_getpagesize_post; + struct HPMHookPoint *HP_sysinfo_platform_pre; + struct HPMHookPoint *HP_sysinfo_platform_post; + struct HPMHookPoint *HP_sysinfo_osversion_pre; + struct HPMHookPoint *HP_sysinfo_osversion_post; + struct HPMHookPoint *HP_sysinfo_cpu_pre; + struct HPMHookPoint *HP_sysinfo_cpu_post; + struct HPMHookPoint *HP_sysinfo_cpucores_pre; + struct HPMHookPoint *HP_sysinfo_cpucores_post; + struct HPMHookPoint *HP_sysinfo_arch_pre; + struct HPMHookPoint *HP_sysinfo_arch_post; + struct HPMHookPoint *HP_sysinfo_is64bit_pre; + struct HPMHookPoint *HP_sysinfo_is64bit_post; + struct HPMHookPoint *HP_sysinfo_compiler_pre; + struct HPMHookPoint *HP_sysinfo_compiler_post; + struct HPMHookPoint *HP_sysinfo_cflags_pre; + struct HPMHookPoint *HP_sysinfo_cflags_post; + struct HPMHookPoint *HP_sysinfo_vcstype_pre; + struct HPMHookPoint *HP_sysinfo_vcstype_post; + struct HPMHookPoint *HP_sysinfo_vcstypeid_pre; + struct HPMHookPoint *HP_sysinfo_vcstypeid_post; + struct HPMHookPoint *HP_sysinfo_vcsrevision_src_pre; + struct HPMHookPoint *HP_sysinfo_vcsrevision_src_post; + struct HPMHookPoint *HP_sysinfo_vcsrevision_scripts_pre; + struct HPMHookPoint *HP_sysinfo_vcsrevision_scripts_post; + struct HPMHookPoint *HP_sysinfo_vcsrevision_reload_pre; + struct HPMHookPoint *HP_sysinfo_vcsrevision_reload_post; + struct HPMHookPoint *HP_sysinfo_is_superuser_pre; + struct HPMHookPoint *HP_sysinfo_is_superuser_post; + struct HPMHookPoint *HP_sysinfo_init_pre; + struct HPMHookPoint *HP_sysinfo_init_post; + struct HPMHookPoint *HP_sysinfo_final_pre; + struct HPMHookPoint *HP_sysinfo_final_post; + struct HPMHookPoint *HP_timer_gettick_pre; + struct HPMHookPoint *HP_timer_gettick_post; + struct HPMHookPoint *HP_timer_gettick_nocache_pre; + struct HPMHookPoint *HP_timer_gettick_nocache_post; + struct HPMHookPoint *HP_timer_add_pre; + struct HPMHookPoint *HP_timer_add_post; + struct HPMHookPoint *HP_timer_add_interval_pre; + struct HPMHookPoint *HP_timer_add_interval_post; + struct HPMHookPoint *HP_timer_get_pre; + struct HPMHookPoint *HP_timer_get_post; + struct HPMHookPoint *HP_timer_delete_pre; + struct HPMHookPoint *HP_timer_delete_post; + struct HPMHookPoint *HP_timer_addtick_pre; + struct HPMHookPoint *HP_timer_addtick_post; + struct HPMHookPoint *HP_timer_settick_pre; + struct HPMHookPoint *HP_timer_settick_post; + struct HPMHookPoint *HP_timer_add_func_list_pre; + struct HPMHookPoint *HP_timer_add_func_list_post; + struct HPMHookPoint *HP_timer_get_uptime_pre; + struct HPMHookPoint *HP_timer_get_uptime_post; + struct HPMHookPoint *HP_timer_perform_pre; + struct HPMHookPoint *HP_timer_perform_post; + struct HPMHookPoint *HP_timer_init_pre; + struct HPMHookPoint *HP_timer_init_post; + struct HPMHookPoint *HP_timer_final_pre; + struct HPMHookPoint *HP_timer_final_post; } list; struct { + int HP_HCache_init_pre; + int HP_HCache_init_post; + int HP_HCache_check_pre; + int HP_HCache_check_post; + int HP_HCache_open_pre; + int HP_HCache_open_post; int HP_chr_waiting_disconnect_pre; int HP_chr_waiting_disconnect_post; int HP_chr_delete_char_sql_pre; @@ -1220,6 +1702,62 @@ struct { int HP_chr_config_dispatch_post; int HP_chr_config_read_pre; int HP_chr_config_read_post; + int HP_cmdline_init_pre; + int HP_cmdline_init_post; + int HP_cmdline_final_pre; + int HP_cmdline_final_post; + int HP_cmdline_arg_add_pre; + int HP_cmdline_arg_add_post; + int HP_cmdline_exec_pre; + int HP_cmdline_exec_post; + int HP_cmdline_arg_next_value_pre; + int HP_cmdline_arg_next_value_post; + int HP_cmdline_arg_source_pre; + int HP_cmdline_arg_source_post; + int HP_console_init_pre; + int HP_console_init_post; + int HP_console_final_pre; + int HP_console_final_post; + int HP_console_display_title_pre; + int HP_console_display_title_post; + int HP_DB_fix_options_pre; + int HP_DB_fix_options_post; + int HP_DB_default_cmp_pre; + int HP_DB_default_cmp_post; + int HP_DB_default_hash_pre; + int HP_DB_default_hash_post; + int HP_DB_default_release_pre; + int HP_DB_default_release_post; + int HP_DB_custom_release_pre; + int HP_DB_custom_release_post; + int HP_DB_alloc_pre; + int HP_DB_alloc_post; + int HP_DB_i2key_pre; + int HP_DB_i2key_post; + int HP_DB_ui2key_pre; + int HP_DB_ui2key_post; + int HP_DB_str2key_pre; + int HP_DB_str2key_post; + int HP_DB_i642key_pre; + int HP_DB_i642key_post; + int HP_DB_ui642key_pre; + int HP_DB_ui642key_post; + int HP_DB_i2data_pre; + int HP_DB_i2data_post; + int HP_DB_ui2data_pre; + int HP_DB_ui2data_post; + int HP_DB_ptr2data_pre; + int HP_DB_ptr2data_post; + int HP_DB_data2i_pre; + int HP_DB_data2i_post; + int HP_DB_data2ui_pre; + int HP_DB_data2ui_post; + int HP_DB_data2ptr_pre; + int HP_DB_data2ptr_post; + int HP_DB_init_pre; + int HP_DB_init_post; + int HP_DB_final_pre; + int HP_DB_final_post; int HP_geoip_getcountry_pre; int HP_geoip_getcountry_post; int HP_geoip_final_pre; @@ -1418,6 +1956,122 @@ struct { int HP_inter_storage_guild_storage_delete_post; int HP_inter_storage_parse_frommap_pre; int HP_inter_storage_parse_frommap_post; + int HP_libconfig_read_pre; + int HP_libconfig_read_post; + int HP_libconfig_write_pre; + int HP_libconfig_write_post; + int HP_libconfig_set_auto_convert_pre; + int HP_libconfig_set_auto_convert_post; + int HP_libconfig_get_auto_convert_pre; + int HP_libconfig_get_auto_convert_post; + int HP_libconfig_read_string_pre; + int HP_libconfig_read_string_post; + int HP_libconfig_read_file_src_pre; + int HP_libconfig_read_file_src_post; + int HP_libconfig_write_file_pre; + int HP_libconfig_write_file_post; + int HP_libconfig_set_destructor_pre; + int HP_libconfig_set_destructor_post; + int HP_libconfig_set_include_dir_pre; + int HP_libconfig_set_include_dir_post; + int HP_libconfig_init_pre; + int HP_libconfig_init_post; + int HP_libconfig_destroy_pre; + int HP_libconfig_destroy_post; + int HP_libconfig_setting_get_int_pre; + int HP_libconfig_setting_get_int_post; + int HP_libconfig_setting_get_int64_pre; + int HP_libconfig_setting_get_int64_post; + int HP_libconfig_setting_get_float_pre; + int HP_libconfig_setting_get_float_post; + int HP_libconfig_setting_get_bool_pre; + int HP_libconfig_setting_get_bool_post; + int HP_libconfig_setting_get_string_pre; + int HP_libconfig_setting_get_string_post; + int HP_libconfig_setting_lookup_int_pre; + int HP_libconfig_setting_lookup_int_post; + int HP_libconfig_setting_lookup_int64_pre; + int HP_libconfig_setting_lookup_int64_post; + int HP_libconfig_setting_lookup_float_pre; + int HP_libconfig_setting_lookup_float_post; + int HP_libconfig_setting_lookup_bool_pre; + int HP_libconfig_setting_lookup_bool_post; + int HP_libconfig_setting_lookup_string_pre; + int HP_libconfig_setting_lookup_string_post; + int HP_libconfig_setting_set_int_pre; + int HP_libconfig_setting_set_int_post; + int HP_libconfig_setting_set_int64_pre; + int HP_libconfig_setting_set_int64_post; + int HP_libconfig_setting_set_float_pre; + int HP_libconfig_setting_set_float_post; + int HP_libconfig_setting_set_bool_pre; + int HP_libconfig_setting_set_bool_post; + int HP_libconfig_setting_set_string_pre; + int HP_libconfig_setting_set_string_post; + int HP_libconfig_setting_set_format_pre; + int HP_libconfig_setting_set_format_post; + int HP_libconfig_setting_get_format_pre; + int HP_libconfig_setting_get_format_post; + int HP_libconfig_setting_get_int_elem_pre; + int HP_libconfig_setting_get_int_elem_post; + int HP_libconfig_setting_get_int64_elem_pre; + int HP_libconfig_setting_get_int64_elem_post; + int HP_libconfig_setting_get_float_elem_pre; + int HP_libconfig_setting_get_float_elem_post; + int HP_libconfig_setting_get_bool_elem_pre; + int HP_libconfig_setting_get_bool_elem_post; + int HP_libconfig_setting_get_string_elem_pre; + int HP_libconfig_setting_get_string_elem_post; + int HP_libconfig_setting_set_int_elem_pre; + int HP_libconfig_setting_set_int_elem_post; + int HP_libconfig_setting_set_int64_elem_pre; + int HP_libconfig_setting_set_int64_elem_post; + int HP_libconfig_setting_set_float_elem_pre; + int HP_libconfig_setting_set_float_elem_post; + int HP_libconfig_setting_set_bool_elem_pre; + int HP_libconfig_setting_set_bool_elem_post; + int HP_libconfig_setting_set_string_elem_pre; + int HP_libconfig_setting_set_string_elem_post; + int HP_libconfig_setting_index_pre; + int HP_libconfig_setting_index_post; + int HP_libconfig_setting_length_pre; + int HP_libconfig_setting_length_post; + int HP_libconfig_setting_get_elem_pre; + int HP_libconfig_setting_get_elem_post; + int HP_libconfig_setting_get_member_pre; + int HP_libconfig_setting_get_member_post; + int HP_libconfig_setting_add_pre; + int HP_libconfig_setting_add_post; + int HP_libconfig_setting_remove_pre; + int HP_libconfig_setting_remove_post; + int HP_libconfig_setting_remove_elem_pre; + int HP_libconfig_setting_remove_elem_post; + int HP_libconfig_setting_set_hook_pre; + int HP_libconfig_setting_set_hook_post; + int HP_libconfig_lookup_pre; + int HP_libconfig_lookup_post; + int HP_libconfig_lookup_from_pre; + int HP_libconfig_lookup_from_post; + int HP_libconfig_lookup_int_pre; + int HP_libconfig_lookup_int_post; + int HP_libconfig_lookup_int64_pre; + int HP_libconfig_lookup_int64_post; + int HP_libconfig_lookup_float_pre; + int HP_libconfig_lookup_float_post; + int HP_libconfig_lookup_bool_pre; + int HP_libconfig_lookup_bool_post; + int HP_libconfig_lookup_string_pre; + int HP_libconfig_lookup_string_post; + int HP_libconfig_read_file_pre; + int HP_libconfig_read_file_post; + int HP_libconfig_setting_copy_simple_pre; + int HP_libconfig_setting_copy_simple_post; + int HP_libconfig_setting_copy_elem_pre; + int HP_libconfig_setting_copy_elem_post; + int HP_libconfig_setting_copy_aggregate_pre; + int HP_libconfig_setting_copy_aggregate_post; + int HP_libconfig_setting_copy_pre; + int HP_libconfig_setting_copy_post; int HP_loginif_init_pre; int HP_loginif_init_post; int HP_loginif_final_pre; @@ -1444,6 +2098,32 @@ struct { int HP_loginif_send_users_count_post; int HP_loginif_connect_to_server_pre; int HP_loginif_connect_to_server_post; + int HP_iMalloc_init_pre; + int HP_iMalloc_init_post; + int HP_iMalloc_final_pre; + int HP_iMalloc_final_post; + int HP_iMalloc_malloc_pre; + int HP_iMalloc_malloc_post; + int HP_iMalloc_calloc_pre; + int HP_iMalloc_calloc_post; + int HP_iMalloc_realloc_pre; + int HP_iMalloc_realloc_post; + int HP_iMalloc_reallocz_pre; + int HP_iMalloc_reallocz_post; + int HP_iMalloc_astrdup_pre; + int HP_iMalloc_astrdup_post; + int HP_iMalloc_free_pre; + int HP_iMalloc_free_post; + int HP_iMalloc_memory_check_pre; + int HP_iMalloc_memory_check_post; + int HP_iMalloc_verify_ptr_pre; + int HP_iMalloc_verify_ptr_post; + int HP_iMalloc_usage_pre; + int HP_iMalloc_usage_post; + int HP_iMalloc_post_shutdown_pre; + int HP_iMalloc_post_shutdown_post; + int HP_iMalloc_init_messages_pre; + int HP_iMalloc_init_messages_post; int HP_mapif_ban_pre; int HP_mapif_ban_post; int HP_mapif_server_init_pre; @@ -1776,6 +2456,26 @@ struct { int HP_mapif_namechange_ack_post; int HP_mapif_parse_NameChangeRequest_pre; int HP_mapif_parse_NameChangeRequest_post; + int HP_mapindex_init_pre; + int HP_mapindex_init_post; + int HP_mapindex_final_pre; + int HP_mapindex_final_post; + int HP_mapindex_addmap_pre; + int HP_mapindex_addmap_post; + int HP_mapindex_removemap_pre; + int HP_mapindex_removemap_post; + int HP_mapindex_getmapname_pre; + int HP_mapindex_getmapname_post; + int HP_mapindex_getmapname_ext_pre; + int HP_mapindex_getmapname_ext_post; + int HP_mapindex_name2id_pre; + int HP_mapindex_name2id_post; + int HP_mapindex_id2name_pre; + int HP_mapindex_id2name_post; + int HP_mapindex_check_default_pre; + int HP_mapindex_check_default_post; + int HP_nullpo_assert_report_pre; + int HP_nullpo_assert_report_post; int HP_pincode_handle_pre; int HP_pincode_handle_post; int HP_pincode_decrypt_pre; @@ -1796,10 +2496,266 @@ struct { int HP_pincode_check_post; int HP_pincode_config_read_pre; int HP_pincode_config_read_post; + int HP_showmsg_init_pre; + int HP_showmsg_init_post; + int HP_showmsg_final_pre; + int HP_showmsg_final_post; + int HP_showmsg_clearScreen_pre; + int HP_showmsg_clearScreen_post; + int HP_showmsg_showMessageV_pre; + int HP_showmsg_showMessageV_post; + int HP_sockt_init_pre; + int HP_sockt_init_post; + int HP_sockt_final_pre; + int HP_sockt_final_post; + int HP_sockt_perform_pre; + int HP_sockt_perform_post; + int HP_sockt_datasync_pre; + int HP_sockt_datasync_post; + int HP_sockt_make_listen_bind_pre; + int HP_sockt_make_listen_bind_post; + int HP_sockt_make_connection_pre; + int HP_sockt_make_connection_post; + int HP_sockt_realloc_fifo_pre; + int HP_sockt_realloc_fifo_post; + int HP_sockt_realloc_writefifo_pre; + int HP_sockt_realloc_writefifo_post; + int HP_sockt_wfifoset_pre; + int HP_sockt_wfifoset_post; + int HP_sockt_rfifoskip_pre; + int HP_sockt_rfifoskip_post; + int HP_sockt_close_pre; + int HP_sockt_close_post; + int HP_sockt_session_is_valid_pre; + int HP_sockt_session_is_valid_post; + int HP_sockt_session_is_active_pre; + int HP_sockt_session_is_active_post; + int HP_sockt_flush_pre; + int HP_sockt_flush_post; + int HP_sockt_flush_fifos_pre; + int HP_sockt_flush_fifos_post; + int HP_sockt_set_nonblocking_pre; + int HP_sockt_set_nonblocking_post; + int HP_sockt_set_defaultparse_pre; + int HP_sockt_set_defaultparse_post; + int HP_sockt_host2ip_pre; + int HP_sockt_host2ip_post; + int HP_sockt_ip2str_pre; + int HP_sockt_ip2str_post; + int HP_sockt_str2ip_pre; + int HP_sockt_str2ip_post; + int HP_sockt_ntows_pre; + int HP_sockt_ntows_post; + int HP_sockt_getips_pre; + int HP_sockt_getips_post; + int HP_sockt_eof_pre; + int HP_sockt_eof_post; + int HP_sockt_lan_subnet_check_pre; + int HP_sockt_lan_subnet_check_post; + int HP_sockt_allowed_ip_check_pre; + int HP_sockt_allowed_ip_check_post; + int HP_sockt_trusted_ip_check_pre; + int HP_sockt_trusted_ip_check_post; + int HP_sockt_net_config_read_sub_pre; + int HP_sockt_net_config_read_sub_post; + int HP_sockt_net_config_read_pre; + int HP_sockt_net_config_read_post; + int HP_SQL_Connect_pre; + int HP_SQL_Connect_post; + int HP_SQL_GetTimeout_pre; + int HP_SQL_GetTimeout_post; + int HP_SQL_GetColumnNames_pre; + int HP_SQL_GetColumnNames_post; + int HP_SQL_SetEncoding_pre; + int HP_SQL_SetEncoding_post; + int HP_SQL_Ping_pre; + int HP_SQL_Ping_post; + int HP_SQL_EscapeString_pre; + int HP_SQL_EscapeString_post; + int HP_SQL_EscapeStringLen_pre; + int HP_SQL_EscapeStringLen_post; + int HP_SQL_QueryV_pre; + int HP_SQL_QueryV_post; + int HP_SQL_QueryStr_pre; + int HP_SQL_QueryStr_post; + int HP_SQL_LastInsertId_pre; + int HP_SQL_LastInsertId_post; + int HP_SQL_NumColumns_pre; + int HP_SQL_NumColumns_post; + int HP_SQL_NumRows_pre; + int HP_SQL_NumRows_post; + int HP_SQL_NextRow_pre; + int HP_SQL_NextRow_post; + int HP_SQL_GetData_pre; + int HP_SQL_GetData_post; + int HP_SQL_FreeResult_pre; + int HP_SQL_FreeResult_post; + int HP_SQL_ShowDebug__pre; + int HP_SQL_ShowDebug__post; + int HP_SQL_Free_pre; + int HP_SQL_Free_post; + int HP_SQL_Malloc_pre; + int HP_SQL_Malloc_post; + int HP_SQL_StmtMalloc_pre; + int HP_SQL_StmtMalloc_post; + int HP_SQL_StmtPrepareV_pre; + int HP_SQL_StmtPrepareV_post; + int HP_SQL_StmtPrepareStr_pre; + int HP_SQL_StmtPrepareStr_post; + int HP_SQL_StmtNumParams_pre; + int HP_SQL_StmtNumParams_post; + int HP_SQL_StmtBindParam_pre; + int HP_SQL_StmtBindParam_post; + int HP_SQL_StmtExecute_pre; + int HP_SQL_StmtExecute_post; + int HP_SQL_StmtLastInsertId_pre; + int HP_SQL_StmtLastInsertId_post; + int HP_SQL_StmtNumColumns_pre; + int HP_SQL_StmtNumColumns_post; + int HP_SQL_StmtBindColumn_pre; + int HP_SQL_StmtBindColumn_post; + int HP_SQL_StmtNumRows_pre; + int HP_SQL_StmtNumRows_post; + int HP_SQL_StmtNextRow_pre; + int HP_SQL_StmtNextRow_post; + int HP_SQL_StmtFreeResult_pre; + int HP_SQL_StmtFreeResult_post; + int HP_SQL_StmtFree_pre; + int HP_SQL_StmtFree_post; + int HP_SQL_StmtShowDebug__pre; + int HP_SQL_StmtShowDebug__post; + int HP_StrBuf_Malloc_pre; + int HP_StrBuf_Malloc_post; + int HP_StrBuf_Init_pre; + int HP_StrBuf_Init_post; + int HP_StrBuf_Vprintf_pre; + int HP_StrBuf_Vprintf_post; + int HP_StrBuf_Append_pre; + int HP_StrBuf_Append_post; + int HP_StrBuf_AppendStr_pre; + int HP_StrBuf_AppendStr_post; + int HP_StrBuf_Length_pre; + int HP_StrBuf_Length_post; + int HP_StrBuf_Value_pre; + int HP_StrBuf_Value_post; + int HP_StrBuf_Clear_pre; + int HP_StrBuf_Clear_post; + int HP_StrBuf_Destroy_pre; + int HP_StrBuf_Destroy_post; + int HP_StrBuf_Free_pre; + int HP_StrBuf_Free_post; + int HP_strlib_jstrescape_pre; + int HP_strlib_jstrescape_post; + int HP_strlib_jstrescapecpy_pre; + int HP_strlib_jstrescapecpy_post; + int HP_strlib_jmemescapecpy_pre; + int HP_strlib_jmemescapecpy_post; + int HP_strlib_remove_control_chars__pre; + int HP_strlib_remove_control_chars__post; + int HP_strlib_trim__pre; + int HP_strlib_trim__post; + int HP_strlib_normalize_name__pre; + int HP_strlib_normalize_name__post; + int HP_strlib_stristr__pre; + int HP_strlib_stristr__post; + int HP_strlib_strnlen__pre; + int HP_strlib_strnlen__post; + int HP_strlib_strtok_r__pre; + int HP_strlib_strtok_r__post; + int HP_strlib_e_mail_check__pre; + int HP_strlib_e_mail_check__post; + int HP_strlib_config_switch__pre; + int HP_strlib_config_switch__post; + int HP_strlib_safestrncpy__pre; + int HP_strlib_safestrncpy__post; + int HP_strlib_safestrnlen__pre; + int HP_strlib_safestrnlen__post; + int HP_strlib_strline__pre; + int HP_strlib_strline__post; + int HP_strlib_bin2hex__pre; + int HP_strlib_bin2hex__post; + int HP_sv_parse_next_pre; + int HP_sv_parse_next_post; + int HP_sv_parse_pre; + int HP_sv_parse_post; + int HP_sv_split_pre; + int HP_sv_split_post; + int HP_sv_escape_c_pre; + int HP_sv_escape_c_post; + int HP_sv_unescape_c_pre; + int HP_sv_unescape_c_post; + int HP_sv_skip_escaped_c_pre; + int HP_sv_skip_escaped_c_post; + int HP_sv_readdb_pre; + int HP_sv_readdb_post; + int HP_sysinfo_getpagesize_pre; + int HP_sysinfo_getpagesize_post; + int HP_sysinfo_platform_pre; + int HP_sysinfo_platform_post; + int HP_sysinfo_osversion_pre; + int HP_sysinfo_osversion_post; + int HP_sysinfo_cpu_pre; + int HP_sysinfo_cpu_post; + int HP_sysinfo_cpucores_pre; + int HP_sysinfo_cpucores_post; + int HP_sysinfo_arch_pre; + int HP_sysinfo_arch_post; + int HP_sysinfo_is64bit_pre; + int HP_sysinfo_is64bit_post; + int HP_sysinfo_compiler_pre; + int HP_sysinfo_compiler_post; + int HP_sysinfo_cflags_pre; + int HP_sysinfo_cflags_post; + int HP_sysinfo_vcstype_pre; + int HP_sysinfo_vcstype_post; + int HP_sysinfo_vcstypeid_pre; + int HP_sysinfo_vcstypeid_post; + int HP_sysinfo_vcsrevision_src_pre; + int HP_sysinfo_vcsrevision_src_post; + int HP_sysinfo_vcsrevision_scripts_pre; + int HP_sysinfo_vcsrevision_scripts_post; + int HP_sysinfo_vcsrevision_reload_pre; + int HP_sysinfo_vcsrevision_reload_post; + int HP_sysinfo_is_superuser_pre; + int HP_sysinfo_is_superuser_post; + int HP_sysinfo_init_pre; + int HP_sysinfo_init_post; + int HP_sysinfo_final_pre; + int HP_sysinfo_final_post; + int HP_timer_gettick_pre; + int HP_timer_gettick_post; + int HP_timer_gettick_nocache_pre; + int HP_timer_gettick_nocache_post; + int HP_timer_add_pre; + int HP_timer_add_post; + int HP_timer_add_interval_pre; + int HP_timer_add_interval_post; + int HP_timer_get_pre; + int HP_timer_get_post; + int HP_timer_delete_pre; + int HP_timer_delete_post; + int HP_timer_addtick_pre; + int HP_timer_addtick_post; + int HP_timer_settick_pre; + int HP_timer_settick_post; + int HP_timer_add_func_list_pre; + int HP_timer_add_func_list_post; + int HP_timer_get_uptime_pre; + int HP_timer_get_uptime_post; + int HP_timer_perform_pre; + int HP_timer_perform_post; + int HP_timer_init_pre; + int HP_timer_init_post; + int HP_timer_final_pre; + int HP_timer_final_post; } count; struct { + struct HCache_interface HCache; struct char_interface chr; + struct cmdline_interface cmdline; + struct console_interface console; + struct db_interface DB; struct geoip_interface geoip; struct inter_auction_interface inter_auction; struct inter_elemental_interface inter_elemental; @@ -1812,7 +2768,19 @@ struct { struct inter_pet_interface inter_pet; struct inter_quest_interface inter_quest; struct inter_storage_interface inter_storage; + struct libconfig_interface libconfig; struct loginif_interface loginif; + struct malloc_interface iMalloc; struct mapif_interface mapif; + struct mapindex_interface mapindex; + struct nullpo_interface nullpo; struct pincode_interface pincode; + struct showmsg_interface showmsg; + struct socket_interface sockt; + struct sql_interface SQL; + struct stringbuf_interface StrBuf; + struct strlib_interface strlib; + struct sv_interface sv; + struct sysinfo_interface sysinfo; + struct timer_interface timer; } source; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc index b11149cf1..9eb6b0fb2 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc @@ -5,6 +5,10 @@ // as it will get overwritten. struct HookingPointData HookingPoints[] = { +/* HCache */ + { HP_POP(HCache->init, HP_HCache_init) }, + { HP_POP(HCache->check, HP_HCache_check) }, + { HP_POP(HCache->open, HP_HCache_open) }, /* chr */ { HP_POP(chr->waiting_disconnect, HP_chr_waiting_disconnect) }, { HP_POP(chr->delete_char_sql, HP_chr_delete_char_sql) }, @@ -165,6 +169,37 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chr->sql_config_read, HP_chr_sql_config_read) }, { HP_POP(chr->config_dispatch, HP_chr_config_dispatch) }, { HP_POP(chr->config_read, HP_chr_config_read) }, +/* cmdline */ + { HP_POP(cmdline->init, HP_cmdline_init) }, + { HP_POP(cmdline->final, HP_cmdline_final) }, + { HP_POP(cmdline->arg_add, HP_cmdline_arg_add) }, + { HP_POP(cmdline->exec, HP_cmdline_exec) }, + { HP_POP(cmdline->arg_next_value, HP_cmdline_arg_next_value) }, + { HP_POP(cmdline->arg_source, HP_cmdline_arg_source) }, +/* console */ + { HP_POP(console->init, HP_console_init) }, + { HP_POP(console->final, HP_console_final) }, + { HP_POP(console->display_title, HP_console_display_title) }, +/* DB */ + { HP_POP(DB->fix_options, HP_DB_fix_options) }, + { HP_POP(DB->default_cmp, HP_DB_default_cmp) }, + { HP_POP(DB->default_hash, HP_DB_default_hash) }, + { HP_POP(DB->default_release, HP_DB_default_release) }, + { HP_POP(DB->custom_release, HP_DB_custom_release) }, + { HP_POP(DB->alloc, HP_DB_alloc) }, + { HP_POP(DB->i2key, HP_DB_i2key) }, + { HP_POP(DB->ui2key, HP_DB_ui2key) }, + { HP_POP(DB->str2key, HP_DB_str2key) }, + { HP_POP(DB->i642key, HP_DB_i642key) }, + { HP_POP(DB->ui642key, HP_DB_ui642key) }, + { HP_POP(DB->i2data, HP_DB_i2data) }, + { HP_POP(DB->ui2data, HP_DB_ui2data) }, + { HP_POP(DB->ptr2data, HP_DB_ptr2data) }, + { HP_POP(DB->data2i, HP_DB_data2i) }, + { HP_POP(DB->data2ui, HP_DB_data2ui) }, + { HP_POP(DB->data2ptr, HP_DB_data2ptr) }, + { HP_POP(DB->init, HP_DB_init) }, + { HP_POP(DB->final, HP_DB_final) }, /* geoip */ { HP_POP(geoip->getcountry, HP_geoip_getcountry) }, { HP_POP(geoip->final, HP_geoip_final) }, @@ -276,6 +311,65 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_storage->delete_, HP_inter_storage_delete_) }, { HP_POP(inter_storage->guild_storage_delete, HP_inter_storage_guild_storage_delete) }, { HP_POP(inter_storage->parse_frommap, HP_inter_storage_parse_frommap) }, +/* libconfig */ + { HP_POP(libconfig->read, HP_libconfig_read) }, + { HP_POP(libconfig->write, HP_libconfig_write) }, + { HP_POP(libconfig->set_auto_convert, HP_libconfig_set_auto_convert) }, + { HP_POP(libconfig->get_auto_convert, HP_libconfig_get_auto_convert) }, + { HP_POP(libconfig->read_string, HP_libconfig_read_string) }, + { HP_POP(libconfig->read_file_src, HP_libconfig_read_file_src) }, + { HP_POP(libconfig->write_file, HP_libconfig_write_file) }, + { HP_POP(libconfig->set_destructor, HP_libconfig_set_destructor) }, + { HP_POP(libconfig->set_include_dir, HP_libconfig_set_include_dir) }, + { HP_POP(libconfig->init, HP_libconfig_init) }, + { HP_POP(libconfig->destroy, HP_libconfig_destroy) }, + { HP_POP(libconfig->setting_get_int, HP_libconfig_setting_get_int) }, + { HP_POP(libconfig->setting_get_int64, HP_libconfig_setting_get_int64) }, + { HP_POP(libconfig->setting_get_float, HP_libconfig_setting_get_float) }, + { HP_POP(libconfig->setting_get_bool, HP_libconfig_setting_get_bool) }, + { HP_POP(libconfig->setting_get_string, HP_libconfig_setting_get_string) }, + { HP_POP(libconfig->setting_lookup_int, HP_libconfig_setting_lookup_int) }, + { HP_POP(libconfig->setting_lookup_int64, HP_libconfig_setting_lookup_int64) }, + { HP_POP(libconfig->setting_lookup_float, HP_libconfig_setting_lookup_float) }, + { HP_POP(libconfig->setting_lookup_bool, HP_libconfig_setting_lookup_bool) }, + { HP_POP(libconfig->setting_lookup_string, HP_libconfig_setting_lookup_string) }, + { HP_POP(libconfig->setting_set_int, HP_libconfig_setting_set_int) }, + { HP_POP(libconfig->setting_set_int64, HP_libconfig_setting_set_int64) }, + { HP_POP(libconfig->setting_set_float, HP_libconfig_setting_set_float) }, + { HP_POP(libconfig->setting_set_bool, HP_libconfig_setting_set_bool) }, + { HP_POP(libconfig->setting_set_string, HP_libconfig_setting_set_string) }, + { HP_POP(libconfig->setting_set_format, HP_libconfig_setting_set_format) }, + { HP_POP(libconfig->setting_get_format, HP_libconfig_setting_get_format) }, + { HP_POP(libconfig->setting_get_int_elem, HP_libconfig_setting_get_int_elem) }, + { HP_POP(libconfig->setting_get_int64_elem, HP_libconfig_setting_get_int64_elem) }, + { HP_POP(libconfig->setting_get_float_elem, HP_libconfig_setting_get_float_elem) }, + { HP_POP(libconfig->setting_get_bool_elem, HP_libconfig_setting_get_bool_elem) }, + { HP_POP(libconfig->setting_get_string_elem, HP_libconfig_setting_get_string_elem) }, + { HP_POP(libconfig->setting_set_int_elem, HP_libconfig_setting_set_int_elem) }, + { HP_POP(libconfig->setting_set_int64_elem, HP_libconfig_setting_set_int64_elem) }, + { HP_POP(libconfig->setting_set_float_elem, HP_libconfig_setting_set_float_elem) }, + { HP_POP(libconfig->setting_set_bool_elem, HP_libconfig_setting_set_bool_elem) }, + { HP_POP(libconfig->setting_set_string_elem, HP_libconfig_setting_set_string_elem) }, + { HP_POP(libconfig->setting_index, HP_libconfig_setting_index) }, + { HP_POP(libconfig->setting_length, HP_libconfig_setting_length) }, + { HP_POP(libconfig->setting_get_elem, HP_libconfig_setting_get_elem) }, + { HP_POP(libconfig->setting_get_member, HP_libconfig_setting_get_member) }, + { HP_POP(libconfig->setting_add, HP_libconfig_setting_add) }, + { HP_POP(libconfig->setting_remove, HP_libconfig_setting_remove) }, + { HP_POP(libconfig->setting_remove_elem, HP_libconfig_setting_remove_elem) }, + { HP_POP(libconfig->setting_set_hook, HP_libconfig_setting_set_hook) }, + { HP_POP(libconfig->lookup, HP_libconfig_lookup) }, + { HP_POP(libconfig->lookup_from, HP_libconfig_lookup_from) }, + { HP_POP(libconfig->lookup_int, HP_libconfig_lookup_int) }, + { HP_POP(libconfig->lookup_int64, HP_libconfig_lookup_int64) }, + { HP_POP(libconfig->lookup_float, HP_libconfig_lookup_float) }, + { HP_POP(libconfig->lookup_bool, HP_libconfig_lookup_bool) }, + { HP_POP(libconfig->lookup_string, HP_libconfig_lookup_string) }, + { HP_POP(libconfig->read_file, HP_libconfig_read_file) }, + { HP_POP(libconfig->setting_copy_simple, HP_libconfig_setting_copy_simple) }, + { HP_POP(libconfig->setting_copy_elem, HP_libconfig_setting_copy_elem) }, + { HP_POP(libconfig->setting_copy_aggregate, HP_libconfig_setting_copy_aggregate) }, + { HP_POP(libconfig->setting_copy, HP_libconfig_setting_copy) }, /* loginif */ { HP_POP(loginif->init, HP_loginif_init) }, { HP_POP(loginif->final, HP_loginif_final) }, @@ -290,6 +384,20 @@ struct HookingPointData HookingPoints[] = { { HP_POP(loginif->auth, HP_loginif_auth) }, { HP_POP(loginif->send_users_count, HP_loginif_send_users_count) }, { HP_POP(loginif->connect_to_server, HP_loginif_connect_to_server) }, +/* iMalloc */ + { HP_POP(iMalloc->init, HP_iMalloc_init) }, + { HP_POP(iMalloc->final, HP_iMalloc_final) }, + { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) }, + { HP_POP(iMalloc->calloc, HP_iMalloc_calloc) }, + { HP_POP(iMalloc->realloc, HP_iMalloc_realloc) }, + { HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) }, + { HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) }, + { HP_POP(iMalloc->free, HP_iMalloc_free) }, + { HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) }, + { HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) }, + { HP_POP(iMalloc->usage, HP_iMalloc_usage) }, + { HP_POP(iMalloc->post_shutdown, HP_iMalloc_post_shutdown) }, + { HP_POP(iMalloc->init_messages, HP_iMalloc_init_messages) }, /* mapif */ { HP_POP(mapif->ban, HP_mapif_ban) }, { HP_POP(mapif->server_init, HP_mapif_server_init) }, @@ -457,6 +565,18 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->parse_RegistryRequest, HP_mapif_parse_RegistryRequest) }, { HP_POP(mapif->namechange_ack, HP_mapif_namechange_ack) }, { HP_POP(mapif->parse_NameChangeRequest, HP_mapif_parse_NameChangeRequest) }, +/* mapindex */ + { HP_POP(mapindex->init, HP_mapindex_init) }, + { HP_POP(mapindex->final, HP_mapindex_final) }, + { HP_POP(mapindex->addmap, HP_mapindex_addmap) }, + { HP_POP(mapindex->removemap, HP_mapindex_removemap) }, + { HP_POP(mapindex->getmapname, HP_mapindex_getmapname) }, + { HP_POP(mapindex->getmapname_ext, HP_mapindex_getmapname_ext) }, + { HP_POP(mapindex->name2id, HP_mapindex_name2id) }, + { HP_POP(mapindex->id2name, HP_mapindex_id2name) }, + { HP_POP(mapindex->check_default, HP_mapindex_check_default) }, +/* nullpo */ + { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) }, /* pincode */ { HP_POP(pincode->handle, HP_pincode_handle) }, { HP_POP(pincode->decrypt, HP_pincode_decrypt) }, @@ -468,6 +588,140 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pincode->compare, HP_pincode_compare) }, { HP_POP(pincode->check, HP_pincode_check) }, { HP_POP(pincode->config_read, HP_pincode_config_read) }, +/* showmsg */ + { HP_POP(showmsg->init, HP_showmsg_init) }, + { HP_POP(showmsg->final, HP_showmsg_final) }, + { HP_POP(showmsg->clearScreen, HP_showmsg_clearScreen) }, + { HP_POP(showmsg->showMessageV, HP_showmsg_showMessageV) }, +/* sockt */ + { HP_POP(sockt->init, HP_sockt_init) }, + { HP_POP(sockt->final, HP_sockt_final) }, + { HP_POP(sockt->perform, HP_sockt_perform) }, + { HP_POP(sockt->datasync, HP_sockt_datasync) }, + { HP_POP(sockt->make_listen_bind, HP_sockt_make_listen_bind) }, + { HP_POP(sockt->make_connection, HP_sockt_make_connection) }, + { HP_POP(sockt->realloc_fifo, HP_sockt_realloc_fifo) }, + { HP_POP(sockt->realloc_writefifo, HP_sockt_realloc_writefifo) }, + { HP_POP(sockt->wfifoset, HP_sockt_wfifoset) }, + { HP_POP(sockt->rfifoskip, HP_sockt_rfifoskip) }, + { HP_POP(sockt->close, HP_sockt_close) }, + { HP_POP(sockt->session_is_valid, HP_sockt_session_is_valid) }, + { HP_POP(sockt->session_is_active, HP_sockt_session_is_active) }, + { HP_POP(sockt->flush, HP_sockt_flush) }, + { HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) }, + { HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) }, + { HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) }, + { HP_POP(sockt->host2ip, HP_sockt_host2ip) }, + { HP_POP(sockt->ip2str, HP_sockt_ip2str) }, + { HP_POP(sockt->str2ip, HP_sockt_str2ip) }, + { HP_POP(sockt->ntows, HP_sockt_ntows) }, + { HP_POP(sockt->getips, HP_sockt_getips) }, + { HP_POP(sockt->eof, HP_sockt_eof) }, + { HP_POP(sockt->lan_subnet_check, HP_sockt_lan_subnet_check) }, + { HP_POP(sockt->allowed_ip_check, HP_sockt_allowed_ip_check) }, + { HP_POP(sockt->trusted_ip_check, HP_sockt_trusted_ip_check) }, + { HP_POP(sockt->net_config_read_sub, HP_sockt_net_config_read_sub) }, + { HP_POP(sockt->net_config_read, HP_sockt_net_config_read) }, +/* SQL */ + { HP_POP(SQL->Connect, HP_SQL_Connect) }, + { HP_POP(SQL->GetTimeout, HP_SQL_GetTimeout) }, + { HP_POP(SQL->GetColumnNames, HP_SQL_GetColumnNames) }, + { HP_POP(SQL->SetEncoding, HP_SQL_SetEncoding) }, + { HP_POP(SQL->Ping, HP_SQL_Ping) }, + { HP_POP(SQL->EscapeString, HP_SQL_EscapeString) }, + { HP_POP(SQL->EscapeStringLen, HP_SQL_EscapeStringLen) }, + { HP_POP(SQL->QueryV, HP_SQL_QueryV) }, + { HP_POP(SQL->QueryStr, HP_SQL_QueryStr) }, + { HP_POP(SQL->LastInsertId, HP_SQL_LastInsertId) }, + { HP_POP(SQL->NumColumns, HP_SQL_NumColumns) }, + { HP_POP(SQL->NumRows, HP_SQL_NumRows) }, + { HP_POP(SQL->NextRow, HP_SQL_NextRow) }, + { HP_POP(SQL->GetData, HP_SQL_GetData) }, + { HP_POP(SQL->FreeResult, HP_SQL_FreeResult) }, + { HP_POP(SQL->ShowDebug_, HP_SQL_ShowDebug_) }, + { HP_POP(SQL->Free, HP_SQL_Free) }, + { HP_POP(SQL->Malloc, HP_SQL_Malloc) }, + { HP_POP(SQL->StmtMalloc, HP_SQL_StmtMalloc) }, + { HP_POP(SQL->StmtPrepareV, HP_SQL_StmtPrepareV) }, + { HP_POP(SQL->StmtPrepareStr, HP_SQL_StmtPrepareStr) }, + { HP_POP(SQL->StmtNumParams, HP_SQL_StmtNumParams) }, + { HP_POP(SQL->StmtBindParam, HP_SQL_StmtBindParam) }, + { HP_POP(SQL->StmtExecute, HP_SQL_StmtExecute) }, + { HP_POP(SQL->StmtLastInsertId, HP_SQL_StmtLastInsertId) }, + { HP_POP(SQL->StmtNumColumns, HP_SQL_StmtNumColumns) }, + { HP_POP(SQL->StmtBindColumn, HP_SQL_StmtBindColumn) }, + { HP_POP(SQL->StmtNumRows, HP_SQL_StmtNumRows) }, + { HP_POP(SQL->StmtNextRow, HP_SQL_StmtNextRow) }, + { HP_POP(SQL->StmtFreeResult, HP_SQL_StmtFreeResult) }, + { HP_POP(SQL->StmtFree, HP_SQL_StmtFree) }, + { HP_POP(SQL->StmtShowDebug_, HP_SQL_StmtShowDebug_) }, +/* StrBuf */ + { HP_POP(StrBuf->Malloc, HP_StrBuf_Malloc) }, + { HP_POP(StrBuf->Init, HP_StrBuf_Init) }, + { HP_POP(StrBuf->Vprintf, HP_StrBuf_Vprintf) }, + { HP_POP(StrBuf->Append, HP_StrBuf_Append) }, + { HP_POP(StrBuf->AppendStr, HP_StrBuf_AppendStr) }, + { HP_POP(StrBuf->Length, HP_StrBuf_Length) }, + { HP_POP(StrBuf->Value, HP_StrBuf_Value) }, + { HP_POP(StrBuf->Clear, HP_StrBuf_Clear) }, + { HP_POP(StrBuf->Destroy, HP_StrBuf_Destroy) }, + { HP_POP(StrBuf->Free, HP_StrBuf_Free) }, +/* strlib */ + { HP_POP(strlib->jstrescape, HP_strlib_jstrescape) }, + { HP_POP(strlib->jstrescapecpy, HP_strlib_jstrescapecpy) }, + { HP_POP(strlib->jmemescapecpy, HP_strlib_jmemescapecpy) }, + { HP_POP(strlib->remove_control_chars_, HP_strlib_remove_control_chars_) }, + { HP_POP(strlib->trim_, HP_strlib_trim_) }, + { HP_POP(strlib->normalize_name_, HP_strlib_normalize_name_) }, + { HP_POP(strlib->stristr_, HP_strlib_stristr_) }, + { HP_POP(strlib->strnlen_, HP_strlib_strnlen_) }, + { HP_POP(strlib->strtok_r_, HP_strlib_strtok_r_) }, + { HP_POP(strlib->e_mail_check_, HP_strlib_e_mail_check_) }, + { HP_POP(strlib->config_switch_, HP_strlib_config_switch_) }, + { HP_POP(strlib->safestrncpy_, HP_strlib_safestrncpy_) }, + { HP_POP(strlib->safestrnlen_, HP_strlib_safestrnlen_) }, + { HP_POP(strlib->strline_, HP_strlib_strline_) }, + { HP_POP(strlib->bin2hex_, HP_strlib_bin2hex_) }, +/* sv */ + { HP_POP(sv->parse_next, HP_sv_parse_next) }, + { HP_POP(sv->parse, HP_sv_parse) }, + { HP_POP(sv->split, HP_sv_split) }, + { HP_POP(sv->escape_c, HP_sv_escape_c) }, + { HP_POP(sv->unescape_c, HP_sv_unescape_c) }, + { HP_POP(sv->skip_escaped_c, HP_sv_skip_escaped_c) }, + { HP_POP(sv->readdb, HP_sv_readdb) }, +/* sysinfo */ + { HP_POP(sysinfo->getpagesize, HP_sysinfo_getpagesize) }, + { HP_POP(sysinfo->platform, HP_sysinfo_platform) }, + { HP_POP(sysinfo->osversion, HP_sysinfo_osversion) }, + { HP_POP(sysinfo->cpu, HP_sysinfo_cpu) }, + { HP_POP(sysinfo->cpucores, HP_sysinfo_cpucores) }, + { HP_POP(sysinfo->arch, HP_sysinfo_arch) }, + { HP_POP(sysinfo->is64bit, HP_sysinfo_is64bit) }, + { HP_POP(sysinfo->compiler, HP_sysinfo_compiler) }, + { HP_POP(sysinfo->cflags, HP_sysinfo_cflags) }, + { HP_POP(sysinfo->vcstype, HP_sysinfo_vcstype) }, + { HP_POP(sysinfo->vcstypeid, HP_sysinfo_vcstypeid) }, + { HP_POP(sysinfo->vcsrevision_src, HP_sysinfo_vcsrevision_src) }, + { HP_POP(sysinfo->vcsrevision_scripts, HP_sysinfo_vcsrevision_scripts) }, + { HP_POP(sysinfo->vcsrevision_reload, HP_sysinfo_vcsrevision_reload) }, + { HP_POP(sysinfo->is_superuser, HP_sysinfo_is_superuser) }, + { HP_POP(sysinfo->init, HP_sysinfo_init) }, + { HP_POP(sysinfo->final, HP_sysinfo_final) }, +/* timer */ + { HP_POP(timer->gettick, HP_timer_gettick) }, + { HP_POP(timer->gettick_nocache, HP_timer_gettick_nocache) }, + { HP_POP(timer->add, HP_timer_add) }, + { HP_POP(timer->add_interval, HP_timer_add_interval) }, + { HP_POP(timer->get, HP_timer_get) }, + { HP_POP(timer->delete, HP_timer_delete) }, + { HP_POP(timer->addtick, HP_timer_addtick) }, + { HP_POP(timer->settick, HP_timer_settick) }, + { HP_POP(timer->add_func_list, HP_timer_add_func_list) }, + { HP_POP(timer->get_uptime, HP_timer_get_uptime) }, + { HP_POP(timer->perform, HP_timer_perform) }, + { HP_POP(timer->init, HP_timer_init) }, + { HP_POP(timer->final, HP_timer_final) }, }; int HookingPointsLenMax = 42; diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index f8d01cb28..89e0661bb 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -4,6 +4,87 @@ // NOTE: This file was auto-generated and should never be manually edited, // as it will get overwritten. +/* HCache */ +void HP_HCache_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_HCache_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_HCache_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.HCache.init(); + } + if( HPMHooks.count.HP_HCache_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_HCache_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_HCache_check(const char *file) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_HCache_check_pre ) { + bool (*preHookFunc) (const char *file); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_HCache_check_pre[hIndex].func; + retVal___ = preHookFunc(file); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.HCache.check(file); + } + if( HPMHooks.count.HP_HCache_check_post ) { + bool (*postHookFunc) (bool retVal___, const char *file); + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_HCache_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, file); + } + } + return retVal___; +} +FILE* HP_HCache_open(const char *file, const char *opt) { + int hIndex = 0; + FILE* retVal___ = NULL; + if( HPMHooks.count.HP_HCache_open_pre ) { + FILE* (*preHookFunc) (const char *file, const char *opt); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_HCache_open_pre[hIndex].func; + retVal___ = preHookFunc(file, opt); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.HCache.open(file, opt); + } + if( HPMHooks.count.HP_HCache_open_post ) { + FILE* (*postHookFunc) (FILE* retVal___, const char *file, const char *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_HCache_open_post[hIndex].func; + retVal___ = postHookFunc(retVal___, file, opt); + } + } + return retVal___; +} /* chr */ int HP_chr_waiting_disconnect(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; @@ -4222,42 +4303,41 @@ int HP_chr_config_read(const char *cfgName) { } return retVal___; } -/* geoip */ -const char* HP_geoip_getcountry(uint32 ipnum) { +/* cmdline */ +void HP_cmdline_init(void) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_geoip_getcountry_pre ) { - const char* (*preHookFunc) (uint32 *ipnum); + if( HPMHooks.count.HP_cmdline_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_getcountry_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_geoip_getcountry_pre[hIndex].func; - retVal___ = preHookFunc(&ipnum); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.geoip.getcountry(ipnum); + HPMHooks.source.cmdline.init(); } - if( HPMHooks.count.HP_geoip_getcountry_post ) { - const char* (*postHookFunc) (const char* retVal___, uint32 *ipnum); - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_getcountry_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_geoip_getcountry_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ipnum); + if( HPMHooks.count.HP_cmdline_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_init_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -void HP_geoip_final(bool shutdown) { +void HP_cmdline_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_geoip_final_pre ) { - void (*preHookFunc) (bool *shutdown); + if( HPMHooks.count.HP_cmdline_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_geoip_final_pre[hIndex].func; - preHookFunc(&shutdown); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4265,53 +4345,53 @@ void HP_geoip_final(bool shutdown) { } } { - HPMHooks.source.geoip.final(shutdown); + HPMHooks.source.cmdline.final(); } - if( HPMHooks.count.HP_geoip_final_post ) { - void (*postHookFunc) (bool *shutdown); - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_geoip_final_post[hIndex].func; - postHookFunc(&shutdown); + if( HPMHooks.count.HP_cmdline_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_final_post[hIndex].func; + postHookFunc(); } } return; } -void HP_geoip_init(void) { +bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) { int hIndex = 0; - if( HPMHooks.count.HP_geoip_init_pre ) { - void (*preHookFunc) (void); + bool retVal___ = false; + if( HPMHooks.count.HP_cmdline_arg_add_pre ) { + bool (*preHookFunc) (unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_geoip_init_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_arg_add_pre[hIndex].func; + retVal___ = preHookFunc(&pluginID, name, &shortname, &func, help, &options); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.geoip.init(); + retVal___ = HPMHooks.source.cmdline.arg_add(pluginID, name, shortname, func, help, options); } - if( HPMHooks.count.HP_geoip_init_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_geoip_init_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_cmdline_arg_add_post ) { + bool (*postHookFunc) (bool retVal___, unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_arg_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &pluginID, name, &shortname, &func, help, &options); } } - return; + return retVal___; } -/* inter_auction */ -int HP_inter_auction_count(int char_id, bool buy) { +int HP_cmdline_exec(int argc, char **argv, unsigned int options) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_auction_count_pre ) { - int (*preHookFunc) (int *char_id, bool *buy); + if( HPMHooks.count.HP_cmdline_exec_pre ) { + int (*preHookFunc) (int *argc, char **argv, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_count_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_auction_count_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, &buy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_exec_pre[hIndex].func; + retVal___ = preHookFunc(&argc, argv, &options); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4319,52 +4399,53 @@ int HP_inter_auction_count(int char_id, bool buy) { } } { - retVal___ = HPMHooks.source.inter_auction.count(char_id, buy); + retVal___ = HPMHooks.source.cmdline.exec(argc, argv, options); } - if( HPMHooks.count.HP_inter_auction_count_post ) { - int (*postHookFunc) (int retVal___, int *char_id, bool *buy); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_count_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_auction_count_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &buy); + if( HPMHooks.count.HP_cmdline_exec_post ) { + int (*postHookFunc) (int retVal___, int *argc, char **argv, unsigned int *options); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_exec_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &argc, argv, &options); } } return retVal___; } -void HP_inter_auction_save(struct auction_data *auction) { +bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { int hIndex = 0; - if( HPMHooks.count.HP_inter_auction_save_pre ) { - void (*preHookFunc) (struct auction_data *auction); + bool retVal___ = false; + if( HPMHooks.count.HP_cmdline_arg_next_value_pre ) { + bool (*preHookFunc) (const char *name, int *current_arg, int *argc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_save_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_auction_save_pre[hIndex].func; - preHookFunc(auction); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_pre[hIndex].func; + retVal___ = preHookFunc(name, ¤t_arg, &argc); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.inter_auction.save(auction); + retVal___ = HPMHooks.source.cmdline.arg_next_value(name, current_arg, argc); } - if( HPMHooks.count.HP_inter_auction_save_post ) { - void (*postHookFunc) (struct auction_data *auction); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_save_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_auction_save_post[hIndex].func; - postHookFunc(auction); + if( HPMHooks.count.HP_cmdline_arg_next_value_post ) { + bool (*postHookFunc) (bool retVal___, const char *name, int *current_arg, int *argc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, ¤t_arg, &argc); } } - return; + return retVal___; } -unsigned int HP_inter_auction_create(struct auction_data *auction) { +const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_inter_auction_create_pre ) { - unsigned int (*preHookFunc) (struct auction_data *auction); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_cmdline_arg_source_pre ) { + const char* (*preHookFunc) (struct CmdlineArgData *arg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_create_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_auction_create_pre[hIndex].func; - retVal___ = preHookFunc(auction); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_arg_source_pre[hIndex].func; + retVal___ = preHookFunc(arg); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4372,52 +4453,52 @@ unsigned int HP_inter_auction_create(struct auction_data *auction) { } } { - retVal___ = HPMHooks.source.inter_auction.create(auction); + retVal___ = HPMHooks.source.cmdline.arg_source(arg); } - if( HPMHooks.count.HP_inter_auction_create_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, struct auction_data *auction); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_create_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_auction_create_post[hIndex].func; - retVal___ = postHookFunc(retVal___, auction); + if( HPMHooks.count.HP_cmdline_arg_source_post ) { + const char* (*postHookFunc) (const char* retVal___, struct CmdlineArgData *arg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_arg_source_post[hIndex].func; + retVal___ = postHookFunc(retVal___, arg); } } return retVal___; } -int HP_inter_auction_end_timer(int tid, int64 tick, int id, intptr_t data) { +/* console */ +void HP_console_init(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_auction_end_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_console_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_end_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_auction_end_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_console_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.inter_auction.end_timer(tid, tick, id, data); + HPMHooks.source.console.init(); } - if( HPMHooks.count.HP_inter_auction_end_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_end_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_auction_end_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_console_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_console_init_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -void HP_inter_auction_delete_(struct auction_data *auction) { +void HP_console_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_auction_delete__pre ) { - void (*preHookFunc) (struct auction_data *auction); + if( HPMHooks.count.HP_console_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_delete__pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_auction_delete__pre[hIndex].func; - preHookFunc(auction); + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_console_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4425,24 +4506,24 @@ void HP_inter_auction_delete_(struct auction_data *auction) { } } { - HPMHooks.source.inter_auction.delete_(auction); + HPMHooks.source.console.final(); } - if( HPMHooks.count.HP_inter_auction_delete__post ) { - void (*postHookFunc) (struct auction_data *auction); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_delete__post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_auction_delete__post[hIndex].func; - postHookFunc(auction); + if( HPMHooks.count.HP_console_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_console_final_post[hIndex].func; + postHookFunc(); } } return; } -void HP_inter_auction_fromsql(void) { +void HP_console_display_title(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_auction_fromsql_pre ) { + if( HPMHooks.count.HP_console_display_title_pre ) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_fromsql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_auction_fromsql_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_console_display_title_pre[hIndex].func; preHookFunc(); } if( *HPMforce_return ) { @@ -4451,26 +4532,27 @@ void HP_inter_auction_fromsql(void) { } } { - HPMHooks.source.inter_auction.fromsql(); + HPMHooks.source.console.display_title(); } - if( HPMHooks.count.HP_inter_auction_fromsql_post ) { + if( HPMHooks.count.HP_console_display_title_post ) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_fromsql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_auction_fromsql_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_console_display_title_post[hIndex].func; postHookFunc(); } } return; } -int HP_inter_auction_parse_frommap(int fd) { +/* DB */ +DBOptions HP_DB_fix_options(DBType type, DBOptions options) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_auction_parse_frommap_pre ) { - int (*preHookFunc) (int *fd); + DBOptions retVal___ = DB_OPT_BASE; + if( HPMHooks.count.HP_DB_fix_options_pre ) { + DBOptions (*preHookFunc) (DBType *type, DBOptions *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_parse_frommap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_auction_parse_frommap_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_fix_options_pre[hIndex].func; + retVal___ = preHookFunc(&type, &options); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4478,26 +4560,26 @@ int HP_inter_auction_parse_frommap(int fd) { } } { - retVal___ = HPMHooks.source.inter_auction.parse_frommap(fd); + retVal___ = HPMHooks.source.DB.fix_options(type, options); } - if( HPMHooks.count.HP_inter_auction_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_parse_frommap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_auction_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_DB_fix_options_post ) { + DBOptions (*postHookFunc) (DBOptions retVal___, DBType *type, DBOptions *options); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_fix_options_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type, &options); } } return retVal___; } -int HP_inter_auction_sql_init(void) { +DBComparator HP_DB_default_cmp(DBType type) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_auction_sql_init_pre ) { - int (*preHookFunc) (void); + DBComparator retVal___ = NULL; + if( HPMHooks.count.HP_DB_default_cmp_pre ) { + DBComparator (*preHookFunc) (DBType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_auction_sql_init_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_default_cmp_pre[hIndex].func; + retVal___ = preHookFunc(&type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4505,105 +4587,107 @@ int HP_inter_auction_sql_init(void) { } } { - retVal___ = HPMHooks.source.inter_auction.sql_init(); + retVal___ = HPMHooks.source.DB.default_cmp(type); } - if( HPMHooks.count.HP_inter_auction_sql_init_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_auction_sql_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_DB_default_cmp_post ) { + DBComparator (*postHookFunc) (DBComparator retVal___, DBType *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_default_cmp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type); } } return retVal___; } -void HP_inter_auction_sql_final(void) { +DBHasher HP_DB_default_hash(DBType type) { int hIndex = 0; - if( HPMHooks.count.HP_inter_auction_sql_final_pre ) { - void (*preHookFunc) (void); + DBHasher retVal___ = NULL; + if( HPMHooks.count.HP_DB_default_hash_pre ) { + DBHasher (*preHookFunc) (DBType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_auction_sql_final_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_default_hash_pre[hIndex].func; + retVal___ = preHookFunc(&type); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.inter_auction.sql_final(); + retVal___ = HPMHooks.source.DB.default_hash(type); } - if( HPMHooks.count.HP_inter_auction_sql_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_auction_sql_final_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_DB_default_hash_post ) { + DBHasher (*postHookFunc) (DBHasher retVal___, DBType *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_default_hash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type); } } - return; + return retVal___; } -/* inter_elemental */ -void HP_inter_elemental_sql_init(void) { +DBReleaser HP_DB_default_release(DBType type, DBOptions options) { int hIndex = 0; - if( HPMHooks.count.HP_inter_elemental_sql_init_pre ) { - void (*preHookFunc) (void); + DBReleaser retVal___ = NULL; + if( HPMHooks.count.HP_DB_default_release_pre ) { + DBReleaser (*preHookFunc) (DBType *type, DBOptions *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_elemental_sql_init_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_default_release_pre[hIndex].func; + retVal___ = preHookFunc(&type, &options); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.inter_elemental.sql_init(); + retVal___ = HPMHooks.source.DB.default_release(type, options); } - if( HPMHooks.count.HP_inter_elemental_sql_init_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_elemental_sql_init_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_DB_default_release_post ) { + DBReleaser (*postHookFunc) (DBReleaser retVal___, DBType *type, DBOptions *options); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_default_release_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type, &options); } } - return; + return retVal___; } -void HP_inter_elemental_sql_final(void) { +DBReleaser HP_DB_custom_release(DBRelease which) { int hIndex = 0; - if( HPMHooks.count.HP_inter_elemental_sql_final_pre ) { - void (*preHookFunc) (void); + DBReleaser retVal___ = NULL; + if( HPMHooks.count.HP_DB_custom_release_pre ) { + DBReleaser (*preHookFunc) (DBRelease *which); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_elemental_sql_final_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_custom_release_pre[hIndex].func; + retVal___ = preHookFunc(&which); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.inter_elemental.sql_final(); + retVal___ = HPMHooks.source.DB.custom_release(which); } - if( HPMHooks.count.HP_inter_elemental_sql_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_elemental_sql_final_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_DB_custom_release_post ) { + DBReleaser (*postHookFunc) (DBReleaser retVal___, DBRelease *which); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_custom_release_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &which); } } - return; + return retVal___; } -int HP_inter_elemental_parse_frommap(int fd) { +DBMap* HP_DB_alloc(const char *file, const char *func, int line, DBType type, DBOptions options, unsigned short maxlen) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_elemental_parse_frommap_pre ) { - int (*preHookFunc) (int *fd); + DBMap* retVal___ = NULL; + if( HPMHooks.count.HP_DB_alloc_pre ) { + DBMap* (*preHookFunc) (const char *file, const char *func, int *line, DBType *type, DBOptions *options, unsigned short *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_parse_frommap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_elemental_parse_frommap_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_alloc_pre[hIndex].func; + retVal___ = preHookFunc(file, func, &line, &type, &options, &maxlen); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4611,27 +4695,27 @@ int HP_inter_elemental_parse_frommap(int fd) { } } { - retVal___ = HPMHooks.source.inter_elemental.parse_frommap(fd); + retVal___ = HPMHooks.source.DB.alloc(file, func, line, type, options, maxlen); } - if( HPMHooks.count.HP_inter_elemental_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_parse_frommap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_elemental_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_DB_alloc_post ) { + DBMap* (*postHookFunc) (DBMap* retVal___, const char *file, const char *func, int *line, DBType *type, DBOptions *options, unsigned short *maxlen); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_alloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, file, func, &line, &type, &options, &maxlen); } } return retVal___; } -/* inter_guild */ -int HP_inter_guild_save_timer(int tid, int64 tick, int id, intptr_t data) { +DBKey HP_DB_i2key(int key) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_save_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + DBKey retVal___; + memset(&retVal___, '\0', sizeof(DBKey)); + if( HPMHooks.count.HP_DB_i2key_pre ) { + DBKey (*preHookFunc) (int *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_save_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_save_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_i2key_pre[hIndex].func; + retVal___ = preHookFunc(&key); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4639,26 +4723,27 @@ int HP_inter_guild_save_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.inter_guild.save_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.DB.i2key(key); } - if( HPMHooks.count.HP_inter_guild_save_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_save_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_save_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_DB_i2key_post ) { + DBKey (*postHookFunc) (DBKey retVal___, int *key); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_i2key_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key); } } return retVal___; } -int HP_inter_guild_removemember_tosql(int account_id, int char_id) { +DBKey HP_DB_ui2key(unsigned int key) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_removemember_tosql_pre ) { - int (*preHookFunc) (int *account_id, int *char_id); + DBKey retVal___; + memset(&retVal___, '\0', sizeof(DBKey)); + if( HPMHooks.count.HP_DB_ui2key_pre ) { + DBKey (*preHookFunc) (unsigned int *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_removemember_tosql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_removemember_tosql_pre[hIndex].func; - retVal___ = preHookFunc(&account_id, &char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_ui2key_pre[hIndex].func; + retVal___ = preHookFunc(&key); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4666,26 +4751,27 @@ int HP_inter_guild_removemember_tosql(int account_id, int char_id) { } } { - retVal___ = HPMHooks.source.inter_guild.removemember_tosql(account_id, char_id); + retVal___ = HPMHooks.source.DB.ui2key(key); } - if( HPMHooks.count.HP_inter_guild_removemember_tosql_post ) { - int (*postHookFunc) (int retVal___, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_removemember_tosql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_removemember_tosql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &account_id, &char_id); + if( HPMHooks.count.HP_DB_ui2key_post ) { + DBKey (*postHookFunc) (DBKey retVal___, unsigned int *key); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_ui2key_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key); } } return retVal___; } -int HP_inter_guild_tosql(struct guild *g, int flag) { +DBKey HP_DB_str2key(const char *key) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_tosql_pre ) { - int (*preHookFunc) (struct guild *g, int *flag); + DBKey retVal___; + memset(&retVal___, '\0', sizeof(DBKey)); + if( HPMHooks.count.HP_DB_str2key_pre ) { + DBKey (*preHookFunc) (const char *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_tosql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_tosql_pre[hIndex].func; - retVal___ = preHookFunc(g, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_str2key_pre[hIndex].func; + retVal___ = preHookFunc(key); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4693,26 +4779,27 @@ int HP_inter_guild_tosql(struct guild *g, int flag) { } } { - retVal___ = HPMHooks.source.inter_guild.tosql(g, flag); + retVal___ = HPMHooks.source.DB.str2key(key); } - if( HPMHooks.count.HP_inter_guild_tosql_post ) { - int (*postHookFunc) (int retVal___, struct guild *g, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_tosql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_tosql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, g, &flag); + if( HPMHooks.count.HP_DB_str2key_post ) { + DBKey (*postHookFunc) (DBKey retVal___, const char *key); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_str2key_post[hIndex].func; + retVal___ = postHookFunc(retVal___, key); } } return retVal___; } -struct guild* HP_inter_guild_fromsql(int guild_id) { +DBKey HP_DB_i642key(int64 key) { int hIndex = 0; - struct guild* retVal___ = NULL; - if( HPMHooks.count.HP_inter_guild_fromsql_pre ) { - struct guild* (*preHookFunc) (int *guild_id); + DBKey retVal___; + memset(&retVal___, '\0', sizeof(DBKey)); + if( HPMHooks.count.HP_DB_i642key_pre ) { + DBKey (*preHookFunc) (int64 *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_fromsql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_i642key_pre[hIndex].func; + retVal___ = preHookFunc(&key); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4720,26 +4807,27 @@ struct guild* HP_inter_guild_fromsql(int guild_id) { } } { - retVal___ = HPMHooks.source.inter_guild.fromsql(guild_id); + retVal___ = HPMHooks.source.DB.i642key(key); } - if( HPMHooks.count.HP_inter_guild_fromsql_post ) { - struct guild* (*postHookFunc) (struct guild* retVal___, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_fromsql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id); + if( HPMHooks.count.HP_DB_i642key_post ) { + DBKey (*postHookFunc) (DBKey retVal___, int64 *key); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_i642key_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key); } } return retVal___; } -int HP_inter_guild_castle_tosql(struct guild_castle *gc) { +DBKey HP_DB_ui642key(uint64 key) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_castle_tosql_pre ) { - int (*preHookFunc) (struct guild_castle *gc); + DBKey retVal___; + memset(&retVal___, '\0', sizeof(DBKey)); + if( HPMHooks.count.HP_DB_ui642key_pre ) { + DBKey (*preHookFunc) (uint64 *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_tosql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_castle_tosql_pre[hIndex].func; - retVal___ = preHookFunc(gc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_ui642key_pre[hIndex].func; + retVal___ = preHookFunc(&key); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4747,26 +4835,27 @@ int HP_inter_guild_castle_tosql(struct guild_castle *gc) { } } { - retVal___ = HPMHooks.source.inter_guild.castle_tosql(gc); + retVal___ = HPMHooks.source.DB.ui642key(key); } - if( HPMHooks.count.HP_inter_guild_castle_tosql_post ) { - int (*postHookFunc) (int retVal___, struct guild_castle *gc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_tosql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_castle_tosql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, gc); + if( HPMHooks.count.HP_DB_ui642key_post ) { + DBKey (*postHookFunc) (DBKey retVal___, uint64 *key); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_ui642key_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key); } } return retVal___; } -struct guild_castle* HP_inter_guild_castle_fromsql(int castle_id) { +DBData HP_DB_i2data(int data) { int hIndex = 0; - struct guild_castle* retVal___ = NULL; - if( HPMHooks.count.HP_inter_guild_castle_fromsql_pre ) { - struct guild_castle* (*preHookFunc) (int *castle_id); + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_DB_i2data_pre ) { + DBData (*preHookFunc) (int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_fromsql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_castle_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&castle_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_i2data_pre[hIndex].func; + retVal___ = preHookFunc(&data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4774,26 +4863,27 @@ struct guild_castle* HP_inter_guild_castle_fromsql(int castle_id) { } } { - retVal___ = HPMHooks.source.inter_guild.castle_fromsql(castle_id); + retVal___ = HPMHooks.source.DB.i2data(data); } - if( HPMHooks.count.HP_inter_guild_castle_fromsql_post ) { - struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, int *castle_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_fromsql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_castle_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &castle_id); + if( HPMHooks.count.HP_DB_i2data_post ) { + DBData (*postHookFunc) (DBData retVal___, int *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_i2data_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &data); } } return retVal___; } -bool HP_inter_guild_exp_parse_row(char *split[], int column, int current) { +DBData HP_DB_ui2data(unsigned int data) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_inter_guild_exp_parse_row_pre ) { - bool (*preHookFunc) (char *split[], int *column, int *current); + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_DB_ui2data_pre ) { + DBData (*preHookFunc) (unsigned int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_exp_parse_row_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_exp_parse_row_pre[hIndex].func; - retVal___ = preHookFunc(split, &column, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_ui2data_pre[hIndex].func; + retVal___ = preHookFunc(&data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4801,26 +4891,27 @@ bool HP_inter_guild_exp_parse_row(char *split[], int column, int current) { } } { - retVal___ = HPMHooks.source.inter_guild.exp_parse_row(split, column, current); + retVal___ = HPMHooks.source.DB.ui2data(data); } - if( HPMHooks.count.HP_inter_guild_exp_parse_row_post ) { - bool (*postHookFunc) (bool retVal___, char *split[], int *column, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_exp_parse_row_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_exp_parse_row_post[hIndex].func; - retVal___ = postHookFunc(retVal___, split, &column, ¤t); + if( HPMHooks.count.HP_DB_ui2data_post ) { + DBData (*postHookFunc) (DBData retVal___, unsigned int *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_ui2data_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &data); } } return retVal___; } -int HP_inter_guild_CharOnline(int char_id, int guild_id) { +DBData HP_DB_ptr2data(void *data) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_CharOnline_pre ) { - int (*preHookFunc) (int *char_id, int *guild_id); + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_DB_ptr2data_pre ) { + DBData (*preHookFunc) (void *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOnline_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_CharOnline_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, &guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_ptr2data_pre[hIndex].func; + retVal___ = preHookFunc(data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4828,26 +4919,26 @@ int HP_inter_guild_CharOnline(int char_id, int guild_id) { } } { - retVal___ = HPMHooks.source.inter_guild.CharOnline(char_id, guild_id); + retVal___ = HPMHooks.source.DB.ptr2data(data); } - if( HPMHooks.count.HP_inter_guild_CharOnline_post ) { - int (*postHookFunc) (int retVal___, int *char_id, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOnline_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_CharOnline_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &guild_id); + if( HPMHooks.count.HP_DB_ptr2data_post ) { + DBData (*postHookFunc) (DBData retVal___, void *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_ptr2data_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); } } return retVal___; } -int HP_inter_guild_CharOffline(int char_id, int guild_id) { +int HP_DB_data2i(DBData *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_CharOffline_pre ) { - int (*preHookFunc) (int *char_id, int *guild_id); + if( HPMHooks.count.HP_DB_data2i_pre ) { + int (*preHookFunc) (DBData *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOffline_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_CharOffline_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, &guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_data2i_pre[hIndex].func; + retVal___ = preHookFunc(data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4855,26 +4946,26 @@ int HP_inter_guild_CharOffline(int char_id, int guild_id) { } } { - retVal___ = HPMHooks.source.inter_guild.CharOffline(char_id, guild_id); + retVal___ = HPMHooks.source.DB.data2i(data); } - if( HPMHooks.count.HP_inter_guild_CharOffline_post ) { - int (*postHookFunc) (int retVal___, int *char_id, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOffline_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_CharOffline_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &guild_id); + if( HPMHooks.count.HP_DB_data2i_post ) { + int (*postHookFunc) (int retVal___, DBData *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_data2i_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); } } return retVal___; } -int HP_inter_guild_sql_init(void) { +unsigned int HP_DB_data2ui(DBData *data) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_sql_init_pre ) { - int (*preHookFunc) (void); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_DB_data2ui_pre ) { + unsigned int (*preHookFunc) (DBData *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_sql_init_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_data2ui_pre[hIndex].func; + retVal___ = preHookFunc(data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4882,28 +4973,26 @@ int HP_inter_guild_sql_init(void) { } } { - retVal___ = HPMHooks.source.inter_guild.sql_init(); + retVal___ = HPMHooks.source.DB.data2ui(data); } - if( HPMHooks.count.HP_inter_guild_sql_init_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_sql_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_DB_data2ui_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, DBData *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_data2ui_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); } } return retVal___; } -int HP_inter_guild_db_final(DBKey key, DBData *data, va_list ap) { +void* HP_DB_data2ptr(DBData *data) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_db_final_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + void* retVal___ = NULL; + if( HPMHooks.count.HP_DB_data2ptr_pre ) { + void* (*preHookFunc) (DBData *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_db_final_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_inter_guild_db_final_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_data2ptr_pre[hIndex].func; + retVal___ = preHookFunc(data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4911,28 +5000,24 @@ int HP_inter_guild_db_final(DBKey key, DBData *data, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.inter_guild.db_final(key, data, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.DB.data2ptr(data); } - if( HPMHooks.count.HP_inter_guild_db_final_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_db_final_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_inter_guild_db_final_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_DB_data2ptr_post ) { + void* (*postHookFunc) (void* retVal___, DBData *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_data2ptr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); } } return retVal___; } -void HP_inter_guild_sql_final(void) { +void HP_DB_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_guild_sql_final_pre ) { + if( HPMHooks.count.HP_DB_init_pre ) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_sql_final_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_init_pre[hIndex].func; preHookFunc(); } if( *HPMforce_return ) { @@ -4941,53 +5026,53 @@ void HP_inter_guild_sql_final(void) { } } { - HPMHooks.source.inter_guild.sql_final(); + HPMHooks.source.DB.init(); } - if( HPMHooks.count.HP_inter_guild_sql_final_post ) { + if( HPMHooks.count.HP_DB_init_post ) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_sql_final_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_init_post[hIndex].func; postHookFunc(); } } return; } -int HP_inter_guild_search_guildname(char *str) { +void HP_DB_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_search_guildname_pre ) { - int (*preHookFunc) (char *str); + if( HPMHooks.count.HP_DB_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_search_guildname_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_search_guildname_pre[hIndex].func; - retVal___ = preHookFunc(str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.inter_guild.search_guildname(str); + HPMHooks.source.DB.final(); } - if( HPMHooks.count.HP_inter_guild_search_guildname_post ) { - int (*postHookFunc) (int retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_search_guildname_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_search_guildname_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str); + if( HPMHooks.count.HP_DB_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -bool HP_inter_guild_check_empty(struct guild *g) { +/* geoip */ +const char* HP_geoip_getcountry(uint32 ipnum) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_inter_guild_check_empty_pre ) { - bool (*preHookFunc) (struct guild *g); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_geoip_getcountry_pre ) { + const char* (*preHookFunc) (uint32 *ipnum); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_check_empty_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_check_empty_pre[hIndex].func; - retVal___ = preHookFunc(g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_getcountry_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_geoip_getcountry_pre[hIndex].func; + retVal___ = preHookFunc(&ipnum); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4995,80 +5080,79 @@ bool HP_inter_guild_check_empty(struct guild *g) { } } { - retVal___ = HPMHooks.source.inter_guild.check_empty(g); + retVal___ = HPMHooks.source.geoip.getcountry(ipnum); } - if( HPMHooks.count.HP_inter_guild_check_empty_post ) { - bool (*postHookFunc) (bool retVal___, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_check_empty_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_check_empty_post[hIndex].func; - retVal___ = postHookFunc(retVal___, g); + if( HPMHooks.count.HP_geoip_getcountry_post ) { + const char* (*postHookFunc) (const char* retVal___, uint32 *ipnum); + for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_getcountry_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_geoip_getcountry_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ipnum); } } return retVal___; } -unsigned int HP_inter_guild_nextexp(int level) { +void HP_geoip_final(bool shutdown) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_nextexp_pre ) { - unsigned int (*preHookFunc) (int *level); + if( HPMHooks.count.HP_geoip_final_pre ) { + void (*preHookFunc) (bool *shutdown); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_nextexp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_nextexp_pre[hIndex].func; - retVal___ = preHookFunc(&level); + for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_geoip_final_pre[hIndex].func; + preHookFunc(&shutdown); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.inter_guild.nextexp(level); + HPMHooks.source.geoip.final(shutdown); } - if( HPMHooks.count.HP_inter_guild_nextexp_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, int *level); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_nextexp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_nextexp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &level); + if( HPMHooks.count.HP_geoip_final_post ) { + void (*postHookFunc) (bool *shutdown); + for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_geoip_final_post[hIndex].func; + postHookFunc(&shutdown); } } - return retVal___; + return; } -int HP_inter_guild_checkskill(struct guild *g, int id) { +void HP_geoip_init(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_checkskill_pre ) { - int (*preHookFunc) (struct guild *g, int *id); + if( HPMHooks.count.HP_geoip_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_checkskill_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_checkskill_pre[hIndex].func; - retVal___ = preHookFunc(g, &id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_geoip_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.inter_guild.checkskill(g, id); + HPMHooks.source.geoip.init(); } - if( HPMHooks.count.HP_inter_guild_checkskill_post ) { - int (*postHookFunc) (int retVal___, struct guild *g, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_checkskill_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_checkskill_post[hIndex].func; - retVal___ = postHookFunc(retVal___, g, &id); + if( HPMHooks.count.HP_geoip_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_geoip_init_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_inter_guild_calcinfo(struct guild *g) { +/* inter_auction */ +int HP_inter_auction_count(int char_id, bool buy) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_calcinfo_pre ) { - int (*preHookFunc) (struct guild *g); + if( HPMHooks.count.HP_inter_auction_count_pre ) { + int (*preHookFunc) (int *char_id, bool *buy); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_calcinfo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_calcinfo_pre[hIndex].func; - retVal___ = preHookFunc(g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_count_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_auction_count_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &buy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5076,53 +5160,52 @@ int HP_inter_guild_calcinfo(struct guild *g) { } } { - retVal___ = HPMHooks.source.inter_guild.calcinfo(g); + retVal___ = HPMHooks.source.inter_auction.count(char_id, buy); } - if( HPMHooks.count.HP_inter_guild_calcinfo_post ) { - int (*postHookFunc) (int retVal___, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_calcinfo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_calcinfo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, g); + if( HPMHooks.count.HP_inter_auction_count_post ) { + int (*postHookFunc) (int retVal___, int *char_id, bool *buy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_count_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_auction_count_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &buy); } } return retVal___; } -int HP_inter_guild_sex_changed(int guild_id, int account_id, int char_id, short gender) { +void HP_inter_auction_save(struct auction_data *auction) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_sex_changed_pre ) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, short *gender); + if( HPMHooks.count.HP_inter_auction_save_pre ) { + void (*preHookFunc) (struct auction_data *auction); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sex_changed_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_sex_changed_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &gender); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_auction_save_pre[hIndex].func; + preHookFunc(auction); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.inter_guild.sex_changed(guild_id, account_id, char_id, gender); + HPMHooks.source.inter_auction.save(auction); } - if( HPMHooks.count.HP_inter_guild_sex_changed_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, short *gender); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sex_changed_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_sex_changed_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &gender); + if( HPMHooks.count.HP_inter_auction_save_post ) { + void (*postHookFunc) (struct auction_data *auction); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_auction_save_post[hIndex].func; + postHookFunc(auction); } } - return retVal___; + return; } -int HP_inter_guild_charname_changed(int guild_id, int account_id, int char_id, char *name) { +unsigned int HP_inter_auction_create(struct auction_data *auction) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_charname_changed_pre ) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, char *name); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_inter_auction_create_pre ) { + unsigned int (*preHookFunc) (struct auction_data *auction); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_charname_changed_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_charname_changed_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, &char_id, name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_auction_create_pre[hIndex].func; + retVal___ = preHookFunc(auction); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5130,26 +5213,26 @@ int HP_inter_guild_charname_changed(int guild_id, int account_id, int char_id, c } } { - retVal___ = HPMHooks.source.inter_guild.charname_changed(guild_id, account_id, char_id, name); + retVal___ = HPMHooks.source.inter_auction.create(auction); } - if( HPMHooks.count.HP_inter_guild_charname_changed_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_charname_changed_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_charname_changed_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, name); + if( HPMHooks.count.HP_inter_auction_create_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct auction_data *auction); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_auction_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, auction); } } return retVal___; } -int HP_inter_guild_parse_frommap(int fd) { +int HP_inter_auction_end_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_parse_frommap_pre ) { - int (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_inter_auction_end_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_parse_frommap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_parse_frommap_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_end_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_auction_end_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5157,53 +5240,78 @@ int HP_inter_guild_parse_frommap(int fd) { } } { - retVal___ = HPMHooks.source.inter_guild.parse_frommap(fd); + retVal___ = HPMHooks.source.inter_auction.end_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_inter_guild_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_parse_frommap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_inter_auction_end_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_end_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_auction_end_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_inter_guild_leave(int guild_id, int account_id, int char_id) { +void HP_inter_auction_delete_(struct auction_data *auction) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_leave_pre ) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id); + if( HPMHooks.count.HP_inter_auction_delete__pre ) { + void (*preHookFunc) (struct auction_data *auction); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_leave_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_leave_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, &char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_delete__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_auction_delete__pre[hIndex].func; + preHookFunc(auction); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.inter_guild.leave(guild_id, account_id, char_id); + HPMHooks.source.inter_auction.delete_(auction); } - if( HPMHooks.count.HP_inter_guild_leave_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_leave_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_leave_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id); + if( HPMHooks.count.HP_inter_auction_delete__post ) { + void (*postHookFunc) (struct auction_data *auction); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_delete__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_auction_delete__post[hIndex].func; + postHookFunc(auction); } } - return retVal___; + return; } -int HP_inter_guild_broken(int guild_id) { +void HP_inter_auction_fromsql(void) { + int hIndex = 0; + if( HPMHooks.count.HP_inter_auction_fromsql_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_fromsql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_auction_fromsql_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.inter_auction.fromsql(); + } + if( HPMHooks.count.HP_inter_auction_fromsql_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_fromsql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_auction_fromsql_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_inter_auction_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_broken_pre ) { - int (*preHookFunc) (int *guild_id); + if( HPMHooks.count.HP_inter_auction_parse_frommap_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_broken_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_broken_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_parse_frommap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_auction_parse_frommap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5211,26 +5319,25 @@ int HP_inter_guild_broken(int guild_id) { } } { - retVal___ = HPMHooks.source.inter_guild.broken(guild_id); + retVal___ = HPMHooks.source.inter_auction.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_guild_broken_post ) { - int (*postHookFunc) (int retVal___, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_broken_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_broken_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id); + if( HPMHooks.count.HP_inter_auction_parse_frommap_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_parse_frommap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_auction_parse_frommap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } return retVal___; } -/* inter_homunculus */ -int HP_inter_homunculus_sql_init(void) { +int HP_inter_auction_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_homunculus_sql_init_pre ) { + if( HPMHooks.count.HP_inter_auction_sql_init_pre ) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_homunculus_sql_init_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_auction_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } if( *HPMforce_return ) { @@ -5239,24 +5346,24 @@ int HP_inter_homunculus_sql_init(void) { } } { - retVal___ = HPMHooks.source.inter_homunculus.sql_init(); + retVal___ = HPMHooks.source.inter_auction.sql_init(); } - if( HPMHooks.count.HP_inter_homunculus_sql_init_post ) { + if( HPMHooks.count.HP_inter_auction_sql_init_post ) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_homunculus_sql_init_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_auction_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } } return retVal___; } -void HP_inter_homunculus_sql_final(void) { +void HP_inter_auction_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_homunculus_sql_final_pre ) { + if( HPMHooks.count.HP_inter_auction_sql_final_pre ) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_homunculus_sql_final_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_auction_sql_final_pre[hIndex].func; preHookFunc(); } if( *HPMforce_return ) { @@ -5265,81 +5372,79 @@ void HP_inter_homunculus_sql_final(void) { } } { - HPMHooks.source.inter_homunculus.sql_final(); + HPMHooks.source.inter_auction.sql_final(); } - if( HPMHooks.count.HP_inter_homunculus_sql_final_post ) { + if( HPMHooks.count.HP_inter_auction_sql_final_post ) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_homunculus_sql_final_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_auction_sql_final_post[hIndex].func; postHookFunc(); } } return; } -int HP_inter_homunculus_parse_frommap(int fd) { +/* inter_elemental */ +void HP_inter_elemental_sql_init(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_homunculus_parse_frommap_pre ) { - int (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_inter_elemental_sql_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_parse_frommap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_homunculus_parse_frommap_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_elemental_sql_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.inter_homunculus.parse_frommap(fd); + HPMHooks.source.inter_elemental.sql_init(); } - if( HPMHooks.count.HP_inter_homunculus_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_parse_frommap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_homunculus_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_inter_elemental_sql_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_elemental_sql_init_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -/* inter */ -const char* HP_inter_msg_txt(int msg_number) { +void HP_inter_elemental_sql_final(void) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_inter_msg_txt_pre ) { - const char* (*preHookFunc) (int *msg_number); + if( HPMHooks.count.HP_inter_elemental_sql_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_txt_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_msg_txt_pre[hIndex].func; - retVal___ = preHookFunc(&msg_number); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_elemental_sql_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.inter.msg_txt(msg_number); + HPMHooks.source.inter_elemental.sql_final(); } - if( HPMHooks.count.HP_inter_msg_txt_post ) { - const char* (*postHookFunc) (const char* retVal___, int *msg_number); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_txt_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_msg_txt_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &msg_number); + if( HPMHooks.count.HP_inter_elemental_sql_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_elemental_sql_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -bool HP_inter_msg_config_read(const char *cfg_name, bool allow_override) { +int HP_inter_elemental_parse_frommap(int fd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_inter_msg_config_read_pre ) { - bool (*preHookFunc) (const char *cfg_name, bool *allow_override); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_elemental_parse_frommap_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_config_read_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_msg_config_read_pre[hIndex].func; - retVal___ = preHookFunc(cfg_name, &allow_override); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_parse_frommap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_elemental_parse_frommap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5347,52 +5452,54 @@ bool HP_inter_msg_config_read(const char *cfg_name, bool allow_override) { } } { - retVal___ = HPMHooks.source.inter.msg_config_read(cfg_name, allow_override); + retVal___ = HPMHooks.source.inter_elemental.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_msg_config_read_post ) { - bool (*postHookFunc) (bool retVal___, const char *cfg_name, bool *allow_override); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_config_read_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_msg_config_read_post[hIndex].func; - retVal___ = postHookFunc(retVal___, cfg_name, &allow_override); + if( HPMHooks.count.HP_inter_elemental_parse_frommap_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_parse_frommap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_elemental_parse_frommap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } return retVal___; } -void HP_inter_do_final_msg(void) { +/* inter_guild */ +int HP_inter_guild_save_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - if( HPMHooks.count.HP_inter_do_final_msg_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_guild_save_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_do_final_msg_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_do_final_msg_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_save_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_save_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.inter.do_final_msg(); + retVal___ = HPMHooks.source.inter_guild.save_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_inter_do_final_msg_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_do_final_msg_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_do_final_msg_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_inter_guild_save_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_save_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_save_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } - return; + return retVal___; } -const char* HP_inter_job_name(int class_) { +int HP_inter_guild_removemember_tosql(int account_id, int char_id) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_inter_job_name_pre ) { - const char* (*preHookFunc) (int *class_); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_guild_removemember_tosql_pre ) { + int (*preHookFunc) (int *account_id, int *char_id); *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_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_removemember_tosql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_removemember_tosql_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &char_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5400,84 +5507,80 @@ const char* HP_inter_job_name(int class_) { } } { - retVal___ = HPMHooks.source.inter.job_name(class_); + retVal___ = HPMHooks.source.inter_guild.removemember_tosql(account_id, char_id); } - if( HPMHooks.count.HP_inter_job_name_post ) { - 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_); + if( HPMHooks.count.HP_inter_guild_removemember_tosql_post ) { + int (*postHookFunc) (int retVal___, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_removemember_tosql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_removemember_tosql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, &char_id); } } return retVal___; } -void HP_inter_vmsg_to_fd(int fd, int u_fd, int aid, char *msg, va_list ap) { +int HP_inter_guild_tosql(struct guild *g, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_inter_vmsg_to_fd_pre ) { - void (*preHookFunc) (int *fd, int *u_fd, int *aid, char *msg, va_list ap); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_guild_tosql_pre ) { + int (*preHookFunc) (struct guild *g, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_vmsg_to_fd_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_inter_vmsg_to_fd_pre[hIndex].func; - preHookFunc(&fd, &u_fd, &aid, msg, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_tosql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_tosql_pre[hIndex].func; + retVal___ = preHookFunc(g, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - va_list ap___copy; va_copy(ap___copy, ap); - HPMHooks.source.inter.vmsg_to_fd(fd, u_fd, aid, msg, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.inter_guild.tosql(g, flag); } - if( HPMHooks.count.HP_inter_vmsg_to_fd_post ) { - void (*postHookFunc) (int *fd, int *u_fd, int *aid, char *msg, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_vmsg_to_fd_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_inter_vmsg_to_fd_post[hIndex].func; - postHookFunc(&fd, &u_fd, &aid, msg, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_inter_guild_tosql_post ) { + int (*postHookFunc) (int retVal___, struct guild *g, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_tosql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_tosql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g, &flag); } } - return; + return retVal___; } -void HP_inter_savereg(int account_id, int char_id, const char *key, unsigned int index, intptr_t val, bool is_string) { +struct guild* HP_inter_guild_fromsql(int guild_id) { int hIndex = 0; - if( HPMHooks.count.HP_inter_savereg_pre ) { - void (*preHookFunc) (int *account_id, int *char_id, const char *key, unsigned int *index, intptr_t *val, bool *is_string); + struct guild* retVal___ = NULL; + if( HPMHooks.count.HP_inter_guild_fromsql_pre ) { + struct guild* (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_savereg_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_savereg_pre[hIndex].func; - preHookFunc(&account_id, &char_id, key, &index, &val, &is_string); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_fromsql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_fromsql_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.inter.savereg(account_id, char_id, key, index, val, is_string); + retVal___ = HPMHooks.source.inter_guild.fromsql(guild_id); } - if( HPMHooks.count.HP_inter_savereg_post ) { - void (*postHookFunc) (int *account_id, int *char_id, const char *key, unsigned int *index, intptr_t *val, bool *is_string); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_savereg_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_savereg_post[hIndex].func; - postHookFunc(&account_id, &char_id, key, &index, &val, &is_string); + if( HPMHooks.count.HP_inter_guild_fromsql_post ) { + struct guild* (*postHookFunc) (struct guild* retVal___, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_fromsql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_fromsql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id); } } - return; + return retVal___; } -int HP_inter_accreg_fromsql(int account_id, int char_id, int fd, int type) { +int HP_inter_guild_castle_tosql(struct guild_castle *gc) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_accreg_fromsql_pre ) { - int (*preHookFunc) (int *account_id, int *char_id, int *fd, int *type); + if( HPMHooks.count.HP_inter_guild_castle_tosql_pre ) { + int (*preHookFunc) (struct guild_castle *gc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_accreg_fromsql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_accreg_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&account_id, &char_id, &fd, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_tosql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_castle_tosql_pre[hIndex].func; + retVal___ = preHookFunc(gc); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5485,26 +5588,26 @@ int HP_inter_accreg_fromsql(int account_id, int char_id, int fd, int type) { } } { - retVal___ = HPMHooks.source.inter.accreg_fromsql(account_id, char_id, fd, type); + retVal___ = HPMHooks.source.inter_guild.castle_tosql(gc); } - if( HPMHooks.count.HP_inter_accreg_fromsql_post ) { - int (*postHookFunc) (int retVal___, int *account_id, int *char_id, int *fd, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_accreg_fromsql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_accreg_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &account_id, &char_id, &fd, &type); + if( HPMHooks.count.HP_inter_guild_castle_tosql_post ) { + int (*postHookFunc) (int retVal___, struct guild_castle *gc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_tosql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_castle_tosql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, gc); } } return retVal___; } -int HP_inter_config_read(const char *cfgName) { +struct guild_castle* HP_inter_guild_castle_fromsql(int castle_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_config_read_pre ) { - int (*preHookFunc) (const char *cfgName); + struct guild_castle* retVal___ = NULL; + if( HPMHooks.count.HP_inter_guild_castle_fromsql_pre ) { + struct guild_castle* (*preHookFunc) (int *castle_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_config_read_pre[hIndex].func; - retVal___ = preHookFunc(cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_fromsql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_castle_fromsql_pre[hIndex].func; + retVal___ = preHookFunc(&castle_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5512,28 +5615,53 @@ int HP_inter_config_read(const char *cfgName) { } } { - retVal___ = HPMHooks.source.inter.config_read(cfgName); + retVal___ = HPMHooks.source.inter_guild.castle_fromsql(castle_id); } - if( HPMHooks.count.HP_inter_config_read_post ) { - int (*postHookFunc) (int retVal___, const char *cfgName); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_config_read_post[hIndex].func; - retVal___ = postHookFunc(retVal___, cfgName); + if( HPMHooks.count.HP_inter_guild_castle_fromsql_post ) { + struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, int *castle_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_fromsql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_castle_fromsql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &castle_id); } } return retVal___; } -int HP_inter_vlog(char *fmt, va_list ap) { +bool HP_inter_guild_exp_parse_row(char *split[], int column, int current) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_inter_guild_exp_parse_row_pre ) { + bool (*preHookFunc) (char *split[], int *column, int *current); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_exp_parse_row_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_exp_parse_row_pre[hIndex].func; + retVal___ = preHookFunc(split, &column, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_guild.exp_parse_row(split, column, current); + } + if( HPMHooks.count.HP_inter_guild_exp_parse_row_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *column, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_exp_parse_row_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_exp_parse_row_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &column, ¤t); + } + } + return retVal___; +} +int HP_inter_guild_CharOnline(int char_id, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_vlog_pre ) { - int (*preHookFunc) (char *fmt, va_list ap); + if( HPMHooks.count.HP_inter_guild_CharOnline_pre ) { + int (*preHookFunc) (int *char_id, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_vlog_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_inter_vlog_pre[hIndex].func; - retVal___ = preHookFunc(fmt, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOnline_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_CharOnline_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &guild_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5541,30 +5669,26 @@ int HP_inter_vlog(char *fmt, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.inter.vlog(fmt, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.inter_guild.CharOnline(char_id, guild_id); } - if( HPMHooks.count.HP_inter_vlog_post ) { - int (*postHookFunc) (int retVal___, char *fmt, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_vlog_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_inter_vlog_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fmt, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_inter_guild_CharOnline_post ) { + int (*postHookFunc) (int retVal___, int *char_id, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOnline_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_CharOnline_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &guild_id); } } return retVal___; } -int HP_inter_init_sql(const char *file) { +int HP_inter_guild_CharOffline(int char_id, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_init_sql_pre ) { - int (*preHookFunc) (const char *file); + if( HPMHooks.count.HP_inter_guild_CharOffline_pre ) { + int (*preHookFunc) (int *char_id, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_init_sql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_init_sql_pre[hIndex].func; - retVal___ = preHookFunc(file); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOffline_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_CharOffline_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &guild_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5572,26 +5696,26 @@ int HP_inter_init_sql(const char *file) { } } { - retVal___ = HPMHooks.source.inter.init_sql(file); + retVal___ = HPMHooks.source.inter_guild.CharOffline(char_id, guild_id); } - if( HPMHooks.count.HP_inter_init_sql_post ) { - int (*postHookFunc) (int retVal___, const char *file); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_init_sql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_init_sql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, file); + if( HPMHooks.count.HP_inter_guild_CharOffline_post ) { + int (*postHookFunc) (int retVal___, int *char_id, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOffline_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_CharOffline_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &guild_id); } } return retVal___; } -int HP_inter_mapif_init(int fd) { +int HP_inter_guild_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mapif_init_pre ) { - int (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_inter_guild_sql_init_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mapif_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_mapif_init_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_sql_init_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5599,26 +5723,26 @@ int HP_inter_mapif_init(int fd) { } } { - retVal___ = HPMHooks.source.inter.mapif_init(fd); + retVal___ = HPMHooks.source.inter_guild.sql_init(); } - if( HPMHooks.count.HP_inter_mapif_init_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mapif_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_mapif_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_inter_guild_sql_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_sql_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_inter_check_ttl_wisdata_sub(DBKey key, DBData *data, va_list ap) { +int HP_inter_guild_db_final(DBKey key, DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_check_ttl_wisdata_sub_pre ) { + if( HPMHooks.count.HP_inter_guild_db_final_pre ) { int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_sub_pre; hIndex++ ) { + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_db_final_pre; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_sub_pre[hIndex].func; + preHookFunc = HPMHooks.list.HP_inter_guild_db_final_pre[hIndex].func; retVal___ = preHookFunc(&key, data, ap___copy); va_end(ap___copy); } @@ -5629,56 +5753,55 @@ int HP_inter_check_ttl_wisdata_sub(DBKey key, DBData *data, va_list ap) { } { va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.inter.check_ttl_wisdata_sub(key, data, ap___copy); + retVal___ = HPMHooks.source.inter_guild.db_final(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_inter_check_ttl_wisdata_sub_post ) { + if( HPMHooks.count.HP_inter_guild_db_final_post ) { int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_sub_post; hIndex++ ) { + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_db_final_post; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_sub_post[hIndex].func; + postHookFunc = HPMHooks.list.HP_inter_guild_db_final_post[hIndex].func; retVal___ = postHookFunc(retVal___, &key, data, ap___copy); va_end(ap___copy); } } return retVal___; } -int HP_inter_check_ttl_wisdata(void) { +void HP_inter_guild_sql_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_check_ttl_wisdata_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_inter_guild_sql_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_sql_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.inter.check_ttl_wisdata(); + HPMHooks.source.inter_guild.sql_final(); } - if( HPMHooks.count.HP_inter_check_ttl_wisdata_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_inter_guild_sql_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_sql_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_inter_check_length(int fd, int length) { +int HP_inter_guild_search_guildname(char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_check_length_pre ) { - int (*preHookFunc) (int *fd, int *length); + if( HPMHooks.count.HP_inter_guild_search_guildname_pre ) { + int (*preHookFunc) (char *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_length_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_check_length_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &length); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_search_guildname_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_search_guildname_pre[hIndex].func; + retVal___ = preHookFunc(str); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5686,26 +5809,26 @@ int HP_inter_check_length(int fd, int length) { } } { - retVal___ = HPMHooks.source.inter.check_length(fd, length); + retVal___ = HPMHooks.source.inter_guild.search_guildname(str); } - if( HPMHooks.count.HP_inter_check_length_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *length); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_length_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_check_length_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &length); + if( HPMHooks.count.HP_inter_guild_search_guildname_post ) { + int (*postHookFunc) (int retVal___, char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_search_guildname_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_search_guildname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); } } return retVal___; } -int HP_inter_parse_frommap(int fd) { +bool HP_inter_guild_check_empty(struct guild *g) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_parse_frommap_pre ) { - int (*preHookFunc) (int *fd); + bool retVal___ = false; + if( HPMHooks.count.HP_inter_guild_check_empty_pre ) { + bool (*preHookFunc) (struct guild *g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_parse_frommap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_parse_frommap_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_check_empty_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_check_empty_pre[hIndex].func; + retVal___ = preHookFunc(g); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5713,53 +5836,53 @@ int HP_inter_parse_frommap(int fd) { } } { - retVal___ = HPMHooks.source.inter.parse_frommap(fd); + retVal___ = HPMHooks.source.inter_guild.check_empty(g); } - if( HPMHooks.count.HP_inter_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_parse_frommap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_inter_guild_check_empty_post ) { + bool (*postHookFunc) (bool retVal___, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_check_empty_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_check_empty_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g); } } return retVal___; } -void HP_inter_final(void) { +unsigned int HP_inter_guild_nextexp(int level) { int hIndex = 0; - if( HPMHooks.count.HP_inter_final_pre ) { - void (*preHookFunc) (void); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_inter_guild_nextexp_pre ) { + unsigned int (*preHookFunc) (int *level); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_final_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_nextexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_nextexp_pre[hIndex].func; + retVal___ = preHookFunc(&level); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.inter.final(); + retVal___ = HPMHooks.source.inter_guild.nextexp(level); } - if( HPMHooks.count.HP_inter_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_final_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_inter_guild_nextexp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, int *level); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_nextexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_nextexp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &level); } } - return; + return retVal___; } -/* inter_mail */ -int HP_inter_mail_sql_init(void) { +int HP_inter_guild_checkskill(struct guild *g, int id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mail_sql_init_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_inter_guild_checkskill_pre ) { + int (*preHookFunc) (struct guild *g, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_mail_sql_init_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_checkskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_checkskill_pre[hIndex].func; + retVal___ = preHookFunc(g, &id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5767,52 +5890,53 @@ int HP_inter_mail_sql_init(void) { } } { - retVal___ = HPMHooks.source.inter_mail.sql_init(); + retVal___ = HPMHooks.source.inter_guild.checkskill(g, id); } - if( HPMHooks.count.HP_inter_mail_sql_init_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_mail_sql_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_inter_guild_checkskill_post ) { + int (*postHookFunc) (int retVal___, struct guild *g, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_checkskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_checkskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g, &id); } } return retVal___; } -void HP_inter_mail_sql_final(void) { +int HP_inter_guild_calcinfo(struct guild *g) { int hIndex = 0; - if( HPMHooks.count.HP_inter_mail_sql_final_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_guild_calcinfo_pre ) { + int (*preHookFunc) (struct guild *g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_mail_sql_final_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_calcinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_calcinfo_pre[hIndex].func; + retVal___ = preHookFunc(g); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.inter_mail.sql_final(); + retVal___ = HPMHooks.source.inter_guild.calcinfo(g); } - if( HPMHooks.count.HP_inter_mail_sql_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_mail_sql_final_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_inter_guild_calcinfo_post ) { + int (*postHookFunc) (int retVal___, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_calcinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_calcinfo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g); } } - return; + return retVal___; } -int HP_inter_mail_parse_frommap(int fd) { +int HP_inter_guild_sex_changed(int guild_id, int account_id, int char_id, short gender) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mail_parse_frommap_pre ) { - int (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_inter_guild_sex_changed_pre ) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, short *gender); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_parse_frommap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_mail_parse_frommap_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sex_changed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_sex_changed_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &gender); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5820,26 +5944,26 @@ int HP_inter_mail_parse_frommap(int fd) { } } { - retVal___ = HPMHooks.source.inter_mail.parse_frommap(fd); + retVal___ = HPMHooks.source.inter_guild.sex_changed(guild_id, account_id, char_id, gender); } - if( HPMHooks.count.HP_inter_mail_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_parse_frommap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_mail_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_inter_guild_sex_changed_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, short *gender); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sex_changed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_sex_changed_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &gender); } } return retVal___; } -int HP_inter_mail_fromsql(int char_id, struct mail_data *md) { +int HP_inter_guild_charname_changed(int guild_id, int account_id, int char_id, char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mail_fromsql_pre ) { - int (*preHookFunc) (int *char_id, struct mail_data *md); + if( HPMHooks.count.HP_inter_guild_charname_changed_pre ) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_fromsql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_mail_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_charname_changed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_charname_changed_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, name); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5847,26 +5971,26 @@ int HP_inter_mail_fromsql(int char_id, struct mail_data *md) { } } { - retVal___ = HPMHooks.source.inter_mail.fromsql(char_id, md); + retVal___ = HPMHooks.source.inter_guild.charname_changed(guild_id, account_id, char_id, name); } - if( HPMHooks.count.HP_inter_mail_fromsql_post ) { - int (*postHookFunc) (int retVal___, int *char_id, struct mail_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_fromsql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_mail_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, md); + if( HPMHooks.count.HP_inter_guild_charname_changed_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_charname_changed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_charname_changed_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, name); } } return retVal___; } -int HP_inter_mail_savemessage(struct mail_message *msg) { +int HP_inter_guild_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mail_savemessage_pre ) { - int (*preHookFunc) (struct mail_message *msg); + if( HPMHooks.count.HP_inter_guild_parse_frommap_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_savemessage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_mail_savemessage_pre[hIndex].func; - retVal___ = preHookFunc(msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_parse_frommap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_parse_frommap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5874,26 +5998,26 @@ int HP_inter_mail_savemessage(struct mail_message *msg) { } } { - retVal___ = HPMHooks.source.inter_mail.savemessage(msg); + retVal___ = HPMHooks.source.inter_guild.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_mail_savemessage_post ) { - int (*postHookFunc) (int retVal___, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_savemessage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_mail_savemessage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, msg); + if( HPMHooks.count.HP_inter_guild_parse_frommap_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_parse_frommap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_parse_frommap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } return retVal___; } -bool HP_inter_mail_loadmessage(int mail_id, struct mail_message *msg) { +int HP_inter_guild_leave(int guild_id, int account_id, int char_id) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_inter_mail_loadmessage_pre ) { - bool (*preHookFunc) (int *mail_id, struct mail_message *msg); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_guild_leave_pre ) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_loadmessage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_mail_loadmessage_pre[hIndex].func; - retVal___ = preHookFunc(&mail_id, msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_leave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_leave_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, &char_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5901,26 +6025,26 @@ bool HP_inter_mail_loadmessage(int mail_id, struct mail_message *msg) { } } { - retVal___ = HPMHooks.source.inter_mail.loadmessage(mail_id, msg); + retVal___ = HPMHooks.source.inter_guild.leave(guild_id, account_id, char_id); } - if( HPMHooks.count.HP_inter_mail_loadmessage_post ) { - bool (*postHookFunc) (bool retVal___, int *mail_id, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_loadmessage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_mail_loadmessage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &mail_id, msg); + if( HPMHooks.count.HP_inter_guild_leave_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_leave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_leave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id); } } return retVal___; } -bool HP_inter_mail_DeleteAttach(int mail_id) { +int HP_inter_guild_broken(int guild_id) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_inter_mail_DeleteAttach_pre ) { - bool (*preHookFunc) (int *mail_id); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_guild_broken_pre ) { + int (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_DeleteAttach_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_mail_DeleteAttach_pre[hIndex].func; - retVal___ = preHookFunc(&mail_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_broken_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_guild_broken_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5928,80 +6052,80 @@ bool HP_inter_mail_DeleteAttach(int mail_id) { } } { - retVal___ = HPMHooks.source.inter_mail.DeleteAttach(mail_id); + retVal___ = HPMHooks.source.inter_guild.broken(guild_id); } - if( HPMHooks.count.HP_inter_mail_DeleteAttach_post ) { - bool (*postHookFunc) (bool retVal___, int *mail_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_DeleteAttach_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_mail_DeleteAttach_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &mail_id); + if( HPMHooks.count.HP_inter_guild_broken_post ) { + int (*postHookFunc) (int retVal___, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_broken_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_guild_broken_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id); } } return retVal___; } -void HP_inter_mail_sendmail(int send_id, const char *send_name, int dest_id, const char *dest_name, const char *title, const char *body, int zeny, struct item *item) { +/* inter_homunculus */ +int HP_inter_homunculus_sql_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_mail_sendmail_pre ) { - void (*preHookFunc) (int *send_id, const char *send_name, int *dest_id, const char *dest_name, const char *title, const char *body, int *zeny, struct item *item); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_homunculus_sql_init_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sendmail_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_mail_sendmail_pre[hIndex].func; - preHookFunc(&send_id, send_name, &dest_id, dest_name, title, body, &zeny, item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_homunculus_sql_init_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.inter_mail.sendmail(send_id, send_name, dest_id, dest_name, title, body, zeny, item); + retVal___ = HPMHooks.source.inter_homunculus.sql_init(); } - if( HPMHooks.count.HP_inter_mail_sendmail_post ) { - void (*postHookFunc) (int *send_id, const char *send_name, int *dest_id, const char *dest_name, const char *title, const char *body, int *zeny, struct item *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sendmail_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_mail_sendmail_post[hIndex].func; - postHookFunc(&send_id, send_name, &dest_id, dest_name, title, body, &zeny, item); + if( HPMHooks.count.HP_inter_homunculus_sql_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_homunculus_sql_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -/* inter_mercenary */ -bool HP_inter_mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status) { +void HP_inter_homunculus_sql_final(void) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_inter_mercenary_owner_fromsql_pre ) { - bool (*preHookFunc) (int *char_id, struct mmo_charstatus *status); + if( HPMHooks.count.HP_inter_homunculus_sql_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_fromsql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_mercenary_owner_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, status); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_homunculus_sql_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.inter_mercenary.owner_fromsql(char_id, status); + HPMHooks.source.inter_homunculus.sql_final(); } - if( HPMHooks.count.HP_inter_mercenary_owner_fromsql_post ) { - bool (*postHookFunc) (bool retVal___, int *char_id, struct mmo_charstatus *status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_fromsql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_mercenary_owner_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, status); + if( HPMHooks.count.HP_inter_homunculus_sql_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_homunculus_sql_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -bool HP_inter_mercenary_owner_tosql(int char_id, struct mmo_charstatus *status) { +int HP_inter_homunculus_parse_frommap(int fd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_inter_mercenary_owner_tosql_pre ) { - bool (*preHookFunc) (int *char_id, struct mmo_charstatus *status); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_homunculus_parse_frommap_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_tosql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_mercenary_owner_tosql_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, status); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_parse_frommap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_homunculus_parse_frommap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6009,26 +6133,27 @@ bool HP_inter_mercenary_owner_tosql(int char_id, struct mmo_charstatus *status) } } { - retVal___ = HPMHooks.source.inter_mercenary.owner_tosql(char_id, status); + retVal___ = HPMHooks.source.inter_homunculus.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_mercenary_owner_tosql_post ) { - bool (*postHookFunc) (bool retVal___, int *char_id, struct mmo_charstatus *status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_tosql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_mercenary_owner_tosql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, status); + if( HPMHooks.count.HP_inter_homunculus_parse_frommap_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_parse_frommap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_homunculus_parse_frommap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } return retVal___; } -bool HP_inter_mercenary_owner_delete(int char_id) { +/* inter */ +const char* HP_inter_msg_txt(int msg_number) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_inter_mercenary_owner_delete_pre ) { - bool (*preHookFunc) (int *char_id); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_inter_msg_txt_pre ) { + const char* (*preHookFunc) (int *msg_number); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_mercenary_owner_delete_pre[hIndex].func; - retVal___ = preHookFunc(&char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_txt_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_msg_txt_pre[hIndex].func; + retVal___ = preHookFunc(&msg_number); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6036,26 +6161,26 @@ bool HP_inter_mercenary_owner_delete(int char_id) { } } { - retVal___ = HPMHooks.source.inter_mercenary.owner_delete(char_id); + retVal___ = HPMHooks.source.inter.msg_txt(msg_number); } - if( HPMHooks.count.HP_inter_mercenary_owner_delete_post ) { - bool (*postHookFunc) (bool retVal___, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_mercenary_owner_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id); + if( HPMHooks.count.HP_inter_msg_txt_post ) { + const char* (*postHookFunc) (const char* retVal___, int *msg_number); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_txt_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_msg_txt_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &msg_number); } } return retVal___; } -int HP_inter_mercenary_sql_init(void) { +bool HP_inter_msg_config_read(const char *cfg_name, bool allow_override) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_mercenary_sql_init_pre ) { - int (*preHookFunc) (void); + bool retVal___ = false; + if( HPMHooks.count.HP_inter_msg_config_read_pre ) { + bool (*preHookFunc) (const char *cfg_name, bool *allow_override); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_mercenary_sql_init_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_msg_config_read_pre[hIndex].func; + retVal___ = preHookFunc(cfg_name, &allow_override); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6063,24 +6188,24 @@ int HP_inter_mercenary_sql_init(void) { } } { - retVal___ = HPMHooks.source.inter_mercenary.sql_init(); + retVal___ = HPMHooks.source.inter.msg_config_read(cfg_name, allow_override); } - if( HPMHooks.count.HP_inter_mercenary_sql_init_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_mercenary_sql_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_inter_msg_config_read_post ) { + bool (*postHookFunc) (bool retVal___, const char *cfg_name, bool *allow_override); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_msg_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cfg_name, &allow_override); } } return retVal___; } -void HP_inter_mercenary_sql_final(void) { +void HP_inter_do_final_msg(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_mercenary_sql_final_pre ) { + if( HPMHooks.count.HP_inter_do_final_msg_pre ) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_mercenary_sql_final_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_do_final_msg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_do_final_msg_pre[hIndex].func; preHookFunc(); } if( *HPMforce_return ) { @@ -6089,26 +6214,26 @@ void HP_inter_mercenary_sql_final(void) { } } { - HPMHooks.source.inter_mercenary.sql_final(); + HPMHooks.source.inter.do_final_msg(); } - if( HPMHooks.count.HP_inter_mercenary_sql_final_post ) { + if( HPMHooks.count.HP_inter_do_final_msg_post ) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_mercenary_sql_final_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_do_final_msg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_do_final_msg_post[hIndex].func; postHookFunc(); } } return; } -int HP_inter_mercenary_parse_frommap(int fd) { +const char* HP_inter_job_name(int class_) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_mercenary_parse_frommap_pre ) { - int (*preHookFunc) (int *fd); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_inter_job_name_pre ) { + const char* (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_parse_frommap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_mercenary_parse_frommap_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + 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_); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6116,53 +6241,57 @@ int HP_inter_mercenary_parse_frommap(int fd) { } } { - retVal___ = HPMHooks.source.inter_mercenary.parse_frommap(fd); + retVal___ = HPMHooks.source.inter.job_name(class_); } - if( HPMHooks.count.HP_inter_mercenary_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_parse_frommap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_mercenary_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_inter_job_name_post ) { + 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_); } } return retVal___; } -/* inter_party */ -int HP_inter_party_check_lv(struct party_data *p) { +void HP_inter_vmsg_to_fd(int fd, int u_fd, int aid, char *msg, va_list ap) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_check_lv_pre ) { - int (*preHookFunc) (struct party_data *p); + if( HPMHooks.count.HP_inter_vmsg_to_fd_pre ) { + void (*preHookFunc) (int *fd, int *u_fd, int *aid, char *msg, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_lv_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_party_check_lv_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_vmsg_to_fd_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_inter_vmsg_to_fd_pre[hIndex].func; + preHookFunc(&fd, &u_fd, &aid, msg, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.inter_party.check_lv(p); + va_list ap___copy; va_copy(ap___copy, ap); + HPMHooks.source.inter.vmsg_to_fd(fd, u_fd, aid, msg, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_inter_party_check_lv_post ) { - int (*postHookFunc) (int retVal___, struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_lv_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_party_check_lv_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_inter_vmsg_to_fd_post ) { + void (*postHookFunc) (int *fd, int *u_fd, int *aid, char *msg, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_vmsg_to_fd_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_inter_vmsg_to_fd_post[hIndex].func; + postHookFunc(&fd, &u_fd, &aid, msg, ap___copy); + va_end(ap___copy); } } - return retVal___; + return; } -void HP_inter_party_calc_state(struct party_data *p) { +void HP_inter_savereg(int account_id, int char_id, const char *key, unsigned int index, intptr_t val, bool is_string) { int hIndex = 0; - if( HPMHooks.count.HP_inter_party_calc_state_pre ) { - void (*preHookFunc) (struct party_data *p); + if( HPMHooks.count.HP_inter_savereg_pre ) { + void (*preHookFunc) (int *account_id, int *char_id, const char *key, unsigned int *index, intptr_t *val, bool *is_string); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_calc_state_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_party_calc_state_pre[hIndex].func; - preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_savereg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_savereg_pre[hIndex].func; + preHookFunc(&account_id, &char_id, key, &index, &val, &is_string); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6170,26 +6299,26 @@ void HP_inter_party_calc_state(struct party_data *p) { } } { - HPMHooks.source.inter_party.calc_state(p); + HPMHooks.source.inter.savereg(account_id, char_id, key, index, val, is_string); } - if( HPMHooks.count.HP_inter_party_calc_state_post ) { - void (*postHookFunc) (struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_calc_state_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_party_calc_state_post[hIndex].func; - postHookFunc(p); + if( HPMHooks.count.HP_inter_savereg_post ) { + void (*postHookFunc) (int *account_id, int *char_id, const char *key, unsigned int *index, intptr_t *val, bool *is_string); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_savereg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_savereg_post[hIndex].func; + postHookFunc(&account_id, &char_id, key, &index, &val, &is_string); } } return; } -int HP_inter_party_tosql(struct party *p, int flag, int index) { +int HP_inter_accreg_fromsql(int account_id, int char_id, int fd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_tosql_pre ) { - int (*preHookFunc) (struct party *p, int *flag, int *index); + if( HPMHooks.count.HP_inter_accreg_fromsql_pre ) { + int (*preHookFunc) (int *account_id, int *char_id, int *fd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_tosql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_party_tosql_pre[hIndex].func; - retVal___ = preHookFunc(p, &flag, &index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_accreg_fromsql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_accreg_fromsql_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &char_id, &fd, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6197,26 +6326,26 @@ int HP_inter_party_tosql(struct party *p, int flag, int index) { } } { - retVal___ = HPMHooks.source.inter_party.tosql(p, flag, index); + retVal___ = HPMHooks.source.inter.accreg_fromsql(account_id, char_id, fd, type); } - if( HPMHooks.count.HP_inter_party_tosql_post ) { - int (*postHookFunc) (int retVal___, struct party *p, int *flag, int *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_tosql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_party_tosql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, &flag, &index); + if( HPMHooks.count.HP_inter_accreg_fromsql_post ) { + int (*postHookFunc) (int retVal___, int *account_id, int *char_id, int *fd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_accreg_fromsql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_accreg_fromsql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, &char_id, &fd, &type); } } return retVal___; } -struct party_data* HP_inter_party_fromsql(int party_id) { +int HP_inter_config_read(const char *cfgName) { int hIndex = 0; - struct party_data* retVal___ = NULL; - if( HPMHooks.count.HP_inter_party_fromsql_pre ) { - struct party_data* (*preHookFunc) (int *party_id); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_config_read_pre ) { + int (*preHookFunc) (const char *cfgName); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_fromsql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_party_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_config_read_pre[hIndex].func; + retVal___ = preHookFunc(cfgName); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6224,26 +6353,28 @@ struct party_data* HP_inter_party_fromsql(int party_id) { } } { - retVal___ = HPMHooks.source.inter_party.fromsql(party_id); + retVal___ = HPMHooks.source.inter.config_read(cfgName); } - if( HPMHooks.count.HP_inter_party_fromsql_post ) { - struct party_data* (*postHookFunc) (struct party_data* retVal___, int *party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_fromsql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_party_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id); + if( HPMHooks.count.HP_inter_config_read_post ) { + int (*postHookFunc) (int retVal___, const char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cfgName); } } return retVal___; } -int HP_inter_party_sql_init(void) { +int HP_inter_vlog(char *fmt, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_sql_init_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_inter_vlog_pre ) { + int (*preHookFunc) (char *fmt, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_party_sql_init_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_vlog_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_inter_vlog_pre[hIndex].func; + retVal___ = preHookFunc(fmt, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6251,79 +6382,86 @@ int HP_inter_party_sql_init(void) { } } { - retVal___ = HPMHooks.source.inter_party.sql_init(); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.inter.vlog(fmt, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_inter_party_sql_init_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_party_sql_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_inter_vlog_post ) { + int (*postHookFunc) (int retVal___, char *fmt, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_vlog_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_inter_vlog_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fmt, ap___copy); + va_end(ap___copy); } } return retVal___; } -void HP_inter_party_sql_final(void) { +int HP_inter_init_sql(const char *file) { int hIndex = 0; - if( HPMHooks.count.HP_inter_party_sql_final_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_init_sql_pre ) { + int (*preHookFunc) (const char *file); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_party_sql_final_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_init_sql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_init_sql_pre[hIndex].func; + retVal___ = preHookFunc(file); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.inter_party.sql_final(); + retVal___ = HPMHooks.source.inter.init_sql(file); } - if( HPMHooks.count.HP_inter_party_sql_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_party_sql_final_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_inter_init_sql_post ) { + int (*postHookFunc) (int retVal___, const char *file); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_init_sql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_init_sql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, file); } } - return; + return retVal___; } -struct party_data* HP_inter_party_search_partyname(const char *str) { +int HP_inter_mapif_init(int fd) { int hIndex = 0; - struct party_data* retVal___ = NULL; - if( HPMHooks.count.HP_inter_party_search_partyname_pre ) { - struct party_data* (*preHookFunc) (const char *str); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_mapif_init_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_search_partyname_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_party_search_partyname_pre[hIndex].func; - retVal___ = preHookFunc(str); - } + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mapif_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_mapif_init_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } if( *HPMforce_return ) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.inter_party.search_partyname(str); + retVal___ = HPMHooks.source.inter.mapif_init(fd); } - if( HPMHooks.count.HP_inter_party_search_partyname_post ) { - struct party_data* (*postHookFunc) (struct party_data* retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_search_partyname_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_party_search_partyname_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str); + if( HPMHooks.count.HP_inter_mapif_init_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mapif_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_mapif_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } return retVal___; } -int HP_inter_party_check_exp_share(struct party_data *p) { +int HP_inter_check_ttl_wisdata_sub(DBKey key, DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_check_exp_share_pre ) { - int (*preHookFunc) (struct party_data *p); + if( HPMHooks.count.HP_inter_check_ttl_wisdata_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_exp_share_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_party_check_exp_share_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6331,26 +6469,30 @@ int HP_inter_party_check_exp_share(struct party_data *p) { } } { - retVal___ = HPMHooks.source.inter_party.check_exp_share(p); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.inter.check_ttl_wisdata_sub(key, data, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_inter_party_check_exp_share_post ) { - int (*postHookFunc) (int retVal___, struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_exp_share_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_party_check_exp_share_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_inter_check_ttl_wisdata_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_inter_party_check_empty(struct party_data *p) { +int HP_inter_check_ttl_wisdata(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_check_empty_pre ) { - int (*preHookFunc) (struct party_data *p); + if( HPMHooks.count.HP_inter_check_ttl_wisdata_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_empty_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_party_check_empty_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6358,26 +6500,26 @@ int HP_inter_party_check_empty(struct party_data *p) { } } { - retVal___ = HPMHooks.source.inter_party.check_empty(p); + retVal___ = HPMHooks.source.inter.check_ttl_wisdata(); } - if( HPMHooks.count.HP_inter_party_check_empty_post ) { - int (*postHookFunc) (int retVal___, struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_empty_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_party_check_empty_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_inter_check_ttl_wisdata_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_inter_party_parse_frommap(int fd) { +int HP_inter_check_length(int fd, int length) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_parse_frommap_pre ) { - int (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_inter_check_length_pre ) { + int (*preHookFunc) (int *fd, int *length); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_parse_frommap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_party_parse_frommap_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_length_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_check_length_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &length); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6385,26 +6527,26 @@ int HP_inter_party_parse_frommap(int fd) { } } { - retVal___ = HPMHooks.source.inter_party.parse_frommap(fd); + retVal___ = HPMHooks.source.inter.check_length(fd, length); } - if( HPMHooks.count.HP_inter_party_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_parse_frommap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_party_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_inter_check_length_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *length); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_length_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_check_length_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &length); } } return retVal___; } -int HP_inter_party_leave(int party_id, int account_id, int char_id) { +int HP_inter_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_leave_pre ) { - int (*preHookFunc) (int *party_id, int *account_id, int *char_id); + if( HPMHooks.count.HP_inter_parse_frommap_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_leave_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_party_leave_pre[hIndex].func; - retVal___ = preHookFunc(&party_id, &account_id, &char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_parse_frommap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_parse_frommap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6412,53 +6554,53 @@ int HP_inter_party_leave(int party_id, int account_id, int char_id) { } } { - retVal___ = HPMHooks.source.inter_party.leave(party_id, account_id, char_id); + retVal___ = HPMHooks.source.inter.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_party_leave_post ) { - int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_leave_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_party_leave_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id); + if( HPMHooks.count.HP_inter_parse_frommap_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_parse_frommap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_parse_frommap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } return retVal___; } -int HP_inter_party_CharOnline(int char_id, int party_id) { +void HP_inter_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_CharOnline_pre ) { - int (*preHookFunc) (int *char_id, int *party_id); + if( HPMHooks.count.HP_inter_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOnline_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_party_CharOnline_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, &party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.inter_party.CharOnline(char_id, party_id); + HPMHooks.source.inter.final(); } - if( HPMHooks.count.HP_inter_party_CharOnline_post ) { - int (*postHookFunc) (int retVal___, int *char_id, int *party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOnline_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_party_CharOnline_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &party_id); + if( HPMHooks.count.HP_inter_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_inter_party_CharOffline(int char_id, int party_id) { +/* inter_mail */ +int HP_inter_mail_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_CharOffline_pre ) { - int (*preHookFunc) (int *char_id, int *party_id); + if( HPMHooks.count.HP_inter_mail_sql_init_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOffline_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_party_CharOffline_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, &party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_mail_sql_init_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6466,54 +6608,52 @@ int HP_inter_party_CharOffline(int char_id, int party_id) { } } { - retVal___ = HPMHooks.source.inter_party.CharOffline(char_id, party_id); + retVal___ = HPMHooks.source.inter_mail.sql_init(); } - if( HPMHooks.count.HP_inter_party_CharOffline_post ) { - int (*postHookFunc) (int retVal___, int *char_id, int *party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOffline_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_party_CharOffline_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &party_id); + if( HPMHooks.count.HP_inter_mail_sql_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_mail_sql_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -/* inter_pet */ -int HP_inter_pet_tosql(int pet_id, struct s_pet *p) { +void HP_inter_mail_sql_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_pet_tosql_pre ) { - int (*preHookFunc) (int *pet_id, struct s_pet *p); + if( HPMHooks.count.HP_inter_mail_sql_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_tosql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_pet_tosql_pre[hIndex].func; - retVal___ = preHookFunc(&pet_id, p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_mail_sql_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.inter_pet.tosql(pet_id, p); + HPMHooks.source.inter_mail.sql_final(); } - if( HPMHooks.count.HP_inter_pet_tosql_post ) { - int (*postHookFunc) (int retVal___, int *pet_id, struct s_pet *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_tosql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_pet_tosql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &pet_id, p); + if( HPMHooks.count.HP_inter_mail_sql_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_mail_sql_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_inter_pet_fromsql(int pet_id, struct s_pet *p) { +int HP_inter_mail_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_pet_fromsql_pre ) { - int (*preHookFunc) (int *pet_id, struct s_pet *p); + if( HPMHooks.count.HP_inter_mail_parse_frommap_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_fromsql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_pet_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&pet_id, p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_parse_frommap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_mail_parse_frommap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6521,26 +6661,26 @@ int HP_inter_pet_fromsql(int pet_id, struct s_pet *p) { } } { - retVal___ = HPMHooks.source.inter_pet.fromsql(pet_id, p); + retVal___ = HPMHooks.source.inter_mail.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_pet_fromsql_post ) { - int (*postHookFunc) (int retVal___, int *pet_id, struct s_pet *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_fromsql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_pet_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &pet_id, p); + if( HPMHooks.count.HP_inter_mail_parse_frommap_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_parse_frommap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_mail_parse_frommap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } return retVal___; } -int HP_inter_pet_sql_init(void) { +int HP_inter_mail_fromsql(int char_id, struct mail_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_pet_sql_init_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_inter_mail_fromsql_pre ) { + int (*preHookFunc) (int *char_id, struct mail_data *md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_pet_sql_init_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_fromsql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_mail_fromsql_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, md); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6548,52 +6688,26 @@ int HP_inter_pet_sql_init(void) { } } { - retVal___ = HPMHooks.source.inter_pet.sql_init(); + retVal___ = HPMHooks.source.inter_mail.fromsql(char_id, md); } - if( HPMHooks.count.HP_inter_pet_sql_init_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_pet_sql_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_inter_mail_fromsql_post ) { + int (*postHookFunc) (int retVal___, int *char_id, struct mail_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_fromsql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_mail_fromsql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, md); } } return retVal___; } -void HP_inter_pet_sql_final(void) { - int hIndex = 0; - if( HPMHooks.count.HP_inter_pet_sql_final_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_pet_sql_final_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.inter_pet.sql_final(); - } - if( HPMHooks.count.HP_inter_pet_sql_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_pet_sql_final_post[hIndex].func; - postHookFunc(); - } - } - return; -} -int HP_inter_pet_delete_(int pet_id) { +int HP_inter_mail_savemessage(struct mail_message *msg) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_pet_delete__pre ) { - int (*preHookFunc) (int *pet_id); + if( HPMHooks.count.HP_inter_mail_savemessage_pre ) { + int (*preHookFunc) (struct mail_message *msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_delete__pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_pet_delete__pre[hIndex].func; - retVal___ = preHookFunc(&pet_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_savemessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_mail_savemessage_pre[hIndex].func; + retVal___ = preHookFunc(msg); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6601,26 +6715,26 @@ int HP_inter_pet_delete_(int pet_id) { } } { - retVal___ = HPMHooks.source.inter_pet.delete_(pet_id); + retVal___ = HPMHooks.source.inter_mail.savemessage(msg); } - if( HPMHooks.count.HP_inter_pet_delete__post ) { - int (*postHookFunc) (int retVal___, int *pet_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_delete__post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_pet_delete__post[hIndex].func; - retVal___ = postHookFunc(retVal___, &pet_id); + if( HPMHooks.count.HP_inter_mail_savemessage_post ) { + int (*postHookFunc) (int retVal___, struct mail_message *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_savemessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_mail_savemessage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, msg); } } return retVal___; } -int HP_inter_pet_parse_frommap(int fd) { +bool HP_inter_mail_loadmessage(int mail_id, struct mail_message *msg) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_pet_parse_frommap_pre ) { - int (*preHookFunc) (int *fd); + bool retVal___ = false; + if( HPMHooks.count.HP_inter_mail_loadmessage_pre ) { + bool (*preHookFunc) (int *mail_id, struct mail_message *msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_parse_frommap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_pet_parse_frommap_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_loadmessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_mail_loadmessage_pre[hIndex].func; + retVal___ = preHookFunc(&mail_id, msg); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6628,27 +6742,26 @@ int HP_inter_pet_parse_frommap(int fd) { } } { - retVal___ = HPMHooks.source.inter_pet.parse_frommap(fd); + retVal___ = HPMHooks.source.inter_mail.loadmessage(mail_id, msg); } - if( HPMHooks.count.HP_inter_pet_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_parse_frommap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_pet_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_inter_mail_loadmessage_post ) { + bool (*postHookFunc) (bool retVal___, int *mail_id, struct mail_message *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_loadmessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_mail_loadmessage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &mail_id, msg); } } return retVal___; } -/* inter_quest */ -int HP_inter_quest_parse_frommap(int fd) { +bool HP_inter_mail_DeleteAttach(int mail_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_quest_parse_frommap_pre ) { - int (*preHookFunc) (int *fd); + bool retVal___ = false; + if( HPMHooks.count.HP_inter_mail_DeleteAttach_pre ) { + bool (*preHookFunc) (int *mail_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_parse_frommap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_quest_parse_frommap_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_DeleteAttach_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_mail_DeleteAttach_pre[hIndex].func; + retVal___ = preHookFunc(&mail_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6656,54 +6769,53 @@ int HP_inter_quest_parse_frommap(int fd) { } } { - retVal___ = HPMHooks.source.inter_quest.parse_frommap(fd); + retVal___ = HPMHooks.source.inter_mail.DeleteAttach(mail_id); } - if( HPMHooks.count.HP_inter_quest_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_parse_frommap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_quest_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_inter_mail_DeleteAttach_post ) { + bool (*postHookFunc) (bool retVal___, int *mail_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_DeleteAttach_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_mail_DeleteAttach_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &mail_id); } } return retVal___; } -/* inter_storage */ -int HP_inter_storage_tosql(int account_id, struct storage_data *p) { +void HP_inter_mail_sendmail(int send_id, const char *send_name, int dest_id, const char *dest_name, const char *title, const char *body, int zeny, struct item *item) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_tosql_pre ) { - int (*preHookFunc) (int *account_id, struct storage_data *p); + if( HPMHooks.count.HP_inter_mail_sendmail_pre ) { + void (*preHookFunc) (int *send_id, const char *send_name, int *dest_id, const char *dest_name, const char *title, const char *body, int *zeny, struct item *item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_tosql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_storage_tosql_pre[hIndex].func; - retVal___ = preHookFunc(&account_id, p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sendmail_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_mail_sendmail_pre[hIndex].func; + preHookFunc(&send_id, send_name, &dest_id, dest_name, title, body, &zeny, item); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.inter_storage.tosql(account_id, p); + HPMHooks.source.inter_mail.sendmail(send_id, send_name, dest_id, dest_name, title, body, zeny, item); } - if( HPMHooks.count.HP_inter_storage_tosql_post ) { - int (*postHookFunc) (int retVal___, int *account_id, struct storage_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_tosql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_storage_tosql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &account_id, p); + if( HPMHooks.count.HP_inter_mail_sendmail_post ) { + void (*postHookFunc) (int *send_id, const char *send_name, int *dest_id, const char *dest_name, const char *title, const char *body, int *zeny, struct item *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sendmail_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_mail_sendmail_post[hIndex].func; + postHookFunc(&send_id, send_name, &dest_id, dest_name, title, body, &zeny, item); } } - return retVal___; + return; } -int HP_inter_storage_fromsql(int account_id, struct storage_data *p) { +/* inter_mercenary */ +bool HP_inter_mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_fromsql_pre ) { - int (*preHookFunc) (int *account_id, struct storage_data *p); + bool retVal___ = false; + if( HPMHooks.count.HP_inter_mercenary_owner_fromsql_pre ) { + bool (*preHookFunc) (int *char_id, struct mmo_charstatus *status); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_fromsql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_storage_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&account_id, p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_fromsql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_mercenary_owner_fromsql_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, status); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6711,26 +6823,26 @@ int HP_inter_storage_fromsql(int account_id, struct storage_data *p) { } } { - retVal___ = HPMHooks.source.inter_storage.fromsql(account_id, p); + retVal___ = HPMHooks.source.inter_mercenary.owner_fromsql(char_id, status); } - if( HPMHooks.count.HP_inter_storage_fromsql_post ) { - int (*postHookFunc) (int retVal___, int *account_id, struct storage_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_fromsql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_storage_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &account_id, p); + if( HPMHooks.count.HP_inter_mercenary_owner_fromsql_post ) { + bool (*postHookFunc) (bool retVal___, int *char_id, struct mmo_charstatus *status); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_fromsql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_mercenary_owner_fromsql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, status); } } return retVal___; } -int HP_inter_storage_guild_storage_tosql(int guild_id, struct guild_storage *p) { +bool HP_inter_mercenary_owner_tosql(int char_id, struct mmo_charstatus *status) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_guild_storage_tosql_pre ) { - int (*preHookFunc) (int *guild_id, struct guild_storage *p); + bool retVal___ = false; + if( HPMHooks.count.HP_inter_mercenary_owner_tosql_pre ) { + bool (*preHookFunc) (int *char_id, struct mmo_charstatus *status); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_tosql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_tosql_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_tosql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_mercenary_owner_tosql_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, status); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6738,26 +6850,26 @@ int HP_inter_storage_guild_storage_tosql(int guild_id, struct guild_storage *p) } } { - retVal___ = HPMHooks.source.inter_storage.guild_storage_tosql(guild_id, p); + retVal___ = HPMHooks.source.inter_mercenary.owner_tosql(char_id, status); } - if( HPMHooks.count.HP_inter_storage_guild_storage_tosql_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, struct guild_storage *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_tosql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_tosql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, p); + if( HPMHooks.count.HP_inter_mercenary_owner_tosql_post ) { + bool (*postHookFunc) (bool retVal___, int *char_id, struct mmo_charstatus *status); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_tosql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_mercenary_owner_tosql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, status); } } return retVal___; } -int HP_inter_storage_guild_storage_fromsql(int guild_id, struct guild_storage *p) { +bool HP_inter_mercenary_owner_delete(int char_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_guild_storage_fromsql_pre ) { - int (*preHookFunc) (int *guild_id, struct guild_storage *p); + bool retVal___ = false; + if( HPMHooks.count.HP_inter_mercenary_owner_delete_pre ) { + bool (*preHookFunc) (int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_fromsql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_mercenary_owner_delete_pre[hIndex].func; + retVal___ = preHookFunc(&char_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6765,25 +6877,25 @@ int HP_inter_storage_guild_storage_fromsql(int guild_id, struct guild_storage *p } } { - retVal___ = HPMHooks.source.inter_storage.guild_storage_fromsql(guild_id, p); + retVal___ = HPMHooks.source.inter_mercenary.owner_delete(char_id); } - if( HPMHooks.count.HP_inter_storage_guild_storage_fromsql_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, struct guild_storage *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_fromsql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, p); + if( HPMHooks.count.HP_inter_mercenary_owner_delete_post ) { + bool (*postHookFunc) (bool retVal___, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_mercenary_owner_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id); } } return retVal___; } -int HP_inter_storage_sql_init(void) { +int HP_inter_mercenary_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_sql_init_pre ) { + if( HPMHooks.count.HP_inter_mercenary_sql_init_pre ) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_storage_sql_init_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_mercenary_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } if( *HPMforce_return ) { @@ -6792,24 +6904,24 @@ int HP_inter_storage_sql_init(void) { } } { - retVal___ = HPMHooks.source.inter_storage.sql_init(); + retVal___ = HPMHooks.source.inter_mercenary.sql_init(); } - if( HPMHooks.count.HP_inter_storage_sql_init_post ) { + if( HPMHooks.count.HP_inter_mercenary_sql_init_post ) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_storage_sql_init_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_mercenary_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } } return retVal___; } -void HP_inter_storage_sql_final(void) { +void HP_inter_mercenary_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_storage_sql_final_pre ) { + if( HPMHooks.count.HP_inter_mercenary_sql_final_pre ) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_storage_sql_final_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_mercenary_sql_final_pre[hIndex].func; preHookFunc(); } if( *HPMforce_return ) { @@ -6818,26 +6930,26 @@ void HP_inter_storage_sql_final(void) { } } { - HPMHooks.source.inter_storage.sql_final(); + HPMHooks.source.inter_mercenary.sql_final(); } - if( HPMHooks.count.HP_inter_storage_sql_final_post ) { + if( HPMHooks.count.HP_inter_mercenary_sql_final_post ) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_storage_sql_final_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_mercenary_sql_final_post[hIndex].func; postHookFunc(); } } return; } -int HP_inter_storage_delete_(int account_id) { +int HP_inter_mercenary_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_delete__pre ) { - int (*preHookFunc) (int *account_id); + if( HPMHooks.count.HP_inter_mercenary_parse_frommap_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_delete__pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_storage_delete__pre[hIndex].func; - retVal___ = preHookFunc(&account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_parse_frommap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_mercenary_parse_frommap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6845,26 +6957,27 @@ int HP_inter_storage_delete_(int account_id) { } } { - retVal___ = HPMHooks.source.inter_storage.delete_(account_id); + retVal___ = HPMHooks.source.inter_mercenary.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_storage_delete__post ) { - int (*postHookFunc) (int retVal___, int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_delete__post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_storage_delete__post[hIndex].func; - retVal___ = postHookFunc(retVal___, &account_id); + if( HPMHooks.count.HP_inter_mercenary_parse_frommap_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_parse_frommap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_mercenary_parse_frommap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } return retVal___; } -int HP_inter_storage_guild_storage_delete(int guild_id) { +/* inter_party */ +int HP_inter_party_check_lv(struct party_data *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_guild_storage_delete_pre ) { - int (*preHookFunc) (int *guild_id); + if( HPMHooks.count.HP_inter_party_check_lv_pre ) { + int (*preHookFunc) (struct party_data *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_delete_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_lv_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_party_check_lv_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -6872,130 +6985,131 @@ int HP_inter_storage_guild_storage_delete(int guild_id) { } } { - retVal___ = HPMHooks.source.inter_storage.guild_storage_delete(guild_id); + retVal___ = HPMHooks.source.inter_party.check_lv(p); } - if( HPMHooks.count.HP_inter_storage_guild_storage_delete_post ) { - int (*postHookFunc) (int retVal___, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id); + if( HPMHooks.count.HP_inter_party_check_lv_post ) { + int (*postHookFunc) (int retVal___, struct party_data *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_lv_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_party_check_lv_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } return retVal___; } -int HP_inter_storage_parse_frommap(int fd) { +void HP_inter_party_calc_state(struct party_data *p) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_parse_frommap_pre ) { - int (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_inter_party_calc_state_pre ) { + void (*preHookFunc) (struct party_data *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_parse_frommap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_storage_parse_frommap_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_calc_state_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_party_calc_state_pre[hIndex].func; + preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.inter_storage.parse_frommap(fd); + HPMHooks.source.inter_party.calc_state(p); } - if( HPMHooks.count.HP_inter_storage_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_parse_frommap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_storage_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_inter_party_calc_state_post ) { + void (*postHookFunc) (struct party_data *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_calc_state_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_party_calc_state_post[hIndex].func; + postHookFunc(p); } } - return retVal___; + return; } -/* loginif */ -void HP_loginif_init(void) { +int HP_inter_party_tosql(struct party *p, int flag, int index) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_init_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_party_tosql_pre ) { + int (*preHookFunc) (struct party *p, int *flag, int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_loginif_init_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_tosql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_party_tosql_pre[hIndex].func; + retVal___ = preHookFunc(p, &flag, &index); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.loginif.init(); + retVal___ = HPMHooks.source.inter_party.tosql(p, flag, index); } - if( HPMHooks.count.HP_loginif_init_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_loginif_init_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_inter_party_tosql_post ) { + int (*postHookFunc) (int retVal___, struct party *p, int *flag, int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_tosql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_party_tosql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, &flag, &index); } } - return; + return retVal___; } -void HP_loginif_final(void) { +struct party_data* HP_inter_party_fromsql(int party_id) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_final_pre ) { - void (*preHookFunc) (void); + struct party_data* retVal___ = NULL; + if( HPMHooks.count.HP_inter_party_fromsql_pre ) { + struct party_data* (*preHookFunc) (int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_loginif_final_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_fromsql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_party_fromsql_pre[hIndex].func; + retVal___ = preHookFunc(&party_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.loginif.final(); + retVal___ = HPMHooks.source.inter_party.fromsql(party_id); } - if( HPMHooks.count.HP_loginif_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_loginif_final_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_inter_party_fromsql_post ) { + struct party_data* (*postHookFunc) (struct party_data* retVal___, int *party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_fromsql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_party_fromsql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id); } } - return; + return retVal___; } -void HP_loginif_reset(void) { +int HP_inter_party_sql_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_reset_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_party_sql_init_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_reset_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_loginif_reset_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_party_sql_init_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.loginif.reset(); + retVal___ = HPMHooks.source.inter_party.sql_init(); } - if( HPMHooks.count.HP_loginif_reset_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_reset_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_loginif_reset_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_inter_party_sql_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_party_sql_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -void HP_loginif_check_shutdown(void) { +void HP_inter_party_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_check_shutdown_pre ) { + if( HPMHooks.count.HP_inter_party_sql_final_pre ) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_check_shutdown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_loginif_check_shutdown_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_party_sql_final_pre[hIndex].func; preHookFunc(); } if( *HPMforce_return ) { @@ -7004,155 +7118,296 @@ void HP_loginif_check_shutdown(void) { } } { - HPMHooks.source.loginif.check_shutdown(); + HPMHooks.source.inter_party.sql_final(); } - if( HPMHooks.count.HP_loginif_check_shutdown_post ) { + if( HPMHooks.count.HP_inter_party_sql_final_post ) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_check_shutdown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_loginif_check_shutdown_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_party_sql_final_post[hIndex].func; postHookFunc(); } } return; } -void HP_loginif_on_disconnect(void) { +struct party_data* HP_inter_party_search_partyname(const char *str) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_on_disconnect_pre ) { - void (*preHookFunc) (void); + struct party_data* retVal___ = NULL; + if( HPMHooks.count.HP_inter_party_search_partyname_pre ) { + struct party_data* (*preHookFunc) (const char *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_disconnect_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_loginif_on_disconnect_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_search_partyname_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_party_search_partyname_pre[hIndex].func; + retVal___ = preHookFunc(str); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.loginif.on_disconnect(); + retVal___ = HPMHooks.source.inter_party.search_partyname(str); } - if( HPMHooks.count.HP_loginif_on_disconnect_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_disconnect_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_loginif_on_disconnect_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_inter_party_search_partyname_post ) { + struct party_data* (*postHookFunc) (struct party_data* retVal___, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_search_partyname_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_party_search_partyname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); } } - return; + return retVal___; } -void HP_loginif_on_ready(void) { +int HP_inter_party_check_exp_share(struct party_data *p) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_on_ready_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_party_check_exp_share_pre ) { + int (*preHookFunc) (struct party_data *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_ready_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_loginif_on_ready_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_exp_share_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_party_check_exp_share_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.loginif.on_ready(); + retVal___ = HPMHooks.source.inter_party.check_exp_share(p); } - if( HPMHooks.count.HP_loginif_on_ready_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_ready_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_loginif_on_ready_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_inter_party_check_exp_share_post ) { + int (*postHookFunc) (int retVal___, struct party_data *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_exp_share_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_party_check_exp_share_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } - return; + return retVal___; } -void HP_loginif_block_account(int account_id, int flag) { +int HP_inter_party_check_empty(struct party_data *p) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_block_account_pre ) { - void (*preHookFunc) (int *account_id, int *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_party_check_empty_pre ) { + int (*preHookFunc) (struct party_data *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_block_account_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_loginif_block_account_pre[hIndex].func; - preHookFunc(&account_id, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_empty_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_party_check_empty_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.loginif.block_account(account_id, flag); + retVal___ = HPMHooks.source.inter_party.check_empty(p); } - if( HPMHooks.count.HP_loginif_block_account_post ) { - void (*postHookFunc) (int *account_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_block_account_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_loginif_block_account_post[hIndex].func; - postHookFunc(&account_id, &flag); + if( HPMHooks.count.HP_inter_party_check_empty_post ) { + int (*postHookFunc) (int retVal___, struct party_data *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_empty_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_party_check_empty_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } - return; + return retVal___; } -void HP_loginif_ban_account(int account_id, short year, short month, short day, short hour, short minute, short second) { +int HP_inter_party_parse_frommap(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_ban_account_pre ) { - void (*preHookFunc) (int *account_id, short *year, short *month, short *day, short *hour, short *minute, short *second); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_ban_account_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_loginif_ban_account_pre[hIndex].func; - preHookFunc(&account_id, &year, &month, &day, &hour, &minute, &second); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_party_parse_frommap_pre ) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_parse_frommap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_party_parse_frommap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.loginif.ban_account(account_id, year, month, day, hour, minute, second); + retVal___ = HPMHooks.source.inter_party.parse_frommap(fd); } - if( HPMHooks.count.HP_loginif_ban_account_post ) { - void (*postHookFunc) (int *account_id, short *year, short *month, short *day, short *hour, short *minute, short *second); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_ban_account_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_loginif_ban_account_post[hIndex].func; - postHookFunc(&account_id, &year, &month, &day, &hour, &minute, &second); + if( HPMHooks.count.HP_inter_party_parse_frommap_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_parse_frommap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_party_parse_frommap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } - return; + return retVal___; } -void HP_loginif_unban_account(int account_id) { +int HP_inter_party_leave(int party_id, int account_id, int char_id) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_unban_account_pre ) { - void (*preHookFunc) (int *account_id); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_party_leave_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_unban_account_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_loginif_unban_account_pre[hIndex].func; - preHookFunc(&account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_leave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_party_leave_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &char_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.loginif.unban_account(account_id); + retVal___ = HPMHooks.source.inter_party.leave(party_id, account_id, char_id); } - if( HPMHooks.count.HP_loginif_unban_account_post ) { - void (*postHookFunc) (int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_unban_account_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_loginif_unban_account_post[hIndex].func; - postHookFunc(&account_id); + if( HPMHooks.count.HP_inter_party_leave_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_leave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_party_leave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id); } } - return; + return retVal___; } -void HP_loginif_changesex(int account_id) { +int HP_inter_party_CharOnline(int char_id, int party_id) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_changesex_pre ) { - void (*preHookFunc) (int *account_id); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_party_CharOnline_pre ) { + int (*preHookFunc) (int *char_id, int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_changesex_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_loginif_changesex_pre[hIndex].func; - preHookFunc(&account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOnline_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_party_CharOnline_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &party_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_party.CharOnline(char_id, party_id); + } + if( HPMHooks.count.HP_inter_party_CharOnline_post ) { + int (*postHookFunc) (int retVal___, int *char_id, int *party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOnline_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_party_CharOnline_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &party_id); + } + } + return retVal___; +} +int HP_inter_party_CharOffline(int char_id, int party_id) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_inter_party_CharOffline_pre ) { + int (*preHookFunc) (int *char_id, int *party_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOffline_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_party_CharOffline_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &party_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_party.CharOffline(char_id, party_id); + } + if( HPMHooks.count.HP_inter_party_CharOffline_post ) { + int (*postHookFunc) (int retVal___, int *char_id, int *party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOffline_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_party_CharOffline_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &party_id); + } + } + return retVal___; +} +/* inter_pet */ +int HP_inter_pet_tosql(int pet_id, struct s_pet *p) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_inter_pet_tosql_pre ) { + int (*preHookFunc) (int *pet_id, struct s_pet *p); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_tosql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_pet_tosql_pre[hIndex].func; + retVal___ = preHookFunc(&pet_id, p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_pet.tosql(pet_id, p); + } + if( HPMHooks.count.HP_inter_pet_tosql_post ) { + int (*postHookFunc) (int retVal___, int *pet_id, struct s_pet *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_tosql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_pet_tosql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &pet_id, p); + } + } + return retVal___; +} +int HP_inter_pet_fromsql(int pet_id, struct s_pet *p) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_inter_pet_fromsql_pre ) { + int (*preHookFunc) (int *pet_id, struct s_pet *p); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_fromsql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_pet_fromsql_pre[hIndex].func; + retVal___ = preHookFunc(&pet_id, p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_pet.fromsql(pet_id, p); + } + if( HPMHooks.count.HP_inter_pet_fromsql_post ) { + int (*postHookFunc) (int retVal___, int *pet_id, struct s_pet *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_fromsql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_pet_fromsql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &pet_id, p); + } + } + return retVal___; +} +int HP_inter_pet_sql_init(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_inter_pet_sql_init_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_pet_sql_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_pet.sql_init(); + } + if( HPMHooks.count.HP_inter_pet_sql_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_pet_sql_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_inter_pet_sql_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_inter_pet_sql_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_pet_sql_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -7160,208 +7415,6287 @@ void HP_loginif_changesex(int account_id) { } } { - HPMHooks.source.loginif.changesex(account_id); + HPMHooks.source.inter_pet.sql_final(); } - if( HPMHooks.count.HP_loginif_changesex_post ) { - void (*postHookFunc) (int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_changesex_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_loginif_changesex_post[hIndex].func; - postHookFunc(&account_id); + if( HPMHooks.count.HP_inter_pet_sql_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_pet_sql_final_post[hIndex].func; + postHookFunc(); } } return; } -void HP_loginif_auth(int fd, struct char_session_data *sd, uint32 ipl) { +int HP_inter_pet_delete_(int pet_id) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_auth_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd, uint32 *ipl); + int retVal___ = 0; + if( HPMHooks.count.HP_inter_pet_delete__pre ) { + int (*preHookFunc) (int *pet_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_auth_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_loginif_auth_pre[hIndex].func; - preHookFunc(&fd, sd, &ipl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_delete__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_pet_delete__pre[hIndex].func; + retVal___ = preHookFunc(&pet_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.loginif.auth(fd, sd, ipl); + retVal___ = HPMHooks.source.inter_pet.delete_(pet_id); } - if( HPMHooks.count.HP_loginif_auth_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd, uint32 *ipl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_auth_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_loginif_auth_post[hIndex].func; - postHookFunc(&fd, sd, &ipl); + if( HPMHooks.count.HP_inter_pet_delete__post ) { + int (*postHookFunc) (int retVal___, int *pet_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_delete__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_pet_delete__post[hIndex].func; + retVal___ = postHookFunc(retVal___, &pet_id); + } + } + return retVal___; +} +int HP_inter_pet_parse_frommap(int fd) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_inter_pet_parse_frommap_pre ) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_parse_frommap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_pet_parse_frommap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_pet.parse_frommap(fd); + } + if( HPMHooks.count.HP_inter_pet_parse_frommap_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_parse_frommap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_pet_parse_frommap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +/* inter_quest */ +int HP_inter_quest_parse_frommap(int fd) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_inter_quest_parse_frommap_pre ) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_parse_frommap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_quest_parse_frommap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_quest.parse_frommap(fd); + } + if( HPMHooks.count.HP_inter_quest_parse_frommap_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_parse_frommap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_quest_parse_frommap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +/* inter_storage */ +int HP_inter_storage_tosql(int account_id, struct storage_data *p) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_inter_storage_tosql_pre ) { + int (*preHookFunc) (int *account_id, struct storage_data *p); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_tosql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_storage_tosql_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_storage.tosql(account_id, p); + } + if( HPMHooks.count.HP_inter_storage_tosql_post ) { + int (*postHookFunc) (int retVal___, int *account_id, struct storage_data *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_tosql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_storage_tosql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, p); + } + } + return retVal___; +} +int HP_inter_storage_fromsql(int account_id, struct storage_data *p) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_inter_storage_fromsql_pre ) { + int (*preHookFunc) (int *account_id, struct storage_data *p); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_fromsql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_storage_fromsql_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_storage.fromsql(account_id, p); + } + if( HPMHooks.count.HP_inter_storage_fromsql_post ) { + int (*postHookFunc) (int retVal___, int *account_id, struct storage_data *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_fromsql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_storage_fromsql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, p); + } + } + return retVal___; +} +int HP_inter_storage_guild_storage_tosql(int guild_id, struct guild_storage *p) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_inter_storage_guild_storage_tosql_pre ) { + int (*preHookFunc) (int *guild_id, struct guild_storage *p); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_tosql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_tosql_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_storage.guild_storage_tosql(guild_id, p); + } + if( HPMHooks.count.HP_inter_storage_guild_storage_tosql_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, struct guild_storage *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_tosql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_tosql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, p); + } + } + return retVal___; +} +int HP_inter_storage_guild_storage_fromsql(int guild_id, struct guild_storage *p) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_inter_storage_guild_storage_fromsql_pre ) { + int (*preHookFunc) (int *guild_id, struct guild_storage *p); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_fromsql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_fromsql_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_storage.guild_storage_fromsql(guild_id, p); + } + if( HPMHooks.count.HP_inter_storage_guild_storage_fromsql_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, struct guild_storage *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_fromsql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_fromsql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, p); + } + } + return retVal___; +} +int HP_inter_storage_sql_init(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_inter_storage_sql_init_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_storage_sql_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_storage.sql_init(); + } + if( HPMHooks.count.HP_inter_storage_sql_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_storage_sql_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_inter_storage_sql_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_inter_storage_sql_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_storage_sql_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.inter_storage.sql_final(); + } + if( HPMHooks.count.HP_inter_storage_sql_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_storage_sql_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_inter_storage_delete_(int account_id) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_inter_storage_delete__pre ) { + int (*preHookFunc) (int *account_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_delete__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_storage_delete__pre[hIndex].func; + retVal___ = preHookFunc(&account_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_storage.delete_(account_id); + } + if( HPMHooks.count.HP_inter_storage_delete__post ) { + int (*postHookFunc) (int retVal___, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_delete__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_storage_delete__post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id); + } + } + return retVal___; +} +int HP_inter_storage_guild_storage_delete(int guild_id) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_inter_storage_guild_storage_delete_pre ) { + int (*preHookFunc) (int *guild_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_delete_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_storage.guild_storage_delete(guild_id); + } + if( HPMHooks.count.HP_inter_storage_guild_storage_delete_post ) { + int (*postHookFunc) (int retVal___, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id); + } + } + return retVal___; +} +int HP_inter_storage_parse_frommap(int fd) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_inter_storage_parse_frommap_pre ) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_parse_frommap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_inter_storage_parse_frommap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_storage.parse_frommap(fd); + } + if( HPMHooks.count.HP_inter_storage_parse_frommap_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_parse_frommap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_inter_storage_parse_frommap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +/* libconfig */ +int HP_libconfig_read(config_t *config, FILE *stream) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_read_pre ) { + int (*preHookFunc) (config_t *config, FILE *stream); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_read_pre[hIndex].func; + retVal___ = preHookFunc(config, stream); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.read(config, stream); + } + if( HPMHooks.count.HP_libconfig_read_post ) { + int (*postHookFunc) (int retVal___, config_t *config, FILE *stream); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, stream); + } + } + return retVal___; +} +void HP_libconfig_write(const config_t *config, FILE *stream) { + int hIndex = 0; + if( HPMHooks.count.HP_libconfig_write_pre ) { + void (*preHookFunc) (const config_t *config, FILE *stream); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_write_pre[hIndex].func; + preHookFunc(config, stream); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.write(config, stream); + } + if( HPMHooks.count.HP_libconfig_write_post ) { + void (*postHookFunc) (const config_t *config, FILE *stream); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_write_post[hIndex].func; + postHookFunc(config, stream); + } + } + return; +} +void HP_libconfig_set_auto_convert(config_t *config, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_libconfig_set_auto_convert_pre ) { + void (*preHookFunc) (config_t *config, int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_auto_convert_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_set_auto_convert_pre[hIndex].func; + preHookFunc(config, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.set_auto_convert(config, flag); + } + if( HPMHooks.count.HP_libconfig_set_auto_convert_post ) { + void (*postHookFunc) (config_t *config, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_auto_convert_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_set_auto_convert_post[hIndex].func; + postHookFunc(config, &flag); + } + } + return; +} +int HP_libconfig_get_auto_convert(const config_t *config) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_get_auto_convert_pre ) { + int (*preHookFunc) (const config_t *config); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_auto_convert_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_get_auto_convert_pre[hIndex].func; + retVal___ = preHookFunc(config); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.get_auto_convert(config); + } + if( HPMHooks.count.HP_libconfig_get_auto_convert_post ) { + int (*postHookFunc) (int retVal___, const config_t *config); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_auto_convert_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_get_auto_convert_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config); + } + } + return retVal___; +} +int HP_libconfig_read_string(config_t *config, const char *str) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_read_string_pre ) { + int (*preHookFunc) (config_t *config, const char *str); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_read_string_pre[hIndex].func; + retVal___ = preHookFunc(config, str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.read_string(config, str); + } + if( HPMHooks.count.HP_libconfig_read_string_post ) { + int (*postHookFunc) (int retVal___, config_t *config, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_read_string_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, str); + } + } + return retVal___; +} +int HP_libconfig_read_file_src(config_t *config, const char *filename) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_read_file_src_pre ) { + int (*preHookFunc) (config_t *config, const char *filename); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_read_file_src_pre[hIndex].func; + retVal___ = preHookFunc(config, filename); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.read_file_src(config, filename); + } + if( HPMHooks.count.HP_libconfig_read_file_src_post ) { + int (*postHookFunc) (int retVal___, config_t *config, const char *filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_read_file_src_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filename); + } + } + return retVal___; +} +int HP_libconfig_write_file(config_t *config, const char *filename) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_write_file_pre ) { + int (*preHookFunc) (config_t *config, const char *filename); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_write_file_pre[hIndex].func; + retVal___ = preHookFunc(config, filename); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.write_file(config, filename); + } + if( HPMHooks.count.HP_libconfig_write_file_post ) { + int (*postHookFunc) (int retVal___, config_t *config, const char *filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_write_file_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filename); + } + } + return retVal___; +} +void HP_libconfig_set_destructor(config_t *config, void ( *destructor ) (void *)) { + int hIndex = 0; + if( HPMHooks.count.HP_libconfig_set_destructor_pre ) { + void (*preHookFunc) (config_t *config, void ( *destructor ) (void *)); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_set_destructor_pre[hIndex].func; + preHookFunc(config, destructor); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.set_destructor(config, destructor); + } + if( HPMHooks.count.HP_libconfig_set_destructor_post ) { + void (*postHookFunc) (config_t *config, void ( *destructor ) (void *)); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_set_destructor_post[hIndex].func; + postHookFunc(config, destructor); + } + } + return; +} +void HP_libconfig_set_include_dir(config_t *config, const char *include_dir) { + int hIndex = 0; + if( HPMHooks.count.HP_libconfig_set_include_dir_pre ) { + void (*preHookFunc) (config_t *config, const char *include_dir); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_pre[hIndex].func; + preHookFunc(config, include_dir); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.set_include_dir(config, include_dir); + } + if( HPMHooks.count.HP_libconfig_set_include_dir_post ) { + void (*postHookFunc) (config_t *config, const char *include_dir); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_post[hIndex].func; + postHookFunc(config, include_dir); + } + } + return; +} +void HP_libconfig_init(config_t *config) { + int hIndex = 0; + if( HPMHooks.count.HP_libconfig_init_pre ) { + void (*preHookFunc) (config_t *config); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_init_pre[hIndex].func; + preHookFunc(config); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.init(config); + } + if( HPMHooks.count.HP_libconfig_init_post ) { + void (*postHookFunc) (config_t *config); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_init_post[hIndex].func; + postHookFunc(config); + } + } + return; +} +void HP_libconfig_destroy(config_t *config) { + int hIndex = 0; + if( HPMHooks.count.HP_libconfig_destroy_pre ) { + void (*preHookFunc) (config_t *config); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_destroy_pre[hIndex].func; + preHookFunc(config); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.destroy(config); + } + if( HPMHooks.count.HP_libconfig_destroy_post ) { + void (*postHookFunc) (config_t *config); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_destroy_post[hIndex].func; + postHookFunc(config); + } + } + return; +} +int HP_libconfig_setting_get_int(const config_setting_t *setting) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_int_pre ) { + int (*preHookFunc) (const config_setting_t *setting); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_pre[hIndex].func; + retVal___ = preHookFunc(setting); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_int(setting); + } + if( HPMHooks.count.HP_libconfig_setting_get_int_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); + } + } + return retVal___; +} +long long HP_libconfig_setting_get_int64(const config_setting_t *setting) { + int hIndex = 0; + long long retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_int64_pre ) { + long long (*preHookFunc) (const config_setting_t *setting); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_pre[hIndex].func; + retVal___ = preHookFunc(setting); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_int64(setting); + } + if( HPMHooks.count.HP_libconfig_setting_get_int64_post ) { + long long (*postHookFunc) (long long retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); + } + } + return retVal___; +} +double HP_libconfig_setting_get_float(const config_setting_t *setting) { + int hIndex = 0; + double retVal___ = 0.; + if( HPMHooks.count.HP_libconfig_setting_get_float_pre ) { + double (*preHookFunc) (const config_setting_t *setting); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_pre[hIndex].func; + retVal___ = preHookFunc(setting); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_float(setting); + } + if( HPMHooks.count.HP_libconfig_setting_get_float_post ) { + double (*postHookFunc) (double retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); + } + } + return retVal___; +} +int HP_libconfig_setting_get_bool(const config_setting_t *setting) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_bool_pre ) { + int (*preHookFunc) (const config_setting_t *setting); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_pre[hIndex].func; + retVal___ = preHookFunc(setting); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_bool(setting); + } + if( HPMHooks.count.HP_libconfig_setting_get_bool_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); + } + } + return retVal___; +} +const char* HP_libconfig_setting_get_string(const config_setting_t *setting) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_get_string_pre ) { + const char* (*preHookFunc) (const config_setting_t *setting); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_pre[hIndex].func; + retVal___ = preHookFunc(setting); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_string(setting); + } + if( HPMHooks.count.HP_libconfig_setting_get_string_post ) { + const char* (*postHookFunc) (const char* retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); + } + } + return retVal___; +} +int HP_libconfig_setting_lookup_int(const config_setting_t *setting, const char *name, int *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_lookup_int_pre ) { + int (*preHookFunc) (const config_setting_t *setting, const char *name, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_pre[hIndex].func; + retVal___ = preHookFunc(setting, name, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_lookup_int(setting, name, value); + } + if( HPMHooks.count.HP_libconfig_setting_lookup_int_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name, value); + } + } + return retVal___; +} +int HP_libconfig_setting_lookup_int64(const config_setting_t *setting, const char *name, long long *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_lookup_int64_pre ) { + int (*preHookFunc) (const config_setting_t *setting, const char *name, long long *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_pre[hIndex].func; + retVal___ = preHookFunc(setting, name, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_lookup_int64(setting, name, value); + } + if( HPMHooks.count.HP_libconfig_setting_lookup_int64_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, long long *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name, value); + } + } + return retVal___; +} +int HP_libconfig_setting_lookup_float(const config_setting_t *setting, const char *name, double *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_lookup_float_pre ) { + int (*preHookFunc) (const config_setting_t *setting, const char *name, double *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_pre[hIndex].func; + retVal___ = preHookFunc(setting, name, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_lookup_float(setting, name, value); + } + if( HPMHooks.count.HP_libconfig_setting_lookup_float_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, double *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name, value); + } + } + return retVal___; +} +int HP_libconfig_setting_lookup_bool(const config_setting_t *setting, const char *name, int *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_lookup_bool_pre ) { + int (*preHookFunc) (const config_setting_t *setting, const char *name, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_pre[hIndex].func; + retVal___ = preHookFunc(setting, name, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_lookup_bool(setting, name, value); + } + if( HPMHooks.count.HP_libconfig_setting_lookup_bool_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name, value); + } + } + return retVal___; +} +int HP_libconfig_setting_lookup_string(const config_setting_t *setting, const char *name, const char **value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_lookup_string_pre ) { + int (*preHookFunc) (const config_setting_t *setting, const char *name, const char **value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_pre[hIndex].func; + retVal___ = preHookFunc(setting, name, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_lookup_string(setting, name, value); + } + if( HPMHooks.count.HP_libconfig_setting_lookup_string_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, const char **value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name, value); + } + } + return retVal___; +} +int HP_libconfig_setting_set_int(config_setting_t *setting, int value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_set_int_pre ) { + int (*preHookFunc) (config_setting_t *setting, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_pre[hIndex].func; + retVal___ = preHookFunc(setting, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_int(setting, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_int_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &value); + } + } + return retVal___; +} +int HP_libconfig_setting_set_int64(config_setting_t *setting, long long value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_set_int64_pre ) { + int (*preHookFunc) (config_setting_t *setting, long long *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_pre[hIndex].func; + retVal___ = preHookFunc(setting, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_int64(setting, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_int64_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, long long *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &value); + } + } + return retVal___; +} +int HP_libconfig_setting_set_float(config_setting_t *setting, double value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_set_float_pre ) { + int (*preHookFunc) (config_setting_t *setting, double *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_pre[hIndex].func; + retVal___ = preHookFunc(setting, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_float(setting, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_float_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, double *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &value); + } + } + return retVal___; +} +int HP_libconfig_setting_set_bool(config_setting_t *setting, int value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_set_bool_pre ) { + int (*preHookFunc) (config_setting_t *setting, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_pre[hIndex].func; + retVal___ = preHookFunc(setting, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_bool(setting, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_bool_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &value); + } + } + return retVal___; +} +int HP_libconfig_setting_set_string(config_setting_t *setting, const char *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_set_string_pre ) { + int (*preHookFunc) (config_setting_t *setting, const char *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_pre[hIndex].func; + retVal___ = preHookFunc(setting, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_string(setting, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_string_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, const char *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, value); + } + } + return retVal___; +} +int HP_libconfig_setting_set_format(config_setting_t *setting, short format) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_set_format_pre ) { + int (*preHookFunc) (config_setting_t *setting, short *format); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_pre[hIndex].func; + retVal___ = preHookFunc(setting, &format); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_format(setting, format); + } + if( HPMHooks.count.HP_libconfig_setting_set_format_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, short *format); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &format); + } + } + return retVal___; +} +short HP_libconfig_setting_get_format(const config_setting_t *setting) { + int hIndex = 0; + short retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_format_pre ) { + short (*preHookFunc) (const config_setting_t *setting); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_pre[hIndex].func; + retVal___ = preHookFunc(setting); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_format(setting); + } + if( HPMHooks.count.HP_libconfig_setting_get_format_post ) { + short (*postHookFunc) (short retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); + } + } + return retVal___; +} +int HP_libconfig_setting_get_int_elem(const config_setting_t *setting, int idx) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_int_elem_pre ) { + int (*preHookFunc) (const config_setting_t *setting, int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_int_elem(setting, idx); + } + if( HPMHooks.count.HP_libconfig_setting_get_int_elem_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); + } + } + return retVal___; +} +long long HP_libconfig_setting_get_int64_elem(const config_setting_t *setting, int idx) { + int hIndex = 0; + long long retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre ) { + long long (*preHookFunc) (const config_setting_t *setting, int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_int64_elem(setting, idx); + } + if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_post ) { + long long (*postHookFunc) (long long retVal___, const config_setting_t *setting, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); + } + } + return retVal___; +} +double HP_libconfig_setting_get_float_elem(const config_setting_t *setting, int idx) { + int hIndex = 0; + double retVal___ = 0.; + if( HPMHooks.count.HP_libconfig_setting_get_float_elem_pre ) { + double (*preHookFunc) (const config_setting_t *setting, int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_float_elem(setting, idx); + } + if( HPMHooks.count.HP_libconfig_setting_get_float_elem_post ) { + double (*postHookFunc) (double retVal___, const config_setting_t *setting, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); + } + } + return retVal___; +} +int HP_libconfig_setting_get_bool_elem(const config_setting_t *setting, int idx) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre ) { + int (*preHookFunc) (const config_setting_t *setting, int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_bool_elem(setting, idx); + } + if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); + } + } + return retVal___; +} +const char* HP_libconfig_setting_get_string_elem(const config_setting_t *setting, int idx) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_get_string_elem_pre ) { + const char* (*preHookFunc) (const config_setting_t *setting, int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_string_elem(setting, idx); + } + if( HPMHooks.count.HP_libconfig_setting_get_string_elem_post ) { + const char* (*postHookFunc) (const char* retVal___, const config_setting_t *setting, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_setting_set_int_elem(config_setting_t *setting, int idx, int value) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_set_int_elem_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_int_elem(setting, idx, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_int_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx, &value); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_setting_set_int64_elem(config_setting_t *setting, int idx, long long value) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, long long *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_int64_elem(setting, idx, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, long long *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx, &value); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_setting_set_float_elem(config_setting_t *setting, int idx, double value) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_set_float_elem_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, double *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_float_elem(setting, idx, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_float_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, double *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx, &value); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_setting_set_bool_elem(config_setting_t *setting, int idx, int value) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_bool_elem(setting, idx, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx, &value); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_setting_set_string_elem(config_setting_t *setting, int idx, const char *value) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_set_string_elem_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, const char *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_string_elem(setting, idx, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_string_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, const char *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx, value); + } + } + return retVal___; +} +int HP_libconfig_setting_index(const config_setting_t *setting) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_index_pre ) { + int (*preHookFunc) (const config_setting_t *setting); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_index_pre[hIndex].func; + retVal___ = preHookFunc(setting); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_index(setting); + } + if( HPMHooks.count.HP_libconfig_setting_index_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_index_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); + } + } + return retVal___; +} +int HP_libconfig_setting_length(const config_setting_t *setting) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_length_pre ) { + int (*preHookFunc) (const config_setting_t *setting); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_length_pre[hIndex].func; + retVal___ = preHookFunc(setting); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_length(setting); + } + if( HPMHooks.count.HP_libconfig_setting_length_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_length_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_setting_get_elem(const config_setting_t *setting, unsigned int idx) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_get_elem_pre ) { + config_setting_t* (*preHookFunc) (const config_setting_t *setting, unsigned int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_elem(setting, idx); + } + if( HPMHooks.count.HP_libconfig_setting_get_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_setting_t *setting, unsigned int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_setting_get_member(const config_setting_t *setting, const char *name) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_get_member_pre ) { + config_setting_t* (*preHookFunc) (const config_setting_t *setting, const char *name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_pre[hIndex].func; + retVal___ = preHookFunc(setting, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_member(setting, name); + } + if( HPMHooks.count.HP_libconfig_setting_get_member_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_setting_t *setting, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_setting_add(config_setting_t *parent, const char *name, int type) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_add_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *parent, const char *name, int *type); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_add_pre[hIndex].func; + retVal___ = preHookFunc(parent, name, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_add(parent, name, type); + } + if( HPMHooks.count.HP_libconfig_setting_add_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *parent, const char *name, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, parent, name, &type); + } + } + return retVal___; +} +int HP_libconfig_setting_remove(config_setting_t *parent, const char *name) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_remove_pre ) { + int (*preHookFunc) (config_setting_t *parent, const char *name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_pre[hIndex].func; + retVal___ = preHookFunc(parent, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_remove(parent, name); + } + if( HPMHooks.count.HP_libconfig_setting_remove_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *parent, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_post[hIndex].func; + retVal___ = postHookFunc(retVal___, parent, name); + } + } + return retVal___; +} +int HP_libconfig_setting_remove_elem(config_setting_t *parent, unsigned int idx) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_remove_elem_pre ) { + int (*preHookFunc) (config_setting_t *parent, unsigned int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_pre[hIndex].func; + retVal___ = preHookFunc(parent, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_remove_elem(parent, idx); + } + if( HPMHooks.count.HP_libconfig_setting_remove_elem_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *parent, unsigned int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, parent, &idx); + } + } + return retVal___; +} +void HP_libconfig_setting_set_hook(config_setting_t *setting, void *hook) { + int hIndex = 0; + if( HPMHooks.count.HP_libconfig_setting_set_hook_pre ) { + void (*preHookFunc) (config_setting_t *setting, void *hook); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_pre[hIndex].func; + preHookFunc(setting, hook); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.setting_set_hook(setting, hook); + } + if( HPMHooks.count.HP_libconfig_setting_set_hook_post ) { + void (*postHookFunc) (config_setting_t *setting, void *hook); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_post[hIndex].func; + postHookFunc(setting, hook); + } + } + return; +} +config_setting_t* HP_libconfig_lookup(const config_t *config, const char *filepath) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_lookup_pre ) { + config_setting_t* (*preHookFunc) (const config_t *config, const char *filepath); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.lookup(config, filepath); + } + if( HPMHooks.count.HP_libconfig_lookup_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_t *config, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_lookup_from(config_setting_t *setting, const char *filepath) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_lookup_from_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, const char *filepath); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_from_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_from_pre[hIndex].func; + retVal___ = preHookFunc(setting, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.lookup_from(setting, filepath); + } + if( HPMHooks.count.HP_libconfig_lookup_from_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_from_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_from_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, filepath); + } + } + return retVal___; +} +int HP_libconfig_lookup_int(const config_t *config, const char *filepath, int *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_lookup_int_pre ) { + int (*preHookFunc) (const config_t *config, const char *filepath, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_int_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.lookup_int(config, filepath, value); + } + if( HPMHooks.count.HP_libconfig_lookup_int_post ) { + int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_int_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath, value); + } + } + return retVal___; +} +int HP_libconfig_lookup_int64(const config_t *config, const char *filepath, long long *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_lookup_int64_pre ) { + int (*preHookFunc) (const config_t *config, const char *filepath, long long *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.lookup_int64(config, filepath, value); + } + if( HPMHooks.count.HP_libconfig_lookup_int64_post ) { + int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, long long *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath, value); + } + } + return retVal___; +} +int HP_libconfig_lookup_float(const config_t *config, const char *filepath, double *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_lookup_float_pre ) { + int (*preHookFunc) (const config_t *config, const char *filepath, double *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_float_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.lookup_float(config, filepath, value); + } + if( HPMHooks.count.HP_libconfig_lookup_float_post ) { + int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, double *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_float_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath, value); + } + } + return retVal___; +} +int HP_libconfig_lookup_bool(const config_t *config, const char *filepath, int *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_lookup_bool_pre ) { + int (*preHookFunc) (const config_t *config, const char *filepath, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.lookup_bool(config, filepath, value); + } + if( HPMHooks.count.HP_libconfig_lookup_bool_post ) { + int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath, value); + } + } + return retVal___; +} +int HP_libconfig_lookup_string(const config_t *config, const char *filepath, const char **value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_lookup_string_pre ) { + int (*preHookFunc) (const config_t *config, const char *filepath, const char **value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_string_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.lookup_string(config, filepath, value); + } + if( HPMHooks.count.HP_libconfig_lookup_string_post ) { + int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, const char **value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_string_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath, value); + } + } + return retVal___; +} +int HP_libconfig_read_file(config_t *config, const char *config_filename) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_read_file_pre ) { + int (*preHookFunc) (config_t *config, const char *config_filename); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_read_file_pre[hIndex].func; + retVal___ = preHookFunc(config, config_filename); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.read_file(config, config_filename); + } + if( HPMHooks.count.HP_libconfig_read_file_post ) { + int (*postHookFunc) (int retVal___, config_t *config, const char *config_filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_read_file_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, config_filename); + } + } + return retVal___; +} +void HP_libconfig_setting_copy_simple(config_setting_t *parent, const config_setting_t *src) { + int hIndex = 0; + if( HPMHooks.count.HP_libconfig_setting_copy_simple_pre ) { + void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_pre[hIndex].func; + preHookFunc(parent, src); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.setting_copy_simple(parent, src); + } + if( HPMHooks.count.HP_libconfig_setting_copy_simple_post ) { + void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_post[hIndex].func; + postHookFunc(parent, src); + } + } + return; +} +void HP_libconfig_setting_copy_elem(config_setting_t *parent, const config_setting_t *src) { + int hIndex = 0; + if( HPMHooks.count.HP_libconfig_setting_copy_elem_pre ) { + void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_pre[hIndex].func; + preHookFunc(parent, src); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.setting_copy_elem(parent, src); + } + if( HPMHooks.count.HP_libconfig_setting_copy_elem_post ) { + void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_post[hIndex].func; + postHookFunc(parent, src); + } + } + return; +} +void HP_libconfig_setting_copy_aggregate(config_setting_t *parent, const config_setting_t *src) { + int hIndex = 0; + if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre ) { + void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_pre[hIndex].func; + preHookFunc(parent, src); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.setting_copy_aggregate(parent, src); + } + if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_post ) { + void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_post[hIndex].func; + postHookFunc(parent, src); + } + } + return; +} +int HP_libconfig_setting_copy(config_setting_t *parent, const config_setting_t *src) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_copy_pre ) { + int (*preHookFunc) (config_setting_t *parent, const config_setting_t *src); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_pre[hIndex].func; + retVal___ = preHookFunc(parent, src); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_copy(parent, src); + } + if( HPMHooks.count.HP_libconfig_setting_copy_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *parent, const config_setting_t *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, parent, src); + } + } + return retVal___; +} +/* loginif */ +void HP_loginif_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_loginif_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_loginif_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.loginif.init(); + } + if( HPMHooks.count.HP_loginif_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_loginif_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_loginif_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_loginif_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_loginif_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.loginif.final(); + } + if( HPMHooks.count.HP_loginif_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_loginif_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_loginif_reset(void) { + int hIndex = 0; + if( HPMHooks.count.HP_loginif_reset_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_reset_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_loginif_reset_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.loginif.reset(); + } + if( HPMHooks.count.HP_loginif_reset_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_reset_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_loginif_reset_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_loginif_check_shutdown(void) { + int hIndex = 0; + if( HPMHooks.count.HP_loginif_check_shutdown_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_check_shutdown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_loginif_check_shutdown_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.loginif.check_shutdown(); + } + if( HPMHooks.count.HP_loginif_check_shutdown_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_check_shutdown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_loginif_check_shutdown_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_loginif_on_disconnect(void) { + int hIndex = 0; + if( HPMHooks.count.HP_loginif_on_disconnect_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_disconnect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_loginif_on_disconnect_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.loginif.on_disconnect(); + } + if( HPMHooks.count.HP_loginif_on_disconnect_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_disconnect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_loginif_on_disconnect_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_loginif_on_ready(void) { + int hIndex = 0; + if( HPMHooks.count.HP_loginif_on_ready_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_ready_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_loginif_on_ready_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.loginif.on_ready(); + } + if( HPMHooks.count.HP_loginif_on_ready_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_ready_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_loginif_on_ready_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_loginif_block_account(int account_id, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_loginif_block_account_pre ) { + void (*preHookFunc) (int *account_id, int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_block_account_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_loginif_block_account_pre[hIndex].func; + preHookFunc(&account_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.loginif.block_account(account_id, flag); + } + if( HPMHooks.count.HP_loginif_block_account_post ) { + void (*postHookFunc) (int *account_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_block_account_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_loginif_block_account_post[hIndex].func; + postHookFunc(&account_id, &flag); + } + } + return; +} +void HP_loginif_ban_account(int account_id, short year, short month, short day, short hour, short minute, short second) { + int hIndex = 0; + if( HPMHooks.count.HP_loginif_ban_account_pre ) { + void (*preHookFunc) (int *account_id, short *year, short *month, short *day, short *hour, short *minute, short *second); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_ban_account_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_loginif_ban_account_pre[hIndex].func; + preHookFunc(&account_id, &year, &month, &day, &hour, &minute, &second); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.loginif.ban_account(account_id, year, month, day, hour, minute, second); + } + if( HPMHooks.count.HP_loginif_ban_account_post ) { + void (*postHookFunc) (int *account_id, short *year, short *month, short *day, short *hour, short *minute, short *second); + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_ban_account_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_loginif_ban_account_post[hIndex].func; + postHookFunc(&account_id, &year, &month, &day, &hour, &minute, &second); + } + } + return; +} +void HP_loginif_unban_account(int account_id) { + int hIndex = 0; + if( HPMHooks.count.HP_loginif_unban_account_pre ) { + void (*preHookFunc) (int *account_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_unban_account_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_loginif_unban_account_pre[hIndex].func; + preHookFunc(&account_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.loginif.unban_account(account_id); + } + if( HPMHooks.count.HP_loginif_unban_account_post ) { + void (*postHookFunc) (int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_unban_account_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_loginif_unban_account_post[hIndex].func; + postHookFunc(&account_id); + } + } + return; +} +void HP_loginif_changesex(int account_id) { + int hIndex = 0; + if( HPMHooks.count.HP_loginif_changesex_pre ) { + void (*preHookFunc) (int *account_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_changesex_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_loginif_changesex_pre[hIndex].func; + preHookFunc(&account_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.loginif.changesex(account_id); + } + if( HPMHooks.count.HP_loginif_changesex_post ) { + void (*postHookFunc) (int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_changesex_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_loginif_changesex_post[hIndex].func; + postHookFunc(&account_id); + } + } + return; +} +void HP_loginif_auth(int fd, struct char_session_data *sd, uint32 ipl) { + int hIndex = 0; + if( HPMHooks.count.HP_loginif_auth_pre ) { + void (*preHookFunc) (int *fd, struct char_session_data *sd, uint32 *ipl); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_auth_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_loginif_auth_pre[hIndex].func; + preHookFunc(&fd, sd, &ipl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.loginif.auth(fd, sd, ipl); + } + if( HPMHooks.count.HP_loginif_auth_post ) { + void (*postHookFunc) (int *fd, struct char_session_data *sd, uint32 *ipl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_auth_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_loginif_auth_post[hIndex].func; + postHookFunc(&fd, sd, &ipl); + } + } + return; +} +void HP_loginif_send_users_count(int users) { + int hIndex = 0; + if( HPMHooks.count.HP_loginif_send_users_count_pre ) { + void (*preHookFunc) (int *users); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_send_users_count_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_loginif_send_users_count_pre[hIndex].func; + preHookFunc(&users); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.loginif.send_users_count(users); + } + if( HPMHooks.count.HP_loginif_send_users_count_post ) { + void (*postHookFunc) (int *users); + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_send_users_count_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_loginif_send_users_count_post[hIndex].func; + postHookFunc(&users); + } + } + return; +} +void HP_loginif_connect_to_server(void) { + int hIndex = 0; + if( HPMHooks.count.HP_loginif_connect_to_server_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_connect_to_server_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_loginif_connect_to_server_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.loginif.connect_to_server(); + } + if( HPMHooks.count.HP_loginif_connect_to_server_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_connect_to_server_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_loginif_connect_to_server_post[hIndex].func; + postHookFunc(); + } + } + return; +} +/* iMalloc */ +void HP_iMalloc_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.init(); + } + if( HPMHooks.count.HP_iMalloc_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_iMalloc_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.final(); + } + if( HPMHooks.count.HP_iMalloc_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void* HP_iMalloc_malloc(size_t size, const char *file, int line, const char *func) { + int hIndex = 0; + void* retVal___ = NULL; + if( HPMHooks.count.HP_iMalloc_malloc_pre ) { + void* (*preHookFunc) (size_t *size, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_malloc_pre[hIndex].func; + retVal___ = preHookFunc(&size, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.malloc(size, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_malloc_post ) { + void* (*postHookFunc) (void* retVal___, size_t *size, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_malloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &size, file, &line, func); + } + } + return retVal___; +} +void* HP_iMalloc_calloc(size_t num, size_t size, const char *file, int line, const char *func) { + int hIndex = 0; + void* retVal___ = NULL; + if( HPMHooks.count.HP_iMalloc_calloc_pre ) { + void* (*preHookFunc) (size_t *num, size_t *size, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_calloc_pre[hIndex].func; + retVal___ = preHookFunc(&num, &size, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.calloc(num, size, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_calloc_post ) { + void* (*postHookFunc) (void* retVal___, size_t *num, size_t *size, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_calloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &num, &size, file, &line, func); + } + } + return retVal___; +} +void* HP_iMalloc_realloc(void *p, size_t size, const char *file, int line, const char *func) { + int hIndex = 0; + void* retVal___ = NULL; + if( HPMHooks.count.HP_iMalloc_realloc_pre ) { + void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_realloc_pre[hIndex].func; + retVal___ = preHookFunc(p, &size, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.realloc(p, size, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_realloc_post ) { + void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_realloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, &size, file, &line, func); + } + } + return retVal___; +} +void* HP_iMalloc_reallocz(void *p, size_t size, const char *file, int line, const char *func) { + int hIndex = 0; + void* retVal___ = NULL; + if( HPMHooks.count.HP_iMalloc_reallocz_pre ) { + void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_reallocz_pre[hIndex].func; + retVal___ = preHookFunc(p, &size, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.reallocz(p, size, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_reallocz_post ) { + void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_reallocz_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, &size, file, &line, func); + } + } + return retVal___; +} +char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *func) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_iMalloc_astrdup_pre ) { + char* (*preHookFunc) (const char *p, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_astrdup_pre[hIndex].func; + retVal___ = preHookFunc(p, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.astrdup(p, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_astrdup_post ) { + char* (*postHookFunc) (char* retVal___, const char *p, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_astrdup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, file, &line, func); + } + } + return retVal___; +} +void HP_iMalloc_free(void *p, const char *file, int line, const char *func) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_free_pre ) { + void (*preHookFunc) (void *p, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_free_pre[hIndex].func; + preHookFunc(p, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.free(p, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_free_post ) { + void (*postHookFunc) (void *p, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_free_post[hIndex].func; + postHookFunc(p, file, &line, func); + } + } + return; +} +void HP_iMalloc_memory_check(void) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_memory_check_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_memory_check_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.memory_check(); + } + if( HPMHooks.count.HP_iMalloc_memory_check_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_memory_check_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_iMalloc_verify_ptr(void *ptr) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_iMalloc_verify_ptr_pre ) { + bool (*preHookFunc) (void *ptr); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_pre[hIndex].func; + retVal___ = preHookFunc(ptr); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.verify_ptr(ptr); + } + if( HPMHooks.count.HP_iMalloc_verify_ptr_post ) { + bool (*postHookFunc) (bool retVal___, void *ptr); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ptr); + } + } + return retVal___; +} +size_t HP_iMalloc_usage(void) { + int hIndex = 0; + size_t retVal___ = 0; + if( HPMHooks.count.HP_iMalloc_usage_pre ) { + size_t (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_usage_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.usage(); + } + if( HPMHooks.count.HP_iMalloc_usage_post ) { + size_t (*postHookFunc) (size_t retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_usage_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_iMalloc_post_shutdown(void) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_post_shutdown_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.post_shutdown(); + } + if( HPMHooks.count.HP_iMalloc_post_shutdown_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_iMalloc_init_messages(void) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_init_messages_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_init_messages_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.init_messages(); + } + if( HPMHooks.count.HP_iMalloc_init_messages_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_init_messages_post[hIndex].func; + postHookFunc(); + } + } + return; +} +/* mapif */ +void HP_mapif_ban(int id, unsigned int flag, int status) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_ban_pre ) { + void (*preHookFunc) (int *id, unsigned int *flag, int *status); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_ban_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_ban_pre[hIndex].func; + preHookFunc(&id, &flag, &status); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.ban(id, flag, status); + } + if( HPMHooks.count.HP_mapif_ban_post ) { + void (*postHookFunc) (int *id, unsigned int *flag, int *status); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_ban_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_ban_post[hIndex].func; + postHookFunc(&id, &flag, &status); + } + } + return; +} +void HP_mapif_server_init(int id) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_server_init_pre ) { + void (*preHookFunc) (int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_server_init_pre[hIndex].func; + preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.server_init(id); + } + if( HPMHooks.count.HP_mapif_server_init_post ) { + void (*postHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_server_init_post[hIndex].func; + postHookFunc(&id); + } + } + return; +} +void HP_mapif_server_destroy(int id) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_server_destroy_pre ) { + void (*preHookFunc) (int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_destroy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_server_destroy_pre[hIndex].func; + preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.server_destroy(id); + } + if( HPMHooks.count.HP_mapif_server_destroy_post ) { + void (*postHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_destroy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_server_destroy_post[hIndex].func; + postHookFunc(&id); + } + } + return; +} +void HP_mapif_server_reset(int id) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_server_reset_pre ) { + void (*preHookFunc) (int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_reset_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_server_reset_pre[hIndex].func; + preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.server_reset(id); + } + if( HPMHooks.count.HP_mapif_server_reset_post ) { + void (*postHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_reset_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_server_reset_post[hIndex].func; + postHookFunc(&id); + } + } + return; +} +void HP_mapif_on_disconnect(int id) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_on_disconnect_pre ) { + void (*preHookFunc) (int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_disconnect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_on_disconnect_pre[hIndex].func; + preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.on_disconnect(id); + } + if( HPMHooks.count.HP_mapif_on_disconnect_post ) { + void (*postHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_disconnect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_on_disconnect_post[hIndex].func; + postHookFunc(&id); + } + } + return; +} +void HP_mapif_on_parse_accinfo(int account_id, int u_fd, int u_aid, int u_group, int map_fd) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_on_parse_accinfo_pre ) { + void (*preHookFunc) (int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_parse_accinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_on_parse_accinfo_pre[hIndex].func; + preHookFunc(&account_id, &u_fd, &u_aid, &u_group, &map_fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.on_parse_accinfo(account_id, u_fd, u_aid, u_group, map_fd); + } + if( HPMHooks.count.HP_mapif_on_parse_accinfo_post ) { + void (*postHookFunc) (int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_parse_accinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_on_parse_accinfo_post[hIndex].func; + postHookFunc(&account_id, &u_fd, &u_aid, &u_group, &map_fd); + } + } + return; +} +void HP_mapif_char_ban(int char_id, time_t timestamp) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_char_ban_pre ) { + void (*preHookFunc) (int *char_id, time_t *timestamp); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_char_ban_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_char_ban_pre[hIndex].func; + preHookFunc(&char_id, ×tamp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.char_ban(char_id, timestamp); + } + if( HPMHooks.count.HP_mapif_char_ban_post ) { + void (*postHookFunc) (int *char_id, time_t *timestamp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_char_ban_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_char_ban_post[hIndex].func; + postHookFunc(&char_id, ×tamp); + } + } + return; +} +int HP_mapif_sendall(unsigned char *buf, unsigned int len) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_sendall_pre ) { + int (*preHookFunc) (unsigned char *buf, unsigned int *len); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendall_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_sendall_pre[hIndex].func; + retVal___ = preHookFunc(buf, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.sendall(buf, len); + } + if( HPMHooks.count.HP_mapif_sendall_post ) { + int (*postHookFunc) (int retVal___, unsigned char *buf, unsigned int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendall_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_sendall_post[hIndex].func; + retVal___ = postHookFunc(retVal___, buf, &len); + } + } + return retVal___; +} +int HP_mapif_sendallwos(int sfd, unsigned char *buf, unsigned int len) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_sendallwos_pre ) { + int (*preHookFunc) (int *sfd, unsigned char *buf, unsigned int *len); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendallwos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_sendallwos_pre[hIndex].func; + retVal___ = preHookFunc(&sfd, buf, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.sendallwos(sfd, buf, len); + } + if( HPMHooks.count.HP_mapif_sendallwos_post ) { + int (*postHookFunc) (int retVal___, int *sfd, unsigned char *buf, unsigned int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendallwos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_sendallwos_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &sfd, buf, &len); + } + } + return retVal___; +} +int HP_mapif_send(int fd, unsigned char *buf, unsigned int len) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_send_pre ) { + int (*preHookFunc) (int *fd, unsigned char *buf, unsigned int *len); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_send_pre[hIndex].func; + retVal___ = preHookFunc(&fd, buf, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.send(fd, buf, len); + } + if( HPMHooks.count.HP_mapif_send_post ) { + int (*postHookFunc) (int retVal___, int *fd, unsigned char *buf, unsigned int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_send_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, buf, &len); + } + } + return retVal___; +} +void HP_mapif_send_users_count(int users) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_send_users_count_pre ) { + void (*preHookFunc) (int *users); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_users_count_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_send_users_count_pre[hIndex].func; + preHookFunc(&users); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.send_users_count(users); + } + if( HPMHooks.count.HP_mapif_send_users_count_post ) { + void (*postHookFunc) (int *users); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_users_count_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_send_users_count_post[hIndex].func; + postHookFunc(&users); + } + } + return; +} +void HP_mapif_auction_message(int char_id, unsigned char result) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_auction_message_pre ) { + void (*preHookFunc) (int *char_id, unsigned char *result); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_auction_message_pre[hIndex].func; + preHookFunc(&char_id, &result); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.auction_message(char_id, result); + } + if( HPMHooks.count.HP_mapif_auction_message_post ) { + void (*postHookFunc) (int *char_id, unsigned char *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_auction_message_post[hIndex].func; + postHookFunc(&char_id, &result); + } + } + return; +} +void HP_mapif_auction_sendlist(int fd, int char_id, short count, short pages, unsigned char *buf) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_auction_sendlist_pre ) { + void (*preHookFunc) (int *fd, int *char_id, short *count, short *pages, unsigned char *buf); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_sendlist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_auction_sendlist_pre[hIndex].func; + preHookFunc(&fd, &char_id, &count, &pages, buf); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.auction_sendlist(fd, char_id, count, pages, buf); + } + if( HPMHooks.count.HP_mapif_auction_sendlist_post ) { + void (*postHookFunc) (int *fd, int *char_id, short *count, short *pages, unsigned char *buf); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_sendlist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_auction_sendlist_post[hIndex].func; + postHookFunc(&fd, &char_id, &count, &pages, buf); + } + } + return; +} +void HP_mapif_parse_auction_requestlist(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_auction_requestlist_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_requestlist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_auction_requestlist_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_auction_requestlist(fd); + } + if( HPMHooks.count.HP_mapif_parse_auction_requestlist_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_requestlist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_auction_requestlist_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_mapif_auction_register(int fd, struct auction_data *auction) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_auction_register_pre ) { + void (*preHookFunc) (int *fd, struct auction_data *auction); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_register_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_auction_register_pre[hIndex].func; + preHookFunc(&fd, auction); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.auction_register(fd, auction); + } + if( HPMHooks.count.HP_mapif_auction_register_post ) { + void (*postHookFunc) (int *fd, struct auction_data *auction); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_register_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_auction_register_post[hIndex].func; + postHookFunc(&fd, auction); + } + } + return; +} +void HP_mapif_parse_auction_register(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_auction_register_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_register_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_auction_register_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_auction_register(fd); + } + if( HPMHooks.count.HP_mapif_parse_auction_register_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_register_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_auction_register_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_mapif_auction_cancel(int fd, int char_id, unsigned char result) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_auction_cancel_pre ) { + void (*preHookFunc) (int *fd, int *char_id, unsigned char *result); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_cancel_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_auction_cancel_pre[hIndex].func; + preHookFunc(&fd, &char_id, &result); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.auction_cancel(fd, char_id, result); + } + if( HPMHooks.count.HP_mapif_auction_cancel_post ) { + void (*postHookFunc) (int *fd, int *char_id, unsigned char *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_cancel_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_auction_cancel_post[hIndex].func; + postHookFunc(&fd, &char_id, &result); + } + } + return; +} +void HP_mapif_parse_auction_cancel(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_auction_cancel_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_cancel_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_auction_cancel_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_auction_cancel(fd); + } + if( HPMHooks.count.HP_mapif_parse_auction_cancel_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_cancel_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_auction_cancel_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_mapif_auction_close(int fd, int char_id, unsigned char result) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_auction_close_pre ) { + void (*preHookFunc) (int *fd, int *char_id, unsigned char *result); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_auction_close_pre[hIndex].func; + preHookFunc(&fd, &char_id, &result); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.auction_close(fd, char_id, result); + } + if( HPMHooks.count.HP_mapif_auction_close_post ) { + void (*postHookFunc) (int *fd, int *char_id, unsigned char *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_auction_close_post[hIndex].func; + postHookFunc(&fd, &char_id, &result); + } + } + return; +} +void HP_mapif_parse_auction_close(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_auction_close_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_auction_close_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_auction_close(fd); + } + if( HPMHooks.count.HP_mapif_parse_auction_close_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_auction_close_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_mapif_auction_bid(int fd, int char_id, int bid, unsigned char result) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_auction_bid_pre ) { + void (*preHookFunc) (int *fd, int *char_id, int *bid, unsigned char *result); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_bid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_auction_bid_pre[hIndex].func; + preHookFunc(&fd, &char_id, &bid, &result); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.auction_bid(fd, char_id, bid, result); + } + if( HPMHooks.count.HP_mapif_auction_bid_post ) { + void (*postHookFunc) (int *fd, int *char_id, int *bid, unsigned char *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_bid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_auction_bid_post[hIndex].func; + postHookFunc(&fd, &char_id, &bid, &result); + } + } + return; +} +void HP_mapif_parse_auction_bid(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_auction_bid_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_bid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_auction_bid_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_auction_bid(fd); + } + if( HPMHooks.count.HP_mapif_parse_auction_bid_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_bid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_auction_bid_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +bool HP_mapif_elemental_save(struct s_elemental *ele) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mapif_elemental_save_pre ) { + bool (*preHookFunc) (struct s_elemental *ele); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_elemental_save_pre[hIndex].func; + retVal___ = preHookFunc(ele); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.elemental_save(ele); + } + if( HPMHooks.count.HP_mapif_elemental_save_post ) { + bool (*postHookFunc) (bool retVal___, struct s_elemental *ele); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_elemental_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ele); + } + } + return retVal___; +} +bool HP_mapif_elemental_load(int ele_id, int char_id, struct s_elemental *ele) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mapif_elemental_load_pre ) { + bool (*preHookFunc) (int *ele_id, int *char_id, struct s_elemental *ele); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_elemental_load_pre[hIndex].func; + retVal___ = preHookFunc(&ele_id, &char_id, ele); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.elemental_load(ele_id, char_id, ele); + } + if( HPMHooks.count.HP_mapif_elemental_load_post ) { + bool (*postHookFunc) (bool retVal___, int *ele_id, int *char_id, struct s_elemental *ele); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_elemental_load_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ele_id, &char_id, ele); + } + } + return retVal___; +} +bool HP_mapif_elemental_delete(int ele_id) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mapif_elemental_delete_pre ) { + bool (*preHookFunc) (int *ele_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_elemental_delete_pre[hIndex].func; + retVal___ = preHookFunc(&ele_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.elemental_delete(ele_id); + } + if( HPMHooks.count.HP_mapif_elemental_delete_post ) { + bool (*postHookFunc) (bool retVal___, int *ele_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_elemental_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ele_id); + } + } + return retVal___; +} +void HP_mapif_elemental_send(int fd, struct s_elemental *ele, unsigned char flag) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_elemental_send_pre ) { + void (*preHookFunc) (int *fd, struct s_elemental *ele, unsigned char *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_send_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_elemental_send_pre[hIndex].func; + preHookFunc(&fd, ele, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.elemental_send(fd, ele, flag); + } + if( HPMHooks.count.HP_mapif_elemental_send_post ) { + void (*postHookFunc) (int *fd, struct s_elemental *ele, unsigned char *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_send_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_elemental_send_post[hIndex].func; + postHookFunc(&fd, ele, &flag); + } + } + return; +} +void HP_mapif_parse_elemental_create(int fd, struct s_elemental *ele) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_elemental_create_pre ) { + void (*preHookFunc) (int *fd, struct s_elemental *ele); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_create_pre[hIndex].func; + preHookFunc(&fd, ele); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_elemental_create(fd, ele); + } + if( HPMHooks.count.HP_mapif_parse_elemental_create_post ) { + void (*postHookFunc) (int *fd, struct s_elemental *ele); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_create_post[hIndex].func; + postHookFunc(&fd, ele); + } + } + return; +} +void HP_mapif_parse_elemental_load(int fd, int ele_id, int char_id) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_elemental_load_pre ) { + void (*preHookFunc) (int *fd, int *ele_id, int *char_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_load_pre[hIndex].func; + preHookFunc(&fd, &ele_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_elemental_load(fd, ele_id, char_id); + } + if( HPMHooks.count.HP_mapif_parse_elemental_load_post ) { + void (*postHookFunc) (int *fd, int *ele_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_load_post[hIndex].func; + postHookFunc(&fd, &ele_id, &char_id); + } + } + return; +} +void HP_mapif_elemental_deleted(int fd, unsigned char flag) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_elemental_deleted_pre ) { + void (*preHookFunc) (int *fd, unsigned char *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_deleted_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_elemental_deleted_pre[hIndex].func; + preHookFunc(&fd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.elemental_deleted(fd, flag); + } + if( HPMHooks.count.HP_mapif_elemental_deleted_post ) { + void (*postHookFunc) (int *fd, unsigned char *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_deleted_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_elemental_deleted_post[hIndex].func; + postHookFunc(&fd, &flag); + } + } + return; +} +void HP_mapif_parse_elemental_delete(int fd, int ele_id) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_elemental_delete_pre ) { + void (*preHookFunc) (int *fd, int *ele_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_delete_pre[hIndex].func; + preHookFunc(&fd, &ele_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_elemental_delete(fd, ele_id); + } + if( HPMHooks.count.HP_mapif_parse_elemental_delete_post ) { + void (*postHookFunc) (int *fd, int *ele_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_delete_post[hIndex].func; + postHookFunc(&fd, &ele_id); + } + } + return; +} +void HP_mapif_elemental_saved(int fd, unsigned char flag) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_elemental_saved_pre ) { + void (*preHookFunc) (int *fd, unsigned char *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_saved_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_elemental_saved_pre[hIndex].func; + preHookFunc(&fd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.elemental_saved(fd, flag); + } + if( HPMHooks.count.HP_mapif_elemental_saved_post ) { + void (*postHookFunc) (int *fd, unsigned char *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_saved_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_elemental_saved_post[hIndex].func; + postHookFunc(&fd, &flag); + } + } + return; +} +void HP_mapif_parse_elemental_save(int fd, struct s_elemental *ele) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_elemental_save_pre ) { + void (*preHookFunc) (int *fd, struct s_elemental *ele); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_save_pre[hIndex].func; + preHookFunc(&fd, ele); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_elemental_save(fd, ele); + } + if( HPMHooks.count.HP_mapif_parse_elemental_save_post ) { + void (*postHookFunc) (int *fd, struct s_elemental *ele); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_save_post[hIndex].func; + postHookFunc(&fd, ele); + } + } + return; +} +int HP_mapif_guild_created(int fd, int account_id, struct guild *g) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_created_pre ) { + int (*preHookFunc) (int *fd, int *account_id, struct guild *g); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_created_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_created_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id, g); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_created(fd, account_id, g); + } + if( HPMHooks.count.HP_mapif_guild_created_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *account_id, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_created_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_created_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &account_id, g); + } + } + return retVal___; +} +int HP_mapif_guild_noinfo(int fd, int guild_id) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_noinfo_pre ) { + int (*preHookFunc) (int *fd, int *guild_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_noinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_noinfo_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_noinfo(fd, guild_id); + } + if( HPMHooks.count.HP_mapif_guild_noinfo_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_noinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_noinfo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &guild_id); + } + } + return retVal___; +} +int HP_mapif_guild_info(int fd, struct guild *g) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_info_pre ) { + int (*preHookFunc) (int *fd, struct guild *g); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_info_pre[hIndex].func; + retVal___ = preHookFunc(&fd, g); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_info(fd, g); + } + if( HPMHooks.count.HP_mapif_guild_info_post ) { + int (*postHookFunc) (int retVal___, int *fd, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_info_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, g); + } + } + return retVal___; +} +int HP_mapif_guild_memberadded(int fd, int guild_id, int account_id, int char_id, int flag) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_memberadded_pre ) { + int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberadded_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_memberadded_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_memberadded(fd, guild_id, account_id, char_id, flag); + } + if( HPMHooks.count.HP_mapif_guild_memberadded_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *account_id, int *char_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberadded_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_memberadded_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &guild_id, &account_id, &char_id, &flag); + } + } + return retVal___; +} +int HP_mapif_guild_withdraw(int guild_id, int account_id, int char_id, int flag, const char *name, const char *mes) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_withdraw_pre ) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char *name, const char *mes); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_withdraw_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_withdraw_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag, name, mes); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_withdraw(guild_id, account_id, char_id, flag, name, mes); + } + if( HPMHooks.count.HP_mapif_guild_withdraw_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, int *flag, const char *name, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_withdraw_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_withdraw_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &flag, name, mes); + } + } + return retVal___; +} +int HP_mapif_guild_memberinfoshort(struct guild *g, int idx) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_memberinfoshort_pre ) { + int (*preHookFunc) (struct guild *g, int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfoshort_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_memberinfoshort_pre[hIndex].func; + retVal___ = preHookFunc(g, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_memberinfoshort(g, idx); + } + if( HPMHooks.count.HP_mapif_guild_memberinfoshort_post ) { + int (*postHookFunc) (int retVal___, struct guild *g, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfoshort_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_memberinfoshort_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g, &idx); + } + } + return retVal___; +} +int HP_mapif_guild_broken(int guild_id, int flag) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_broken_pre ) { + int (*preHookFunc) (int *guild_id, int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_broken_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_broken_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_broken(guild_id, flag); + } + if( HPMHooks.count.HP_mapif_guild_broken_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_broken_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_broken_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &flag); + } + } + return retVal___; +} +int HP_mapif_guild_message(int guild_id, int account_id, char *mes, int len, int sfd) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_message_pre ) { + int (*preHookFunc) (int *guild_id, int *account_id, char *mes, int *len, int *sfd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_message_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, mes, &len, &sfd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_message(guild_id, account_id, mes, len, sfd); + } + if( HPMHooks.count.HP_mapif_guild_message_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, char *mes, int *len, int *sfd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, mes, &len, &sfd); + } + } + return retVal___; +} +int HP_mapif_guild_basicinfochanged(int guild_id, int type, const void *data, int len) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_basicinfochanged_pre ) { + int (*preHookFunc) (int *guild_id, int *type, const void *data, int *len); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_basicinfochanged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_basicinfochanged_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &type, data, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_basicinfochanged(guild_id, type, data, len); + } + if( HPMHooks.count.HP_mapif_guild_basicinfochanged_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *type, const void *data, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_basicinfochanged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_basicinfochanged_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &type, data, &len); + } + } + return retVal___; +} +int HP_mapif_guild_memberinfochanged(int guild_id, int account_id, int char_id, int type, const void *data, int len) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_memberinfochanged_pre ) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *type, const void *data, int *len); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfochanged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_memberinfochanged_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &type, data, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_memberinfochanged(guild_id, account_id, char_id, type, data, len); + } + if( HPMHooks.count.HP_mapif_guild_memberinfochanged_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, int *type, const void *data, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfochanged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_memberinfochanged_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &type, data, &len); + } + } + return retVal___; +} +int HP_mapif_guild_skillupack(int guild_id, uint16 skill_id, int account_id) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_skillupack_pre ) { + int (*preHookFunc) (int *guild_id, uint16 *skill_id, int *account_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_skillupack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_skillupack_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &skill_id, &account_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_skillupack(guild_id, skill_id, account_id); + } + if( HPMHooks.count.HP_mapif_guild_skillupack_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, uint16 *skill_id, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_skillupack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_skillupack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &skill_id, &account_id); + } + } + return retVal___; +} +int HP_mapif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int account_id2, int flag, const char *name1, const char *name2) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_alliance_pre ) { + int (*preHookFunc) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag, const char *name1, const char *name2); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_alliance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_alliance_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id1, &guild_id2, &account_id1, &account_id2, &flag, name1, name2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_alliance(guild_id1, guild_id2, account_id1, account_id2, flag, name1, name2); + } + if( HPMHooks.count.HP_mapif_guild_alliance_post ) { + int (*postHookFunc) (int retVal___, int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag, const char *name1, const char *name2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_alliance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_alliance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id1, &guild_id2, &account_id1, &account_id2, &flag, name1, name2); + } + } + return retVal___; +} +int HP_mapif_guild_position(struct guild *g, int idx) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_position_pre ) { + int (*preHookFunc) (struct guild *g, int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_position_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_position_pre[hIndex].func; + retVal___ = preHookFunc(g, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_position(g, idx); + } + if( HPMHooks.count.HP_mapif_guild_position_post ) { + int (*postHookFunc) (int retVal___, struct guild *g, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_position_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_position_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g, &idx); + } + } + return retVal___; +} +int HP_mapif_guild_notice(struct guild *g) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_notice_pre ) { + int (*preHookFunc) (struct guild *g); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_notice_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_notice_pre[hIndex].func; + retVal___ = preHookFunc(g); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_notice(g); + } + if( HPMHooks.count.HP_mapif_guild_notice_post ) { + int (*postHookFunc) (int retVal___, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_notice_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_notice_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g); + } + } + return retVal___; +} +int HP_mapif_guild_emblem(struct guild *g) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_emblem_pre ) { + int (*preHookFunc) (struct guild *g); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_emblem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_emblem_pre[hIndex].func; + retVal___ = preHookFunc(g); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_emblem(g); + } + if( HPMHooks.count.HP_mapif_guild_emblem_post ) { + int (*postHookFunc) (int retVal___, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_emblem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_emblem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g); + } + } + return retVal___; +} +int HP_mapif_guild_master_changed(struct guild *g, int aid, int cid) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_master_changed_pre ) { + int (*preHookFunc) (struct guild *g, int *aid, int *cid); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_master_changed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_master_changed_pre[hIndex].func; + retVal___ = preHookFunc(g, &aid, &cid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_master_changed(g, aid, cid); + } + if( HPMHooks.count.HP_mapif_guild_master_changed_post ) { + int (*postHookFunc) (int retVal___, struct guild *g, int *aid, int *cid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_master_changed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_master_changed_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g, &aid, &cid); + } + } + return retVal___; +} +int HP_mapif_guild_castle_dataload(int fd, int sz, int *castle_ids) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_guild_castle_dataload_pre ) { + int (*preHookFunc) (int *fd, int *sz, int *castle_ids); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_castle_dataload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_guild_castle_dataload_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sz, castle_ids); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.guild_castle_dataload(fd, sz, castle_ids); + } + if( HPMHooks.count.HP_mapif_guild_castle_dataload_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *sz, int *castle_ids); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_castle_dataload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_guild_castle_dataload_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &sz, castle_ids); + } + } + return retVal___; +} +int HP_mapif_parse_CreateGuild(int fd, int account_id, char *name, struct guild_member *master) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_CreateGuild_pre ) { + int (*preHookFunc) (int *fd, int *account_id, char *name, struct guild_member *master); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateGuild_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_CreateGuild_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id, name, master); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_CreateGuild(fd, account_id, name, master); + } + if( HPMHooks.count.HP_mapif_parse_CreateGuild_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *account_id, char *name, struct guild_member *master); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateGuild_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_CreateGuild_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &account_id, name, master); + } + } + return retVal___; +} +int HP_mapif_parse_GuildInfo(int fd, int guild_id) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_GuildInfo_pre ) { + int (*preHookFunc) (int *fd, int *guild_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildInfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_GuildInfo_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_GuildInfo(fd, guild_id); + } + if( HPMHooks.count.HP_mapif_parse_GuildInfo_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildInfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_GuildInfo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &guild_id); + } + } + return retVal___; +} +int HP_mapif_parse_GuildAddMember(int fd, int guild_id, struct guild_member *m) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_GuildAddMember_pre ) { + int (*preHookFunc) (int *fd, int *guild_id, struct guild_member *m); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAddMember_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_GuildAddMember_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &guild_id, m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_GuildAddMember(fd, guild_id, m); + } + if( HPMHooks.count.HP_mapif_parse_GuildAddMember_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *guild_id, struct guild_member *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAddMember_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_GuildAddMember_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &guild_id, m); + } + } + return retVal___; +} +int HP_mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, int flag, const char *mes) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_GuildLeave_pre ) { + int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag, const char *mes); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildLeave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_GuildLeave_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &flag, mes); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_GuildLeave(fd, guild_id, account_id, char_id, flag, mes); + } + if( HPMHooks.count.HP_mapif_parse_GuildLeave_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *account_id, int *char_id, int *flag, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildLeave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_GuildLeave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &guild_id, &account_id, &char_id, &flag, mes); + } + } + 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 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_); + *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_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + 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_); + 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_); + } + } + return retVal___; +} +int HP_mapif_parse_BreakGuild(int fd, int guild_id) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_BreakGuild_pre ) { + int (*preHookFunc) (int *fd, int *guild_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakGuild_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_BreakGuild_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_BreakGuild(fd, guild_id); + } + if( HPMHooks.count.HP_mapif_parse_BreakGuild_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakGuild_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_BreakGuild_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &guild_id); + } + } + return retVal___; +} +int HP_mapif_parse_GuildMessage(int fd, int guild_id, int account_id, char *mes, int len) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_GuildMessage_pre ) { + int (*preHookFunc) (int *fd, int *guild_id, int *account_id, char *mes, int *len); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_GuildMessage_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &guild_id, &account_id, mes, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_GuildMessage(fd, guild_id, account_id, mes, len); + } + if( HPMHooks.count.HP_mapif_parse_GuildMessage_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *account_id, char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_GuildMessage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &guild_id, &account_id, mes, &len); + } + } + return retVal___; +} +int HP_mapif_parse_GuildBasicInfoChange(int fd, int guild_id, int type, const void *data, int len) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_pre ) { + int (*preHookFunc) (int *fd, int *guild_id, int *type, const void *data, int *len); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_GuildBasicInfoChange_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &guild_id, &type, data, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_GuildBasicInfoChange(fd, guild_id, type, data, len); + } + if( HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *type, const void *data, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_GuildBasicInfoChange_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &guild_id, &type, data, &len); + } + } + return retVal___; +} +int HP_mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, int char_id, int type, const char *data, int len) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_pre ) { + int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *type, const char *data, int *len); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_GuildMemberInfoChange_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &type, data, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_GuildMemberInfoChange(fd, guild_id, account_id, char_id, type, data, len); + } + if( HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *account_id, int *char_id, int *type, const char *data, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_GuildMemberInfoChange_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &guild_id, &account_id, &char_id, &type, data, &len); + } + } + return retVal___; +} +int HP_mapif_parse_GuildPosition(int fd, int guild_id, int idx, struct guild_position *p) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_GuildPosition_pre ) { + int (*preHookFunc) (int *fd, int *guild_id, int *idx, struct guild_position *p); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildPosition_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_GuildPosition_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &guild_id, &idx, p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_GuildPosition(fd, guild_id, idx, p); + } + if( HPMHooks.count.HP_mapif_parse_GuildPosition_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *idx, struct guild_position *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildPosition_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_GuildPosition_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &guild_id, &idx, p); + } + } + return retVal___; +} +int HP_mapif_parse_GuildSkillUp(int fd, int guild_id, uint16 skill_id, int account_id, int max) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_GuildSkillUp_pre ) { + int (*preHookFunc) (int *fd, int *guild_id, uint16 *skill_id, int *account_id, int *max); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildSkillUp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_GuildSkillUp_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &guild_id, &skill_id, &account_id, &max); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_GuildSkillUp(fd, guild_id, skill_id, account_id, max); + } + if( HPMHooks.count.HP_mapif_parse_GuildSkillUp_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *guild_id, uint16 *skill_id, int *account_id, int *max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildSkillUp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_GuildSkillUp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &guild_id, &skill_id, &account_id, &max); + } + } + return retVal___; +} +int HP_mapif_parse_GuildDeleteAlliance(struct guild *g, int guild_id, int account_id1, int account_id2, int flag) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_pre ) { + int (*preHookFunc) (struct guild *g, int *guild_id, int *account_id1, int *account_id2, int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_GuildDeleteAlliance_pre[hIndex].func; + retVal___ = preHookFunc(g, &guild_id, &account_id1, &account_id2, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_GuildDeleteAlliance(g, guild_id, account_id1, account_id2, flag); + } + if( HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_post ) { + int (*postHookFunc) (int retVal___, struct guild *g, int *guild_id, int *account_id1, int *account_id2, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_GuildDeleteAlliance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g, &guild_id, &account_id1, &account_id2, &flag); + } + } + return retVal___; +} +int HP_mapif_parse_GuildAlliance(int fd, int guild_id1, int guild_id2, int account_id1, int account_id2, int flag) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_GuildAlliance_pre ) { + int (*preHookFunc) (int *fd, int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAlliance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_GuildAlliance_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &guild_id1, &guild_id2, &account_id1, &account_id2, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_GuildAlliance(fd, guild_id1, guild_id2, account_id1, account_id2, flag); + } + if( HPMHooks.count.HP_mapif_parse_GuildAlliance_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAlliance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_GuildAlliance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &guild_id1, &guild_id2, &account_id1, &account_id2, &flag); + } + } + return retVal___; +} +int HP_mapif_parse_GuildNotice(int fd, int guild_id, const char *mes1, const char *mes2) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_GuildNotice_pre ) { + int (*preHookFunc) (int *fd, int *guild_id, const char *mes1, const char *mes2); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildNotice_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_GuildNotice_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &guild_id, mes1, mes2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_GuildNotice(fd, guild_id, mes1, mes2); + } + if( HPMHooks.count.HP_mapif_parse_GuildNotice_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *guild_id, const char *mes1, const char *mes2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildNotice_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_GuildNotice_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &guild_id, mes1, mes2); + } + } + return retVal___; +} +int HP_mapif_parse_GuildEmblem(int fd, int len, int guild_id, int dummy, const char *data) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_GuildEmblem_pre ) { + int (*preHookFunc) (int *fd, int *len, int *guild_id, int *dummy, const char *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildEmblem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_GuildEmblem_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &len, &guild_id, &dummy, data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_GuildEmblem(fd, len, guild_id, dummy, data); + } + if( HPMHooks.count.HP_mapif_parse_GuildEmblem_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *len, int *guild_id, int *dummy, const char *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildEmblem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_GuildEmblem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &len, &guild_id, &dummy, data); + } + } + return retVal___; +} +int HP_mapif_parse_GuildCastleDataLoad(int fd, int len, int *castle_ids) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_pre ) { + int (*preHookFunc) (int *fd, int *len, int *castle_ids); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataLoad_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &len, castle_ids); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_GuildCastleDataLoad(fd, len, castle_ids); + } + if( HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *len, int *castle_ids); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataLoad_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &len, castle_ids); + } + } + return retVal___; +} +int HP_mapif_parse_GuildCastleDataSave(int fd, int castle_id, int index, int value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_pre ) { + int (*preHookFunc) (int *fd, int *castle_id, int *index, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataSave_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &castle_id, &index, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_GuildCastleDataSave(fd, castle_id, index, value); + } + if( HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *castle_id, int *index, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataSave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &castle_id, &index, &value); + } + } + return retVal___; +} +int HP_mapif_parse_GuildMasterChange(int fd, int guild_id, const char *name, int len) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_GuildMasterChange_pre ) { + int (*preHookFunc) (int *fd, int *guild_id, const char *name, int *len); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMasterChange_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_GuildMasterChange_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &guild_id, name, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_GuildMasterChange(fd, guild_id, name, len); + } + if( HPMHooks.count.HP_mapif_parse_GuildMasterChange_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *guild_id, const char *name, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMasterChange_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_GuildMasterChange_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &guild_id, name, &len); + } + } + return retVal___; +} +void HP_mapif_homunculus_created(int fd, int account_id, struct s_homunculus *sh, unsigned char flag) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_homunculus_created_pre ) { + void (*preHookFunc) (int *fd, int *account_id, struct s_homunculus *sh, unsigned char *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_created_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_homunculus_created_pre[hIndex].func; + preHookFunc(&fd, &account_id, sh, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.homunculus_created(fd, account_id, sh, flag); + } + if( HPMHooks.count.HP_mapif_homunculus_created_post ) { + void (*postHookFunc) (int *fd, int *account_id, struct s_homunculus *sh, unsigned char *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_created_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_homunculus_created_post[hIndex].func; + postHookFunc(&fd, &account_id, sh, &flag); + } + } + return; +} +void HP_mapif_homunculus_deleted(int fd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_homunculus_deleted_pre ) { + void (*preHookFunc) (int *fd, int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_deleted_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_homunculus_deleted_pre[hIndex].func; + preHookFunc(&fd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.homunculus_deleted(fd, flag); + } + if( HPMHooks.count.HP_mapif_homunculus_deleted_post ) { + void (*postHookFunc) (int *fd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_deleted_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_homunculus_deleted_post[hIndex].func; + postHookFunc(&fd, &flag); + } + } + return; +} +void HP_mapif_homunculus_loaded(int fd, int account_id, struct s_homunculus *hd) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_homunculus_loaded_pre ) { + void (*preHookFunc) (int *fd, int *account_id, struct s_homunculus *hd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_loaded_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_homunculus_loaded_pre[hIndex].func; + preHookFunc(&fd, &account_id, hd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.homunculus_loaded(fd, account_id, hd); + } + if( HPMHooks.count.HP_mapif_homunculus_loaded_post ) { + void (*postHookFunc) (int *fd, int *account_id, struct s_homunculus *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_loaded_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_homunculus_loaded_post[hIndex].func; + postHookFunc(&fd, &account_id, hd); + } + } + return; +} +void HP_mapif_homunculus_saved(int fd, int account_id, bool flag) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_homunculus_saved_pre ) { + void (*preHookFunc) (int *fd, int *account_id, bool *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_saved_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_homunculus_saved_pre[hIndex].func; + preHookFunc(&fd, &account_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.homunculus_saved(fd, account_id, flag); + } + if( HPMHooks.count.HP_mapif_homunculus_saved_post ) { + void (*postHookFunc) (int *fd, int *account_id, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_saved_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_homunculus_saved_post[hIndex].func; + postHookFunc(&fd, &account_id, &flag); + } + } + return; +} +void HP_mapif_homunculus_renamed(int fd, int account_id, int char_id, unsigned char flag, char *name) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_homunculus_renamed_pre ) { + void (*preHookFunc) (int *fd, int *account_id, int *char_id, unsigned char *flag, char *name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_renamed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_homunculus_renamed_pre[hIndex].func; + preHookFunc(&fd, &account_id, &char_id, &flag, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.homunculus_renamed(fd, account_id, char_id, flag, name); + } + if( HPMHooks.count.HP_mapif_homunculus_renamed_post ) { + void (*postHookFunc) (int *fd, int *account_id, int *char_id, unsigned char *flag, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_renamed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_homunculus_renamed_post[hIndex].func; + postHookFunc(&fd, &account_id, &char_id, &flag, name); + } + } + return; +} +bool HP_mapif_homunculus_save(struct s_homunculus *hd) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mapif_homunculus_save_pre ) { + bool (*preHookFunc) (struct s_homunculus *hd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_homunculus_save_pre[hIndex].func; + retVal___ = preHookFunc(hd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.homunculus_save(hd); + } + if( HPMHooks.count.HP_mapif_homunculus_save_post ) { + bool (*postHookFunc) (bool retVal___, struct s_homunculus *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_homunculus_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd); + } + } + return retVal___; +} +bool HP_mapif_homunculus_load(int homun_id, struct s_homunculus *hd) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mapif_homunculus_load_pre ) { + bool (*preHookFunc) (int *homun_id, struct s_homunculus *hd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_homunculus_load_pre[hIndex].func; + retVal___ = preHookFunc(&homun_id, hd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.homunculus_load(homun_id, hd); + } + if( HPMHooks.count.HP_mapif_homunculus_load_post ) { + bool (*postHookFunc) (bool retVal___, int *homun_id, struct s_homunculus *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_homunculus_load_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &homun_id, hd); + } + } + return retVal___; +} +bool HP_mapif_homunculus_delete(int homun_id) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mapif_homunculus_delete_pre ) { + bool (*preHookFunc) (int *homun_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_homunculus_delete_pre[hIndex].func; + retVal___ = preHookFunc(&homun_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.homunculus_delete(homun_id); + } + if( HPMHooks.count.HP_mapif_homunculus_delete_post ) { + bool (*postHookFunc) (bool retVal___, int *homun_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_homunculus_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &homun_id); + } + } + return retVal___; +} +bool HP_mapif_homunculus_rename(char *name) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mapif_homunculus_rename_pre ) { + bool (*preHookFunc) (char *name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_rename_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_homunculus_rename_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.homunculus_rename(name); + } + if( HPMHooks.count.HP_mapif_homunculus_rename_post ) { + bool (*postHookFunc) (bool retVal___, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_rename_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_homunculus_rename_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +void HP_mapif_parse_homunculus_create(int fd, int len, int account_id, struct s_homunculus *phd) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_homunculus_create_pre ) { + void (*preHookFunc) (int *fd, int *len, int *account_id, struct s_homunculus *phd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_create_pre[hIndex].func; + preHookFunc(&fd, &len, &account_id, phd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_homunculus_create(fd, len, account_id, phd); + } + if( HPMHooks.count.HP_mapif_parse_homunculus_create_post ) { + void (*postHookFunc) (int *fd, int *len, int *account_id, struct s_homunculus *phd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_create_post[hIndex].func; + postHookFunc(&fd, &len, &account_id, phd); + } + } + return; +} +void HP_mapif_parse_homunculus_delete(int fd, int homun_id) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_homunculus_delete_pre ) { + void (*preHookFunc) (int *fd, int *homun_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_delete_pre[hIndex].func; + preHookFunc(&fd, &homun_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_homunculus_delete(fd, homun_id); + } + if( HPMHooks.count.HP_mapif_parse_homunculus_delete_post ) { + void (*postHookFunc) (int *fd, int *homun_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_delete_post[hIndex].func; + postHookFunc(&fd, &homun_id); + } + } + return; +} +void HP_mapif_parse_homunculus_load(int fd, int account_id, int homun_id) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_homunculus_load_pre ) { + void (*preHookFunc) (int *fd, int *account_id, int *homun_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_load_pre[hIndex].func; + preHookFunc(&fd, &account_id, &homun_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_homunculus_load(fd, account_id, homun_id); + } + if( HPMHooks.count.HP_mapif_parse_homunculus_load_post ) { + void (*postHookFunc) (int *fd, int *account_id, int *homun_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_load_post[hIndex].func; + postHookFunc(&fd, &account_id, &homun_id); + } + } + return; +} +void HP_mapif_parse_homunculus_save(int fd, int len, int account_id, struct s_homunculus *phd) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_homunculus_save_pre ) { + void (*preHookFunc) (int *fd, int *len, int *account_id, struct s_homunculus *phd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_save_pre[hIndex].func; + preHookFunc(&fd, &len, &account_id, phd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_homunculus_save(fd, len, account_id, phd); + } + if( HPMHooks.count.HP_mapif_parse_homunculus_save_post ) { + void (*postHookFunc) (int *fd, int *len, int *account_id, struct s_homunculus *phd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_save_post[hIndex].func; + postHookFunc(&fd, &len, &account_id, phd); + } + } + return; +} +void HP_mapif_parse_homunculus_rename(int fd, int account_id, int char_id, char *name) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_homunculus_rename_pre ) { + void (*preHookFunc) (int *fd, int *account_id, int *char_id, char *name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_rename_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_rename_pre[hIndex].func; + preHookFunc(&fd, &account_id, &char_id, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_homunculus_rename(fd, account_id, char_id, name); + } + if( HPMHooks.count.HP_mapif_parse_homunculus_rename_post ) { + void (*postHookFunc) (int *fd, int *account_id, int *char_id, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_rename_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_rename_post[hIndex].func; + postHookFunc(&fd, &account_id, &char_id, name); + } + } + return; +} +void HP_mapif_mail_sendinbox(int fd, int char_id, unsigned char flag, struct mail_data *md) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_mail_sendinbox_pre ) { + void (*preHookFunc) (int *fd, int *char_id, unsigned char *flag, struct mail_data *md); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendinbox_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_mail_sendinbox_pre[hIndex].func; + preHookFunc(&fd, &char_id, &flag, md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.mail_sendinbox(fd, char_id, flag, md); + } + if( HPMHooks.count.HP_mapif_mail_sendinbox_post ) { + void (*postHookFunc) (int *fd, int *char_id, unsigned char *flag, struct mail_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendinbox_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_mail_sendinbox_post[hIndex].func; + postHookFunc(&fd, &char_id, &flag, md); + } + } + return; +} +void HP_mapif_parse_mail_requestinbox(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_mail_requestinbox_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_requestinbox_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_mail_requestinbox_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_mail_requestinbox(fd); + } + if( HPMHooks.count.HP_mapif_parse_mail_requestinbox_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_requestinbox_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_mail_requestinbox_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_mapif_parse_mail_read(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_mail_read_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_mail_read_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_mail_read(fd); + } + if( HPMHooks.count.HP_mapif_parse_mail_read_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_mail_read_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_mapif_mail_sendattach(int fd, int char_id, struct mail_message *msg) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_mail_sendattach_pre ) { + void (*preHookFunc) (int *fd, int *char_id, struct mail_message *msg); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendattach_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_mail_sendattach_pre[hIndex].func; + preHookFunc(&fd, &char_id, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.mail_sendattach(fd, char_id, msg); + } + if( HPMHooks.count.HP_mapif_mail_sendattach_post ) { + void (*postHookFunc) (int *fd, int *char_id, struct mail_message *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendattach_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_mail_sendattach_post[hIndex].func; + postHookFunc(&fd, &char_id, msg); + } + } + return; +} +void HP_mapif_mail_getattach(int fd, int char_id, int mail_id) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_mail_getattach_pre ) { + void (*preHookFunc) (int *fd, int *char_id, int *mail_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_getattach_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_mail_getattach_pre[hIndex].func; + preHookFunc(&fd, &char_id, &mail_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.mail_getattach(fd, char_id, mail_id); + } + if( HPMHooks.count.HP_mapif_mail_getattach_post ) { + void (*postHookFunc) (int *fd, int *char_id, int *mail_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_getattach_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_mail_getattach_post[hIndex].func; + postHookFunc(&fd, &char_id, &mail_id); + } + } + return; +} +void HP_mapif_parse_mail_getattach(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_mail_getattach_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_getattach_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_mail_getattach_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_mail_getattach(fd); + } + if( HPMHooks.count.HP_mapif_parse_mail_getattach_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_getattach_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_mail_getattach_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_mapif_mail_delete(int fd, int char_id, int mail_id, bool failed) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_mail_delete_pre ) { + void (*preHookFunc) (int *fd, int *char_id, int *mail_id, bool *failed); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_mail_delete_pre[hIndex].func; + preHookFunc(&fd, &char_id, &mail_id, &failed); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.mail_delete(fd, char_id, mail_id, failed); + } + if( HPMHooks.count.HP_mapif_mail_delete_post ) { + void (*postHookFunc) (int *fd, int *char_id, int *mail_id, bool *failed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_mail_delete_post[hIndex].func; + postHookFunc(&fd, &char_id, &mail_id, &failed); + } + } + return; +} +void HP_mapif_parse_mail_delete(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_mail_delete_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_mail_delete_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_mail_delete(fd); + } + if( HPMHooks.count.HP_mapif_parse_mail_delete_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_mail_delete_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_mapif_mail_new(struct mail_message *msg) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_mail_new_pre ) { + void (*preHookFunc) (struct mail_message *msg); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_new_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_mail_new_pre[hIndex].func; + preHookFunc(msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.mail_new(msg); + } + if( HPMHooks.count.HP_mapif_mail_new_post ) { + void (*postHookFunc) (struct mail_message *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_new_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_mail_new_post[hIndex].func; + postHookFunc(msg); + } + } + return; +} +void HP_mapif_mail_return(int fd, int char_id, int mail_id, int new_mail) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_mail_return_pre ) { + void (*preHookFunc) (int *fd, int *char_id, int *mail_id, int *new_mail); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_return_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_mail_return_pre[hIndex].func; + preHookFunc(&fd, &char_id, &mail_id, &new_mail); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.mail_return(fd, char_id, mail_id, new_mail); + } + if( HPMHooks.count.HP_mapif_mail_return_post ) { + void (*postHookFunc) (int *fd, int *char_id, int *mail_id, int *new_mail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_return_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_mail_return_post[hIndex].func; + postHookFunc(&fd, &char_id, &mail_id, &new_mail); + } + } + return; +} +void HP_mapif_parse_mail_return(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_mail_return_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_return_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_mail_return_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_mail_return(fd); + } + if( HPMHooks.count.HP_mapif_parse_mail_return_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_return_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_mail_return_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_mapif_mail_send(int fd, struct mail_message *msg) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_mail_send_pre ) { + void (*preHookFunc) (int *fd, struct mail_message *msg); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_send_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_mail_send_pre[hIndex].func; + preHookFunc(&fd, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.mail_send(fd, msg); + } + if( HPMHooks.count.HP_mapif_mail_send_post ) { + void (*postHookFunc) (int *fd, struct mail_message *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_send_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_mail_send_post[hIndex].func; + postHookFunc(&fd, msg); + } + } + return; +} +void HP_mapif_parse_mail_send(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_mail_send_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_send_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_mail_send_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_mail_send(fd); + } + if( HPMHooks.count.HP_mapif_parse_mail_send_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_send_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_mail_send_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +bool HP_mapif_mercenary_save(struct s_mercenary *merc) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mapif_mercenary_save_pre ) { + bool (*preHookFunc) (struct s_mercenary *merc); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_mercenary_save_pre[hIndex].func; + retVal___ = preHookFunc(merc); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.mercenary_save(merc); + } + if( HPMHooks.count.HP_mapif_mercenary_save_post ) { + bool (*postHookFunc) (bool retVal___, struct s_mercenary *merc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_mercenary_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, merc); + } + } + return retVal___; +} +bool HP_mapif_mercenary_load(int merc_id, int char_id, struct s_mercenary *merc) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mapif_mercenary_load_pre ) { + bool (*preHookFunc) (int *merc_id, int *char_id, struct s_mercenary *merc); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_mercenary_load_pre[hIndex].func; + retVal___ = preHookFunc(&merc_id, &char_id, merc); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.mercenary_load(merc_id, char_id, merc); + } + if( HPMHooks.count.HP_mapif_mercenary_load_post ) { + bool (*postHookFunc) (bool retVal___, int *merc_id, int *char_id, struct s_mercenary *merc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_mercenary_load_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &merc_id, &char_id, merc); + } + } + return retVal___; +} +bool HP_mapif_mercenary_delete(int merc_id) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mapif_mercenary_delete_pre ) { + bool (*preHookFunc) (int *merc_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_mercenary_delete_pre[hIndex].func; + retVal___ = preHookFunc(&merc_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.mercenary_delete(merc_id); + } + if( HPMHooks.count.HP_mapif_mercenary_delete_post ) { + bool (*postHookFunc) (bool retVal___, int *merc_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_mercenary_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &merc_id); + } + } + return retVal___; +} +void HP_mapif_mercenary_send(int fd, struct s_mercenary *merc, unsigned char flag) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_mercenary_send_pre ) { + void (*preHookFunc) (int *fd, struct s_mercenary *merc, unsigned char *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_send_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_mercenary_send_pre[hIndex].func; + preHookFunc(&fd, merc, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.mercenary_send(fd, merc, flag); + } + if( HPMHooks.count.HP_mapif_mercenary_send_post ) { + void (*postHookFunc) (int *fd, struct s_mercenary *merc, unsigned char *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_send_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_mercenary_send_post[hIndex].func; + postHookFunc(&fd, merc, &flag); + } + } + return; +} +void HP_mapif_parse_mercenary_create(int fd, struct s_mercenary *merc) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_mercenary_create_pre ) { + void (*preHookFunc) (int *fd, struct s_mercenary *merc); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_create_pre[hIndex].func; + preHookFunc(&fd, merc); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_mercenary_create(fd, merc); + } + if( HPMHooks.count.HP_mapif_parse_mercenary_create_post ) { + void (*postHookFunc) (int *fd, struct s_mercenary *merc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_create_post[hIndex].func; + postHookFunc(&fd, merc); + } + } + return; +} +void HP_mapif_parse_mercenary_load(int fd, int merc_id, int char_id) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_mercenary_load_pre ) { + void (*preHookFunc) (int *fd, int *merc_id, int *char_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_load_pre[hIndex].func; + preHookFunc(&fd, &merc_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_mercenary_load(fd, merc_id, char_id); + } + if( HPMHooks.count.HP_mapif_parse_mercenary_load_post ) { + void (*postHookFunc) (int *fd, int *merc_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_load_post[hIndex].func; + postHookFunc(&fd, &merc_id, &char_id); + } + } + return; +} +void HP_mapif_mercenary_deleted(int fd, unsigned char flag) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_mercenary_deleted_pre ) { + void (*preHookFunc) (int *fd, unsigned char *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_deleted_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_mercenary_deleted_pre[hIndex].func; + preHookFunc(&fd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.mercenary_deleted(fd, flag); + } + if( HPMHooks.count.HP_mapif_mercenary_deleted_post ) { + void (*postHookFunc) (int *fd, unsigned char *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_deleted_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_mercenary_deleted_post[hIndex].func; + postHookFunc(&fd, &flag); + } + } + return; +} +void HP_mapif_parse_mercenary_delete(int fd, int merc_id) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_mercenary_delete_pre ) { + void (*preHookFunc) (int *fd, int *merc_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_delete_pre[hIndex].func; + preHookFunc(&fd, &merc_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_mercenary_delete(fd, merc_id); + } + if( HPMHooks.count.HP_mapif_parse_mercenary_delete_post ) { + void (*postHookFunc) (int *fd, int *merc_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_delete_post[hIndex].func; + postHookFunc(&fd, &merc_id); + } + } + return; +} +void HP_mapif_mercenary_saved(int fd, unsigned char flag) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_mercenary_saved_pre ) { + void (*preHookFunc) (int *fd, unsigned char *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_saved_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_mercenary_saved_pre[hIndex].func; + preHookFunc(&fd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.mercenary_saved(fd, flag); + } + if( HPMHooks.count.HP_mapif_mercenary_saved_post ) { + void (*postHookFunc) (int *fd, unsigned char *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_saved_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_mercenary_saved_post[hIndex].func; + postHookFunc(&fd, &flag); + } + } + return; +} +void HP_mapif_parse_mercenary_save(int fd, struct s_mercenary *merc) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_mercenary_save_pre ) { + void (*preHookFunc) (int *fd, struct s_mercenary *merc); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_save_pre[hIndex].func; + preHookFunc(&fd, merc); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_mercenary_save(fd, merc); + } + if( HPMHooks.count.HP_mapif_parse_mercenary_save_post ) { + void (*postHookFunc) (int *fd, struct s_mercenary *merc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_save_post[hIndex].func; + postHookFunc(&fd, merc); + } + } + return; +} +int HP_mapif_party_created(int fd, int account_id, int char_id, struct party *p) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_party_created_pre ) { + int (*preHookFunc) (int *fd, int *account_id, int *char_id, struct party *p); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_created_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_party_created_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id, &char_id, p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.party_created(fd, account_id, char_id, p); + } + if( HPMHooks.count.HP_mapif_party_created_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, struct party *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_created_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_party_created_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &account_id, &char_id, p); + } + } + return retVal___; +} +void HP_mapif_party_noinfo(int fd, int party_id, int char_id) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_party_noinfo_pre ) { + void (*preHookFunc) (int *fd, int *party_id, int *char_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_noinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_party_noinfo_pre[hIndex].func; + preHookFunc(&fd, &party_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.party_noinfo(fd, party_id, char_id); + } + if( HPMHooks.count.HP_mapif_party_noinfo_post ) { + void (*postHookFunc) (int *fd, int *party_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_noinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_party_noinfo_post[hIndex].func; + postHookFunc(&fd, &party_id, &char_id); + } + } + return; +} +void HP_mapif_party_info(int fd, struct party *p, int char_id) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_party_info_pre ) { + void (*preHookFunc) (int *fd, struct party *p, int *char_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_party_info_pre[hIndex].func; + preHookFunc(&fd, p, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.party_info(fd, p, char_id); + } + if( HPMHooks.count.HP_mapif_party_info_post ) { + void (*postHookFunc) (int *fd, struct party *p, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_party_info_post[hIndex].func; + postHookFunc(&fd, p, &char_id); + } + } + return; +} +int HP_mapif_party_memberadded(int fd, int party_id, int account_id, int char_id, int flag) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_party_memberadded_pre ) { + int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *char_id, int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_memberadded_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_party_memberadded_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &party_id, &account_id, &char_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.party_memberadded(fd, party_id, account_id, char_id, flag); + } + if( HPMHooks.count.HP_mapif_party_memberadded_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, int *char_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_memberadded_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_party_memberadded_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, &char_id, &flag); + } + } + return retVal___; +} +int HP_mapif_party_optionchanged(int fd, struct party *p, int account_id, int flag) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_party_optionchanged_pre ) { + int (*preHookFunc) (int *fd, struct party *p, int *account_id, int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_optionchanged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_party_optionchanged_pre[hIndex].func; + retVal___ = preHookFunc(&fd, p, &account_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.party_optionchanged(fd, p, account_id, flag); + } + if( HPMHooks.count.HP_mapif_party_optionchanged_post ) { + int (*postHookFunc) (int retVal___, int *fd, struct party *p, int *account_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_optionchanged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_party_optionchanged_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, p, &account_id, &flag); + } + } + return retVal___; +} +int HP_mapif_party_withdraw(int party_id, int account_id, int char_id) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_party_withdraw_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, int *char_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_withdraw_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_party_withdraw_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.party_withdraw(party_id, account_id, char_id); + } + if( HPMHooks.count.HP_mapif_party_withdraw_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_withdraw_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_party_withdraw_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id); + } + } + return retVal___; +} +int HP_mapif_party_membermoved(struct party *p, int idx) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_party_membermoved_pre ) { + int (*preHookFunc) (struct party *p, int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_membermoved_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_party_membermoved_pre[hIndex].func; + retVal___ = preHookFunc(p, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.party_membermoved(p, idx); + } + if( HPMHooks.count.HP_mapif_party_membermoved_post ) { + int (*postHookFunc) (int retVal___, struct party *p, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_membermoved_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_party_membermoved_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, &idx); + } + } + return retVal___; +} +int HP_mapif_party_broken(int party_id, int flag) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_party_broken_pre ) { + int (*preHookFunc) (int *party_id, int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_broken_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_party_broken_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.party_broken(party_id, flag); + } + if( HPMHooks.count.HP_mapif_party_broken_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_broken_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_party_broken_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &flag); + } + } + return retVal___; +} +int HP_mapif_party_message(int party_id, int account_id, char *mes, int len, int sfd) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_party_message_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, char *mes, int *len, int *sfd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_party_message_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, mes, &len, &sfd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.party_message(party_id, account_id, mes, len, sfd); + } + if( HPMHooks.count.HP_mapif_party_message_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, char *mes, int *len, int *sfd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_party_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, mes, &len, &sfd); + } + } + return retVal___; +} +int HP_mapif_parse_CreateParty(int fd, char *name, int item, int item2, struct party_member *leader) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_CreateParty_pre ) { + int (*preHookFunc) (int *fd, char *name, int *item, int *item2, struct party_member *leader); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateParty_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_CreateParty_pre[hIndex].func; + retVal___ = preHookFunc(&fd, name, &item, &item2, leader); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_CreateParty(fd, name, item, item2, leader); + } + if( HPMHooks.count.HP_mapif_parse_CreateParty_post ) { + int (*postHookFunc) (int retVal___, int *fd, char *name, int *item, int *item2, struct party_member *leader); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateParty_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_CreateParty_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, name, &item, &item2, leader); + } + } + return retVal___; +} +void HP_mapif_parse_PartyInfo(int fd, int party_id, int char_id) { + int hIndex = 0; + if( HPMHooks.count.HP_mapif_parse_PartyInfo_pre ) { + void (*preHookFunc) (int *fd, int *party_id, int *char_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyInfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_PartyInfo_pre[hIndex].func; + preHookFunc(&fd, &party_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_PartyInfo(fd, party_id, char_id); + } + if( HPMHooks.count.HP_mapif_parse_PartyInfo_post ) { + void (*postHookFunc) (int *fd, int *party_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyInfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_PartyInfo_post[hIndex].func; + postHookFunc(&fd, &party_id, &char_id); + } + } + return; +} +int HP_mapif_parse_PartyAddMember(int fd, int party_id, struct party_member *member) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_PartyAddMember_pre ) { + int (*preHookFunc) (int *fd, int *party_id, struct party_member *member); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyAddMember_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_PartyAddMember_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &party_id, member); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_PartyAddMember(fd, party_id, member); + } + if( HPMHooks.count.HP_mapif_parse_PartyAddMember_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *party_id, struct party_member *member); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyAddMember_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_PartyAddMember_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &party_id, member); + } + } + return retVal___; +} +int HP_mapif_parse_PartyChangeOption(int fd, int party_id, int account_id, int exp, int item) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_PartyChangeOption_pre ) { + int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *exp, int *item); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeOption_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_PartyChangeOption_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &party_id, &account_id, &exp, &item); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_PartyChangeOption(fd, party_id, account_id, exp, item); + } + if( HPMHooks.count.HP_mapif_parse_PartyChangeOption_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, int *exp, int *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeOption_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_PartyChangeOption_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, &exp, &item); + } + } + return retVal___; +} +int HP_mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_PartyLeave_pre ) { + int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *char_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_PartyLeave_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &party_id, &account_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_PartyLeave(fd, party_id, account_id, char_id); + } + if( HPMHooks.count.HP_mapif_parse_PartyLeave_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_PartyLeave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, &char_id); + } + } + return retVal___; +} +int HP_mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id, unsigned short map, int online, unsigned int lv) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_PartyChangeMap_pre ) { + int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *char_id, unsigned short *map, int *online, unsigned int *lv); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeMap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_PartyChangeMap_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &party_id, &account_id, &char_id, &map, &online, &lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_PartyChangeMap(fd, party_id, account_id, char_id, map, online, lv); + } + if( HPMHooks.count.HP_mapif_parse_PartyChangeMap_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, int *char_id, unsigned short *map, int *online, unsigned int *lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeMap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_PartyChangeMap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, &char_id, &map, &online, &lv); + } + } + return retVal___; +} +int HP_mapif_parse_BreakParty(int fd, int party_id) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_BreakParty_pre ) { + int (*preHookFunc) (int *fd, int *party_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakParty_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_BreakParty_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &party_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_BreakParty(fd, party_id); + } + if( HPMHooks.count.HP_mapif_parse_BreakParty_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakParty_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_BreakParty_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &party_id); + } + } + return retVal___; +} +int HP_mapif_parse_PartyMessage(int fd, int party_id, int account_id, char *mes, int len) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_PartyMessage_pre ) { + int (*preHookFunc) (int *fd, int *party_id, int *account_id, char *mes, int *len); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyMessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_PartyMessage_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &party_id, &account_id, mes, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_PartyMessage(fd, party_id, account_id, mes, len); + } + if( HPMHooks.count.HP_mapif_parse_PartyMessage_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyMessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_PartyMessage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, mes, &len); + } + } + return retVal___; +} +int HP_mapif_parse_PartyLeaderChange(int fd, int party_id, int account_id, int char_id) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_PartyLeaderChange_pre ) { + int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *char_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeaderChange_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_PartyLeaderChange_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &party_id, &account_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_PartyLeaderChange(fd, party_id, account_id, char_id); + } + if( HPMHooks.count.HP_mapif_parse_PartyLeaderChange_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeaderChange_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_PartyLeaderChange_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, &char_id); + } + } + return retVal___; +} +int HP_mapif_pet_created(int fd, int account_id, struct s_pet *p) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_pet_created_pre ) { + int (*preHookFunc) (int *fd, int *account_id, struct s_pet *p); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_created_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_pet_created_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id, p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.pet_created(fd, account_id, p); + } + if( HPMHooks.count.HP_mapif_pet_created_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *account_id, struct s_pet *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_created_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_pet_created_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &account_id, p); + } + } + return retVal___; +} +int HP_mapif_pet_info(int fd, int account_id, struct s_pet *p) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_pet_info_pre ) { + int (*preHookFunc) (int *fd, int *account_id, struct s_pet *p); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_pet_info_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id, p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.pet_info(fd, account_id, p); + } + if( HPMHooks.count.HP_mapif_pet_info_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *account_id, struct s_pet *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_pet_info_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &account_id, p); + } + } + return retVal___; +} +int HP_mapif_pet_noinfo(int fd, int account_id) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_pet_noinfo_pre ) { + int (*preHookFunc) (int *fd, int *account_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_noinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_pet_noinfo_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.pet_noinfo(fd, account_id); + } + if( HPMHooks.count.HP_mapif_pet_noinfo_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_noinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_pet_noinfo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &account_id); + } + } + return retVal___; +} +int HP_mapif_save_pet_ack(int fd, int account_id, int flag) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_save_pet_ack_pre ) { + int (*preHookFunc) (int *fd, int *account_id, int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_save_pet_ack_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.save_pet_ack(fd, account_id, flag); + } + if( HPMHooks.count.HP_mapif_save_pet_ack_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_save_pet_ack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &account_id, &flag); + } + } + return retVal___; +} +int HP_mapif_delete_pet_ack(int fd, int flag) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_delete_pet_ack_pre ) { + int (*preHookFunc) (int *fd, int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_delete_pet_ack_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.delete_pet_ack(fd, flag); + } + if( HPMHooks.count.HP_mapif_delete_pet_ack_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_delete_pet_ack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &flag); + } + } + return retVal___; +} +int HP_mapif_create_pet(int fd, int account_id, int char_id, short pet_class, short pet_lv, short pet_egg_id, short pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_create_pet_pre ) { + int (*preHookFunc) (int *fd, int *account_id, int *char_id, short *pet_class, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char *pet_name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_create_pet_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_create_pet_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id, &char_id, &pet_class, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incubate, pet_name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.create_pet(fd, account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); + } + if( HPMHooks.count.HP_mapif_create_pet_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, short *pet_class, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char *pet_name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_create_pet_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_create_pet_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &account_id, &char_id, &pet_class, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incubate, pet_name); + } + } + return retVal___; +} +int HP_mapif_load_pet(int fd, int account_id, int char_id, int pet_id) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_load_pet_pre ) { + int (*preHookFunc) (int *fd, int *account_id, int *char_id, int *pet_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_pet_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_load_pet_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id, &char_id, &pet_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.load_pet(fd, account_id, char_id, pet_id); + } + if( HPMHooks.count.HP_mapif_load_pet_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, int *pet_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_pet_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_load_pet_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &account_id, &char_id, &pet_id); + } + } + return retVal___; +} +int HP_mapif_save_pet(int fd, int account_id, struct s_pet *data) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_save_pet_pre ) { + int (*preHookFunc) (int *fd, int *account_id, struct s_pet *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_save_pet_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id, data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.save_pet(fd, account_id, data); + } + if( HPMHooks.count.HP_mapif_save_pet_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *account_id, struct s_pet *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_save_pet_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &account_id, data); + } + } + return retVal___; +} +int HP_mapif_delete_pet(int fd, int pet_id) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_delete_pet_pre ) { + int (*preHookFunc) (int *fd, int *pet_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_delete_pet_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &pet_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.delete_pet(fd, pet_id); + } + if( HPMHooks.count.HP_mapif_delete_pet_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *pet_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_delete_pet_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &pet_id); + } + } + return retVal___; +} +int HP_mapif_parse_CreatePet(int fd) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_CreatePet_pre ) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreatePet_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_CreatePet_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_CreatePet(fd); + } + if( HPMHooks.count.HP_mapif_parse_CreatePet_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreatePet_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_CreatePet_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +int HP_mapif_parse_LoadPet(int fd) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_LoadPet_pre ) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadPet_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_LoadPet_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_LoadPet(fd); + } + if( HPMHooks.count.HP_mapif_parse_LoadPet_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadPet_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_LoadPet_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } - return; + return retVal___; } -void HP_loginif_send_users_count(int users) { +int HP_mapif_parse_SavePet(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_send_users_count_pre ) { - void (*preHookFunc) (int *users); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_SavePet_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_send_users_count_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_loginif_send_users_count_pre[hIndex].func; - preHookFunc(&users); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SavePet_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_SavePet_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.loginif.send_users_count(users); + retVal___ = HPMHooks.source.mapif.parse_SavePet(fd); } - if( HPMHooks.count.HP_loginif_send_users_count_post ) { - void (*postHookFunc) (int *users); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_send_users_count_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_loginif_send_users_count_post[hIndex].func; - postHookFunc(&users); + if( HPMHooks.count.HP_mapif_parse_SavePet_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SavePet_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_SavePet_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } - return; + return retVal___; } -void HP_loginif_connect_to_server(void) { +int HP_mapif_parse_DeletePet(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_connect_to_server_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_DeletePet_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_connect_to_server_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_loginif_connect_to_server_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_DeletePet_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_DeletePet_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.loginif.connect_to_server(); + retVal___ = HPMHooks.source.mapif.parse_DeletePet(fd); } - if( HPMHooks.count.HP_loginif_connect_to_server_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_connect_to_server_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_loginif_connect_to_server_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_mapif_parse_DeletePet_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_DeletePet_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_DeletePet_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } - return; + return retVal___; } -/* mapif */ -void HP_mapif_ban(int id, unsigned int flag, int status) { +struct quest* HP_mapif_quests_fromsql(int char_id, int *count) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_ban_pre ) { - void (*preHookFunc) (int *id, unsigned int *flag, int *status); + struct quest* retVal___ = NULL; + if( HPMHooks.count.HP_mapif_quests_fromsql_pre ) { + struct quest* (*preHookFunc) (int *char_id, int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_ban_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_ban_pre[hIndex].func; - preHookFunc(&id, &flag, &status); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quests_fromsql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_quests_fromsql_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, count); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.ban(id, flag, status); + retVal___ = HPMHooks.source.mapif.quests_fromsql(char_id, count); } - if( HPMHooks.count.HP_mapif_ban_post ) { - void (*postHookFunc) (int *id, unsigned int *flag, int *status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_ban_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_ban_post[hIndex].func; - postHookFunc(&id, &flag, &status); + if( HPMHooks.count.HP_mapif_quests_fromsql_post ) { + struct quest* (*postHookFunc) (struct quest* retVal___, int *char_id, int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quests_fromsql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_quests_fromsql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, count); } } - return; + return retVal___; } -void HP_mapif_server_init(int id) { +bool HP_mapif_quest_delete(int char_id, int quest_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_server_init_pre ) { - void (*preHookFunc) (int *id); + bool retVal___ = false; + if( HPMHooks.count.HP_mapif_quest_delete_pre ) { + bool (*preHookFunc) (int *char_id, int *quest_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_server_init_pre[hIndex].func; - preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_quest_delete_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &quest_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.server_init(id); + retVal___ = HPMHooks.source.mapif.quest_delete(char_id, quest_id); } - if( HPMHooks.count.HP_mapif_server_init_post ) { - void (*postHookFunc) (int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_server_init_post[hIndex].func; - postHookFunc(&id); + if( HPMHooks.count.HP_mapif_quest_delete_post ) { + bool (*postHookFunc) (bool retVal___, int *char_id, int *quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_quest_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &quest_id); } } - return; + return retVal___; } -void HP_mapif_server_destroy(int id) { +bool HP_mapif_quest_add(int char_id, struct quest qd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_server_destroy_pre ) { - void (*preHookFunc) (int *id); + bool retVal___ = false; + if( HPMHooks.count.HP_mapif_quest_add_pre ) { + bool (*preHookFunc) (int *char_id, struct quest *qd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_destroy_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_server_destroy_pre[hIndex].func; - preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_quest_add_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &qd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.server_destroy(id); + retVal___ = HPMHooks.source.mapif.quest_add(char_id, qd); } - if( HPMHooks.count.HP_mapif_server_destroy_post ) { - void (*postHookFunc) (int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_destroy_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_server_destroy_post[hIndex].func; - postHookFunc(&id); + if( HPMHooks.count.HP_mapif_quest_add_post ) { + bool (*postHookFunc) (bool retVal___, int *char_id, struct quest *qd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_quest_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &qd); } } - return; + return retVal___; } -void HP_mapif_server_reset(int id) { +bool HP_mapif_quest_update(int char_id, struct quest qd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_server_reset_pre ) { - void (*preHookFunc) (int *id); + bool retVal___ = false; + if( HPMHooks.count.HP_mapif_quest_update_pre ) { + bool (*preHookFunc) (int *char_id, struct quest *qd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_reset_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_server_reset_pre[hIndex].func; - preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_update_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_quest_update_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &qd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.server_reset(id); + retVal___ = HPMHooks.source.mapif.quest_update(char_id, qd); } - if( HPMHooks.count.HP_mapif_server_reset_post ) { - void (*postHookFunc) (int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_reset_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_server_reset_post[hIndex].func; - postHookFunc(&id); + if( HPMHooks.count.HP_mapif_quest_update_post ) { + bool (*postHookFunc) (bool retVal___, int *char_id, struct quest *qd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_update_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_quest_update_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &qd); } } - return; + return retVal___; } -void HP_mapif_on_disconnect(int id) { +void HP_mapif_quest_save_ack(int fd, int char_id, bool success) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_on_disconnect_pre ) { - void (*preHookFunc) (int *id); + if( HPMHooks.count.HP_mapif_quest_save_ack_pre ) { + void (*preHookFunc) (int *fd, int *char_id, bool *success); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_disconnect_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_on_disconnect_pre[hIndex].func; - preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_save_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_quest_save_ack_pre[hIndex].func; + preHookFunc(&fd, &char_id, &success); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -7369,78 +13703,79 @@ void HP_mapif_on_disconnect(int id) { } } { - HPMHooks.source.mapif.on_disconnect(id); + HPMHooks.source.mapif.quest_save_ack(fd, char_id, success); } - if( HPMHooks.count.HP_mapif_on_disconnect_post ) { - void (*postHookFunc) (int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_disconnect_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_on_disconnect_post[hIndex].func; - postHookFunc(&id); + if( HPMHooks.count.HP_mapif_quest_save_ack_post ) { + void (*postHookFunc) (int *fd, int *char_id, bool *success); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_save_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_quest_save_ack_post[hIndex].func; + postHookFunc(&fd, &char_id, &success); } } return; } -void HP_mapif_on_parse_accinfo(int account_id, int u_fd, int u_aid, int u_group, int map_fd) { +int HP_mapif_parse_quest_save(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_on_parse_accinfo_pre ) { - void (*preHookFunc) (int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_quest_save_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_parse_accinfo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_on_parse_accinfo_pre[hIndex].func; - preHookFunc(&account_id, &u_fd, &u_aid, &u_group, &map_fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_quest_save_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.on_parse_accinfo(account_id, u_fd, u_aid, u_group, map_fd); + retVal___ = HPMHooks.source.mapif.parse_quest_save(fd); } - if( HPMHooks.count.HP_mapif_on_parse_accinfo_post ) { - void (*postHookFunc) (int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_parse_accinfo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_on_parse_accinfo_post[hIndex].func; - postHookFunc(&account_id, &u_fd, &u_aid, &u_group, &map_fd); + if( HPMHooks.count.HP_mapif_parse_quest_save_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_quest_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } - return; + return retVal___; } -void HP_mapif_char_ban(int char_id, time_t timestamp) { +void HP_mapif_send_quests(int fd, int char_id, struct quest *tmp_questlog, int num_quests) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_char_ban_pre ) { - void (*preHookFunc) (int *char_id, time_t *timestamp); + if( HPMHooks.count.HP_mapif_send_quests_pre ) { + void (*preHookFunc) (int *fd, int *char_id, struct quest *tmp_questlog, int *num_quests); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_char_ban_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_char_ban_pre[hIndex].func; - preHookFunc(&char_id, ×tamp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_quests_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_send_quests_pre[hIndex].func; + preHookFunc(&fd, &char_id, tmp_questlog, &num_quests); } if( *HPMforce_return ) { *HPMforce_return = false; return; } } - { - HPMHooks.source.mapif.char_ban(char_id, timestamp); - } - if( HPMHooks.count.HP_mapif_char_ban_post ) { - void (*postHookFunc) (int *char_id, time_t *timestamp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_char_ban_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_char_ban_post[hIndex].func; - postHookFunc(&char_id, ×tamp); + { + HPMHooks.source.mapif.send_quests(fd, char_id, tmp_questlog, num_quests); + } + if( HPMHooks.count.HP_mapif_send_quests_post ) { + void (*postHookFunc) (int *fd, int *char_id, struct quest *tmp_questlog, int *num_quests); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_quests_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_send_quests_post[hIndex].func; + postHookFunc(&fd, &char_id, tmp_questlog, &num_quests); } } return; } -int HP_mapif_sendall(unsigned char *buf, unsigned int len) { +int HP_mapif_parse_quest_load(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_sendall_pre ) { - int (*preHookFunc) (unsigned char *buf, unsigned int *len); + if( HPMHooks.count.HP_mapif_parse_quest_load_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendall_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_sendall_pre[hIndex].func; - retVal___ = preHookFunc(buf, &len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_quest_load_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -7448,26 +13783,26 @@ int HP_mapif_sendall(unsigned char *buf, unsigned int len) { } } { - retVal___ = HPMHooks.source.mapif.sendall(buf, len); + retVal___ = HPMHooks.source.mapif.parse_quest_load(fd); } - if( HPMHooks.count.HP_mapif_sendall_post ) { - int (*postHookFunc) (int retVal___, unsigned char *buf, unsigned int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendall_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_sendall_post[hIndex].func; - retVal___ = postHookFunc(retVal___, buf, &len); + if( HPMHooks.count.HP_mapif_parse_quest_load_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_quest_load_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } return retVal___; } -int HP_mapif_sendallwos(int sfd, unsigned char *buf, unsigned int len) { +int HP_mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_sendallwos_pre ) { - int (*preHookFunc) (int *sfd, unsigned char *buf, unsigned int *len); + if( HPMHooks.count.HP_mapif_load_guild_storage_pre ) { + int (*preHookFunc) (int *fd, int *account_id, int *guild_id, char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendallwos_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_sendallwos_pre[hIndex].func; - retVal___ = preHookFunc(&sfd, buf, &len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_guild_storage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_load_guild_storage_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id, &guild_id, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -7475,26 +13810,26 @@ int HP_mapif_sendallwos(int sfd, unsigned char *buf, unsigned int len) { } } { - retVal___ = HPMHooks.source.mapif.sendallwos(sfd, buf, len); + retVal___ = HPMHooks.source.mapif.load_guild_storage(fd, account_id, guild_id, flag); } - if( HPMHooks.count.HP_mapif_sendallwos_post ) { - int (*postHookFunc) (int retVal___, int *sfd, unsigned char *buf, unsigned int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendallwos_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_sendallwos_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &sfd, buf, &len); + if( HPMHooks.count.HP_mapif_load_guild_storage_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *guild_id, char *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_guild_storage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_load_guild_storage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &account_id, &guild_id, &flag); } } return retVal___; } -int HP_mapif_send(int fd, unsigned char *buf, unsigned int len) { +int HP_mapif_save_guild_storage_ack(int fd, int account_id, int guild_id, int fail) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_send_pre ) { - int (*preHookFunc) (int *fd, unsigned char *buf, unsigned int *len); + if( HPMHooks.count.HP_mapif_save_guild_storage_ack_pre ) { + int (*preHookFunc) (int *fd, int *account_id, int *guild_id, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_send_pre[hIndex].func; - retVal___ = preHookFunc(&fd, buf, &len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_guild_storage_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_save_guild_storage_ack_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id, &guild_id, &fail); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -7502,129 +13837,133 @@ int HP_mapif_send(int fd, unsigned char *buf, unsigned int len) { } } { - retVal___ = HPMHooks.source.mapif.send(fd, buf, len); + retVal___ = HPMHooks.source.mapif.save_guild_storage_ack(fd, account_id, guild_id, fail); } - if( HPMHooks.count.HP_mapif_send_post ) { - int (*postHookFunc) (int retVal___, int *fd, unsigned char *buf, unsigned int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_send_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, buf, &len); + if( HPMHooks.count.HP_mapif_save_guild_storage_ack_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *guild_id, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_guild_storage_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_save_guild_storage_ack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &account_id, &guild_id, &fail); } } return retVal___; } -void HP_mapif_send_users_count(int users) { +int HP_mapif_parse_LoadGuildStorage(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_send_users_count_pre ) { - void (*preHookFunc) (int *users); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_LoadGuildStorage_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_users_count_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_send_users_count_pre[hIndex].func; - preHookFunc(&users); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadGuildStorage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_LoadGuildStorage_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.send_users_count(users); + retVal___ = HPMHooks.source.mapif.parse_LoadGuildStorage(fd); } - if( HPMHooks.count.HP_mapif_send_users_count_post ) { - void (*postHookFunc) (int *users); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_users_count_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_send_users_count_post[hIndex].func; - postHookFunc(&users); + if( HPMHooks.count.HP_mapif_parse_LoadGuildStorage_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadGuildStorage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_LoadGuildStorage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } - return; + return retVal___; } -void HP_mapif_auction_message(int char_id, unsigned char result) { +int HP_mapif_parse_SaveGuildStorage(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_message_pre ) { - void (*preHookFunc) (int *char_id, unsigned char *result); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_SaveGuildStorage_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_message_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_auction_message_pre[hIndex].func; - preHookFunc(&char_id, &result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SaveGuildStorage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_SaveGuildStorage_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.auction_message(char_id, result); + retVal___ = HPMHooks.source.mapif.parse_SaveGuildStorage(fd); } - if( HPMHooks.count.HP_mapif_auction_message_post ) { - void (*postHookFunc) (int *char_id, unsigned char *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_message_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_auction_message_post[hIndex].func; - postHookFunc(&char_id, &result); + if( HPMHooks.count.HP_mapif_parse_SaveGuildStorage_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SaveGuildStorage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_SaveGuildStorage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } - return; + return retVal___; } -void HP_mapif_auction_sendlist(int fd, int char_id, short count, short pages, unsigned char *buf) { +int HP_mapif_itembound_ack(int fd, int aid, int guild_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_sendlist_pre ) { - void (*preHookFunc) (int *fd, int *char_id, short *count, short *pages, unsigned char *buf); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_itembound_ack_pre ) { + int (*preHookFunc) (int *fd, int *aid, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_sendlist_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_auction_sendlist_pre[hIndex].func; - preHookFunc(&fd, &char_id, &count, &pages, buf); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_itembound_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_itembound_ack_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &aid, &guild_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.auction_sendlist(fd, char_id, count, pages, buf); + retVal___ = HPMHooks.source.mapif.itembound_ack(fd, aid, guild_id); } - if( HPMHooks.count.HP_mapif_auction_sendlist_post ) { - void (*postHookFunc) (int *fd, int *char_id, short *count, short *pages, unsigned char *buf); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_sendlist_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_auction_sendlist_post[hIndex].func; - postHookFunc(&fd, &char_id, &count, &pages, buf); + if( HPMHooks.count.HP_mapif_itembound_ack_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *aid, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_itembound_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_itembound_ack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &aid, &guild_id); } } - return; + return retVal___; } -void HP_mapif_parse_auction_requestlist(int fd) { +int HP_mapif_parse_ItemBoundRetrieve_sub(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_auction_requestlist_pre ) { - void (*preHookFunc) (int *fd); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_requestlist_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_auction_requestlist_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_sub_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_auction_requestlist(fd); + retVal___ = HPMHooks.source.mapif.parse_ItemBoundRetrieve_sub(fd); } - if( HPMHooks.count.HP_mapif_parse_auction_requestlist_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_requestlist_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_auction_requestlist_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } - return; + return retVal___; } -void HP_mapif_auction_register(int fd, struct auction_data *auction) { +void HP_mapif_parse_ItemBoundRetrieve(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_register_pre ) { - void (*preHookFunc) (int *fd, struct auction_data *auction); + if( HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_pre ) { + void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_register_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_auction_register_pre[hIndex].func; - preHookFunc(&fd, auction); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_pre[hIndex].func; + preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -7632,24 +13971,24 @@ void HP_mapif_auction_register(int fd, struct auction_data *auction) { } } { - HPMHooks.source.mapif.auction_register(fd, auction); + HPMHooks.source.mapif.parse_ItemBoundRetrieve(fd); } - if( HPMHooks.count.HP_mapif_auction_register_post ) { - void (*postHookFunc) (int *fd, struct auction_data *auction); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_register_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_auction_register_post[hIndex].func; - postHookFunc(&fd, auction); + if( HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_post[hIndex].func; + postHookFunc(&fd); } } return; } -void HP_mapif_parse_auction_register(int fd) { +void HP_mapif_parse_accinfo(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_auction_register_pre ) { + if( HPMHooks.count.HP_mapif_parse_accinfo_pre ) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_register_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_auction_register_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_accinfo_pre[hIndex].func; preHookFunc(&fd); } if( *HPMforce_return ) { @@ -7658,25 +13997,25 @@ void HP_mapif_parse_auction_register(int fd) { } } { - HPMHooks.source.mapif.parse_auction_register(fd); + HPMHooks.source.mapif.parse_accinfo(fd); } - if( HPMHooks.count.HP_mapif_parse_auction_register_post ) { + if( HPMHooks.count.HP_mapif_parse_accinfo_post ) { void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_register_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_auction_register_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_accinfo_post[hIndex].func; postHookFunc(&fd); } } return; } -void HP_mapif_auction_cancel(int fd, int char_id, unsigned char result) { +void HP_mapif_parse_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int group_id, int logincount, int state) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_cancel_pre ) { - void (*preHookFunc) (int *fd, int *char_id, unsigned char *result); + if( HPMHooks.count.HP_mapif_parse_accinfo2_pre ) { + void (*preHookFunc) (bool *success, int *map_fd, int *u_fd, int *u_aid, int *account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int *group_id, int *logincount, int *state); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_cancel_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_auction_cancel_pre[hIndex].func; - preHookFunc(&fd, &char_id, &result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_accinfo2_pre[hIndex].func; + preHookFunc(&success, &map_fd, &u_fd, &u_aid, &account_id, userid, user_pass, email, last_ip, lastlogin, pin_code, birthdate, &group_id, &logincount, &state); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -7684,77 +14023,79 @@ void HP_mapif_auction_cancel(int fd, int char_id, unsigned char result) { } } { - HPMHooks.source.mapif.auction_cancel(fd, char_id, result); + HPMHooks.source.mapif.parse_accinfo2(success, map_fd, u_fd, u_aid, account_id, userid, user_pass, email, last_ip, lastlogin, pin_code, birthdate, group_id, logincount, state); } - if( HPMHooks.count.HP_mapif_auction_cancel_post ) { - void (*postHookFunc) (int *fd, int *char_id, unsigned char *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_cancel_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_auction_cancel_post[hIndex].func; - postHookFunc(&fd, &char_id, &result); + if( HPMHooks.count.HP_mapif_parse_accinfo2_post ) { + void (*postHookFunc) (bool *success, int *map_fd, int *u_fd, int *u_aid, int *account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int *group_id, int *logincount, int *state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_accinfo2_post[hIndex].func; + postHookFunc(&success, &map_fd, &u_fd, &u_aid, &account_id, userid, user_pass, email, last_ip, lastlogin, pin_code, birthdate, &group_id, &logincount, &state); } } return; } -void HP_mapif_parse_auction_cancel(int fd) { +int HP_mapif_broadcast(unsigned char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_auction_cancel_pre ) { - void (*preHookFunc) (int *fd); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_broadcast_pre ) { + int (*preHookFunc) (unsigned char *mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, int *sfd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_cancel_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_auction_cancel_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_broadcast_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_broadcast_pre[hIndex].func; + retVal___ = preHookFunc(mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &sfd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_auction_cancel(fd); + retVal___ = HPMHooks.source.mapif.broadcast(mes, len, fontColor, fontType, fontSize, fontAlign, fontY, sfd); } - if( HPMHooks.count.HP_mapif_parse_auction_cancel_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_cancel_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_auction_cancel_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_mapif_broadcast_post ) { + int (*postHookFunc) (int retVal___, unsigned char *mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, int *sfd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_broadcast_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_broadcast_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &sfd); } } - return; + return retVal___; } -void HP_mapif_auction_close(int fd, int char_id, unsigned char result) { +int HP_mapif_wis_message(struct WisData *wd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_close_pre ) { - void (*preHookFunc) (int *fd, int *char_id, unsigned char *result); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_wis_message_pre ) { + int (*preHookFunc) (struct WisData *wd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_close_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_auction_close_pre[hIndex].func; - preHookFunc(&fd, &char_id, &result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_wis_message_pre[hIndex].func; + retVal___ = preHookFunc(wd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.auction_close(fd, char_id, result); + retVal___ = HPMHooks.source.mapif.wis_message(wd); } - if( HPMHooks.count.HP_mapif_auction_close_post ) { - void (*postHookFunc) (int *fd, int *char_id, unsigned char *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_close_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_auction_close_post[hIndex].func; - postHookFunc(&fd, &char_id, &result); + if( HPMHooks.count.HP_mapif_wis_message_post ) { + int (*postHookFunc) (int retVal___, struct WisData *wd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_wis_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, wd); } } - return; + return retVal___; } -void HP_mapif_parse_auction_close(int fd) { +void HP_mapif_wis_response(int fd, unsigned char *src, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_auction_close_pre ) { - void (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_mapif_wis_response_pre ) { + void (*preHookFunc) (int *fd, unsigned char *src, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_close_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_auction_close_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_response_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_wis_response_pre[hIndex].func; + preHookFunc(&fd, src, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -7762,78 +14103,80 @@ void HP_mapif_parse_auction_close(int fd) { } } { - HPMHooks.source.mapif.parse_auction_close(fd); + HPMHooks.source.mapif.wis_response(fd, src, flag); } - if( HPMHooks.count.HP_mapif_parse_auction_close_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_close_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_auction_close_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_mapif_wis_response_post ) { + void (*postHookFunc) (int *fd, unsigned char *src, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_response_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_wis_response_post[hIndex].func; + postHookFunc(&fd, src, &flag); } } return; } -void HP_mapif_auction_bid(int fd, int char_id, int bid, unsigned char result) { +int HP_mapif_wis_end(struct WisData *wd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_bid_pre ) { - void (*preHookFunc) (int *fd, int *char_id, int *bid, unsigned char *result); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_wis_end_pre ) { + int (*preHookFunc) (struct WisData *wd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_bid_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_auction_bid_pre[hIndex].func; - preHookFunc(&fd, &char_id, &bid, &result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_end_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_wis_end_pre[hIndex].func; + retVal___ = preHookFunc(wd, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.auction_bid(fd, char_id, bid, result); + retVal___ = HPMHooks.source.mapif.wis_end(wd, flag); } - if( HPMHooks.count.HP_mapif_auction_bid_post ) { - void (*postHookFunc) (int *fd, int *char_id, int *bid, unsigned char *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_bid_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_auction_bid_post[hIndex].func; - postHookFunc(&fd, &char_id, &bid, &result); + if( HPMHooks.count.HP_mapif_wis_end_post ) { + int (*postHookFunc) (int retVal___, struct WisData *wd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_end_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_wis_end_post[hIndex].func; + retVal___ = postHookFunc(retVal___, wd, &flag); } } - return; + return retVal___; } -void HP_mapif_parse_auction_bid(int fd) { +int HP_mapif_account_reg_reply(int fd, int account_id, int char_id, int type) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_auction_bid_pre ) { - void (*preHookFunc) (int *fd); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_account_reg_reply_pre ) { + int (*preHookFunc) (int *fd, int *account_id, int *char_id, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_bid_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_auction_bid_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_reg_reply_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_account_reg_reply_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id, &char_id, &type); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_auction_bid(fd); + retVal___ = HPMHooks.source.mapif.account_reg_reply(fd, account_id, char_id, type); } - if( HPMHooks.count.HP_mapif_parse_auction_bid_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_bid_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_auction_bid_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_mapif_account_reg_reply_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_reg_reply_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_account_reg_reply_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &account_id, &char_id, &type); } } - return; + return retVal___; } -bool HP_mapif_elemental_save(struct s_elemental *ele) { +int HP_mapif_disconnectplayer(int fd, int account_id, int char_id, int reason) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_elemental_save_pre ) { - bool (*preHookFunc) (struct s_elemental *ele); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_disconnectplayer_pre ) { + int (*preHookFunc) (int *fd, int *account_id, int *char_id, int *reason); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_save_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_elemental_save_pre[hIndex].func; - retVal___ = preHookFunc(ele); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_disconnectplayer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_disconnectplayer_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id, &char_id, &reason); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -7841,26 +14184,26 @@ bool HP_mapif_elemental_save(struct s_elemental *ele) { } } { - retVal___ = HPMHooks.source.mapif.elemental_save(ele); + retVal___ = HPMHooks.source.mapif.disconnectplayer(fd, account_id, char_id, reason); } - if( HPMHooks.count.HP_mapif_elemental_save_post ) { - bool (*postHookFunc) (bool retVal___, struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_save_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_elemental_save_post[hIndex].func; - retVal___ = postHookFunc(retVal___, ele); + if( HPMHooks.count.HP_mapif_disconnectplayer_post ) { + int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, int *reason); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_disconnectplayer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_disconnectplayer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &account_id, &char_id, &reason); } } return retVal___; } -bool HP_mapif_elemental_load(int ele_id, int char_id, struct s_elemental *ele) { +int HP_mapif_parse_broadcast(int fd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_elemental_load_pre ) { - bool (*preHookFunc) (int *ele_id, int *char_id, struct s_elemental *ele); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_broadcast_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_load_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_elemental_load_pre[hIndex].func; - retVal___ = preHookFunc(&ele_id, &char_id, ele); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_broadcast_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_broadcast_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -7868,26 +14211,26 @@ bool HP_mapif_elemental_load(int ele_id, int char_id, struct s_elemental *ele) { } } { - retVal___ = HPMHooks.source.mapif.elemental_load(ele_id, char_id, ele); + retVal___ = HPMHooks.source.mapif.parse_broadcast(fd); } - if( HPMHooks.count.HP_mapif_elemental_load_post ) { - bool (*postHookFunc) (bool retVal___, int *ele_id, int *char_id, struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_load_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_elemental_load_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ele_id, &char_id, ele); + if( HPMHooks.count.HP_mapif_parse_broadcast_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_broadcast_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_broadcast_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } return retVal___; } -bool HP_mapif_elemental_delete(int ele_id) { +int HP_mapif_parse_WisRequest(int fd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_elemental_delete_pre ) { - bool (*preHookFunc) (int *ele_id); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_WisRequest_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_elemental_delete_pre[hIndex].func; - retVal___ = preHookFunc(&ele_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisRequest_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_WisRequest_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -7895,129 +14238,133 @@ bool HP_mapif_elemental_delete(int ele_id) { } } { - retVal___ = HPMHooks.source.mapif.elemental_delete(ele_id); + retVal___ = HPMHooks.source.mapif.parse_WisRequest(fd); } - if( HPMHooks.count.HP_mapif_elemental_delete_post ) { - bool (*postHookFunc) (bool retVal___, int *ele_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_elemental_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ele_id); + if( HPMHooks.count.HP_mapif_parse_WisRequest_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisRequest_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_WisRequest_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } return retVal___; } -void HP_mapif_elemental_send(int fd, struct s_elemental *ele, unsigned char flag) { +int HP_mapif_parse_WisReply(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_elemental_send_pre ) { - void (*preHookFunc) (int *fd, struct s_elemental *ele, unsigned char *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_WisReply_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_send_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_elemental_send_pre[hIndex].func; - preHookFunc(&fd, ele, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisReply_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_WisReply_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.elemental_send(fd, ele, flag); + retVal___ = HPMHooks.source.mapif.parse_WisReply(fd); } - if( HPMHooks.count.HP_mapif_elemental_send_post ) { - void (*postHookFunc) (int *fd, struct s_elemental *ele, unsigned char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_send_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_elemental_send_post[hIndex].func; - postHookFunc(&fd, ele, &flag); + if( HPMHooks.count.HP_mapif_parse_WisReply_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisReply_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_WisReply_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } - return; + return retVal___; } -void HP_mapif_parse_elemental_create(int fd, struct s_elemental *ele) { +int HP_mapif_parse_WisToGM(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_elemental_create_pre ) { - void (*preHookFunc) (int *fd, struct s_elemental *ele); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_WisToGM_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_create_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_create_pre[hIndex].func; - preHookFunc(&fd, ele); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisToGM_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_WisToGM_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_elemental_create(fd, ele); + retVal___ = HPMHooks.source.mapif.parse_WisToGM(fd); } - if( HPMHooks.count.HP_mapif_parse_elemental_create_post ) { - void (*postHookFunc) (int *fd, struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_create_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_create_post[hIndex].func; - postHookFunc(&fd, ele); + if( HPMHooks.count.HP_mapif_parse_WisToGM_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisToGM_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_WisToGM_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } - return; + return retVal___; } -void HP_mapif_parse_elemental_load(int fd, int ele_id, int char_id) { +int HP_mapif_parse_Registry(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_elemental_load_pre ) { - void (*preHookFunc) (int *fd, int *ele_id, int *char_id); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_Registry_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_load_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_load_pre[hIndex].func; - preHookFunc(&fd, &ele_id, &char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_Registry_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_Registry_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_elemental_load(fd, ele_id, char_id); + retVal___ = HPMHooks.source.mapif.parse_Registry(fd); } - if( HPMHooks.count.HP_mapif_parse_elemental_load_post ) { - void (*postHookFunc) (int *fd, int *ele_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_load_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_load_post[hIndex].func; - postHookFunc(&fd, &ele_id, &char_id); + if( HPMHooks.count.HP_mapif_parse_Registry_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_Registry_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_Registry_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } - return; + return retVal___; } -void HP_mapif_elemental_deleted(int fd, unsigned char flag) { +int HP_mapif_parse_RegistryRequest(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_elemental_deleted_pre ) { - void (*preHookFunc) (int *fd, unsigned char *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_RegistryRequest_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_deleted_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_elemental_deleted_pre[hIndex].func; - preHookFunc(&fd, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_RegistryRequest_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_RegistryRequest_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.elemental_deleted(fd, flag); + retVal___ = HPMHooks.source.mapif.parse_RegistryRequest(fd); } - if( HPMHooks.count.HP_mapif_elemental_deleted_post ) { - void (*postHookFunc) (int *fd, unsigned char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_deleted_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_elemental_deleted_post[hIndex].func; - postHookFunc(&fd, &flag); + if( HPMHooks.count.HP_mapif_parse_RegistryRequest_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_RegistryRequest_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_RegistryRequest_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } - return; + return retVal___; } -void HP_mapif_parse_elemental_delete(int fd, int ele_id) { +void HP_mapif_namechange_ack(int fd, int account_id, int char_id, int type, int flag, const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_elemental_delete_pre ) { - void (*preHookFunc) (int *fd, int *ele_id); + if( HPMHooks.count.HP_mapif_namechange_ack_pre ) { + void (*preHookFunc) (int *fd, int *account_id, int *char_id, int *type, int *flag, const char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_delete_pre[hIndex].func; - preHookFunc(&fd, &ele_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_namechange_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_namechange_ack_pre[hIndex].func; + preHookFunc(&fd, &account_id, &char_id, &type, &flag, name); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -8025,105 +14372,107 @@ void HP_mapif_parse_elemental_delete(int fd, int ele_id) { } } { - HPMHooks.source.mapif.parse_elemental_delete(fd, ele_id); + HPMHooks.source.mapif.namechange_ack(fd, account_id, char_id, type, flag, name); } - if( HPMHooks.count.HP_mapif_parse_elemental_delete_post ) { - void (*postHookFunc) (int *fd, int *ele_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_delete_post[hIndex].func; - postHookFunc(&fd, &ele_id); + if( HPMHooks.count.HP_mapif_namechange_ack_post ) { + void (*postHookFunc) (int *fd, int *account_id, int *char_id, int *type, int *flag, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_namechange_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_namechange_ack_post[hIndex].func; + postHookFunc(&fd, &account_id, &char_id, &type, &flag, name); } } return; } -void HP_mapif_elemental_saved(int fd, unsigned char flag) { +int HP_mapif_parse_NameChangeRequest(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_elemental_saved_pre ) { - void (*preHookFunc) (int *fd, unsigned char *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_mapif_parse_NameChangeRequest_pre ) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_saved_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_elemental_saved_pre[hIndex].func; - preHookFunc(&fd, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_NameChangeRequest_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapif_parse_NameChangeRequest_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.elemental_saved(fd, flag); + retVal___ = HPMHooks.source.mapif.parse_NameChangeRequest(fd); } - if( HPMHooks.count.HP_mapif_elemental_saved_post ) { - void (*postHookFunc) (int *fd, unsigned char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_saved_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_elemental_saved_post[hIndex].func; - postHookFunc(&fd, &flag); + if( HPMHooks.count.HP_mapif_parse_NameChangeRequest_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_NameChangeRequest_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapif_parse_NameChangeRequest_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } - return; + return retVal___; } -void HP_mapif_parse_elemental_save(int fd, struct s_elemental *ele) { +/* mapindex */ +int HP_mapindex_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_elemental_save_pre ) { - void (*preHookFunc) (int *fd, struct s_elemental *ele); + int retVal___ = 0; + if( HPMHooks.count.HP_mapindex_init_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_save_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_save_pre[hIndex].func; - preHookFunc(&fd, ele); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_init_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_elemental_save(fd, ele); + retVal___ = HPMHooks.source.mapindex.init(); } - if( HPMHooks.count.HP_mapif_parse_elemental_save_post ) { - void (*postHookFunc) (int *fd, struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_save_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_save_post[hIndex].func; - postHookFunc(&fd, ele); + if( HPMHooks.count.HP_mapindex_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -int HP_mapif_guild_created(int fd, int account_id, struct guild *g) { +void HP_mapindex_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_created_pre ) { - int (*preHookFunc) (int *fd, int *account_id, struct guild *g); + if( HPMHooks.count.HP_mapindex_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_created_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_created_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.guild_created(fd, account_id, g); + HPMHooks.source.mapindex.final(); } - if( HPMHooks.count.HP_mapif_guild_created_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_created_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_created_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, g); + if( HPMHooks.count.HP_mapindex_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_mapif_guild_noinfo(int fd, int guild_id) { +int HP_mapindex_addmap(int index, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_noinfo_pre ) { - int (*preHookFunc) (int *fd, int *guild_id); + if( HPMHooks.count.HP_mapindex_addmap_pre ) { + int (*preHookFunc) (int *index, const char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_noinfo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_noinfo_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_addmap_pre[hIndex].func; + retVal___ = preHookFunc(&index, name); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -8131,53 +14480,52 @@ int HP_mapif_guild_noinfo(int fd, int guild_id) { } } { - retVal___ = HPMHooks.source.mapif.guild_noinfo(fd, guild_id); + retVal___ = HPMHooks.source.mapindex.addmap(index, name); } - if( HPMHooks.count.HP_mapif_guild_noinfo_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_noinfo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_noinfo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id); + if( HPMHooks.count.HP_mapindex_addmap_post ) { + int (*postHookFunc) (int retVal___, int *index, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_addmap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &index, name); } } return retVal___; } -int HP_mapif_guild_info(int fd, struct guild *g) { +void HP_mapindex_removemap(int index) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_info_pre ) { - int (*preHookFunc) (int *fd, struct guild *g); + if( HPMHooks.count.HP_mapindex_removemap_pre ) { + void (*preHookFunc) (int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_info_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_info_pre[hIndex].func; - retVal___ = preHookFunc(&fd, g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_removemap_pre[hIndex].func; + preHookFunc(&index); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.guild_info(fd, g); + HPMHooks.source.mapindex.removemap(index); } - if( HPMHooks.count.HP_mapif_guild_info_post ) { - int (*postHookFunc) (int retVal___, int *fd, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_info_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_info_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, g); + if( HPMHooks.count.HP_mapindex_removemap_post ) { + void (*postHookFunc) (int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_removemap_post[hIndex].func; + postHookFunc(&index); } } - return retVal___; + return; } -int HP_mapif_guild_memberadded(int fd, int guild_id, int account_id, int char_id, int flag) { +const char* HP_mapindex_getmapname(const char *string, char *output) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_memberadded_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_mapindex_getmapname_pre ) { + const char* (*preHookFunc) (const char *string, char *output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberadded_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_memberadded_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_getmapname_pre[hIndex].func; + retVal___ = preHookFunc(string, output); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -8185,26 +14533,26 @@ int HP_mapif_guild_memberadded(int fd, int guild_id, int account_id, int char_id } } { - retVal___ = HPMHooks.source.mapif.guild_memberadded(fd, guild_id, account_id, char_id, flag); + retVal___ = HPMHooks.source.mapindex.getmapname(string, output); } - if( HPMHooks.count.HP_mapif_guild_memberadded_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *account_id, int *char_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberadded_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_memberadded_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, &account_id, &char_id, &flag); + if( HPMHooks.count.HP_mapindex_getmapname_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *string, char *output); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_getmapname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, string, output); } } return retVal___; } -int HP_mapif_guild_withdraw(int guild_id, int account_id, int char_id, int flag, const char *name, const char *mes) { +const char* HP_mapindex_getmapname_ext(const char *string, char *output) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_withdraw_pre ) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char *name, const char *mes); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_mapindex_getmapname_ext_pre ) { + const char* (*preHookFunc) (const char *string, char *output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_withdraw_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_withdraw_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag, name, mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_getmapname_ext_pre[hIndex].func; + retVal___ = preHookFunc(string, output); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -8212,26 +14560,26 @@ int HP_mapif_guild_withdraw(int guild_id, int account_id, int char_id, int flag, } } { - retVal___ = HPMHooks.source.mapif.guild_withdraw(guild_id, account_id, char_id, flag, name, mes); + retVal___ = HPMHooks.source.mapindex.getmapname_ext(string, output); } - if( HPMHooks.count.HP_mapif_guild_withdraw_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, int *flag, const char *name, const char *mes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_withdraw_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_withdraw_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &flag, name, mes); + if( HPMHooks.count.HP_mapindex_getmapname_ext_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *string, char *output); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_getmapname_ext_post[hIndex].func; + retVal___ = postHookFunc(retVal___, string, output); } } return retVal___; } -int HP_mapif_guild_memberinfoshort(struct guild *g, int idx) { +unsigned short HP_mapindex_name2id(const char *p1) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_memberinfoshort_pre ) { - int (*preHookFunc) (struct guild *g, int *idx); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_mapindex_name2id_pre ) { + unsigned short (*preHookFunc) (const char *p1); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfoshort_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_memberinfoshort_pre[hIndex].func; - retVal___ = preHookFunc(g, &idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_name2id_pre[hIndex].func; + retVal___ = preHookFunc(p1); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -8239,26 +14587,26 @@ int HP_mapif_guild_memberinfoshort(struct guild *g, int idx) { } } { - retVal___ = HPMHooks.source.mapif.guild_memberinfoshort(g, idx); + retVal___ = HPMHooks.source.mapindex.name2id(p1); } - if( HPMHooks.count.HP_mapif_guild_memberinfoshort_post ) { - int (*postHookFunc) (int retVal___, struct guild *g, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfoshort_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_memberinfoshort_post[hIndex].func; - retVal___ = postHookFunc(retVal___, g, &idx); + if( HPMHooks.count.HP_mapindex_name2id_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, const char *p1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_name2id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p1); } } return retVal___; } -int HP_mapif_guild_broken(int guild_id, int flag) { +const char* HP_mapindex_id2name(uint16 id, const char *file, int line, const char *func) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_broken_pre ) { - int (*preHookFunc) (int *guild_id, int *flag); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_broken_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_broken_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &flag); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_mapindex_id2name_pre ) { + const char* (*preHookFunc) (uint16 *id, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_id2name_pre[hIndex].func; + retVal___ = preHookFunc(&id, file, &line, func); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -8266,26 +14614,26 @@ int HP_mapif_guild_broken(int guild_id, int flag) { } } { - retVal___ = HPMHooks.source.mapif.guild_broken(guild_id, flag); + retVal___ = HPMHooks.source.mapindex.id2name(id, file, line, func); } - if( HPMHooks.count.HP_mapif_guild_broken_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_broken_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_broken_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &flag); + if( HPMHooks.count.HP_mapindex_id2name_post ) { + const char* (*postHookFunc) (const char* retVal___, uint16 *id, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_id2name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id, file, &line, func); } } return retVal___; } -int HP_mapif_guild_message(int guild_id, int account_id, char *mes, int len, int sfd) { +bool HP_mapindex_check_default(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_message_pre ) { - int (*preHookFunc) (int *guild_id, int *account_id, char *mes, int *len, int *sfd); + bool retVal___ = false; + if( HPMHooks.count.HP_mapindex_check_default_pre ) { + bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_message_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_message_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, mes, &len, &sfd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_check_default_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -8293,242 +14641,236 @@ int HP_mapif_guild_message(int guild_id, int account_id, char *mes, int len, int } } { - retVal___ = HPMHooks.source.mapif.guild_message(guild_id, account_id, mes, len, sfd); + retVal___ = HPMHooks.source.mapindex.check_default(); } - if( HPMHooks.count.HP_mapif_guild_message_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, char *mes, int *len, int *sfd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_message_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &account_id, mes, &len, &sfd); + if( HPMHooks.count.HP_mapindex_check_default_post ) { + bool (*postHookFunc) (bool retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_check_default_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_mapif_guild_basicinfochanged(int guild_id, int type, const void *data, int len) { +/* nullpo */ +void HP_nullpo_assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_basicinfochanged_pre ) { - int (*preHookFunc) (int *guild_id, int *type, const void *data, int *len); + if( HPMHooks.count.HP_nullpo_assert_report_pre ) { + void (*preHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_basicinfochanged_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_basicinfochanged_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &type, data, &len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_nullpo_assert_report_pre[hIndex].func; + preHookFunc(file, &line, func, targetname, title); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.guild_basicinfochanged(guild_id, type, data, len); + HPMHooks.source.nullpo.assert_report(file, line, func, targetname, title); } - if( HPMHooks.count.HP_mapif_guild_basicinfochanged_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, int *type, const void *data, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_basicinfochanged_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_basicinfochanged_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &type, data, &len); + if( HPMHooks.count.HP_nullpo_assert_report_post ) { + void (*postHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title); + for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_nullpo_assert_report_post[hIndex].func; + postHookFunc(file, &line, func, targetname, title); } } - return retVal___; + return; } -int HP_mapif_guild_memberinfochanged(int guild_id, int account_id, int char_id, int type, const void *data, int len) { +/* pincode */ +void HP_pincode_handle(int fd, struct char_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_memberinfochanged_pre ) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *type, const void *data, int *len); + 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_mapif_guild_memberinfochanged_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_memberinfochanged_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &type, data, &len); + 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 retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.guild_memberinfochanged(guild_id, account_id, char_id, type, data, len); + HPMHooks.source.pincode.handle(fd, sd); } - if( HPMHooks.count.HP_mapif_guild_memberinfochanged_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, int *type, const void *data, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfochanged_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_memberinfochanged_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &type, data, &len); + 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 retVal___; + return; } -int HP_mapif_guild_skillupack(int guild_id, uint16 skill_id, int account_id) { +void HP_pincode_decrypt(unsigned int userSeed, char *pin) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_skillupack_pre ) { - int (*preHookFunc) (int *guild_id, uint16 *skill_id, int *account_id); + if( HPMHooks.count.HP_pincode_decrypt_pre ) { + void (*preHookFunc) (unsigned int *userSeed, char *pin); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_skillupack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_skillupack_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &skill_id, &account_id); + 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 retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.guild_skillupack(guild_id, skill_id, account_id); + HPMHooks.source.pincode.decrypt(userSeed, pin); } - if( HPMHooks.count.HP_mapif_guild_skillupack_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, uint16 *skill_id, int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_skillupack_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_skillupack_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &skill_id, &account_id); + 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 retVal___; + return; } -int HP_mapif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int account_id2, int flag, const char *name1, const char *name2) { +void HP_pincode_error(int account_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_alliance_pre ) { - int (*preHookFunc) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag, const char *name1, const char *name2); + if( HPMHooks.count.HP_pincode_error_pre ) { + void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_alliance_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_alliance_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id1, &guild_id2, &account_id1, &account_id2, &flag, name1, name2); + 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 retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.guild_alliance(guild_id1, guild_id2, account_id1, account_id2, flag, name1, name2); + HPMHooks.source.pincode.error(account_id); } - if( HPMHooks.count.HP_mapif_guild_alliance_post ) { - int (*postHookFunc) (int retVal___, int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag, const char *name1, const char *name2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_alliance_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_alliance_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id1, &guild_id2, &account_id1, &account_id2, &flag, name1, name2); + 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 retVal___; + return; } -int HP_mapif_guild_position(struct guild *g, int idx) { +void HP_pincode_update(int account_id, char *pin) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_position_pre ) { - int (*preHookFunc) (struct guild *g, int *idx); + if( HPMHooks.count.HP_pincode_update_pre ) { + void (*preHookFunc) (int *account_id, char *pin); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_position_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_position_pre[hIndex].func; - retVal___ = preHookFunc(g, &idx); + 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 retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.guild_position(g, idx); + HPMHooks.source.pincode.update(account_id, pin); } - if( HPMHooks.count.HP_mapif_guild_position_post ) { - int (*postHookFunc) (int retVal___, struct guild *g, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_position_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_position_post[hIndex].func; - retVal___ = postHookFunc(retVal___, g, &idx); + 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 retVal___; + return; } -int HP_mapif_guild_notice(struct guild *g) { +void HP_pincode_sendstate(int fd, struct char_session_data *sd, uint16 state) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_notice_pre ) { - int (*preHookFunc) (struct guild *g); + 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_mapif_guild_notice_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_notice_pre[hIndex].func; - retVal___ = preHookFunc(g); + 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 retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.guild_notice(g); + HPMHooks.source.pincode.sendstate(fd, sd, state); } - if( HPMHooks.count.HP_mapif_guild_notice_post ) { - int (*postHookFunc) (int retVal___, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_notice_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_notice_post[hIndex].func; - retVal___ = postHookFunc(retVal___, g); + 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 retVal___; + return; } -int HP_mapif_guild_emblem(struct guild *g) { +void HP_pincode_setnew(int fd, struct char_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_emblem_pre ) { - int (*preHookFunc) (struct guild *g); + 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_mapif_guild_emblem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_emblem_pre[hIndex].func; - retVal___ = preHookFunc(g); + 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 retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.guild_emblem(g); + HPMHooks.source.pincode.setnew(fd, sd); } - if( HPMHooks.count.HP_mapif_guild_emblem_post ) { - int (*postHookFunc) (int retVal___, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_emblem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_emblem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, g); + 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 retVal___; + return; } -int HP_mapif_guild_master_changed(struct guild *g, int aid, int cid) { +void HP_pincode_change(int fd, struct char_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_master_changed_pre ) { - int (*preHookFunc) (struct guild *g, int *aid, int *cid); + 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_mapif_guild_master_changed_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_master_changed_pre[hIndex].func; - retVal___ = preHookFunc(g, &aid, &cid); + 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 retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.guild_master_changed(g, aid, cid); + HPMHooks.source.pincode.change(fd, sd); } - if( HPMHooks.count.HP_mapif_guild_master_changed_post ) { - int (*postHookFunc) (int retVal___, struct guild *g, int *aid, int *cid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_master_changed_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_master_changed_post[hIndex].func; - retVal___ = postHookFunc(retVal___, g, &aid, &cid); + 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 retVal___; + return; } -int HP_mapif_guild_castle_dataload(int fd, int sz, int *castle_ids) { +int HP_pincode_compare(int fd, struct char_session_data *sd, char *pin) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_castle_dataload_pre ) { - int (*preHookFunc) (int *fd, int *sz, int *castle_ids); + 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_mapif_guild_castle_dataload_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_castle_dataload_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &sz, castle_ids); + 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; @@ -8536,53 +14878,52 @@ int HP_mapif_guild_castle_dataload(int fd, int sz, int *castle_ids) { } } { - retVal___ = HPMHooks.source.mapif.guild_castle_dataload(fd, sz, castle_ids); + retVal___ = HPMHooks.source.pincode.compare(fd, sd, pin); } - if( HPMHooks.count.HP_mapif_guild_castle_dataload_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *sz, int *castle_ids); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_castle_dataload_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_castle_dataload_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &sz, castle_ids); + 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___; } -int HP_mapif_parse_CreateGuild(int fd, int account_id, char *name, struct guild_member *master) { +void HP_pincode_check(int fd, struct char_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_CreateGuild_pre ) { - int (*preHookFunc) (int *fd, int *account_id, char *name, struct guild_member *master); + 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_mapif_parse_CreateGuild_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_CreateGuild_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, name, master); + 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 retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.parse_CreateGuild(fd, account_id, name, master); + HPMHooks.source.pincode.check(fd, sd); } - if( HPMHooks.count.HP_mapif_parse_CreateGuild_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, char *name, struct guild_member *master); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateGuild_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_CreateGuild_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, name, master); + 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 retVal___; + return; } -int HP_mapif_parse_GuildInfo(int fd, int guild_id) { +bool HP_pincode_config_read(char *w1, char *w2) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildInfo_pre ) { - int (*preHookFunc) (int *fd, int *guild_id); + 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_mapif_parse_GuildInfo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildInfo_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id); + 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; @@ -8590,107 +14931,107 @@ int HP_mapif_parse_GuildInfo(int fd, int guild_id) { } } { - retVal___ = HPMHooks.source.mapif.parse_GuildInfo(fd, guild_id); + retVal___ = HPMHooks.source.pincode.config_read(w1, w2); } - if( HPMHooks.count.HP_mapif_parse_GuildInfo_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildInfo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildInfo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id); + 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___; } -int HP_mapif_parse_GuildAddMember(int fd, int guild_id, struct guild_member *m) { +/* showmsg */ +void HP_showmsg_init(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildAddMember_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, struct guild_member *m); + if( HPMHooks.count.HP_showmsg_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAddMember_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildAddMember_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_showmsg_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.parse_GuildAddMember(fd, guild_id, m); + HPMHooks.source.showmsg.init(); } - if( HPMHooks.count.HP_mapif_parse_GuildAddMember_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, struct guild_member *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAddMember_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildAddMember_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, m); + if( HPMHooks.count.HP_showmsg_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_showmsg_init_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, int flag, const char *mes) { +void HP_showmsg_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildLeave_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag, const char *mes); + if( HPMHooks.count.HP_showmsg_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildLeave_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildLeave_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &flag, mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_showmsg_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.parse_GuildLeave(fd, guild_id, account_id, char_id, flag, mes); + HPMHooks.source.showmsg.final(); } - if( HPMHooks.count.HP_mapif_parse_GuildLeave_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *account_id, int *char_id, int *flag, const char *mes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildLeave_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildLeave_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, &account_id, &char_id, &flag, mes); + if( HPMHooks.count.HP_showmsg_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_showmsg_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class_) { +void HP_showmsg_clearScreen(void) { 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_); + if( HPMHooks.count.HP_showmsg_clearScreen_pre ) { + void (*preHookFunc) (void); *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_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_showmsg_clearScreen_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.parse_GuildChangeMemberInfoShort(fd, guild_id, account_id, char_id, online, lv, class_); + HPMHooks.source.showmsg.clearScreen(); } - 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_); - 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_); + if( HPMHooks.count.HP_showmsg_clearScreen_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_showmsg_clearScreen_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_mapif_parse_BreakGuild(int fd, int guild_id) { +int HP_showmsg_showMessageV(const char *string, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_BreakGuild_pre ) { - int (*preHookFunc) (int *fd, int *guild_id); + if( HPMHooks.count.HP_showmsg_showMessageV_pre ) { + int (*preHookFunc) (const char *string, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakGuild_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_BreakGuild_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_showmsg_showMessageV_pre[hIndex].func; + retVal___ = preHookFunc(string, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -8698,80 +15039,83 @@ int HP_mapif_parse_BreakGuild(int fd, int guild_id) { } } { - retVal___ = HPMHooks.source.mapif.parse_BreakGuild(fd, guild_id); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.showmsg.showMessageV(string, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_mapif_parse_BreakGuild_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakGuild_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_BreakGuild_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id); + if( HPMHooks.count.HP_showmsg_showMessageV_post ) { + int (*postHookFunc) (int retVal___, const char *string, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_showmsg_showMessageV_post[hIndex].func; + retVal___ = postHookFunc(retVal___, string, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_mapif_parse_GuildMessage(int fd, int guild_id, int account_id, char *mes, int len) { +/* sockt */ +void HP_sockt_init(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildMessage_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, int *account_id, char *mes, int *len); + if( HPMHooks.count.HP_sockt_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMessage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildMessage_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, &account_id, mes, &len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.parse_GuildMessage(fd, guild_id, account_id, mes, len); + HPMHooks.source.sockt.init(); } - if( HPMHooks.count.HP_mapif_parse_GuildMessage_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *account_id, char *mes, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMessage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildMessage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, &account_id, mes, &len); + if( HPMHooks.count.HP_sockt_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_init_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_mapif_parse_GuildBasicInfoChange(int fd, int guild_id, int type, const void *data, int len) { +void HP_sockt_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, int *type, const void *data, int *len); + if( HPMHooks.count.HP_sockt_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildBasicInfoChange_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, &type, data, &len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.parse_GuildBasicInfoChange(fd, guild_id, type, data, len); + HPMHooks.source.sockt.final(); } - if( HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *type, const void *data, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildBasicInfoChange_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, &type, data, &len); + if( HPMHooks.count.HP_sockt_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, int char_id, int type, const char *data, int len) { +int HP_sockt_perform(int next) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *type, const char *data, int *len); + if( HPMHooks.count.HP_sockt_perform_pre ) { + int (*preHookFunc) (int *next); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildMemberInfoChange_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &type, data, &len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_perform_pre[hIndex].func; + retVal___ = preHookFunc(&next); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -8779,53 +15123,52 @@ int HP_mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, i } } { - retVal___ = HPMHooks.source.mapif.parse_GuildMemberInfoChange(fd, guild_id, account_id, char_id, type, data, len); + retVal___ = HPMHooks.source.sockt.perform(next); } - if( HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *account_id, int *char_id, int *type, const char *data, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildMemberInfoChange_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, &account_id, &char_id, &type, data, &len); + if( HPMHooks.count.HP_sockt_perform_post ) { + int (*postHookFunc) (int retVal___, int *next); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_perform_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &next); } } return retVal___; } -int HP_mapif_parse_GuildPosition(int fd, int guild_id, int idx, struct guild_position *p) { +void HP_sockt_datasync(int fd, bool send) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildPosition_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, int *idx, struct guild_position *p); + if( HPMHooks.count.HP_sockt_datasync_pre ) { + void (*preHookFunc) (int *fd, bool *send); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildPosition_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildPosition_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, &idx, p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_datasync_pre[hIndex].func; + preHookFunc(&fd, &send); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.parse_GuildPosition(fd, guild_id, idx, p); + HPMHooks.source.sockt.datasync(fd, send); } - if( HPMHooks.count.HP_mapif_parse_GuildPosition_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *idx, struct guild_position *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildPosition_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildPosition_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, &idx, p); + if( HPMHooks.count.HP_sockt_datasync_post ) { + void (*postHookFunc) (int *fd, bool *send); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_datasync_post[hIndex].func; + postHookFunc(&fd, &send); } } - return retVal___; + return; } -int HP_mapif_parse_GuildSkillUp(int fd, int guild_id, uint16 skill_id, int account_id, int max) { +int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildSkillUp_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, uint16 *skill_id, int *account_id, int *max); + if( HPMHooks.count.HP_sockt_make_listen_bind_pre ) { + int (*preHookFunc) (uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildSkillUp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildSkillUp_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, &skill_id, &account_id, &max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_pre[hIndex].func; + retVal___ = preHookFunc(&ip, &port); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -8833,26 +15176,26 @@ int HP_mapif_parse_GuildSkillUp(int fd, int guild_id, uint16 skill_id, int accou } } { - retVal___ = HPMHooks.source.mapif.parse_GuildSkillUp(fd, guild_id, skill_id, account_id, max); + retVal___ = HPMHooks.source.sockt.make_listen_bind(ip, port); } - if( HPMHooks.count.HP_mapif_parse_GuildSkillUp_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, uint16 *skill_id, int *account_id, int *max); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildSkillUp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildSkillUp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, &skill_id, &account_id, &max); + if( HPMHooks.count.HP_sockt_make_listen_bind_post ) { + int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip, &port); } } return retVal___; } -int HP_mapif_parse_GuildDeleteAlliance(struct guild *g, int guild_id, int account_id1, int account_id2, int flag) { +int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_pre ) { - int (*preHookFunc) (struct guild *g, int *guild_id, int *account_id1, int *account_id2, int *flag); + if( HPMHooks.count.HP_sockt_make_connection_pre ) { + int (*preHookFunc) (uint32 *ip, uint16 *port, struct hSockOpt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildDeleteAlliance_pre[hIndex].func; - retVal___ = preHookFunc(g, &guild_id, &account_id1, &account_id2, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_make_connection_pre[hIndex].func; + retVal___ = preHookFunc(&ip, &port, opt); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -8860,26 +15203,26 @@ int HP_mapif_parse_GuildDeleteAlliance(struct guild *g, int guild_id, int accoun } } { - retVal___ = HPMHooks.source.mapif.parse_GuildDeleteAlliance(g, guild_id, account_id1, account_id2, flag); + retVal___ = HPMHooks.source.sockt.make_connection(ip, port, opt); } - if( HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_post ) { - int (*postHookFunc) (int retVal___, struct guild *g, int *guild_id, int *account_id1, int *account_id2, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildDeleteAlliance_post[hIndex].func; - retVal___ = postHookFunc(retVal___, g, &guild_id, &account_id1, &account_id2, &flag); + if( HPMHooks.count.HP_sockt_make_connection_post ) { + int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port, struct hSockOpt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_make_connection_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip, &port, opt); } } return retVal___; } -int HP_mapif_parse_GuildAlliance(int fd, int guild_id1, int guild_id2, int account_id1, int account_id2, int flag) { +int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildAlliance_pre ) { - int (*preHookFunc) (int *fd, int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag); + if( HPMHooks.count.HP_sockt_realloc_fifo_pre ) { + int (*preHookFunc) (int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAlliance_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildAlliance_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id1, &guild_id2, &account_id1, &account_id2, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &rfifo_size, &wfifo_size); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -8887,26 +15230,26 @@ int HP_mapif_parse_GuildAlliance(int fd, int guild_id1, int guild_id2, int accou } } { - retVal___ = HPMHooks.source.mapif.parse_GuildAlliance(fd, guild_id1, guild_id2, account_id1, account_id2, flag); + retVal___ = HPMHooks.source.sockt.realloc_fifo(fd, rfifo_size, wfifo_size); } - if( HPMHooks.count.HP_mapif_parse_GuildAlliance_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAlliance_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildAlliance_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id1, &guild_id2, &account_id1, &account_id2, &flag); + if( HPMHooks.count.HP_sockt_realloc_fifo_post ) { + int (*postHookFunc) (int retVal___, int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &rfifo_size, &wfifo_size); } } return retVal___; } -int HP_mapif_parse_GuildNotice(int fd, int guild_id, const char *mes1, const char *mes2) { +int HP_sockt_realloc_writefifo(int fd, size_t addition) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildNotice_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, const char *mes1, const char *mes2); + if( HPMHooks.count.HP_sockt_realloc_writefifo_pre ) { + int (*preHookFunc) (int *fd, size_t *addition); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildNotice_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildNotice_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, mes1, mes2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &addition); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -8914,26 +15257,26 @@ int HP_mapif_parse_GuildNotice(int fd, int guild_id, const char *mes1, const cha } } { - retVal___ = HPMHooks.source.mapif.parse_GuildNotice(fd, guild_id, mes1, mes2); + retVal___ = HPMHooks.source.sockt.realloc_writefifo(fd, addition); } - if( HPMHooks.count.HP_mapif_parse_GuildNotice_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, const char *mes1, const char *mes2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildNotice_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildNotice_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, mes1, mes2); + if( HPMHooks.count.HP_sockt_realloc_writefifo_post ) { + int (*postHookFunc) (int retVal___, int *fd, size_t *addition); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &addition); } } return retVal___; } -int HP_mapif_parse_GuildEmblem(int fd, int len, int guild_id, int dummy, const char *data) { +int HP_sockt_wfifoset(int fd, size_t len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildEmblem_pre ) { - int (*preHookFunc) (int *fd, int *len, int *guild_id, int *dummy, const char *data); + if( HPMHooks.count.HP_sockt_wfifoset_pre ) { + int (*preHookFunc) (int *fd, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildEmblem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildEmblem_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &len, &guild_id, &dummy, data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_wfifoset_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &len); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -8941,26 +15284,26 @@ int HP_mapif_parse_GuildEmblem(int fd, int len, int guild_id, int dummy, const c } } { - retVal___ = HPMHooks.source.mapif.parse_GuildEmblem(fd, len, guild_id, dummy, data); + retVal___ = HPMHooks.source.sockt.wfifoset(fd, len); } - if( HPMHooks.count.HP_mapif_parse_GuildEmblem_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *len, int *guild_id, int *dummy, const char *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildEmblem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildEmblem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &len, &guild_id, &dummy, data); + if( HPMHooks.count.HP_sockt_wfifoset_post ) { + int (*postHookFunc) (int retVal___, int *fd, size_t *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_wfifoset_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &len); } } return retVal___; } -int HP_mapif_parse_GuildCastleDataLoad(int fd, int len, int *castle_ids) { +int HP_sockt_rfifoskip(int fd, size_t len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_pre ) { - int (*preHookFunc) (int *fd, int *len, int *castle_ids); + if( HPMHooks.count.HP_sockt_rfifoskip_pre ) { + int (*preHookFunc) (int *fd, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataLoad_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &len, castle_ids); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_rfifoskip_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &len); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -8968,53 +15311,52 @@ int HP_mapif_parse_GuildCastleDataLoad(int fd, int len, int *castle_ids) { } } { - retVal___ = HPMHooks.source.mapif.parse_GuildCastleDataLoad(fd, len, castle_ids); + retVal___ = HPMHooks.source.sockt.rfifoskip(fd, len); } - if( HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *len, int *castle_ids); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataLoad_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &len, castle_ids); + if( HPMHooks.count.HP_sockt_rfifoskip_post ) { + int (*postHookFunc) (int retVal___, int *fd, size_t *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_rfifoskip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &len); } } return retVal___; } -int HP_mapif_parse_GuildCastleDataSave(int fd, int castle_id, int index, int value) { +void HP_sockt_close(int fd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_pre ) { - int (*preHookFunc) (int *fd, int *castle_id, int *index, int *value); + if( HPMHooks.count.HP_sockt_close_pre ) { + void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataSave_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &castle_id, &index, &value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_close_pre[hIndex].func; + preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.parse_GuildCastleDataSave(fd, castle_id, index, value); + HPMHooks.source.sockt.close(fd); } - if( HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *castle_id, int *index, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataSave_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &castle_id, &index, &value); + if( HPMHooks.count.HP_sockt_close_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_close_post[hIndex].func; + postHookFunc(&fd); } } - return retVal___; + return; } -int HP_mapif_parse_GuildMasterChange(int fd, int guild_id, const char *name, int len) { +bool HP_sockt_session_is_valid(int fd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildMasterChange_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, const char *name, int *len); + bool retVal___ = false; + if( HPMHooks.count.HP_sockt_session_is_valid_pre ) { + bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMasterChange_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildMasterChange_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, name, &len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_session_is_valid_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9022,51 +15364,52 @@ int HP_mapif_parse_GuildMasterChange(int fd, int guild_id, const char *name, int } } { - retVal___ = HPMHooks.source.mapif.parse_GuildMasterChange(fd, guild_id, name, len); + retVal___ = HPMHooks.source.sockt.session_is_valid(fd); } - if( HPMHooks.count.HP_mapif_parse_GuildMasterChange_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, const char *name, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMasterChange_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildMasterChange_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, name, &len); + if( HPMHooks.count.HP_sockt_session_is_valid_post ) { + bool (*postHookFunc) (bool retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_session_is_valid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } return retVal___; } -void HP_mapif_homunculus_created(int fd, int account_id, struct s_homunculus *sh, unsigned char flag) { +bool HP_sockt_session_is_active(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_homunculus_created_pre ) { - void (*preHookFunc) (int *fd, int *account_id, struct s_homunculus *sh, unsigned char *flag); + bool retVal___ = false; + if( HPMHooks.count.HP_sockt_session_is_active_pre ) { + bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_created_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_homunculus_created_pre[hIndex].func; - preHookFunc(&fd, &account_id, sh, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_session_is_active_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.homunculus_created(fd, account_id, sh, flag); + retVal___ = HPMHooks.source.sockt.session_is_active(fd); } - if( HPMHooks.count.HP_mapif_homunculus_created_post ) { - void (*postHookFunc) (int *fd, int *account_id, struct s_homunculus *sh, unsigned char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_created_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_homunculus_created_post[hIndex].func; - postHookFunc(&fd, &account_id, sh, &flag); + if( HPMHooks.count.HP_sockt_session_is_active_post ) { + bool (*postHookFunc) (bool retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_session_is_active_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } - return; + return retVal___; } -void HP_mapif_homunculus_deleted(int fd, int flag) { +void HP_sockt_flush(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_homunculus_deleted_pre ) { - void (*preHookFunc) (int *fd, int *flag); + if( HPMHooks.count.HP_sockt_flush_pre ) { + void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_deleted_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_homunculus_deleted_pre[hIndex].func; - preHookFunc(&fd, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_flush_pre[hIndex].func; + preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9074,25 +15417,25 @@ void HP_mapif_homunculus_deleted(int fd, int flag) { } } { - HPMHooks.source.mapif.homunculus_deleted(fd, flag); + HPMHooks.source.sockt.flush(fd); } - if( HPMHooks.count.HP_mapif_homunculus_deleted_post ) { - void (*postHookFunc) (int *fd, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_deleted_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_homunculus_deleted_post[hIndex].func; - postHookFunc(&fd, &flag); + if( HPMHooks.count.HP_sockt_flush_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_flush_post[hIndex].func; + postHookFunc(&fd); } } return; } -void HP_mapif_homunculus_loaded(int fd, int account_id, struct s_homunculus *hd) { +void HP_sockt_flush_fifos(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_homunculus_loaded_pre ) { - void (*preHookFunc) (int *fd, int *account_id, struct s_homunculus *hd); + if( HPMHooks.count.HP_sockt_flush_fifos_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_loaded_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_homunculus_loaded_pre[hIndex].func; - preHookFunc(&fd, &account_id, hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_flush_fifos_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9100,25 +15443,25 @@ void HP_mapif_homunculus_loaded(int fd, int account_id, struct s_homunculus *hd) } } { - HPMHooks.source.mapif.homunculus_loaded(fd, account_id, hd); + HPMHooks.source.sockt.flush_fifos(); } - if( HPMHooks.count.HP_mapif_homunculus_loaded_post ) { - void (*postHookFunc) (int *fd, int *account_id, struct s_homunculus *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_loaded_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_homunculus_loaded_post[hIndex].func; - postHookFunc(&fd, &account_id, hd); + if( HPMHooks.count.HP_sockt_flush_fifos_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_flush_fifos_post[hIndex].func; + postHookFunc(); } } return; } -void HP_mapif_homunculus_saved(int fd, int account_id, bool flag) { +void HP_sockt_set_nonblocking(int fd, unsigned long yes) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_homunculus_saved_pre ) { - void (*preHookFunc) (int *fd, int *account_id, bool *flag); + if( HPMHooks.count.HP_sockt_set_nonblocking_pre ) { + void (*preHookFunc) (int *fd, unsigned long *yes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_saved_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_homunculus_saved_pre[hIndex].func; - preHookFunc(&fd, &account_id, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_pre[hIndex].func; + preHookFunc(&fd, &yes); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9126,25 +15469,25 @@ void HP_mapif_homunculus_saved(int fd, int account_id, bool flag) { } } { - HPMHooks.source.mapif.homunculus_saved(fd, account_id, flag); + HPMHooks.source.sockt.set_nonblocking(fd, yes); } - if( HPMHooks.count.HP_mapif_homunculus_saved_post ) { - void (*postHookFunc) (int *fd, int *account_id, bool *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_saved_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_homunculus_saved_post[hIndex].func; - postHookFunc(&fd, &account_id, &flag); + if( HPMHooks.count.HP_sockt_set_nonblocking_post ) { + void (*postHookFunc) (int *fd, unsigned long *yes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_post[hIndex].func; + postHookFunc(&fd, &yes); } } return; } -void HP_mapif_homunculus_renamed(int fd, int account_id, int char_id, unsigned char flag, char *name) { +void HP_sockt_set_defaultparse(ParseFunc defaultparse) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_homunculus_renamed_pre ) { - void (*preHookFunc) (int *fd, int *account_id, int *char_id, unsigned char *flag, char *name); + if( HPMHooks.count.HP_sockt_set_defaultparse_pre ) { + void (*preHookFunc) (ParseFunc *defaultparse); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_renamed_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_homunculus_renamed_pre[hIndex].func; - preHookFunc(&fd, &account_id, &char_id, &flag, name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_pre[hIndex].func; + preHookFunc(&defaultparse); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9152,26 +15495,26 @@ void HP_mapif_homunculus_renamed(int fd, int account_id, int char_id, unsigned c } } { - HPMHooks.source.mapif.homunculus_renamed(fd, account_id, char_id, flag, name); + HPMHooks.source.sockt.set_defaultparse(defaultparse); } - if( HPMHooks.count.HP_mapif_homunculus_renamed_post ) { - void (*postHookFunc) (int *fd, int *account_id, int *char_id, unsigned char *flag, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_renamed_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_homunculus_renamed_post[hIndex].func; - postHookFunc(&fd, &account_id, &char_id, &flag, name); + if( HPMHooks.count.HP_sockt_set_defaultparse_post ) { + void (*postHookFunc) (ParseFunc *defaultparse); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_post[hIndex].func; + postHookFunc(&defaultparse); } } return; } -bool HP_mapif_homunculus_save(struct s_homunculus *hd) { +uint32 HP_sockt_host2ip(const char *hostname) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_homunculus_save_pre ) { - bool (*preHookFunc) (struct s_homunculus *hd); + uint32 retVal___ = 0; + if( HPMHooks.count.HP_sockt_host2ip_pre ) { + uint32 (*preHookFunc) (const char *hostname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_save_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_homunculus_save_pre[hIndex].func; - retVal___ = preHookFunc(hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_host2ip_pre[hIndex].func; + retVal___ = preHookFunc(hostname); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9179,26 +15522,26 @@ bool HP_mapif_homunculus_save(struct s_homunculus *hd) { } } { - retVal___ = HPMHooks.source.mapif.homunculus_save(hd); + retVal___ = HPMHooks.source.sockt.host2ip(hostname); } - if( HPMHooks.count.HP_mapif_homunculus_save_post ) { - bool (*postHookFunc) (bool retVal___, struct s_homunculus *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_save_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_homunculus_save_post[hIndex].func; - retVal___ = postHookFunc(retVal___, hd); + if( HPMHooks.count.HP_sockt_host2ip_post ) { + uint32 (*postHookFunc) (uint32 retVal___, const char *hostname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_host2ip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hostname); } } return retVal___; } -bool HP_mapif_homunculus_load(int homun_id, struct s_homunculus *hd) { +const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_homunculus_load_pre ) { - bool (*preHookFunc) (int *homun_id, struct s_homunculus *hd); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sockt_ip2str_pre ) { + const char* (*preHookFunc) (uint32 *ip, char *ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_load_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_homunculus_load_pre[hIndex].func; - retVal___ = preHookFunc(&homun_id, hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_ip2str_pre[hIndex].func; + retVal___ = preHookFunc(&ip, ip_str); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9206,26 +15549,26 @@ bool HP_mapif_homunculus_load(int homun_id, struct s_homunculus *hd) { } } { - retVal___ = HPMHooks.source.mapif.homunculus_load(homun_id, hd); + retVal___ = HPMHooks.source.sockt.ip2str(ip, ip_str); } - if( HPMHooks.count.HP_mapif_homunculus_load_post ) { - bool (*postHookFunc) (bool retVal___, int *homun_id, struct s_homunculus *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_load_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_homunculus_load_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &homun_id, hd); + if( HPMHooks.count.HP_sockt_ip2str_post ) { + const char* (*postHookFunc) (const char* retVal___, uint32 *ip, char *ip_str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_ip2str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip, ip_str); } } return retVal___; } -bool HP_mapif_homunculus_delete(int homun_id) { +uint32 HP_sockt_str2ip(const char *ip_str) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_homunculus_delete_pre ) { - bool (*preHookFunc) (int *homun_id); + uint32 retVal___ = 0; + if( HPMHooks.count.HP_sockt_str2ip_pre ) { + uint32 (*preHookFunc) (const char *ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_homunculus_delete_pre[hIndex].func; - retVal___ = preHookFunc(&homun_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_str2ip_pre[hIndex].func; + retVal___ = preHookFunc(ip_str); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9233,26 +15576,26 @@ bool HP_mapif_homunculus_delete(int homun_id) { } } { - retVal___ = HPMHooks.source.mapif.homunculus_delete(homun_id); + retVal___ = HPMHooks.source.sockt.str2ip(ip_str); } - if( HPMHooks.count.HP_mapif_homunculus_delete_post ) { - bool (*postHookFunc) (bool retVal___, int *homun_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_homunculus_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &homun_id); + if( HPMHooks.count.HP_sockt_str2ip_post ) { + uint32 (*postHookFunc) (uint32 retVal___, const char *ip_str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_str2ip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ip_str); } } return retVal___; } -bool HP_mapif_homunculus_rename(char *name) { +uint16 HP_sockt_ntows(uint16 netshort) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_homunculus_rename_pre ) { - bool (*preHookFunc) (char *name); + uint16 retVal___ = 0; + if( HPMHooks.count.HP_sockt_ntows_pre ) { + uint16 (*preHookFunc) (uint16 *netshort); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_rename_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_homunculus_rename_pre[hIndex].func; - retVal___ = preHookFunc(name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_ntows_pre[hIndex].func; + retVal___ = preHookFunc(&netshort); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9260,51 +15603,52 @@ bool HP_mapif_homunculus_rename(char *name) { } } { - retVal___ = HPMHooks.source.mapif.homunculus_rename(name); + retVal___ = HPMHooks.source.sockt.ntows(netshort); } - if( HPMHooks.count.HP_mapif_homunculus_rename_post ) { - bool (*postHookFunc) (bool retVal___, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_rename_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_homunculus_rename_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name); + if( HPMHooks.count.HP_sockt_ntows_post ) { + uint16 (*postHookFunc) (uint16 retVal___, uint16 *netshort); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_ntows_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &netshort); } } return retVal___; } -void HP_mapif_parse_homunculus_create(int fd, int len, int account_id, struct s_homunculus *phd) { +int HP_sockt_getips(uint32 *ips, int max) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_homunculus_create_pre ) { - void (*preHookFunc) (int *fd, int *len, int *account_id, struct s_homunculus *phd); + int retVal___ = 0; + if( HPMHooks.count.HP_sockt_getips_pre ) { + int (*preHookFunc) (uint32 *ips, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_create_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_create_pre[hIndex].func; - preHookFunc(&fd, &len, &account_id, phd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_getips_pre[hIndex].func; + retVal___ = preHookFunc(ips, &max); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_homunculus_create(fd, len, account_id, phd); + retVal___ = HPMHooks.source.sockt.getips(ips, max); } - if( HPMHooks.count.HP_mapif_parse_homunculus_create_post ) { - void (*postHookFunc) (int *fd, int *len, int *account_id, struct s_homunculus *phd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_create_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_create_post[hIndex].func; - postHookFunc(&fd, &len, &account_id, phd); + if( HPMHooks.count.HP_sockt_getips_post ) { + int (*postHookFunc) (int retVal___, uint32 *ips, int *max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_getips_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ips, &max); } } - return; + return retVal___; } -void HP_mapif_parse_homunculus_delete(int fd, int homun_id) { +void HP_sockt_eof(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_homunculus_delete_pre ) { - void (*preHookFunc) (int *fd, int *homun_id); + if( HPMHooks.count.HP_sockt_eof_pre ) { + void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_delete_pre[hIndex].func; - preHookFunc(&fd, &homun_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_eof_pre[hIndex].func; + preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9312,129 +15656,133 @@ void HP_mapif_parse_homunculus_delete(int fd, int homun_id) { } } { - HPMHooks.source.mapif.parse_homunculus_delete(fd, homun_id); + HPMHooks.source.sockt.eof(fd); } - if( HPMHooks.count.HP_mapif_parse_homunculus_delete_post ) { - void (*postHookFunc) (int *fd, int *homun_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_delete_post[hIndex].func; - postHookFunc(&fd, &homun_id); + if( HPMHooks.count.HP_sockt_eof_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_eof_post[hIndex].func; + postHookFunc(&fd); } } return; } -void HP_mapif_parse_homunculus_load(int fd, int account_id, int homun_id) { +uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_homunculus_load_pre ) { - void (*preHookFunc) (int *fd, int *account_id, int *homun_id); + uint32 retVal___ = 0; + if( HPMHooks.count.HP_sockt_lan_subnet_check_pre ) { + uint32 (*preHookFunc) (uint32 *ip, struct s_subnet *info); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_load_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_load_pre[hIndex].func; - preHookFunc(&fd, &account_id, &homun_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_pre[hIndex].func; + retVal___ = preHookFunc(&ip, info); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_homunculus_load(fd, account_id, homun_id); + retVal___ = HPMHooks.source.sockt.lan_subnet_check(ip, info); } - if( HPMHooks.count.HP_mapif_parse_homunculus_load_post ) { - void (*postHookFunc) (int *fd, int *account_id, int *homun_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_load_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_load_post[hIndex].func; - postHookFunc(&fd, &account_id, &homun_id); + if( HPMHooks.count.HP_sockt_lan_subnet_check_post ) { + uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip, struct s_subnet *info); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip, info); } } - return; + return retVal___; } -void HP_mapif_parse_homunculus_save(int fd, int len, int account_id, struct s_homunculus *phd) { - int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_homunculus_save_pre ) { - void (*preHookFunc) (int *fd, int *len, int *account_id, struct s_homunculus *phd); +bool HP_sockt_allowed_ip_check(uint32 ip) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_sockt_allowed_ip_check_pre ) { + bool (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_save_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_save_pre[hIndex].func; - preHookFunc(&fd, &len, &account_id, phd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_pre[hIndex].func; + retVal___ = preHookFunc(&ip); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_homunculus_save(fd, len, account_id, phd); + retVal___ = HPMHooks.source.sockt.allowed_ip_check(ip); } - if( HPMHooks.count.HP_mapif_parse_homunculus_save_post ) { - void (*postHookFunc) (int *fd, int *len, int *account_id, struct s_homunculus *phd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_save_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_save_post[hIndex].func; - postHookFunc(&fd, &len, &account_id, phd); + if( HPMHooks.count.HP_sockt_allowed_ip_check_post ) { + bool (*postHookFunc) (bool retVal___, uint32 *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip); } } - return; + return retVal___; } -void HP_mapif_parse_homunculus_rename(int fd, int account_id, int char_id, char *name) { +bool HP_sockt_trusted_ip_check(uint32 ip) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_homunculus_rename_pre ) { - void (*preHookFunc) (int *fd, int *account_id, int *char_id, char *name); + bool retVal___ = false; + if( HPMHooks.count.HP_sockt_trusted_ip_check_pre ) { + bool (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_rename_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_rename_pre[hIndex].func; - preHookFunc(&fd, &account_id, &char_id, name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_pre[hIndex].func; + retVal___ = preHookFunc(&ip); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_homunculus_rename(fd, account_id, char_id, name); + retVal___ = HPMHooks.source.sockt.trusted_ip_check(ip); } - if( HPMHooks.count.HP_mapif_parse_homunculus_rename_post ) { - void (*postHookFunc) (int *fd, int *account_id, int *char_id, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_rename_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_rename_post[hIndex].func; - postHookFunc(&fd, &account_id, &char_id, name); + if( HPMHooks.count.HP_sockt_trusted_ip_check_post ) { + bool (*postHookFunc) (bool retVal___, uint32 *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip); } } - return; + return retVal___; } -void HP_mapif_mail_sendinbox(int fd, int char_id, unsigned char flag, struct mail_data *md) { +int HP_sockt_net_config_read_sub(config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_sendinbox_pre ) { - void (*preHookFunc) (int *fd, int *char_id, unsigned char *flag, struct mail_data *md); + int retVal___ = 0; + if( HPMHooks.count.HP_sockt_net_config_read_sub_pre ) { + int (*preHookFunc) (config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendinbox_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mail_sendinbox_pre[hIndex].func; - preHookFunc(&fd, &char_id, &flag, md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_pre[hIndex].func; + retVal___ = preHookFunc(t, list, count, filename, groupname); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.mail_sendinbox(fd, char_id, flag, md); + retVal___ = HPMHooks.source.sockt.net_config_read_sub(t, list, count, filename, groupname); } - if( HPMHooks.count.HP_mapif_mail_sendinbox_post ) { - void (*postHookFunc) (int *fd, int *char_id, unsigned char *flag, struct mail_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendinbox_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mail_sendinbox_post[hIndex].func; - postHookFunc(&fd, &char_id, &flag, md); + if( HPMHooks.count.HP_sockt_net_config_read_sub_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, t, list, count, filename, groupname); } } - return; + return retVal___; } -void HP_mapif_parse_mail_requestinbox(int fd) { +void HP_sockt_net_config_read(const char *filename) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_requestinbox_pre ) { - void (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_sockt_net_config_read_pre ) { + void (*preHookFunc) (const char *filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_requestinbox_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_mail_requestinbox_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_net_config_read_pre[hIndex].func; + preHookFunc(filename); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9442,312 +15790,330 @@ void HP_mapif_parse_mail_requestinbox(int fd) { } } { - HPMHooks.source.mapif.parse_mail_requestinbox(fd); + HPMHooks.source.sockt.net_config_read(filename); } - if( HPMHooks.count.HP_mapif_parse_mail_requestinbox_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_requestinbox_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_mail_requestinbox_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_sockt_net_config_read_post ) { + void (*postHookFunc) (const char *filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_net_config_read_post[hIndex].func; + postHookFunc(filename); } } return; } -void HP_mapif_parse_mail_read(int fd) { +/* SQL */ +int HP_SQL_Connect(Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_read_pre ) { - void (*preHookFunc) (int *fd); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_Connect_pre ) { + int (*preHookFunc) (Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_read_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_mail_read_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_Connect_pre[hIndex].func; + retVal___ = preHookFunc(self, user, passwd, host, &port, db); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_mail_read(fd); + retVal___ = HPMHooks.source.SQL.Connect(self, user, passwd, host, port, db); } - if( HPMHooks.count.HP_mapif_parse_mail_read_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_read_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_mail_read_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_SQL_Connect_post ) { + int (*postHookFunc) (int retVal___, Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_Connect_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, user, passwd, host, &port, db); } } - return; + return retVal___; } -void HP_mapif_mail_sendattach(int fd, int char_id, struct mail_message *msg) { +int HP_SQL_GetTimeout(Sql *self, uint32 *out_timeout) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_sendattach_pre ) { - void (*preHookFunc) (int *fd, int *char_id, struct mail_message *msg); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_GetTimeout_pre ) { + int (*preHookFunc) (Sql *self, uint32 *out_timeout); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendattach_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mail_sendattach_pre[hIndex].func; - preHookFunc(&fd, &char_id, msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_GetTimeout_pre[hIndex].func; + retVal___ = preHookFunc(self, out_timeout); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.mail_sendattach(fd, char_id, msg); + retVal___ = HPMHooks.source.SQL.GetTimeout(self, out_timeout); } - if( HPMHooks.count.HP_mapif_mail_sendattach_post ) { - void (*postHookFunc) (int *fd, int *char_id, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendattach_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mail_sendattach_post[hIndex].func; - postHookFunc(&fd, &char_id, msg); + if( HPMHooks.count.HP_SQL_GetTimeout_post ) { + int (*postHookFunc) (int retVal___, Sql *self, uint32 *out_timeout); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_GetTimeout_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, out_timeout); } } - return; + return retVal___; } -void HP_mapif_mail_getattach(int fd, int char_id, int mail_id) { +int HP_SQL_GetColumnNames(Sql *self, const char *table, char *out_buf, size_t buf_len, char sep) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_getattach_pre ) { - void (*preHookFunc) (int *fd, int *char_id, int *mail_id); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_GetColumnNames_pre ) { + int (*preHookFunc) (Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_getattach_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mail_getattach_pre[hIndex].func; - preHookFunc(&fd, &char_id, &mail_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_pre[hIndex].func; + retVal___ = preHookFunc(self, table, out_buf, &buf_len, &sep); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.mail_getattach(fd, char_id, mail_id); + retVal___ = HPMHooks.source.SQL.GetColumnNames(self, table, out_buf, buf_len, sep); } - if( HPMHooks.count.HP_mapif_mail_getattach_post ) { - void (*postHookFunc) (int *fd, int *char_id, int *mail_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_getattach_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mail_getattach_post[hIndex].func; - postHookFunc(&fd, &char_id, &mail_id); + if( HPMHooks.count.HP_SQL_GetColumnNames_post ) { + int (*postHookFunc) (int retVal___, Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, table, out_buf, &buf_len, &sep); } } - return; + return retVal___; } -void HP_mapif_parse_mail_getattach(int fd) { +int HP_SQL_SetEncoding(Sql *self, const char *encoding) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_getattach_pre ) { - void (*preHookFunc) (int *fd); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_SetEncoding_pre ) { + int (*preHookFunc) (Sql *self, const char *encoding); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_getattach_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_mail_getattach_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_SetEncoding_pre[hIndex].func; + retVal___ = preHookFunc(self, encoding); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_mail_getattach(fd); + retVal___ = HPMHooks.source.SQL.SetEncoding(self, encoding); } - if( HPMHooks.count.HP_mapif_parse_mail_getattach_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_getattach_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_mail_getattach_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_SQL_SetEncoding_post ) { + int (*postHookFunc) (int retVal___, Sql *self, const char *encoding); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_SetEncoding_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, encoding); } } - return; + return retVal___; } -void HP_mapif_mail_delete(int fd, int char_id, int mail_id, bool failed) { +int HP_SQL_Ping(Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_delete_pre ) { - void (*preHookFunc) (int *fd, int *char_id, int *mail_id, bool *failed); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_Ping_pre ) { + int (*preHookFunc) (Sql *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mail_delete_pre[hIndex].func; - preHookFunc(&fd, &char_id, &mail_id, &failed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_Ping_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.mail_delete(fd, char_id, mail_id, failed); + retVal___ = HPMHooks.source.SQL.Ping(self); } - if( HPMHooks.count.HP_mapif_mail_delete_post ) { - void (*postHookFunc) (int *fd, int *char_id, int *mail_id, bool *failed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mail_delete_post[hIndex].func; - postHookFunc(&fd, &char_id, &mail_id, &failed); + if( HPMHooks.count.HP_SQL_Ping_post ) { + int (*postHookFunc) (int retVal___, Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_Ping_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } - return; + return retVal___; } -void HP_mapif_parse_mail_delete(int fd) { +size_t HP_SQL_EscapeString(Sql *self, char *out_to, const char *from) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_delete_pre ) { - void (*preHookFunc) (int *fd); + size_t retVal___ = 0; + if( HPMHooks.count.HP_SQL_EscapeString_pre ) { + size_t (*preHookFunc) (Sql *self, char *out_to, const char *from); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_mail_delete_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_EscapeString_pre[hIndex].func; + retVal___ = preHookFunc(self, out_to, from); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_mail_delete(fd); + retVal___ = HPMHooks.source.SQL.EscapeString(self, out_to, from); } - if( HPMHooks.count.HP_mapif_parse_mail_delete_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_mail_delete_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_SQL_EscapeString_post ) { + size_t (*postHookFunc) (size_t retVal___, Sql *self, char *out_to, const char *from); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_EscapeString_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, out_to, from); } } - return; + return retVal___; } -void HP_mapif_mail_new(struct mail_message *msg) { +size_t HP_SQL_EscapeStringLen(Sql *self, char *out_to, const char *from, size_t from_len) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_new_pre ) { - void (*preHookFunc) (struct mail_message *msg); + size_t retVal___ = 0; + if( HPMHooks.count.HP_SQL_EscapeStringLen_pre ) { + size_t (*preHookFunc) (Sql *self, char *out_to, const char *from, size_t *from_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_new_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mail_new_pre[hIndex].func; - preHookFunc(msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_pre[hIndex].func; + retVal___ = preHookFunc(self, out_to, from, &from_len); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.mail_new(msg); + retVal___ = HPMHooks.source.SQL.EscapeStringLen(self, out_to, from, from_len); } - if( HPMHooks.count.HP_mapif_mail_new_post ) { - void (*postHookFunc) (struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_new_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mail_new_post[hIndex].func; - postHookFunc(msg); + if( HPMHooks.count.HP_SQL_EscapeStringLen_post ) { + size_t (*postHookFunc) (size_t retVal___, Sql *self, char *out_to, const char *from, size_t *from_len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, out_to, from, &from_len); } } - return; + return retVal___; } -void HP_mapif_mail_return(int fd, int char_id, int mail_id, int new_mail) { +int HP_SQL_QueryV(Sql *self, const char *query, va_list args) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_return_pre ) { - void (*preHookFunc) (int *fd, int *char_id, int *mail_id, int *new_mail); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_QueryV_pre ) { + int (*preHookFunc) (Sql *self, const char *query, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_return_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mail_return_pre[hIndex].func; - preHookFunc(&fd, &char_id, &mail_id, &new_mail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_SQL_QueryV_pre[hIndex].func; + retVal___ = preHookFunc(self, query, args___copy); + va_end(args___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.mail_return(fd, char_id, mail_id, new_mail); + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.SQL.QueryV(self, query, args___copy); + va_end(args___copy); } - if( HPMHooks.count.HP_mapif_mail_return_post ) { - void (*postHookFunc) (int *fd, int *char_id, int *mail_id, int *new_mail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_return_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mail_return_post[hIndex].func; - postHookFunc(&fd, &char_id, &mail_id, &new_mail); + if( HPMHooks.count.HP_SQL_QueryV_post ) { + int (*postHookFunc) (int retVal___, Sql *self, const char *query, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_SQL_QueryV_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, query, args___copy); + va_end(args___copy); } } - return; + return retVal___; } -void HP_mapif_parse_mail_return(int fd) { +int HP_SQL_QueryStr(Sql *self, const char *query) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_return_pre ) { - void (*preHookFunc) (int *fd); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_QueryStr_pre ) { + int (*preHookFunc) (Sql *self, const char *query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_return_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_mail_return_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_QueryStr_pre[hIndex].func; + retVal___ = preHookFunc(self, query); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_mail_return(fd); + retVal___ = HPMHooks.source.SQL.QueryStr(self, query); } - if( HPMHooks.count.HP_mapif_parse_mail_return_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_return_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_mail_return_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_SQL_QueryStr_post ) { + int (*postHookFunc) (int retVal___, Sql *self, const char *query); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_QueryStr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, query); } } - return; + return retVal___; } -void HP_mapif_mail_send(int fd, struct mail_message *msg) { +uint64 HP_SQL_LastInsertId(Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_send_pre ) { - void (*preHookFunc) (int *fd, struct mail_message *msg); + uint64 retVal___ = 0; + if( HPMHooks.count.HP_SQL_LastInsertId_pre ) { + uint64 (*preHookFunc) (Sql *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_send_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mail_send_pre[hIndex].func; - preHookFunc(&fd, msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_LastInsertId_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.mail_send(fd, msg); + retVal___ = HPMHooks.source.SQL.LastInsertId(self); } - if( HPMHooks.count.HP_mapif_mail_send_post ) { - void (*postHookFunc) (int *fd, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_send_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mail_send_post[hIndex].func; - postHookFunc(&fd, msg); + if( HPMHooks.count.HP_SQL_LastInsertId_post ) { + uint64 (*postHookFunc) (uint64 retVal___, Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_LastInsertId_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } - return; + return retVal___; } -void HP_mapif_parse_mail_send(int fd) { +uint32 HP_SQL_NumColumns(Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_send_pre ) { - void (*preHookFunc) (int *fd); + uint32 retVal___ = 0; + if( HPMHooks.count.HP_SQL_NumColumns_pre ) { + uint32 (*preHookFunc) (Sql *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_send_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_mail_send_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_NumColumns_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_mail_send(fd); + retVal___ = HPMHooks.source.SQL.NumColumns(self); } - if( HPMHooks.count.HP_mapif_parse_mail_send_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_send_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_mail_send_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_SQL_NumColumns_post ) { + uint32 (*postHookFunc) (uint32 retVal___, Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_NumColumns_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } - return; + return retVal___; } -bool HP_mapif_mercenary_save(struct s_mercenary *merc) { +uint64 HP_SQL_NumRows(Sql *self) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_mercenary_save_pre ) { - bool (*preHookFunc) (struct s_mercenary *merc); + uint64 retVal___ = 0; + if( HPMHooks.count.HP_SQL_NumRows_pre ) { + uint64 (*preHookFunc) (Sql *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_save_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mercenary_save_pre[hIndex].func; - retVal___ = preHookFunc(merc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_NumRows_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9755,26 +16121,26 @@ bool HP_mapif_mercenary_save(struct s_mercenary *merc) { } } { - retVal___ = HPMHooks.source.mapif.mercenary_save(merc); + retVal___ = HPMHooks.source.SQL.NumRows(self); } - if( HPMHooks.count.HP_mapif_mercenary_save_post ) { - bool (*postHookFunc) (bool retVal___, struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_save_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mercenary_save_post[hIndex].func; - retVal___ = postHookFunc(retVal___, merc); + if( HPMHooks.count.HP_SQL_NumRows_post ) { + uint64 (*postHookFunc) (uint64 retVal___, Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_NumRows_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -bool HP_mapif_mercenary_load(int merc_id, int char_id, struct s_mercenary *merc) { +int HP_SQL_NextRow(Sql *self) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_mercenary_load_pre ) { - bool (*preHookFunc) (int *merc_id, int *char_id, struct s_mercenary *merc); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_NextRow_pre ) { + int (*preHookFunc) (Sql *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_load_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mercenary_load_pre[hIndex].func; - retVal___ = preHookFunc(&merc_id, &char_id, merc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_NextRow_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9782,26 +16148,26 @@ bool HP_mapif_mercenary_load(int merc_id, int char_id, struct s_mercenary *merc) } } { - retVal___ = HPMHooks.source.mapif.mercenary_load(merc_id, char_id, merc); + retVal___ = HPMHooks.source.SQL.NextRow(self); } - if( HPMHooks.count.HP_mapif_mercenary_load_post ) { - bool (*postHookFunc) (bool retVal___, int *merc_id, int *char_id, struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_load_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mercenary_load_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &merc_id, &char_id, merc); + if( HPMHooks.count.HP_SQL_NextRow_post ) { + int (*postHookFunc) (int retVal___, Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_NextRow_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -bool HP_mapif_mercenary_delete(int merc_id) { +int HP_SQL_GetData(Sql *self, size_t col, char **out_buf, size_t *out_len) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_mercenary_delete_pre ) { - bool (*preHookFunc) (int *merc_id); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_GetData_pre ) { + int (*preHookFunc) (Sql *self, size_t *col, char **out_buf, size_t *out_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mercenary_delete_pre[hIndex].func; - retVal___ = preHookFunc(&merc_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_GetData_pre[hIndex].func; + retVal___ = preHookFunc(self, &col, out_buf, out_len); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9809,25 +16175,25 @@ bool HP_mapif_mercenary_delete(int merc_id) { } } { - retVal___ = HPMHooks.source.mapif.mercenary_delete(merc_id); + retVal___ = HPMHooks.source.SQL.GetData(self, col, out_buf, out_len); } - if( HPMHooks.count.HP_mapif_mercenary_delete_post ) { - bool (*postHookFunc) (bool retVal___, int *merc_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mercenary_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &merc_id); + if( HPMHooks.count.HP_SQL_GetData_post ) { + int (*postHookFunc) (int retVal___, Sql *self, size_t *col, char **out_buf, size_t *out_len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_GetData_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, &col, out_buf, out_len); } } return retVal___; } -void HP_mapif_mercenary_send(int fd, struct s_mercenary *merc, unsigned char flag) { +void HP_SQL_FreeResult(Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mercenary_send_pre ) { - void (*preHookFunc) (int *fd, struct s_mercenary *merc, unsigned char *flag); + if( HPMHooks.count.HP_SQL_FreeResult_pre ) { + void (*preHookFunc) (Sql *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_send_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mercenary_send_pre[hIndex].func; - preHookFunc(&fd, merc, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_FreeResult_pre[hIndex].func; + preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9835,25 +16201,25 @@ void HP_mapif_mercenary_send(int fd, struct s_mercenary *merc, unsigned char fla } } { - HPMHooks.source.mapif.mercenary_send(fd, merc, flag); + HPMHooks.source.SQL.FreeResult(self); } - if( HPMHooks.count.HP_mapif_mercenary_send_post ) { - void (*postHookFunc) (int *fd, struct s_mercenary *merc, unsigned char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_send_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mercenary_send_post[hIndex].func; - postHookFunc(&fd, merc, &flag); + if( HPMHooks.count.HP_SQL_FreeResult_post ) { + void (*postHookFunc) (Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_FreeResult_post[hIndex].func; + postHookFunc(self); } } return; } -void HP_mapif_parse_mercenary_create(int fd, struct s_mercenary *merc) { +void HP_SQL_ShowDebug_(Sql *self, const char *debug_file, const unsigned long debug_line) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mercenary_create_pre ) { - void (*preHookFunc) (int *fd, struct s_mercenary *merc); + if( HPMHooks.count.HP_SQL_ShowDebug__pre ) { + void (*preHookFunc) (Sql *self, const char *debug_file, const unsigned long *debug_line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_create_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_create_pre[hIndex].func; - preHookFunc(&fd, merc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_ShowDebug__pre[hIndex].func; + preHookFunc(self, debug_file, &debug_line); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9861,25 +16227,25 @@ void HP_mapif_parse_mercenary_create(int fd, struct s_mercenary *merc) { } } { - HPMHooks.source.mapif.parse_mercenary_create(fd, merc); + HPMHooks.source.SQL.ShowDebug_(self, debug_file, debug_line); } - if( HPMHooks.count.HP_mapif_parse_mercenary_create_post ) { - void (*postHookFunc) (int *fd, struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_create_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_create_post[hIndex].func; - postHookFunc(&fd, merc); + if( HPMHooks.count.HP_SQL_ShowDebug__post ) { + void (*postHookFunc) (Sql *self, const char *debug_file, const unsigned long *debug_line); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_ShowDebug__post[hIndex].func; + postHookFunc(self, debug_file, &debug_line); } } return; } -void HP_mapif_parse_mercenary_load(int fd, int merc_id, int char_id) { +void HP_SQL_Free(Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mercenary_load_pre ) { - void (*preHookFunc) (int *fd, int *merc_id, int *char_id); + if( HPMHooks.count.HP_SQL_Free_pre ) { + void (*preHookFunc) (Sql *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_load_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_load_pre[hIndex].func; - preHookFunc(&fd, &merc_id, &char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_Free_pre[hIndex].func; + preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -9887,130 +16253,140 @@ void HP_mapif_parse_mercenary_load(int fd, int merc_id, int char_id) { } } { - HPMHooks.source.mapif.parse_mercenary_load(fd, merc_id, char_id); + HPMHooks.source.SQL.Free(self); } - if( HPMHooks.count.HP_mapif_parse_mercenary_load_post ) { - void (*postHookFunc) (int *fd, int *merc_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_load_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_load_post[hIndex].func; - postHookFunc(&fd, &merc_id, &char_id); + if( HPMHooks.count.HP_SQL_Free_post ) { + void (*postHookFunc) (Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_Free_post[hIndex].func; + postHookFunc(self); } } return; } -void HP_mapif_mercenary_deleted(int fd, unsigned char flag) { +struct Sql* HP_SQL_Malloc(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mercenary_deleted_pre ) { - void (*preHookFunc) (int *fd, unsigned char *flag); + struct Sql* retVal___ = NULL; + if( HPMHooks.count.HP_SQL_Malloc_pre ) { + struct Sql* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_deleted_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mercenary_deleted_pre[hIndex].func; - preHookFunc(&fd, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_Malloc_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.mercenary_deleted(fd, flag); + retVal___ = HPMHooks.source.SQL.Malloc(); } - if( HPMHooks.count.HP_mapif_mercenary_deleted_post ) { - void (*postHookFunc) (int *fd, unsigned char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_deleted_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mercenary_deleted_post[hIndex].func; - postHookFunc(&fd, &flag); + if( HPMHooks.count.HP_SQL_Malloc_post ) { + struct Sql* (*postHookFunc) (struct Sql* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_Malloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -void HP_mapif_parse_mercenary_delete(int fd, int merc_id) { +struct SqlStmt* HP_SQL_StmtMalloc(Sql *sql) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mercenary_delete_pre ) { - void (*preHookFunc) (int *fd, int *merc_id); + struct SqlStmt* retVal___ = NULL; + if( HPMHooks.count.HP_SQL_StmtMalloc_pre ) { + struct SqlStmt* (*preHookFunc) (Sql *sql); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_delete_pre[hIndex].func; - preHookFunc(&fd, &merc_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_pre[hIndex].func; + retVal___ = preHookFunc(sql); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_mercenary_delete(fd, merc_id); + retVal___ = HPMHooks.source.SQL.StmtMalloc(sql); } - if( HPMHooks.count.HP_mapif_parse_mercenary_delete_post ) { - void (*postHookFunc) (int *fd, int *merc_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_delete_post[hIndex].func; - postHookFunc(&fd, &merc_id); + if( HPMHooks.count.HP_SQL_StmtMalloc_post ) { + struct SqlStmt* (*postHookFunc) (struct SqlStmt* retVal___, Sql *sql); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sql); } } - return; + return retVal___; } -void HP_mapif_mercenary_saved(int fd, unsigned char flag) { +int HP_SQL_StmtPrepareV(SqlStmt *self, const char *query, va_list args) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mercenary_saved_pre ) { - void (*preHookFunc) (int *fd, unsigned char *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtPrepareV_pre ) { + int (*preHookFunc) (SqlStmt *self, const char *query, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_saved_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mercenary_saved_pre[hIndex].func; - preHookFunc(&fd, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_pre[hIndex].func; + retVal___ = preHookFunc(self, query, args___copy); + va_end(args___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.mercenary_saved(fd, flag); + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.SQL.StmtPrepareV(self, query, args___copy); + va_end(args___copy); } - if( HPMHooks.count.HP_mapif_mercenary_saved_post ) { - void (*postHookFunc) (int *fd, unsigned char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_saved_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mercenary_saved_post[hIndex].func; - postHookFunc(&fd, &flag); + if( HPMHooks.count.HP_SQL_StmtPrepareV_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self, const char *query, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, query, args___copy); + va_end(args___copy); } } - return; + return retVal___; } -void HP_mapif_parse_mercenary_save(int fd, struct s_mercenary *merc) { +int HP_SQL_StmtPrepareStr(SqlStmt *self, const char *query) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mercenary_save_pre ) { - void (*preHookFunc) (int *fd, struct s_mercenary *merc); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtPrepareStr_pre ) { + int (*preHookFunc) (SqlStmt *self, const char *query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_save_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_save_pre[hIndex].func; - preHookFunc(&fd, merc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_pre[hIndex].func; + retVal___ = preHookFunc(self, query); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_mercenary_save(fd, merc); + retVal___ = HPMHooks.source.SQL.StmtPrepareStr(self, query); } - if( HPMHooks.count.HP_mapif_parse_mercenary_save_post ) { - void (*postHookFunc) (int *fd, struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_save_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_save_post[hIndex].func; - postHookFunc(&fd, merc); + if( HPMHooks.count.HP_SQL_StmtPrepareStr_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self, const char *query); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, query); } } - return; + return retVal___; } -int HP_mapif_party_created(int fd, int account_id, int char_id, struct party *p) { +size_t HP_SQL_StmtNumParams(SqlStmt *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_created_pre ) { - int (*preHookFunc) (int *fd, int *account_id, int *char_id, struct party *p); + size_t retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtNumParams_pre ) { + size_t (*preHookFunc) (SqlStmt *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_created_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_party_created_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, &char_id, p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10018,78 +16394,80 @@ int HP_mapif_party_created(int fd, int account_id, int char_id, struct party *p) } } { - retVal___ = HPMHooks.source.mapif.party_created(fd, account_id, char_id, p); + retVal___ = HPMHooks.source.SQL.StmtNumParams(self); } - if( HPMHooks.count.HP_mapif_party_created_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, struct party *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_created_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_party_created_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, &char_id, p); + if( HPMHooks.count.HP_SQL_StmtNumParams_post ) { + size_t (*postHookFunc) (size_t retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -void HP_mapif_party_noinfo(int fd, int party_id, int char_id) { +int HP_SQL_StmtBindParam(SqlStmt *self, size_t idx, SqlDataType buffer_type, void *buffer, size_t buffer_len) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_party_noinfo_pre ) { - void (*preHookFunc) (int *fd, int *party_id, int *char_id); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtBindParam_pre ) { + int (*preHookFunc) (SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_noinfo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_party_noinfo_pre[hIndex].func; - preHookFunc(&fd, &party_id, &char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_pre[hIndex].func; + retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.party_noinfo(fd, party_id, char_id); + retVal___ = HPMHooks.source.SQL.StmtBindParam(self, idx, buffer_type, buffer, buffer_len); } - if( HPMHooks.count.HP_mapif_party_noinfo_post ) { - void (*postHookFunc) (int *fd, int *party_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_noinfo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_party_noinfo_post[hIndex].func; - postHookFunc(&fd, &party_id, &char_id); + if( HPMHooks.count.HP_SQL_StmtBindParam_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len); } } - return; + return retVal___; } -void HP_mapif_party_info(int fd, struct party *p, int char_id) { +int HP_SQL_StmtExecute(SqlStmt *self) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_party_info_pre ) { - void (*preHookFunc) (int *fd, struct party *p, int *char_id); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtExecute_pre ) { + int (*preHookFunc) (SqlStmt *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_info_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_party_info_pre[hIndex].func; - preHookFunc(&fd, p, &char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtExecute_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.party_info(fd, p, char_id); + retVal___ = HPMHooks.source.SQL.StmtExecute(self); } - if( HPMHooks.count.HP_mapif_party_info_post ) { - void (*postHookFunc) (int *fd, struct party *p, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_info_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_party_info_post[hIndex].func; - postHookFunc(&fd, p, &char_id); + if( HPMHooks.count.HP_SQL_StmtExecute_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtExecute_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } - return; + return retVal___; } -int HP_mapif_party_memberadded(int fd, int party_id, int account_id, int char_id, int flag) { +uint64 HP_SQL_StmtLastInsertId(SqlStmt *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_memberadded_pre ) { - int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *char_id, int *flag); + uint64 retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtLastInsertId_pre ) { + uint64 (*preHookFunc) (SqlStmt *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_memberadded_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_party_memberadded_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &party_id, &account_id, &char_id, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10097,26 +16475,26 @@ int HP_mapif_party_memberadded(int fd, int party_id, int account_id, int char_id } } { - retVal___ = HPMHooks.source.mapif.party_memberadded(fd, party_id, account_id, char_id, flag); + retVal___ = HPMHooks.source.SQL.StmtLastInsertId(self); } - if( HPMHooks.count.HP_mapif_party_memberadded_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, int *char_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_memberadded_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_party_memberadded_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, &char_id, &flag); + if( HPMHooks.count.HP_SQL_StmtLastInsertId_post ) { + uint64 (*postHookFunc) (uint64 retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -int HP_mapif_party_optionchanged(int fd, struct party *p, int account_id, int flag) { +size_t HP_SQL_StmtNumColumns(SqlStmt *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_optionchanged_pre ) { - int (*preHookFunc) (int *fd, struct party *p, int *account_id, int *flag); + size_t retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtNumColumns_pre ) { + size_t (*preHookFunc) (SqlStmt *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_optionchanged_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_party_optionchanged_pre[hIndex].func; - retVal___ = preHookFunc(&fd, p, &account_id, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10124,26 +16502,26 @@ int HP_mapif_party_optionchanged(int fd, struct party *p, int account_id, int fl } } { - retVal___ = HPMHooks.source.mapif.party_optionchanged(fd, p, account_id, flag); + retVal___ = HPMHooks.source.SQL.StmtNumColumns(self); } - if( HPMHooks.count.HP_mapif_party_optionchanged_post ) { - int (*postHookFunc) (int retVal___, int *fd, struct party *p, int *account_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_optionchanged_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_party_optionchanged_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, p, &account_id, &flag); + if( HPMHooks.count.HP_SQL_StmtNumColumns_post ) { + size_t (*postHookFunc) (size_t retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -int HP_mapif_party_withdraw(int party_id, int account_id, int char_id) { +int HP_SQL_StmtBindColumn(SqlStmt *self, size_t idx, SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_withdraw_pre ) { - int (*preHookFunc) (int *party_id, int *account_id, int *char_id); + if( HPMHooks.count.HP_SQL_StmtBindColumn_pre ) { + int (*preHookFunc) (SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_withdraw_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_party_withdraw_pre[hIndex].func; - retVal___ = preHookFunc(&party_id, &account_id, &char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_pre[hIndex].func; + retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10151,26 +16529,26 @@ int HP_mapif_party_withdraw(int party_id, int account_id, int char_id) { } } { - retVal___ = HPMHooks.source.mapif.party_withdraw(party_id, account_id, char_id); + retVal___ = HPMHooks.source.SQL.StmtBindColumn(self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null); } - if( HPMHooks.count.HP_mapif_party_withdraw_post ) { - int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_withdraw_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_party_withdraw_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id); + if( HPMHooks.count.HP_SQL_StmtBindColumn_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null); } } return retVal___; } -int HP_mapif_party_membermoved(struct party *p, int idx) { +uint64 HP_SQL_StmtNumRows(SqlStmt *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_membermoved_pre ) { - int (*preHookFunc) (struct party *p, int *idx); + uint64 retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtNumRows_pre ) { + uint64 (*preHookFunc) (SqlStmt *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_membermoved_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_party_membermoved_pre[hIndex].func; - retVal___ = preHookFunc(p, &idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10178,26 +16556,26 @@ int HP_mapif_party_membermoved(struct party *p, int idx) { } } { - retVal___ = HPMHooks.source.mapif.party_membermoved(p, idx); + retVal___ = HPMHooks.source.SQL.StmtNumRows(self); } - if( HPMHooks.count.HP_mapif_party_membermoved_post ) { - int (*postHookFunc) (int retVal___, struct party *p, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_membermoved_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_party_membermoved_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, &idx); + if( HPMHooks.count.HP_SQL_StmtNumRows_post ) { + uint64 (*postHookFunc) (uint64 retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -int HP_mapif_party_broken(int party_id, int flag) { +int HP_SQL_StmtNextRow(SqlStmt *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_broken_pre ) { - int (*preHookFunc) (int *party_id, int *flag); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_broken_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_party_broken_pre[hIndex].func; - retVal___ = preHookFunc(&party_id, &flag); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtNextRow_pre ) { + int (*preHookFunc) (SqlStmt *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10205,79 +16583,77 @@ int HP_mapif_party_broken(int party_id, int flag) { } } { - retVal___ = HPMHooks.source.mapif.party_broken(party_id, flag); + retVal___ = HPMHooks.source.SQL.StmtNextRow(self); } - if( HPMHooks.count.HP_mapif_party_broken_post ) { - int (*postHookFunc) (int retVal___, int *party_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_broken_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_party_broken_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id, &flag); + if( HPMHooks.count.HP_SQL_StmtNextRow_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -int HP_mapif_party_message(int party_id, int account_id, char *mes, int len, int sfd) { +void HP_SQL_StmtFreeResult(SqlStmt *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_message_pre ) { - int (*preHookFunc) (int *party_id, int *account_id, char *mes, int *len, int *sfd); + if( HPMHooks.count.HP_SQL_StmtFreeResult_pre ) { + void (*preHookFunc) (SqlStmt *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_message_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_party_message_pre[hIndex].func; - retVal___ = preHookFunc(&party_id, &account_id, mes, &len, &sfd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_pre[hIndex].func; + preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.party_message(party_id, account_id, mes, len, sfd); + HPMHooks.source.SQL.StmtFreeResult(self); } - if( HPMHooks.count.HP_mapif_party_message_post ) { - int (*postHookFunc) (int retVal___, int *party_id, int *account_id, char *mes, int *len, int *sfd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_message_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_party_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id, &account_id, mes, &len, &sfd); + if( HPMHooks.count.HP_SQL_StmtFreeResult_post ) { + void (*postHookFunc) (SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_post[hIndex].func; + postHookFunc(self); } } - return retVal___; + return; } -int HP_mapif_parse_CreateParty(int fd, char *name, int item, int item2, struct party_member *leader) { +void HP_SQL_StmtFree(SqlStmt *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_CreateParty_pre ) { - int (*preHookFunc) (int *fd, char *name, int *item, int *item2, struct party_member *leader); + if( HPMHooks.count.HP_SQL_StmtFree_pre ) { + void (*preHookFunc) (SqlStmt *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateParty_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_CreateParty_pre[hIndex].func; - retVal___ = preHookFunc(&fd, name, &item, &item2, leader); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtFree_pre[hIndex].func; + preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.parse_CreateParty(fd, name, item, item2, leader); + HPMHooks.source.SQL.StmtFree(self); } - if( HPMHooks.count.HP_mapif_parse_CreateParty_post ) { - int (*postHookFunc) (int retVal___, int *fd, char *name, int *item, int *item2, struct party_member *leader); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateParty_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_CreateParty_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, name, &item, &item2, leader); + if( HPMHooks.count.HP_SQL_StmtFree_post ) { + void (*postHookFunc) (SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtFree_post[hIndex].func; + postHookFunc(self); } } - return retVal___; + return; } -void HP_mapif_parse_PartyInfo(int fd, int party_id, int char_id) { +void HP_SQL_StmtShowDebug_(SqlStmt *self, const char *debug_file, const unsigned long debug_line) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_PartyInfo_pre ) { - void (*preHookFunc) (int *fd, int *party_id, int *char_id); + if( HPMHooks.count.HP_SQL_StmtShowDebug__pre ) { + void (*preHookFunc) (SqlStmt *self, const char *debug_file, const unsigned long *debug_line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyInfo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_PartyInfo_pre[hIndex].func; - preHookFunc(&fd, &party_id, &char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__pre[hIndex].func; + preHookFunc(self, debug_file, &debug_line); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10285,26 +16661,27 @@ void HP_mapif_parse_PartyInfo(int fd, int party_id, int char_id) { } } { - HPMHooks.source.mapif.parse_PartyInfo(fd, party_id, char_id); + HPMHooks.source.SQL.StmtShowDebug_(self, debug_file, debug_line); } - if( HPMHooks.count.HP_mapif_parse_PartyInfo_post ) { - void (*postHookFunc) (int *fd, int *party_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyInfo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_PartyInfo_post[hIndex].func; - postHookFunc(&fd, &party_id, &char_id); + if( HPMHooks.count.HP_SQL_StmtShowDebug__post ) { + void (*postHookFunc) (SqlStmt *self, const char *debug_file, const unsigned long *debug_line); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__post[hIndex].func; + postHookFunc(self, debug_file, &debug_line); } } return; } -int HP_mapif_parse_PartyAddMember(int fd, int party_id, struct party_member *member) { +/* StrBuf */ +StringBuf* HP_StrBuf_Malloc(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyAddMember_pre ) { - int (*preHookFunc) (int *fd, int *party_id, struct party_member *member); + StringBuf* retVal___ = NULL; + if( HPMHooks.count.HP_StrBuf_Malloc_pre ) { + StringBuf* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyAddMember_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_PartyAddMember_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &party_id, member); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Malloc_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10312,53 +16689,54 @@ int HP_mapif_parse_PartyAddMember(int fd, int party_id, struct party_member *mem } } { - retVal___ = HPMHooks.source.mapif.parse_PartyAddMember(fd, party_id, member); + retVal___ = HPMHooks.source.StrBuf.Malloc(); } - if( HPMHooks.count.HP_mapif_parse_PartyAddMember_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *party_id, struct party_member *member); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyAddMember_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_PartyAddMember_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &party_id, member); + if( HPMHooks.count.HP_StrBuf_Malloc_post ) { + StringBuf* (*postHookFunc) (StringBuf* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Malloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_mapif_parse_PartyChangeOption(int fd, int party_id, int account_id, int exp, int item) { +void HP_StrBuf_Init(StringBuf *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyChangeOption_pre ) { - int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *exp, int *item); + if( HPMHooks.count.HP_StrBuf_Init_pre ) { + void (*preHookFunc) (StringBuf *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeOption_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_PartyChangeOption_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &party_id, &account_id, &exp, &item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Init_pre[hIndex].func; + preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.parse_PartyChangeOption(fd, party_id, account_id, exp, item); + HPMHooks.source.StrBuf.Init(self); } - if( HPMHooks.count.HP_mapif_parse_PartyChangeOption_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, int *exp, int *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeOption_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_PartyChangeOption_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, &exp, &item); + if( HPMHooks.count.HP_StrBuf_Init_post ) { + void (*postHookFunc) (StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Init_post[hIndex].func; + postHookFunc(self); } } - return retVal___; + return; } -int HP_mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id) { +int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyLeave_pre ) { - int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *char_id); + if( HPMHooks.count.HP_StrBuf_Vprintf_pre ) { + int (*preHookFunc) (StringBuf *self, const char *fmt, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeave_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_PartyLeave_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &party_id, &account_id, &char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_pre[hIndex].func; + retVal___ = preHookFunc(self, fmt, args___copy); + va_end(args___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10366,26 +16744,30 @@ int HP_mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id) } } { - retVal___ = HPMHooks.source.mapif.parse_PartyLeave(fd, party_id, account_id, char_id); + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.StrBuf.Vprintf(self, fmt, args___copy); + va_end(args___copy); } - if( HPMHooks.count.HP_mapif_parse_PartyLeave_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeave_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_PartyLeave_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, &char_id); + if( HPMHooks.count.HP_StrBuf_Vprintf_post ) { + int (*postHookFunc) (int retVal___, StringBuf *self, const char *fmt, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, fmt, args___copy); + va_end(args___copy); } } return retVal___; } -int HP_mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id, unsigned short map, int online, unsigned int lv) { +int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyChangeMap_pre ) { - int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *char_id, unsigned short *map, int *online, unsigned int *lv); + if( HPMHooks.count.HP_StrBuf_Append_pre ) { + int (*preHookFunc) (StringBuf *self, const StringBuf *sbuf); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeMap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_PartyChangeMap_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &party_id, &account_id, &char_id, &map, &online, &lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Append_pre[hIndex].func; + retVal___ = preHookFunc(self, sbuf); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10393,26 +16775,26 @@ int HP_mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char } } { - retVal___ = HPMHooks.source.mapif.parse_PartyChangeMap(fd, party_id, account_id, char_id, map, online, lv); + retVal___ = HPMHooks.source.StrBuf.Append(self, sbuf); } - if( HPMHooks.count.HP_mapif_parse_PartyChangeMap_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, int *char_id, unsigned short *map, int *online, unsigned int *lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeMap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_PartyChangeMap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, &char_id, &map, &online, &lv); + if( HPMHooks.count.HP_StrBuf_Append_post ) { + int (*postHookFunc) (int retVal___, StringBuf *self, const StringBuf *sbuf); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Append_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, sbuf); } } return retVal___; } -int HP_mapif_parse_BreakParty(int fd, int party_id) { +int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_BreakParty_pre ) { - int (*preHookFunc) (int *fd, int *party_id); + if( HPMHooks.count.HP_StrBuf_AppendStr_pre ) { + int (*preHookFunc) (StringBuf *self, const char *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakParty_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_BreakParty_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_pre[hIndex].func; + retVal___ = preHookFunc(self, str); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10420,26 +16802,26 @@ int HP_mapif_parse_BreakParty(int fd, int party_id) { } } { - retVal___ = HPMHooks.source.mapif.parse_BreakParty(fd, party_id); + retVal___ = HPMHooks.source.StrBuf.AppendStr(self, str); } - if( HPMHooks.count.HP_mapif_parse_BreakParty_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakParty_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_BreakParty_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &party_id); + if( HPMHooks.count.HP_StrBuf_AppendStr_post ) { + int (*postHookFunc) (int retVal___, StringBuf *self, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, str); } } return retVal___; } -int HP_mapif_parse_PartyMessage(int fd, int party_id, int account_id, char *mes, int len) { +int HP_StrBuf_Length(StringBuf *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyMessage_pre ) { - int (*preHookFunc) (int *fd, int *party_id, int *account_id, char *mes, int *len); + if( HPMHooks.count.HP_StrBuf_Length_pre ) { + int (*preHookFunc) (StringBuf *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyMessage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_PartyMessage_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &party_id, &account_id, mes, &len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Length_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10447,26 +16829,26 @@ int HP_mapif_parse_PartyMessage(int fd, int party_id, int account_id, char *mes, } } { - retVal___ = HPMHooks.source.mapif.parse_PartyMessage(fd, party_id, account_id, mes, len); + retVal___ = HPMHooks.source.StrBuf.Length(self); } - if( HPMHooks.count.HP_mapif_parse_PartyMessage_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, char *mes, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyMessage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_PartyMessage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, mes, &len); + if( HPMHooks.count.HP_StrBuf_Length_post ) { + int (*postHookFunc) (int retVal___, StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Length_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -int HP_mapif_parse_PartyLeaderChange(int fd, int party_id, int account_id, int char_id) { +char* HP_StrBuf_Value(StringBuf *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyLeaderChange_pre ) { - int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *char_id); + char* retVal___ = NULL; + if( HPMHooks.count.HP_StrBuf_Value_pre ) { + char* (*preHookFunc) (StringBuf *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeaderChange_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_PartyLeaderChange_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &party_id, &account_id, &char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Value_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10474,107 +16856,105 @@ int HP_mapif_parse_PartyLeaderChange(int fd, int party_id, int account_id, int c } } { - retVal___ = HPMHooks.source.mapif.parse_PartyLeaderChange(fd, party_id, account_id, char_id); + retVal___ = HPMHooks.source.StrBuf.Value(self); } - if( HPMHooks.count.HP_mapif_parse_PartyLeaderChange_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeaderChange_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_PartyLeaderChange_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, &char_id); + if( HPMHooks.count.HP_StrBuf_Value_post ) { + char* (*postHookFunc) (char* retVal___, StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Value_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -int HP_mapif_pet_created(int fd, int account_id, struct s_pet *p) { +void HP_StrBuf_Clear(StringBuf *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_pet_created_pre ) { - int (*preHookFunc) (int *fd, int *account_id, struct s_pet *p); + if( HPMHooks.count.HP_StrBuf_Clear_pre ) { + void (*preHookFunc) (StringBuf *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_created_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_pet_created_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Clear_pre[hIndex].func; + preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.pet_created(fd, account_id, p); + HPMHooks.source.StrBuf.Clear(self); } - if( HPMHooks.count.HP_mapif_pet_created_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, struct s_pet *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_created_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_pet_created_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, p); + if( HPMHooks.count.HP_StrBuf_Clear_post ) { + void (*postHookFunc) (StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Clear_post[hIndex].func; + postHookFunc(self); } } - return retVal___; + return; } -int HP_mapif_pet_info(int fd, int account_id, struct s_pet *p) { +void HP_StrBuf_Destroy(StringBuf *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_pet_info_pre ) { - int (*preHookFunc) (int *fd, int *account_id, struct s_pet *p); + if( HPMHooks.count.HP_StrBuf_Destroy_pre ) { + void (*preHookFunc) (StringBuf *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_info_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_pet_info_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Destroy_pre[hIndex].func; + preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.pet_info(fd, account_id, p); + HPMHooks.source.StrBuf.Destroy(self); } - if( HPMHooks.count.HP_mapif_pet_info_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, struct s_pet *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_info_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_pet_info_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, p); + if( HPMHooks.count.HP_StrBuf_Destroy_post ) { + void (*postHookFunc) (StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Destroy_post[hIndex].func; + postHookFunc(self); } } - return retVal___; + return; } -int HP_mapif_pet_noinfo(int fd, int account_id) { +void HP_StrBuf_Free(StringBuf *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_pet_noinfo_pre ) { - int (*preHookFunc) (int *fd, int *account_id); + if( HPMHooks.count.HP_StrBuf_Free_pre ) { + void (*preHookFunc) (StringBuf *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_noinfo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_pet_noinfo_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Free_pre[hIndex].func; + preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.pet_noinfo(fd, account_id); + HPMHooks.source.StrBuf.Free(self); } - if( HPMHooks.count.HP_mapif_pet_noinfo_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_noinfo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_pet_noinfo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id); + if( HPMHooks.count.HP_StrBuf_Free_post ) { + void (*postHookFunc) (StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Free_post[hIndex].func; + postHookFunc(self); } } - return retVal___; + return; } -int HP_mapif_save_pet_ack(int fd, int account_id, int flag) { +/* strlib */ +char* HP_strlib_jstrescape(char *pt) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_save_pet_ack_pre ) { - int (*preHookFunc) (int *fd, int *account_id, int *flag); + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_jstrescape_pre ) { + char* (*preHookFunc) (char *pt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_ack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_save_pet_ack_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_jstrescape_pre[hIndex].func; + retVal___ = preHookFunc(pt); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10582,26 +16962,26 @@ int HP_mapif_save_pet_ack(int fd, int account_id, int flag) { } } { - retVal___ = HPMHooks.source.mapif.save_pet_ack(fd, account_id, flag); + retVal___ = HPMHooks.source.strlib.jstrescape(pt); } - if( HPMHooks.count.HP_mapif_save_pet_ack_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_ack_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_save_pet_ack_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, &flag); + if( HPMHooks.count.HP_strlib_jstrescape_post ) { + char* (*postHookFunc) (char* retVal___, char *pt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_jstrescape_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pt); } } return retVal___; } -int HP_mapif_delete_pet_ack(int fd, int flag) { +char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_delete_pet_ack_pre ) { - int (*preHookFunc) (int *fd, int *flag); + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_jstrescapecpy_pre ) { + char* (*preHookFunc) (char *pt, const char *spt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_ack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_delete_pet_ack_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_pre[hIndex].func; + retVal___ = preHookFunc(pt, spt); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10609,26 +16989,26 @@ int HP_mapif_delete_pet_ack(int fd, int flag) { } } { - retVal___ = HPMHooks.source.mapif.delete_pet_ack(fd, flag); + retVal___ = HPMHooks.source.strlib.jstrescapecpy(pt, spt); } - if( HPMHooks.count.HP_mapif_delete_pet_ack_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_ack_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_delete_pet_ack_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &flag); + if( HPMHooks.count.HP_strlib_jstrescapecpy_post ) { + char* (*postHookFunc) (char* retVal___, char *pt, const char *spt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pt, spt); } } return retVal___; } -int HP_mapif_create_pet(int fd, int account_id, int char_id, short pet_class, short pet_lv, short pet_egg_id, short pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name) { +int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_create_pet_pre ) { - int (*preHookFunc) (int *fd, int *account_id, int *char_id, short *pet_class, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char *pet_name); + if( HPMHooks.count.HP_strlib_jmemescapecpy_pre ) { + int (*preHookFunc) (char *pt, const char *spt, int *size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_create_pet_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_create_pet_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, &char_id, &pet_class, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incubate, pet_name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_pre[hIndex].func; + retVal___ = preHookFunc(pt, spt, &size); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10636,26 +17016,53 @@ int HP_mapif_create_pet(int fd, int account_id, int char_id, short pet_class, sh } } { - retVal___ = HPMHooks.source.mapif.create_pet(fd, account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); + retVal___ = HPMHooks.source.strlib.jmemescapecpy(pt, spt, size); } - if( HPMHooks.count.HP_mapif_create_pet_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, short *pet_class, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char *pet_name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_create_pet_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_create_pet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, &char_id, &pet_class, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incubate, pet_name); + if( HPMHooks.count.HP_strlib_jmemescapecpy_post ) { + int (*postHookFunc) (int retVal___, char *pt, const char *spt, int *size); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pt, spt, &size); + } + } + return retVal___; +} +int HP_strlib_remove_control_chars_(char *str) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_strlib_remove_control_chars__pre ) { + int (*preHookFunc) (char *str); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__pre[hIndex].func; + retVal___ = preHookFunc(str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.strlib.remove_control_chars_(str); + } + if( HPMHooks.count.HP_strlib_remove_control_chars__post ) { + int (*postHookFunc) (int retVal___, char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); } } return retVal___; } -int HP_mapif_load_pet(int fd, int account_id, int char_id, int pet_id) { +char* HP_strlib_trim_(char *str) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_load_pet_pre ) { - int (*preHookFunc) (int *fd, int *account_id, int *char_id, int *pet_id); + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_trim__pre ) { + char* (*preHookFunc) (char *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_pet_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_load_pet_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, &char_id, &pet_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_trim__pre[hIndex].func; + retVal___ = preHookFunc(str); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10663,26 +17070,26 @@ int HP_mapif_load_pet(int fd, int account_id, int char_id, int pet_id) { } } { - retVal___ = HPMHooks.source.mapif.load_pet(fd, account_id, char_id, pet_id); + retVal___ = HPMHooks.source.strlib.trim_(str); } - if( HPMHooks.count.HP_mapif_load_pet_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, int *pet_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_pet_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_load_pet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, &char_id, &pet_id); + if( HPMHooks.count.HP_strlib_trim__post ) { + char* (*postHookFunc) (char* retVal___, char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_trim__post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); } } return retVal___; } -int HP_mapif_save_pet(int fd, int account_id, struct s_pet *data) { +char* HP_strlib_normalize_name_(char *str, const char *delims) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_save_pet_pre ) { - int (*preHookFunc) (int *fd, int *account_id, struct s_pet *data); + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_normalize_name__pre ) { + char* (*preHookFunc) (char *str, const char *delims); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_save_pet_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_normalize_name__pre[hIndex].func; + retVal___ = preHookFunc(str, delims); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10690,26 +17097,26 @@ int HP_mapif_save_pet(int fd, int account_id, struct s_pet *data) { } } { - retVal___ = HPMHooks.source.mapif.save_pet(fd, account_id, data); + retVal___ = HPMHooks.source.strlib.normalize_name_(str, delims); } - if( HPMHooks.count.HP_mapif_save_pet_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, struct s_pet *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_save_pet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, data); + if( HPMHooks.count.HP_strlib_normalize_name__post ) { + char* (*postHookFunc) (char* retVal___, char *str, const char *delims); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_normalize_name__post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, delims); } } return retVal___; } -int HP_mapif_delete_pet(int fd, int pet_id) { +const char* HP_strlib_stristr_(const char *haystack, const char *needle) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_delete_pet_pre ) { - int (*preHookFunc) (int *fd, int *pet_id); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_stristr__pre ) { + const char* (*preHookFunc) (const char *haystack, const char *needle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_delete_pet_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &pet_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_stristr__pre[hIndex].func; + retVal___ = preHookFunc(haystack, needle); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10717,26 +17124,26 @@ int HP_mapif_delete_pet(int fd, int pet_id) { } } { - retVal___ = HPMHooks.source.mapif.delete_pet(fd, pet_id); + retVal___ = HPMHooks.source.strlib.stristr_(haystack, needle); } - if( HPMHooks.count.HP_mapif_delete_pet_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *pet_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_delete_pet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &pet_id); + if( HPMHooks.count.HP_strlib_stristr__post ) { + const char* (*postHookFunc) (const char* retVal___, const char *haystack, const char *needle); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_stristr__post[hIndex].func; + retVal___ = postHookFunc(retVal___, haystack, needle); } } return retVal___; } -int HP_mapif_parse_CreatePet(int fd) { +size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_CreatePet_pre ) { - int (*preHookFunc) (int *fd); + size_t retVal___ = 0; + if( HPMHooks.count.HP_strlib_strnlen__pre ) { + size_t (*preHookFunc) (const char *string, size_t *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreatePet_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_CreatePet_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_strnlen__pre[hIndex].func; + retVal___ = preHookFunc(string, &maxlen); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10744,26 +17151,26 @@ int HP_mapif_parse_CreatePet(int fd) { } } { - retVal___ = HPMHooks.source.mapif.parse_CreatePet(fd); + retVal___ = HPMHooks.source.strlib.strnlen_(string, maxlen); } - if( HPMHooks.count.HP_mapif_parse_CreatePet_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreatePet_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_CreatePet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_strlib_strnlen__post ) { + size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_strnlen__post[hIndex].func; + retVal___ = postHookFunc(retVal___, string, &maxlen); } } return retVal___; } -int HP_mapif_parse_LoadPet(int fd) { +char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_LoadPet_pre ) { - int (*preHookFunc) (int *fd); + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_strtok_r__pre ) { + char* (*preHookFunc) (char *s1, const char *s2, char **lasts); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadPet_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_LoadPet_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_strtok_r__pre[hIndex].func; + retVal___ = preHookFunc(s1, s2, lasts); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10771,26 +17178,26 @@ int HP_mapif_parse_LoadPet(int fd) { } } { - retVal___ = HPMHooks.source.mapif.parse_LoadPet(fd); + retVal___ = HPMHooks.source.strlib.strtok_r_(s1, s2, lasts); } - if( HPMHooks.count.HP_mapif_parse_LoadPet_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadPet_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_LoadPet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_strlib_strtok_r__post ) { + char* (*postHookFunc) (char* retVal___, char *s1, const char *s2, char **lasts); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_strtok_r__post[hIndex].func; + retVal___ = postHookFunc(retVal___, s1, s2, lasts); } } return retVal___; } -int HP_mapif_parse_SavePet(int fd) { +int HP_strlib_e_mail_check_(char *email) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_SavePet_pre ) { - int (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_strlib_e_mail_check__pre ) { + int (*preHookFunc) (char *email); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SavePet_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_SavePet_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_e_mail_check__pre[hIndex].func; + retVal___ = preHookFunc(email); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10798,26 +17205,26 @@ int HP_mapif_parse_SavePet(int fd) { } } { - retVal___ = HPMHooks.source.mapif.parse_SavePet(fd); + retVal___ = HPMHooks.source.strlib.e_mail_check_(email); } - if( HPMHooks.count.HP_mapif_parse_SavePet_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SavePet_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_SavePet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_strlib_e_mail_check__post ) { + int (*postHookFunc) (int retVal___, char *email); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_e_mail_check__post[hIndex].func; + retVal___ = postHookFunc(retVal___, email); } } return retVal___; } -int HP_mapif_parse_DeletePet(int fd) { +int HP_strlib_config_switch_(const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_DeletePet_pre ) { - int (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_strlib_config_switch__pre ) { + int (*preHookFunc) (const char *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_DeletePet_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_DeletePet_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_config_switch__pre[hIndex].func; + retVal___ = preHookFunc(str); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10825,26 +17232,26 @@ int HP_mapif_parse_DeletePet(int fd) { } } { - retVal___ = HPMHooks.source.mapif.parse_DeletePet(fd); + retVal___ = HPMHooks.source.strlib.config_switch_(str); } - if( HPMHooks.count.HP_mapif_parse_DeletePet_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_DeletePet_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_DeletePet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_strlib_config_switch__post ) { + int (*postHookFunc) (int retVal___, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_config_switch__post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); } } return retVal___; } -struct quest* HP_mapif_quests_fromsql(int char_id, int *count) { +char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { int hIndex = 0; - struct quest* retVal___ = NULL; - if( HPMHooks.count.HP_mapif_quests_fromsql_pre ) { - struct quest* (*preHookFunc) (int *char_id, int *count); + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_safestrncpy__pre ) { + char* (*preHookFunc) (char *dst, const char *src, size_t *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quests_fromsql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_quests_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_safestrncpy__pre[hIndex].func; + retVal___ = preHookFunc(dst, src, &n); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10852,26 +17259,26 @@ struct quest* HP_mapif_quests_fromsql(int char_id, int *count) { } } { - retVal___ = HPMHooks.source.mapif.quests_fromsql(char_id, count); + retVal___ = HPMHooks.source.strlib.safestrncpy_(dst, src, n); } - if( HPMHooks.count.HP_mapif_quests_fromsql_post ) { - struct quest* (*postHookFunc) (struct quest* retVal___, int *char_id, int *count); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quests_fromsql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_quests_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, count); + if( HPMHooks.count.HP_strlib_safestrncpy__post ) { + char* (*postHookFunc) (char* retVal___, char *dst, const char *src, size_t *n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_safestrncpy__post[hIndex].func; + retVal___ = postHookFunc(retVal___, dst, src, &n); } } return retVal___; } -bool HP_mapif_quest_delete(int char_id, int quest_id) { +size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_quest_delete_pre ) { - bool (*preHookFunc) (int *char_id, int *quest_id); + size_t retVal___ = 0; + if( HPMHooks.count.HP_strlib_safestrnlen__pre ) { + size_t (*preHookFunc) (const char *string, size_t *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_quest_delete_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, &quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_safestrnlen__pre[hIndex].func; + retVal___ = preHookFunc(string, &maxlen); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10879,26 +17286,26 @@ bool HP_mapif_quest_delete(int char_id, int quest_id) { } } { - retVal___ = HPMHooks.source.mapif.quest_delete(char_id, quest_id); + retVal___ = HPMHooks.source.strlib.safestrnlen_(string, maxlen); } - if( HPMHooks.count.HP_mapif_quest_delete_post ) { - bool (*postHookFunc) (bool retVal___, int *char_id, int *quest_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_quest_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &quest_id); + if( HPMHooks.count.HP_strlib_safestrnlen__post ) { + size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_safestrnlen__post[hIndex].func; + retVal___ = postHookFunc(retVal___, string, &maxlen); } } return retVal___; } -bool HP_mapif_quest_add(int char_id, struct quest qd) { +int HP_strlib_strline_(const char *str, size_t pos) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_quest_add_pre ) { - bool (*preHookFunc) (int *char_id, struct quest *qd); + int retVal___ = 0; + if( HPMHooks.count.HP_strlib_strline__pre ) { + int (*preHookFunc) (const char *str, size_t *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_add_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_quest_add_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, &qd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_strline__pre[hIndex].func; + retVal___ = preHookFunc(str, &pos); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10906,26 +17313,26 @@ bool HP_mapif_quest_add(int char_id, struct quest qd) { } } { - retVal___ = HPMHooks.source.mapif.quest_add(char_id, qd); + retVal___ = HPMHooks.source.strlib.strline_(str, pos); } - if( HPMHooks.count.HP_mapif_quest_add_post ) { - bool (*postHookFunc) (bool retVal___, int *char_id, struct quest *qd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_add_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_quest_add_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &qd); + if( HPMHooks.count.HP_strlib_strline__post ) { + int (*postHookFunc) (int retVal___, const char *str, size_t *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_strline__post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &pos); } } return retVal___; } -bool HP_mapif_quest_update(int char_id, struct quest qd) { +bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_quest_update_pre ) { - bool (*preHookFunc) (int *char_id, struct quest *qd); + if( HPMHooks.count.HP_strlib_bin2hex__pre ) { + bool (*preHookFunc) (char *output, unsigned char *input, size_t *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_update_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_quest_update_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, &qd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_bin2hex__pre[hIndex].func; + retVal___ = preHookFunc(output, input, &count); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10933,52 +17340,54 @@ bool HP_mapif_quest_update(int char_id, struct quest qd) { } } { - retVal___ = HPMHooks.source.mapif.quest_update(char_id, qd); + retVal___ = HPMHooks.source.strlib.bin2hex_(output, input, count); } - if( HPMHooks.count.HP_mapif_quest_update_post ) { - bool (*postHookFunc) (bool retVal___, int *char_id, struct quest *qd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_update_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_quest_update_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &qd); + if( HPMHooks.count.HP_strlib_bin2hex__post ) { + bool (*postHookFunc) (bool retVal___, char *output, unsigned char *input, size_t *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_bin2hex__post[hIndex].func; + retVal___ = postHookFunc(retVal___, output, input, &count); } } return retVal___; } -void HP_mapif_quest_save_ack(int fd, int char_id, bool success) { +/* sv */ +int HP_sv_parse_next(struct s_svstate *svstate) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_quest_save_ack_pre ) { - void (*preHookFunc) (int *fd, int *char_id, bool *success); + int retVal___ = 0; + if( HPMHooks.count.HP_sv_parse_next_pre ) { + int (*preHookFunc) (struct s_svstate *svstate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_save_ack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_quest_save_ack_pre[hIndex].func; - preHookFunc(&fd, &char_id, &success); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_parse_next_pre[hIndex].func; + retVal___ = preHookFunc(svstate); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.quest_save_ack(fd, char_id, success); + retVal___ = HPMHooks.source.sv.parse_next(svstate); } - if( HPMHooks.count.HP_mapif_quest_save_ack_post ) { - void (*postHookFunc) (int *fd, int *char_id, bool *success); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_save_ack_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_quest_save_ack_post[hIndex].func; - postHookFunc(&fd, &char_id, &success); + if( HPMHooks.count.HP_sv_parse_next_post ) { + int (*postHookFunc) (int retVal___, struct s_svstate *svstate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_parse_next_post[hIndex].func; + retVal___ = postHookFunc(retVal___, svstate); } } - return; + return retVal___; } -int HP_mapif_parse_quest_save(int fd) { +int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_quest_save_pre ) { - int (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_sv_parse_pre ) { + int (*preHookFunc) (const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_save_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_quest_save_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_parse_pre[hIndex].func; + retVal___ = preHookFunc(str, &len, &startoff, &delim, out_pos, &npos, &opt); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -10986,52 +17395,53 @@ int HP_mapif_parse_quest_save(int fd) { } } { - retVal___ = HPMHooks.source.mapif.parse_quest_save(fd); + retVal___ = HPMHooks.source.sv.parse(str, len, startoff, delim, out_pos, npos, opt); } - if( HPMHooks.count.HP_mapif_parse_quest_save_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_save_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_quest_save_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_sv_parse_post ) { + int (*postHookFunc) (int retVal___, const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_parse_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_pos, &npos, &opt); } } return retVal___; } -void HP_mapif_send_quests(int fd, int char_id, struct quest *tmp_questlog, int num_quests) { +int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_send_quests_pre ) { - void (*preHookFunc) (int *fd, int *char_id, struct quest *tmp_questlog, int *num_quests); + int retVal___ = 0; + if( HPMHooks.count.HP_sv_split_pre ) { + int (*preHookFunc) (char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_quests_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_send_quests_pre[hIndex].func; - preHookFunc(&fd, &char_id, tmp_questlog, &num_quests); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_split_pre[hIndex].func; + retVal___ = preHookFunc(str, &len, &startoff, &delim, out_fields, &nfields, &opt); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.send_quests(fd, char_id, tmp_questlog, num_quests); + retVal___ = HPMHooks.source.sv.split(str, len, startoff, delim, out_fields, nfields, opt); } - if( HPMHooks.count.HP_mapif_send_quests_post ) { - void (*postHookFunc) (int *fd, int *char_id, struct quest *tmp_questlog, int *num_quests); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_quests_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_send_quests_post[hIndex].func; - postHookFunc(&fd, &char_id, tmp_questlog, &num_quests); + if( HPMHooks.count.HP_sv_split_post ) { + int (*postHookFunc) (int retVal___, char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_split_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_fields, &nfields, &opt); } } - return; + return retVal___; } -int HP_mapif_parse_quest_load(int fd) { +size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *escapes) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_quest_load_pre ) { - int (*preHookFunc) (int *fd); + size_t retVal___ = 0; + if( HPMHooks.count.HP_sv_escape_c_pre ) { + size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len, const char *escapes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_load_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_quest_load_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_escape_c_pre[hIndex].func; + retVal___ = preHookFunc(out_dest, src, &len, escapes); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11039,26 +17449,26 @@ int HP_mapif_parse_quest_load(int fd) { } } { - retVal___ = HPMHooks.source.mapif.parse_quest_load(fd); + retVal___ = HPMHooks.source.sv.escape_c(out_dest, src, len, escapes); } - if( HPMHooks.count.HP_mapif_parse_quest_load_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_load_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_quest_load_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_sv_escape_c_post ) { + size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len, const char *escapes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_escape_c_post[hIndex].func; + retVal___ = postHookFunc(retVal___, out_dest, src, &len, escapes); } } return retVal___; } -int HP_mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag) { +size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_load_guild_storage_pre ) { - int (*preHookFunc) (int *fd, int *account_id, int *guild_id, char *flag); + size_t retVal___ = 0; + if( HPMHooks.count.HP_sv_unescape_c_pre ) { + size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_guild_storage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_load_guild_storage_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, &guild_id, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_unescape_c_pre[hIndex].func; + retVal___ = preHookFunc(out_dest, src, &len); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11066,26 +17476,26 @@ int HP_mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag) } } { - retVal___ = HPMHooks.source.mapif.load_guild_storage(fd, account_id, guild_id, flag); + retVal___ = HPMHooks.source.sv.unescape_c(out_dest, src, len); } - if( HPMHooks.count.HP_mapif_load_guild_storage_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *guild_id, char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_guild_storage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_load_guild_storage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, &guild_id, &flag); + if( HPMHooks.count.HP_sv_unescape_c_post ) { + size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_unescape_c_post[hIndex].func; + retVal___ = postHookFunc(retVal___, out_dest, src, &len); } } return retVal___; } -int HP_mapif_save_guild_storage_ack(int fd, int account_id, int guild_id, int fail) { +const char* HP_sv_skip_escaped_c(const char *p) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_save_guild_storage_ack_pre ) { - int (*preHookFunc) (int *fd, int *account_id, int *guild_id, int *fail); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sv_skip_escaped_c_pre ) { + const char* (*preHookFunc) (const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_guild_storage_ack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_save_guild_storage_ack_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, &guild_id, &fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11093,26 +17503,26 @@ int HP_mapif_save_guild_storage_ack(int fd, int account_id, int guild_id, int fa } } { - retVal___ = HPMHooks.source.mapif.save_guild_storage_ack(fd, account_id, guild_id, fail); + retVal___ = HPMHooks.source.sv.skip_escaped_c(p); } - if( HPMHooks.count.HP_mapif_save_guild_storage_ack_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *guild_id, int *fail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_guild_storage_ack_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_save_guild_storage_ack_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, &guild_id, &fail); + if( HPMHooks.count.HP_sv_skip_escaped_c_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } return retVal___; } -int HP_mapif_parse_LoadGuildStorage(int fd) { +bool HP_sv_readdb(const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_LoadGuildStorage_pre ) { - int (*preHookFunc) (int *fd); + bool retVal___ = false; + if( HPMHooks.count.HP_sv_readdb_pre ) { + bool (*preHookFunc) (const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadGuildStorage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_LoadGuildStorage_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_readdb_pre[hIndex].func; + retVal___ = preHookFunc(directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11120,26 +17530,27 @@ int HP_mapif_parse_LoadGuildStorage(int fd) { } } { - retVal___ = HPMHooks.source.mapif.parse_LoadGuildStorage(fd); + retVal___ = HPMHooks.source.sv.readdb(directory, filename, delim, mincols, maxcols, maxrows, parseproc); } - if( HPMHooks.count.HP_mapif_parse_LoadGuildStorage_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadGuildStorage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_LoadGuildStorage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_sv_readdb_post ) { + bool (*postHookFunc) (bool retVal___, const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_readdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc); } } return retVal___; } -int HP_mapif_parse_SaveGuildStorage(int fd) { +/* sysinfo */ +int HP_sysinfo_getpagesize(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_SaveGuildStorage_pre ) { - int (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_sysinfo_getpagesize_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SaveGuildStorage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_SaveGuildStorage_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11147,26 +17558,26 @@ int HP_mapif_parse_SaveGuildStorage(int fd) { } } { - retVal___ = HPMHooks.source.mapif.parse_SaveGuildStorage(fd); + retVal___ = HPMHooks.source.sysinfo.getpagesize(); } - if( HPMHooks.count.HP_mapif_parse_SaveGuildStorage_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SaveGuildStorage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_SaveGuildStorage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_sysinfo_getpagesize_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_mapif_itembound_ack(int fd, int aid, int guild_id) { +const char* HP_sysinfo_platform(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_itembound_ack_pre ) { - int (*preHookFunc) (int *fd, int *aid, int *guild_id); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_platform_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_itembound_ack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_itembound_ack_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &aid, &guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_platform_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11174,26 +17585,26 @@ int HP_mapif_itembound_ack(int fd, int aid, int guild_id) { } } { - retVal___ = HPMHooks.source.mapif.itembound_ack(fd, aid, guild_id); + retVal___ = HPMHooks.source.sysinfo.platform(); } - if( HPMHooks.count.HP_mapif_itembound_ack_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *aid, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_itembound_ack_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_itembound_ack_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &aid, &guild_id); + if( HPMHooks.count.HP_sysinfo_platform_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_platform_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_mapif_parse_ItemBoundRetrieve_sub(int fd) { +const char* HP_sysinfo_osversion(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_pre ) { - int (*preHookFunc) (int *fd); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_osversion_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_sub_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_osversion_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11201,104 +17612,107 @@ int HP_mapif_parse_ItemBoundRetrieve_sub(int fd) { } } { - retVal___ = HPMHooks.source.mapif.parse_ItemBoundRetrieve_sub(fd); + retVal___ = HPMHooks.source.sysinfo.osversion(); } - if( HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_sysinfo_osversion_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_osversion_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -void HP_mapif_parse_ItemBoundRetrieve(int fd) { +const char* HP_sysinfo_cpu(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_pre ) { - void (*preHookFunc) (int *fd); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_cpu_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_cpu_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_ItemBoundRetrieve(fd); + retVal___ = HPMHooks.source.sysinfo.cpu(); } - if( HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_sysinfo_cpu_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_cpu_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -void HP_mapif_parse_accinfo(int fd) { +int HP_sysinfo_cpucores(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_accinfo_pre ) { - void (*preHookFunc) (int *fd); + int retVal___ = 0; + if( HPMHooks.count.HP_sysinfo_cpucores_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_accinfo_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_cpucores_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_accinfo(fd); + retVal___ = HPMHooks.source.sysinfo.cpucores(); } - if( HPMHooks.count.HP_mapif_parse_accinfo_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_accinfo_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_sysinfo_cpucores_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_cpucores_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -void HP_mapif_parse_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int group_id, int logincount, int state) { +const char* HP_sysinfo_arch(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_accinfo2_pre ) { - void (*preHookFunc) (bool *success, int *map_fd, int *u_fd, int *u_aid, int *account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int *group_id, int *logincount, int *state); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_arch_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_accinfo2_pre[hIndex].func; - preHookFunc(&success, &map_fd, &u_fd, &u_aid, &account_id, userid, user_pass, email, last_ip, lastlogin, pin_code, birthdate, &group_id, &logincount, &state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_arch_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_accinfo2(success, map_fd, u_fd, u_aid, account_id, userid, user_pass, email, last_ip, lastlogin, pin_code, birthdate, group_id, logincount, state); + retVal___ = HPMHooks.source.sysinfo.arch(); } - if( HPMHooks.count.HP_mapif_parse_accinfo2_post ) { - void (*postHookFunc) (bool *success, int *map_fd, int *u_fd, int *u_aid, int *account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int *group_id, int *logincount, int *state); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_accinfo2_post[hIndex].func; - postHookFunc(&success, &map_fd, &u_fd, &u_aid, &account_id, userid, user_pass, email, last_ip, lastlogin, pin_code, birthdate, &group_id, &logincount, &state); + if( HPMHooks.count.HP_sysinfo_arch_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_arch_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -int HP_mapif_broadcast(unsigned char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd) { +bool HP_sysinfo_is64bit(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_broadcast_pre ) { - int (*preHookFunc) (unsigned char *mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, int *sfd); + bool retVal___ = false; + if( HPMHooks.count.HP_sysinfo_is64bit_pre ) { + bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_broadcast_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_broadcast_pre[hIndex].func; - retVal___ = preHookFunc(mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &sfd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_is64bit_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11306,26 +17720,26 @@ int HP_mapif_broadcast(unsigned char *mes, int len, unsigned int fontColor, shor } } { - retVal___ = HPMHooks.source.mapif.broadcast(mes, len, fontColor, fontType, fontSize, fontAlign, fontY, sfd); + retVal___ = HPMHooks.source.sysinfo.is64bit(); } - if( HPMHooks.count.HP_mapif_broadcast_post ) { - int (*postHookFunc) (int retVal___, unsigned char *mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, int *sfd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_broadcast_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_broadcast_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &sfd); + if( HPMHooks.count.HP_sysinfo_is64bit_post ) { + bool (*postHookFunc) (bool retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_is64bit_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_mapif_wis_message(struct WisData *wd) { +const char* HP_sysinfo_compiler(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_wis_message_pre ) { - int (*preHookFunc) (struct WisData *wd); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_compiler_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_message_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_wis_message_pre[hIndex].func; - retVal___ = preHookFunc(wd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_compiler_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11333,52 +17747,53 @@ int HP_mapif_wis_message(struct WisData *wd) { } } { - retVal___ = HPMHooks.source.mapif.wis_message(wd); + retVal___ = HPMHooks.source.sysinfo.compiler(); } - if( HPMHooks.count.HP_mapif_wis_message_post ) { - int (*postHookFunc) (int retVal___, struct WisData *wd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_message_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_wis_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, wd); + if( HPMHooks.count.HP_sysinfo_compiler_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_compiler_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -void HP_mapif_wis_response(int fd, unsigned char *src, int flag) { +const char* HP_sysinfo_cflags(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_wis_response_pre ) { - void (*preHookFunc) (int *fd, unsigned char *src, int *flag); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_cflags_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_response_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_wis_response_pre[hIndex].func; - preHookFunc(&fd, src, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_cflags_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.wis_response(fd, src, flag); + retVal___ = HPMHooks.source.sysinfo.cflags(); } - if( HPMHooks.count.HP_mapif_wis_response_post ) { - void (*postHookFunc) (int *fd, unsigned char *src, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_response_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_wis_response_post[hIndex].func; - postHookFunc(&fd, src, &flag); + if( HPMHooks.count.HP_sysinfo_cflags_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_cflags_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -int HP_mapif_wis_end(struct WisData *wd, int flag) { +const char* HP_sysinfo_vcstype(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_wis_end_pre ) { - int (*preHookFunc) (struct WisData *wd, int *flag); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_vcstype_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_end_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_wis_end_pre[hIndex].func; - retVal___ = preHookFunc(wd, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_vcstype_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11386,26 +17801,26 @@ int HP_mapif_wis_end(struct WisData *wd, int flag) { } } { - retVal___ = HPMHooks.source.mapif.wis_end(wd, flag); + retVal___ = HPMHooks.source.sysinfo.vcstype(); } - if( HPMHooks.count.HP_mapif_wis_end_post ) { - int (*postHookFunc) (int retVal___, struct WisData *wd, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_end_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_wis_end_post[hIndex].func; - retVal___ = postHookFunc(retVal___, wd, &flag); + if( HPMHooks.count.HP_sysinfo_vcstype_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_vcstype_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_mapif_account_reg_reply(int fd, int account_id, int char_id, int type) { +int HP_sysinfo_vcstypeid(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_account_reg_reply_pre ) { - int (*preHookFunc) (int *fd, int *account_id, int *char_id, int *type); + if( HPMHooks.count.HP_sysinfo_vcstypeid_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_reg_reply_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_account_reg_reply_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, &char_id, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11413,26 +17828,26 @@ int HP_mapif_account_reg_reply(int fd, int account_id, int char_id, int type) { } } { - retVal___ = HPMHooks.source.mapif.account_reg_reply(fd, account_id, char_id, type); + retVal___ = HPMHooks.source.sysinfo.vcstypeid(); } - if( HPMHooks.count.HP_mapif_account_reg_reply_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_reg_reply_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_account_reg_reply_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, &char_id, &type); + if( HPMHooks.count.HP_sysinfo_vcstypeid_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_mapif_disconnectplayer(int fd, int account_id, int char_id, int reason) { +const char* HP_sysinfo_vcsrevision_src(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_disconnectplayer_pre ) { - int (*preHookFunc) (int *fd, int *account_id, int *char_id, int *reason); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_vcsrevision_src_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_disconnectplayer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_disconnectplayer_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, &char_id, &reason); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11440,26 +17855,26 @@ int HP_mapif_disconnectplayer(int fd, int account_id, int char_id, int reason) { } } { - retVal___ = HPMHooks.source.mapif.disconnectplayer(fd, account_id, char_id, reason); + retVal___ = HPMHooks.source.sysinfo.vcsrevision_src(); } - if( HPMHooks.count.HP_mapif_disconnectplayer_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, int *reason); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_disconnectplayer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_disconnectplayer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, &char_id, &reason); + if( HPMHooks.count.HP_sysinfo_vcsrevision_src_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_mapif_parse_broadcast(int fd) { +const char* HP_sysinfo_vcsrevision_scripts(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_broadcast_pre ) { - int (*preHookFunc) (int *fd); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_broadcast_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_broadcast_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11467,53 +17882,52 @@ int HP_mapif_parse_broadcast(int fd) { } } { - retVal___ = HPMHooks.source.mapif.parse_broadcast(fd); + retVal___ = HPMHooks.source.sysinfo.vcsrevision_scripts(); } - if( HPMHooks.count.HP_mapif_parse_broadcast_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_broadcast_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_broadcast_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_mapif_parse_WisRequest(int fd) { +void HP_sysinfo_vcsrevision_reload(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_WisRequest_pre ) { - int (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisRequest_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_WisRequest_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.parse_WisRequest(fd); + HPMHooks.source.sysinfo.vcsrevision_reload(); } - if( HPMHooks.count.HP_mapif_parse_WisRequest_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisRequest_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_WisRequest_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_mapif_parse_WisReply(int fd) { +bool HP_sysinfo_is_superuser(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_WisReply_pre ) { - int (*preHookFunc) (int *fd); + bool retVal___ = false; + if( HPMHooks.count.HP_sysinfo_is_superuser_pre ) { + bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisReply_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_WisReply_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11521,80 +17935,79 @@ int HP_mapif_parse_WisReply(int fd) { } } { - retVal___ = HPMHooks.source.mapif.parse_WisReply(fd); - } - if( HPMHooks.count.HP_mapif_parse_WisReply_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisReply_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_WisReply_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = HPMHooks.source.sysinfo.is_superuser(); + } + if( HPMHooks.count.HP_sysinfo_is_superuser_post ) { + bool (*postHookFunc) (bool retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_mapif_parse_WisToGM(int fd) { +void HP_sysinfo_init(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_WisToGM_pre ) { - int (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_sysinfo_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisToGM_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_WisToGM_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.parse_WisToGM(fd); + HPMHooks.source.sysinfo.init(); } - if( HPMHooks.count.HP_mapif_parse_WisToGM_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisToGM_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_WisToGM_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_sysinfo_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_init_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_mapif_parse_Registry(int fd) { +void HP_sysinfo_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_Registry_pre ) { - int (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_sysinfo_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_Registry_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_Registry_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.parse_Registry(fd); + HPMHooks.source.sysinfo.final(); } - if( HPMHooks.count.HP_mapif_parse_Registry_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_Registry_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_Registry_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_sysinfo_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_mapif_parse_RegistryRequest(int fd) { +/* timer */ +int64 HP_timer_gettick(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_RegistryRequest_pre ) { - int (*preHookFunc) (int *fd); + int64 retVal___ = 0; + if( HPMHooks.count.HP_timer_gettick_pre ) { + int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_RegistryRequest_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_RegistryRequest_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_gettick_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11602,52 +18015,53 @@ int HP_mapif_parse_RegistryRequest(int fd) { } } { - retVal___ = HPMHooks.source.mapif.parse_RegistryRequest(fd); + retVal___ = HPMHooks.source.timer.gettick(); } - if( HPMHooks.count.HP_mapif_parse_RegistryRequest_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_RegistryRequest_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_RegistryRequest_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_timer_gettick_post ) { + int64 (*postHookFunc) (int64 retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_gettick_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -void HP_mapif_namechange_ack(int fd, int account_id, int char_id, int type, int flag, const char *name) { +int64 HP_timer_gettick_nocache(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_namechange_ack_pre ) { - void (*preHookFunc) (int *fd, int *account_id, int *char_id, int *type, int *flag, const char *name); + int64 retVal___ = 0; + if( HPMHooks.count.HP_timer_gettick_nocache_pre ) { + int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_namechange_ack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_namechange_ack_pre[hIndex].func; - preHookFunc(&fd, &account_id, &char_id, &type, &flag, name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_gettick_nocache_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.namechange_ack(fd, account_id, char_id, type, flag, name); + retVal___ = HPMHooks.source.timer.gettick_nocache(); } - if( HPMHooks.count.HP_mapif_namechange_ack_post ) { - void (*postHookFunc) (int *fd, int *account_id, int *char_id, int *type, int *flag, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_namechange_ack_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_namechange_ack_post[hIndex].func; - postHookFunc(&fd, &account_id, &char_id, &type, &flag, name); + if( HPMHooks.count.HP_timer_gettick_nocache_post ) { + int64 (*postHookFunc) (int64 retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_gettick_nocache_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -int HP_mapif_parse_NameChangeRequest(int fd) { +int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_NameChangeRequest_pre ) { - int (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_timer_add_pre ) { + int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_NameChangeRequest_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_NameChangeRequest_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_add_pre[hIndex].func; + retVal___ = preHookFunc(&tick, &func, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11655,209 +18069,215 @@ int HP_mapif_parse_NameChangeRequest(int fd) { } } { - retVal___ = HPMHooks.source.mapif.parse_NameChangeRequest(fd); + retVal___ = HPMHooks.source.timer.add(tick, func, id, data); } - if( HPMHooks.count.HP_mapif_parse_NameChangeRequest_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_NameChangeRequest_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_NameChangeRequest_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_timer_add_post ) { + int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data); } } return retVal___; } -/* pincode */ -void HP_pincode_handle(int fd, struct char_session_data *sd) { +int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int interval) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_handle_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_timer_add_interval_pre ) { + int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_add_interval_pre[hIndex].func; + retVal___ = preHookFunc(&tick, &func, &id, &data, &interval); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pincode.handle(fd, sd); + retVal___ = HPMHooks.source.timer.add_interval(tick, func, id, data, interval); } - 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); + if( HPMHooks.count.HP_timer_add_interval_post ) { + int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_add_interval_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data, &interval); } } - return; + return retVal___; } -void HP_pincode_decrypt(unsigned int userSeed, char *pin) { +const struct TimerData* HP_timer_get(int tid) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_decrypt_pre ) { - void (*preHookFunc) (unsigned int *userSeed, char *pin); + const struct TimerData* retVal___ = NULL; + if( HPMHooks.count.HP_timer_get_pre ) { + const struct TimerData* (*preHookFunc) (int *tid); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_get_pre[hIndex].func; + retVal___ = preHookFunc(&tid); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pincode.decrypt(userSeed, pin); + retVal___ = HPMHooks.source.timer.get(tid); } - 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); + if( HPMHooks.count.HP_timer_get_post ) { + const struct TimerData* (*postHookFunc) (const struct TimerData* retVal___, int *tid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_get_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid); } } - return; + return retVal___; } -void HP_pincode_error(int account_id) { +int HP_timer_delete(int tid, TimerFunc func) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_error_pre ) { - void (*preHookFunc) (int *account_id); + int retVal___ = 0; + if( HPMHooks.count.HP_timer_delete_pre ) { + int (*preHookFunc) (int *tid, TimerFunc *func); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_delete_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &func); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pincode.error(account_id); + retVal___ = HPMHooks.source.timer.delete(tid, func); } - 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); + if( HPMHooks.count.HP_timer_delete_post ) { + int (*postHookFunc) (int retVal___, int *tid, TimerFunc *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &func); } } - return; + return retVal___; } -void HP_pincode_update(int account_id, char *pin) { +int64 HP_timer_addtick(int tid, int64 tick) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_update_pre ) { - void (*preHookFunc) (int *account_id, char *pin); + int64 retVal___ = 0; + if( HPMHooks.count.HP_timer_addtick_pre ) { + int64 (*preHookFunc) (int *tid, int64 *tick); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_addtick_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pincode.update(account_id, pin); + retVal___ = HPMHooks.source.timer.addtick(tid, tick); } - 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); + if( HPMHooks.count.HP_timer_addtick_post ) { + int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_addtick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick); } } - return; + return retVal___; } -void HP_pincode_sendstate(int fd, struct char_session_data *sd, uint16 state) { +int64 HP_timer_settick(int tid, int64 tick) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_sendstate_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd, uint16 *state); + int64 retVal___ = 0; + if( HPMHooks.count.HP_timer_settick_pre ) { + int64 (*preHookFunc) (int *tid, int64 *tick); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_settick_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pincode.sendstate(fd, sd, state); + retVal___ = HPMHooks.source.timer.settick(tid, tick); } - 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); + if( HPMHooks.count.HP_timer_settick_post ) { + int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_settick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick); } } - return; + return retVal___; } -void HP_pincode_setnew(int fd, struct char_session_data *sd) { +int HP_timer_add_func_list(TimerFunc func, char *name) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_setnew_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_timer_add_func_list_pre ) { + int (*preHookFunc) (TimerFunc *func, char *name); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_add_func_list_pre[hIndex].func; + retVal___ = preHookFunc(&func, name); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pincode.setnew(fd, sd); + retVal___ = HPMHooks.source.timer.add_func_list(func, name); } - 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); + if( HPMHooks.count.HP_timer_add_func_list_post ) { + int (*postHookFunc) (int retVal___, TimerFunc *func, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_add_func_list_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &func, name); } } - return; + return retVal___; } -void HP_pincode_change(int fd, struct char_session_data *sd) { +unsigned long HP_timer_get_uptime(void) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_change_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + unsigned long retVal___ = 0; + if( HPMHooks.count.HP_timer_get_uptime_pre ) { + unsigned long (*preHookFunc) (void); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_get_uptime_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pincode.change(fd, sd); + retVal___ = HPMHooks.source.timer.get_uptime(); } - 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); + if( HPMHooks.count.HP_timer_get_uptime_post ) { + unsigned long (*postHookFunc) (unsigned long retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_get_uptime_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -int HP_pincode_compare(int fd, struct char_session_data *sd, char *pin) { +int HP_timer_perform(int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pincode_compare_pre ) { - int (*preHookFunc) (int *fd, struct char_session_data *sd, char *pin); + if( HPMHooks.count.HP_timer_perform_pre ) { + int (*preHookFunc) (int64 *tick); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_perform_pre[hIndex].func; + retVal___ = preHookFunc(&tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11865,25 +18285,25 @@ int HP_pincode_compare(int fd, struct char_session_data *sd, char *pin) { } } { - retVal___ = HPMHooks.source.pincode.compare(fd, sd, pin); + retVal___ = HPMHooks.source.timer.perform(tick); } - 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); + if( HPMHooks.count.HP_timer_perform_post ) { + int (*postHookFunc) (int retVal___, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_perform_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tick); } } return retVal___; } -void HP_pincode_check(int fd, struct char_session_data *sd) { +void HP_timer_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_check_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if( HPMHooks.count.HP_timer_init_pre ) { + void (*preHookFunc) (void); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -11891,41 +18311,40 @@ void HP_pincode_check(int fd, struct char_session_data *sd) { } } { - HPMHooks.source.pincode.check(fd, sd); + HPMHooks.source.timer.init(); } - 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); + if( HPMHooks.count.HP_timer_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_init_post[hIndex].func; + postHookFunc(); } } return; } -bool HP_pincode_config_read(char *w1, char *w2) { +void HP_timer_final(void) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pincode_config_read_pre ) { - bool (*preHookFunc) (char *w1, char *w2); + if( HPMHooks.count.HP_timer_final_pre ) { + void (*preHookFunc) (void); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pincode.config_read(w1, w2); + HPMHooks.source.timer.final(); } - 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); + if( HPMHooks.count.HP_timer_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } diff --git a/src/plugins/HPMHooking/HPMHooking_char.sources.inc b/src/plugins/HPMHooking/HPMHooking_char.sources.inc index 00700756c..17253aa82 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.sources.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.sources.inc @@ -4,7 +4,11 @@ // NOTE: This file was auto-generated and should never be manually edited, // as it will get overwritten. +memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface)); memcpy(&HPMHooks.source.chr, chr, sizeof(struct char_interface)); +memcpy(&HPMHooks.source.cmdline, cmdline, sizeof(struct cmdline_interface)); +memcpy(&HPMHooks.source.console, console, sizeof(struct console_interface)); +memcpy(&HPMHooks.source.DB, DB, sizeof(struct db_interface)); memcpy(&HPMHooks.source.geoip, geoip, sizeof(struct geoip_interface)); memcpy(&HPMHooks.source.inter_auction, inter_auction, sizeof(struct inter_auction_interface)); memcpy(&HPMHooks.source.inter_elemental, inter_elemental, sizeof(struct inter_elemental_interface)); @@ -17,6 +21,18 @@ memcpy(&HPMHooks.source.inter_party, inter_party, sizeof(struct inter_party_inte memcpy(&HPMHooks.source.inter_pet, inter_pet, sizeof(struct inter_pet_interface)); memcpy(&HPMHooks.source.inter_quest, inter_quest, sizeof(struct inter_quest_interface)); memcpy(&HPMHooks.source.inter_storage, inter_storage, sizeof(struct inter_storage_interface)); +memcpy(&HPMHooks.source.libconfig, libconfig, sizeof(struct libconfig_interface)); memcpy(&HPMHooks.source.loginif, loginif, sizeof(struct loginif_interface)); +memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface)); memcpy(&HPMHooks.source.mapif, mapif, sizeof(struct mapif_interface)); +memcpy(&HPMHooks.source.mapindex, mapindex, sizeof(struct mapindex_interface)); +memcpy(&HPMHooks.source.nullpo, nullpo, sizeof(struct nullpo_interface)); memcpy(&HPMHooks.source.pincode, pincode, sizeof(struct pincode_interface)); +memcpy(&HPMHooks.source.showmsg, showmsg, sizeof(struct showmsg_interface)); +memcpy(&HPMHooks.source.sockt, sockt, sizeof(struct socket_interface)); +memcpy(&HPMHooks.source.SQL, SQL, sizeof(struct sql_interface)); +memcpy(&HPMHooks.source.StrBuf, StrBuf, sizeof(struct stringbuf_interface)); +memcpy(&HPMHooks.source.strlib, strlib, sizeof(struct strlib_interface)); +memcpy(&HPMHooks.source.sv, sv, sizeof(struct sv_interface)); +memcpy(&HPMHooks.source.sysinfo, sysinfo, sizeof(struct sysinfo_interface)); +memcpy(&HPMHooks.source.timer, timer, sizeof(struct timer_interface)); diff --git a/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc index fd9eeba8c..ec126d089 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc @@ -4,4 +4,19 @@ // NOTE: This file was auto-generated and should never be manually edited, // as it will get overwritten. +if( !(HCache = GET_SYMBOL("HCache") ) ) return "HCache"; +if( !(cmdline = GET_SYMBOL("cmdline") ) ) return "cmdline"; +if( !(console = GET_SYMBOL("console") ) ) return "console"; +if( !(DB = GET_SYMBOL("DB") ) ) return "DB"; +if( !(libconfig = GET_SYMBOL("libconfig") ) ) return "libconfig"; if( !(login = GET_SYMBOL("login") ) ) return "login"; +if( !(iMalloc = GET_SYMBOL("iMalloc") ) ) return "iMalloc"; +if( !(nullpo = GET_SYMBOL("nullpo") ) ) return "nullpo"; +if( !(showmsg = GET_SYMBOL("showmsg") ) ) return "showmsg"; +if( !(sockt = GET_SYMBOL("sockt") ) ) return "sockt"; +if( !(SQL = GET_SYMBOL("SQL") ) ) return "SQL"; +if( !(StrBuf = GET_SYMBOL("StrBuf") ) ) return "StrBuf"; +if( !(strlib = GET_SYMBOL("strlib") ) ) return "strlib"; +if( !(sv = GET_SYMBOL("sv") ) ) return "sv"; +if( !(sysinfo = GET_SYMBOL("sysinfo") ) ) return "sysinfo"; +if( !(timer = GET_SYMBOL("timer") ) ) return "timer"; diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc index 31cd3d710..cdc8f6820 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc @@ -5,6 +5,184 @@ // as it will get overwritten. struct { + struct HPMHookPoint *HP_HCache_init_pre; + struct HPMHookPoint *HP_HCache_init_post; + struct HPMHookPoint *HP_HCache_check_pre; + struct HPMHookPoint *HP_HCache_check_post; + struct HPMHookPoint *HP_HCache_open_pre; + struct HPMHookPoint *HP_HCache_open_post; + struct HPMHookPoint *HP_cmdline_init_pre; + struct HPMHookPoint *HP_cmdline_init_post; + struct HPMHookPoint *HP_cmdline_final_pre; + struct HPMHookPoint *HP_cmdline_final_post; + struct HPMHookPoint *HP_cmdline_arg_add_pre; + struct HPMHookPoint *HP_cmdline_arg_add_post; + struct HPMHookPoint *HP_cmdline_exec_pre; + struct HPMHookPoint *HP_cmdline_exec_post; + struct HPMHookPoint *HP_cmdline_arg_next_value_pre; + struct HPMHookPoint *HP_cmdline_arg_next_value_post; + struct HPMHookPoint *HP_cmdline_arg_source_pre; + struct HPMHookPoint *HP_cmdline_arg_source_post; + struct HPMHookPoint *HP_console_init_pre; + struct HPMHookPoint *HP_console_init_post; + struct HPMHookPoint *HP_console_final_pre; + struct HPMHookPoint *HP_console_final_post; + struct HPMHookPoint *HP_console_display_title_pre; + struct HPMHookPoint *HP_console_display_title_post; + struct HPMHookPoint *HP_DB_fix_options_pre; + struct HPMHookPoint *HP_DB_fix_options_post; + struct HPMHookPoint *HP_DB_default_cmp_pre; + struct HPMHookPoint *HP_DB_default_cmp_post; + struct HPMHookPoint *HP_DB_default_hash_pre; + struct HPMHookPoint *HP_DB_default_hash_post; + struct HPMHookPoint *HP_DB_default_release_pre; + struct HPMHookPoint *HP_DB_default_release_post; + struct HPMHookPoint *HP_DB_custom_release_pre; + struct HPMHookPoint *HP_DB_custom_release_post; + struct HPMHookPoint *HP_DB_alloc_pre; + struct HPMHookPoint *HP_DB_alloc_post; + struct HPMHookPoint *HP_DB_i2key_pre; + struct HPMHookPoint *HP_DB_i2key_post; + struct HPMHookPoint *HP_DB_ui2key_pre; + struct HPMHookPoint *HP_DB_ui2key_post; + struct HPMHookPoint *HP_DB_str2key_pre; + struct HPMHookPoint *HP_DB_str2key_post; + struct HPMHookPoint *HP_DB_i642key_pre; + struct HPMHookPoint *HP_DB_i642key_post; + struct HPMHookPoint *HP_DB_ui642key_pre; + struct HPMHookPoint *HP_DB_ui642key_post; + struct HPMHookPoint *HP_DB_i2data_pre; + struct HPMHookPoint *HP_DB_i2data_post; + struct HPMHookPoint *HP_DB_ui2data_pre; + struct HPMHookPoint *HP_DB_ui2data_post; + struct HPMHookPoint *HP_DB_ptr2data_pre; + struct HPMHookPoint *HP_DB_ptr2data_post; + struct HPMHookPoint *HP_DB_data2i_pre; + struct HPMHookPoint *HP_DB_data2i_post; + struct HPMHookPoint *HP_DB_data2ui_pre; + struct HPMHookPoint *HP_DB_data2ui_post; + struct HPMHookPoint *HP_DB_data2ptr_pre; + struct HPMHookPoint *HP_DB_data2ptr_post; + struct HPMHookPoint *HP_DB_init_pre; + struct HPMHookPoint *HP_DB_init_post; + struct HPMHookPoint *HP_DB_final_pre; + struct HPMHookPoint *HP_DB_final_post; + struct HPMHookPoint *HP_libconfig_read_pre; + struct HPMHookPoint *HP_libconfig_read_post; + struct HPMHookPoint *HP_libconfig_write_pre; + struct HPMHookPoint *HP_libconfig_write_post; + struct HPMHookPoint *HP_libconfig_set_auto_convert_pre; + struct HPMHookPoint *HP_libconfig_set_auto_convert_post; + struct HPMHookPoint *HP_libconfig_get_auto_convert_pre; + struct HPMHookPoint *HP_libconfig_get_auto_convert_post; + struct HPMHookPoint *HP_libconfig_read_string_pre; + struct HPMHookPoint *HP_libconfig_read_string_post; + struct HPMHookPoint *HP_libconfig_read_file_src_pre; + struct HPMHookPoint *HP_libconfig_read_file_src_post; + struct HPMHookPoint *HP_libconfig_write_file_pre; + struct HPMHookPoint *HP_libconfig_write_file_post; + struct HPMHookPoint *HP_libconfig_set_destructor_pre; + struct HPMHookPoint *HP_libconfig_set_destructor_post; + struct HPMHookPoint *HP_libconfig_set_include_dir_pre; + struct HPMHookPoint *HP_libconfig_set_include_dir_post; + struct HPMHookPoint *HP_libconfig_init_pre; + struct HPMHookPoint *HP_libconfig_init_post; + struct HPMHookPoint *HP_libconfig_destroy_pre; + struct HPMHookPoint *HP_libconfig_destroy_post; + struct HPMHookPoint *HP_libconfig_setting_get_int_pre; + struct HPMHookPoint *HP_libconfig_setting_get_int_post; + struct HPMHookPoint *HP_libconfig_setting_get_int64_pre; + struct HPMHookPoint *HP_libconfig_setting_get_int64_post; + struct HPMHookPoint *HP_libconfig_setting_get_float_pre; + struct HPMHookPoint *HP_libconfig_setting_get_float_post; + struct HPMHookPoint *HP_libconfig_setting_get_bool_pre; + struct HPMHookPoint *HP_libconfig_setting_get_bool_post; + struct HPMHookPoint *HP_libconfig_setting_get_string_pre; + struct HPMHookPoint *HP_libconfig_setting_get_string_post; + struct HPMHookPoint *HP_libconfig_setting_lookup_int_pre; + struct HPMHookPoint *HP_libconfig_setting_lookup_int_post; + struct HPMHookPoint *HP_libconfig_setting_lookup_int64_pre; + struct HPMHookPoint *HP_libconfig_setting_lookup_int64_post; + struct HPMHookPoint *HP_libconfig_setting_lookup_float_pre; + struct HPMHookPoint *HP_libconfig_setting_lookup_float_post; + struct HPMHookPoint *HP_libconfig_setting_lookup_bool_pre; + struct HPMHookPoint *HP_libconfig_setting_lookup_bool_post; + struct HPMHookPoint *HP_libconfig_setting_lookup_string_pre; + struct HPMHookPoint *HP_libconfig_setting_lookup_string_post; + struct HPMHookPoint *HP_libconfig_setting_set_int_pre; + struct HPMHookPoint *HP_libconfig_setting_set_int_post; + struct HPMHookPoint *HP_libconfig_setting_set_int64_pre; + struct HPMHookPoint *HP_libconfig_setting_set_int64_post; + struct HPMHookPoint *HP_libconfig_setting_set_float_pre; + struct HPMHookPoint *HP_libconfig_setting_set_float_post; + struct HPMHookPoint *HP_libconfig_setting_set_bool_pre; + struct HPMHookPoint *HP_libconfig_setting_set_bool_post; + struct HPMHookPoint *HP_libconfig_setting_set_string_pre; + struct HPMHookPoint *HP_libconfig_setting_set_string_post; + struct HPMHookPoint *HP_libconfig_setting_set_format_pre; + struct HPMHookPoint *HP_libconfig_setting_set_format_post; + struct HPMHookPoint *HP_libconfig_setting_get_format_pre; + struct HPMHookPoint *HP_libconfig_setting_get_format_post; + struct HPMHookPoint *HP_libconfig_setting_get_int_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_int_elem_post; + struct HPMHookPoint *HP_libconfig_setting_get_int64_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_int64_elem_post; + struct HPMHookPoint *HP_libconfig_setting_get_float_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_float_elem_post; + struct HPMHookPoint *HP_libconfig_setting_get_bool_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_bool_elem_post; + struct HPMHookPoint *HP_libconfig_setting_get_string_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_string_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_int_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_set_int_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_int64_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_set_int64_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_float_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_set_float_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_bool_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_set_bool_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_string_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_set_string_elem_post; + struct HPMHookPoint *HP_libconfig_setting_index_pre; + struct HPMHookPoint *HP_libconfig_setting_index_post; + struct HPMHookPoint *HP_libconfig_setting_length_pre; + struct HPMHookPoint *HP_libconfig_setting_length_post; + struct HPMHookPoint *HP_libconfig_setting_get_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_elem_post; + struct HPMHookPoint *HP_libconfig_setting_get_member_pre; + struct HPMHookPoint *HP_libconfig_setting_get_member_post; + struct HPMHookPoint *HP_libconfig_setting_add_pre; + struct HPMHookPoint *HP_libconfig_setting_add_post; + struct HPMHookPoint *HP_libconfig_setting_remove_pre; + struct HPMHookPoint *HP_libconfig_setting_remove_post; + struct HPMHookPoint *HP_libconfig_setting_remove_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_remove_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_hook_pre; + struct HPMHookPoint *HP_libconfig_setting_set_hook_post; + struct HPMHookPoint *HP_libconfig_lookup_pre; + struct HPMHookPoint *HP_libconfig_lookup_post; + struct HPMHookPoint *HP_libconfig_lookup_from_pre; + struct HPMHookPoint *HP_libconfig_lookup_from_post; + struct HPMHookPoint *HP_libconfig_lookup_int_pre; + struct HPMHookPoint *HP_libconfig_lookup_int_post; + struct HPMHookPoint *HP_libconfig_lookup_int64_pre; + struct HPMHookPoint *HP_libconfig_lookup_int64_post; + struct HPMHookPoint *HP_libconfig_lookup_float_pre; + struct HPMHookPoint *HP_libconfig_lookup_float_post; + struct HPMHookPoint *HP_libconfig_lookup_bool_pre; + struct HPMHookPoint *HP_libconfig_lookup_bool_post; + struct HPMHookPoint *HP_libconfig_lookup_string_pre; + struct HPMHookPoint *HP_libconfig_lookup_string_post; + struct HPMHookPoint *HP_libconfig_read_file_pre; + struct HPMHookPoint *HP_libconfig_read_file_post; + struct HPMHookPoint *HP_libconfig_setting_copy_simple_pre; + struct HPMHookPoint *HP_libconfig_setting_copy_simple_post; + struct HPMHookPoint *HP_libconfig_setting_copy_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_copy_elem_post; + struct HPMHookPoint *HP_libconfig_setting_copy_aggregate_pre; + struct HPMHookPoint *HP_libconfig_setting_copy_aggregate_post; + struct HPMHookPoint *HP_libconfig_setting_copy_pre; + struct HPMHookPoint *HP_libconfig_setting_copy_post; struct HPMHookPoint *HP_login_mmo_auth_pre; struct HPMHookPoint *HP_login_mmo_auth_post; struct HPMHookPoint *HP_login_mmo_auth_new_pre; @@ -113,9 +291,467 @@ struct { struct HPMHookPoint *HP_login_parse_request_connection_post; struct HPMHookPoint *HP_login_parse_login_pre; struct HPMHookPoint *HP_login_parse_login_post; + struct HPMHookPoint *HP_iMalloc_init_pre; + struct HPMHookPoint *HP_iMalloc_init_post; + struct HPMHookPoint *HP_iMalloc_final_pre; + struct HPMHookPoint *HP_iMalloc_final_post; + struct HPMHookPoint *HP_iMalloc_malloc_pre; + struct HPMHookPoint *HP_iMalloc_malloc_post; + struct HPMHookPoint *HP_iMalloc_calloc_pre; + struct HPMHookPoint *HP_iMalloc_calloc_post; + struct HPMHookPoint *HP_iMalloc_realloc_pre; + struct HPMHookPoint *HP_iMalloc_realloc_post; + struct HPMHookPoint *HP_iMalloc_reallocz_pre; + struct HPMHookPoint *HP_iMalloc_reallocz_post; + struct HPMHookPoint *HP_iMalloc_astrdup_pre; + struct HPMHookPoint *HP_iMalloc_astrdup_post; + struct HPMHookPoint *HP_iMalloc_free_pre; + struct HPMHookPoint *HP_iMalloc_free_post; + struct HPMHookPoint *HP_iMalloc_memory_check_pre; + struct HPMHookPoint *HP_iMalloc_memory_check_post; + struct HPMHookPoint *HP_iMalloc_verify_ptr_pre; + struct HPMHookPoint *HP_iMalloc_verify_ptr_post; + struct HPMHookPoint *HP_iMalloc_usage_pre; + struct HPMHookPoint *HP_iMalloc_usage_post; + struct HPMHookPoint *HP_iMalloc_post_shutdown_pre; + struct HPMHookPoint *HP_iMalloc_post_shutdown_post; + struct HPMHookPoint *HP_iMalloc_init_messages_pre; + struct HPMHookPoint *HP_iMalloc_init_messages_post; + struct HPMHookPoint *HP_nullpo_assert_report_pre; + struct HPMHookPoint *HP_nullpo_assert_report_post; + struct HPMHookPoint *HP_showmsg_init_pre; + struct HPMHookPoint *HP_showmsg_init_post; + struct HPMHookPoint *HP_showmsg_final_pre; + struct HPMHookPoint *HP_showmsg_final_post; + struct HPMHookPoint *HP_showmsg_clearScreen_pre; + struct HPMHookPoint *HP_showmsg_clearScreen_post; + struct HPMHookPoint *HP_showmsg_showMessageV_pre; + struct HPMHookPoint *HP_showmsg_showMessageV_post; + struct HPMHookPoint *HP_sockt_init_pre; + struct HPMHookPoint *HP_sockt_init_post; + struct HPMHookPoint *HP_sockt_final_pre; + struct HPMHookPoint *HP_sockt_final_post; + struct HPMHookPoint *HP_sockt_perform_pre; + struct HPMHookPoint *HP_sockt_perform_post; + struct HPMHookPoint *HP_sockt_datasync_pre; + struct HPMHookPoint *HP_sockt_datasync_post; + struct HPMHookPoint *HP_sockt_make_listen_bind_pre; + struct HPMHookPoint *HP_sockt_make_listen_bind_post; + struct HPMHookPoint *HP_sockt_make_connection_pre; + struct HPMHookPoint *HP_sockt_make_connection_post; + struct HPMHookPoint *HP_sockt_realloc_fifo_pre; + struct HPMHookPoint *HP_sockt_realloc_fifo_post; + struct HPMHookPoint *HP_sockt_realloc_writefifo_pre; + struct HPMHookPoint *HP_sockt_realloc_writefifo_post; + struct HPMHookPoint *HP_sockt_wfifoset_pre; + struct HPMHookPoint *HP_sockt_wfifoset_post; + struct HPMHookPoint *HP_sockt_rfifoskip_pre; + struct HPMHookPoint *HP_sockt_rfifoskip_post; + struct HPMHookPoint *HP_sockt_close_pre; + struct HPMHookPoint *HP_sockt_close_post; + struct HPMHookPoint *HP_sockt_session_is_valid_pre; + struct HPMHookPoint *HP_sockt_session_is_valid_post; + struct HPMHookPoint *HP_sockt_session_is_active_pre; + struct HPMHookPoint *HP_sockt_session_is_active_post; + struct HPMHookPoint *HP_sockt_flush_pre; + struct HPMHookPoint *HP_sockt_flush_post; + struct HPMHookPoint *HP_sockt_flush_fifos_pre; + struct HPMHookPoint *HP_sockt_flush_fifos_post; + struct HPMHookPoint *HP_sockt_set_nonblocking_pre; + struct HPMHookPoint *HP_sockt_set_nonblocking_post; + struct HPMHookPoint *HP_sockt_set_defaultparse_pre; + struct HPMHookPoint *HP_sockt_set_defaultparse_post; + struct HPMHookPoint *HP_sockt_host2ip_pre; + struct HPMHookPoint *HP_sockt_host2ip_post; + struct HPMHookPoint *HP_sockt_ip2str_pre; + struct HPMHookPoint *HP_sockt_ip2str_post; + struct HPMHookPoint *HP_sockt_str2ip_pre; + struct HPMHookPoint *HP_sockt_str2ip_post; + struct HPMHookPoint *HP_sockt_ntows_pre; + struct HPMHookPoint *HP_sockt_ntows_post; + struct HPMHookPoint *HP_sockt_getips_pre; + struct HPMHookPoint *HP_sockt_getips_post; + struct HPMHookPoint *HP_sockt_eof_pre; + struct HPMHookPoint *HP_sockt_eof_post; + struct HPMHookPoint *HP_sockt_lan_subnet_check_pre; + struct HPMHookPoint *HP_sockt_lan_subnet_check_post; + struct HPMHookPoint *HP_sockt_allowed_ip_check_pre; + struct HPMHookPoint *HP_sockt_allowed_ip_check_post; + struct HPMHookPoint *HP_sockt_trusted_ip_check_pre; + struct HPMHookPoint *HP_sockt_trusted_ip_check_post; + struct HPMHookPoint *HP_sockt_net_config_read_sub_pre; + struct HPMHookPoint *HP_sockt_net_config_read_sub_post; + struct HPMHookPoint *HP_sockt_net_config_read_pre; + struct HPMHookPoint *HP_sockt_net_config_read_post; + struct HPMHookPoint *HP_SQL_Connect_pre; + struct HPMHookPoint *HP_SQL_Connect_post; + struct HPMHookPoint *HP_SQL_GetTimeout_pre; + struct HPMHookPoint *HP_SQL_GetTimeout_post; + struct HPMHookPoint *HP_SQL_GetColumnNames_pre; + struct HPMHookPoint *HP_SQL_GetColumnNames_post; + struct HPMHookPoint *HP_SQL_SetEncoding_pre; + struct HPMHookPoint *HP_SQL_SetEncoding_post; + struct HPMHookPoint *HP_SQL_Ping_pre; + struct HPMHookPoint *HP_SQL_Ping_post; + struct HPMHookPoint *HP_SQL_EscapeString_pre; + struct HPMHookPoint *HP_SQL_EscapeString_post; + struct HPMHookPoint *HP_SQL_EscapeStringLen_pre; + struct HPMHookPoint *HP_SQL_EscapeStringLen_post; + struct HPMHookPoint *HP_SQL_QueryV_pre; + struct HPMHookPoint *HP_SQL_QueryV_post; + struct HPMHookPoint *HP_SQL_QueryStr_pre; + struct HPMHookPoint *HP_SQL_QueryStr_post; + struct HPMHookPoint *HP_SQL_LastInsertId_pre; + struct HPMHookPoint *HP_SQL_LastInsertId_post; + struct HPMHookPoint *HP_SQL_NumColumns_pre; + struct HPMHookPoint *HP_SQL_NumColumns_post; + struct HPMHookPoint *HP_SQL_NumRows_pre; + struct HPMHookPoint *HP_SQL_NumRows_post; + struct HPMHookPoint *HP_SQL_NextRow_pre; + struct HPMHookPoint *HP_SQL_NextRow_post; + struct HPMHookPoint *HP_SQL_GetData_pre; + struct HPMHookPoint *HP_SQL_GetData_post; + struct HPMHookPoint *HP_SQL_FreeResult_pre; + struct HPMHookPoint *HP_SQL_FreeResult_post; + struct HPMHookPoint *HP_SQL_ShowDebug__pre; + struct HPMHookPoint *HP_SQL_ShowDebug__post; + struct HPMHookPoint *HP_SQL_Free_pre; + struct HPMHookPoint *HP_SQL_Free_post; + struct HPMHookPoint *HP_SQL_Malloc_pre; + struct HPMHookPoint *HP_SQL_Malloc_post; + struct HPMHookPoint *HP_SQL_StmtMalloc_pre; + struct HPMHookPoint *HP_SQL_StmtMalloc_post; + struct HPMHookPoint *HP_SQL_StmtPrepareV_pre; + struct HPMHookPoint *HP_SQL_StmtPrepareV_post; + struct HPMHookPoint *HP_SQL_StmtPrepareStr_pre; + struct HPMHookPoint *HP_SQL_StmtPrepareStr_post; + struct HPMHookPoint *HP_SQL_StmtNumParams_pre; + struct HPMHookPoint *HP_SQL_StmtNumParams_post; + struct HPMHookPoint *HP_SQL_StmtBindParam_pre; + struct HPMHookPoint *HP_SQL_StmtBindParam_post; + struct HPMHookPoint *HP_SQL_StmtExecute_pre; + struct HPMHookPoint *HP_SQL_StmtExecute_post; + struct HPMHookPoint *HP_SQL_StmtLastInsertId_pre; + struct HPMHookPoint *HP_SQL_StmtLastInsertId_post; + struct HPMHookPoint *HP_SQL_StmtNumColumns_pre; + struct HPMHookPoint *HP_SQL_StmtNumColumns_post; + struct HPMHookPoint *HP_SQL_StmtBindColumn_pre; + struct HPMHookPoint *HP_SQL_StmtBindColumn_post; + struct HPMHookPoint *HP_SQL_StmtNumRows_pre; + struct HPMHookPoint *HP_SQL_StmtNumRows_post; + struct HPMHookPoint *HP_SQL_StmtNextRow_pre; + struct HPMHookPoint *HP_SQL_StmtNextRow_post; + struct HPMHookPoint *HP_SQL_StmtFreeResult_pre; + struct HPMHookPoint *HP_SQL_StmtFreeResult_post; + struct HPMHookPoint *HP_SQL_StmtFree_pre; + struct HPMHookPoint *HP_SQL_StmtFree_post; + struct HPMHookPoint *HP_SQL_StmtShowDebug__pre; + struct HPMHookPoint *HP_SQL_StmtShowDebug__post; + struct HPMHookPoint *HP_StrBuf_Malloc_pre; + struct HPMHookPoint *HP_StrBuf_Malloc_post; + struct HPMHookPoint *HP_StrBuf_Init_pre; + struct HPMHookPoint *HP_StrBuf_Init_post; + struct HPMHookPoint *HP_StrBuf_Vprintf_pre; + struct HPMHookPoint *HP_StrBuf_Vprintf_post; + struct HPMHookPoint *HP_StrBuf_Append_pre; + struct HPMHookPoint *HP_StrBuf_Append_post; + struct HPMHookPoint *HP_StrBuf_AppendStr_pre; + struct HPMHookPoint *HP_StrBuf_AppendStr_post; + struct HPMHookPoint *HP_StrBuf_Length_pre; + struct HPMHookPoint *HP_StrBuf_Length_post; + struct HPMHookPoint *HP_StrBuf_Value_pre; + struct HPMHookPoint *HP_StrBuf_Value_post; + struct HPMHookPoint *HP_StrBuf_Clear_pre; + struct HPMHookPoint *HP_StrBuf_Clear_post; + struct HPMHookPoint *HP_StrBuf_Destroy_pre; + struct HPMHookPoint *HP_StrBuf_Destroy_post; + struct HPMHookPoint *HP_StrBuf_Free_pre; + struct HPMHookPoint *HP_StrBuf_Free_post; + struct HPMHookPoint *HP_strlib_jstrescape_pre; + struct HPMHookPoint *HP_strlib_jstrescape_post; + struct HPMHookPoint *HP_strlib_jstrescapecpy_pre; + struct HPMHookPoint *HP_strlib_jstrescapecpy_post; + struct HPMHookPoint *HP_strlib_jmemescapecpy_pre; + struct HPMHookPoint *HP_strlib_jmemescapecpy_post; + struct HPMHookPoint *HP_strlib_remove_control_chars__pre; + struct HPMHookPoint *HP_strlib_remove_control_chars__post; + struct HPMHookPoint *HP_strlib_trim__pre; + struct HPMHookPoint *HP_strlib_trim__post; + struct HPMHookPoint *HP_strlib_normalize_name__pre; + struct HPMHookPoint *HP_strlib_normalize_name__post; + struct HPMHookPoint *HP_strlib_stristr__pre; + struct HPMHookPoint *HP_strlib_stristr__post; + struct HPMHookPoint *HP_strlib_strnlen__pre; + struct HPMHookPoint *HP_strlib_strnlen__post; + struct HPMHookPoint *HP_strlib_strtok_r__pre; + struct HPMHookPoint *HP_strlib_strtok_r__post; + struct HPMHookPoint *HP_strlib_e_mail_check__pre; + struct HPMHookPoint *HP_strlib_e_mail_check__post; + struct HPMHookPoint *HP_strlib_config_switch__pre; + struct HPMHookPoint *HP_strlib_config_switch__post; + struct HPMHookPoint *HP_strlib_safestrncpy__pre; + struct HPMHookPoint *HP_strlib_safestrncpy__post; + struct HPMHookPoint *HP_strlib_safestrnlen__pre; + struct HPMHookPoint *HP_strlib_safestrnlen__post; + struct HPMHookPoint *HP_strlib_strline__pre; + struct HPMHookPoint *HP_strlib_strline__post; + struct HPMHookPoint *HP_strlib_bin2hex__pre; + struct HPMHookPoint *HP_strlib_bin2hex__post; + struct HPMHookPoint *HP_sv_parse_next_pre; + struct HPMHookPoint *HP_sv_parse_next_post; + struct HPMHookPoint *HP_sv_parse_pre; + struct HPMHookPoint *HP_sv_parse_post; + struct HPMHookPoint *HP_sv_split_pre; + struct HPMHookPoint *HP_sv_split_post; + struct HPMHookPoint *HP_sv_escape_c_pre; + struct HPMHookPoint *HP_sv_escape_c_post; + struct HPMHookPoint *HP_sv_unescape_c_pre; + struct HPMHookPoint *HP_sv_unescape_c_post; + struct HPMHookPoint *HP_sv_skip_escaped_c_pre; + struct HPMHookPoint *HP_sv_skip_escaped_c_post; + struct HPMHookPoint *HP_sv_readdb_pre; + struct HPMHookPoint *HP_sv_readdb_post; + struct HPMHookPoint *HP_sysinfo_getpagesize_pre; + struct HPMHookPoint *HP_sysinfo_getpagesize_post; + struct HPMHookPoint *HP_sysinfo_platform_pre; + struct HPMHookPoint *HP_sysinfo_platform_post; + struct HPMHookPoint *HP_sysinfo_osversion_pre; + struct HPMHookPoint *HP_sysinfo_osversion_post; + struct HPMHookPoint *HP_sysinfo_cpu_pre; + struct HPMHookPoint *HP_sysinfo_cpu_post; + struct HPMHookPoint *HP_sysinfo_cpucores_pre; + struct HPMHookPoint *HP_sysinfo_cpucores_post; + struct HPMHookPoint *HP_sysinfo_arch_pre; + struct HPMHookPoint *HP_sysinfo_arch_post; + struct HPMHookPoint *HP_sysinfo_is64bit_pre; + struct HPMHookPoint *HP_sysinfo_is64bit_post; + struct HPMHookPoint *HP_sysinfo_compiler_pre; + struct HPMHookPoint *HP_sysinfo_compiler_post; + struct HPMHookPoint *HP_sysinfo_cflags_pre; + struct HPMHookPoint *HP_sysinfo_cflags_post; + struct HPMHookPoint *HP_sysinfo_vcstype_pre; + struct HPMHookPoint *HP_sysinfo_vcstype_post; + struct HPMHookPoint *HP_sysinfo_vcstypeid_pre; + struct HPMHookPoint *HP_sysinfo_vcstypeid_post; + struct HPMHookPoint *HP_sysinfo_vcsrevision_src_pre; + struct HPMHookPoint *HP_sysinfo_vcsrevision_src_post; + struct HPMHookPoint *HP_sysinfo_vcsrevision_scripts_pre; + struct HPMHookPoint *HP_sysinfo_vcsrevision_scripts_post; + struct HPMHookPoint *HP_sysinfo_vcsrevision_reload_pre; + struct HPMHookPoint *HP_sysinfo_vcsrevision_reload_post; + struct HPMHookPoint *HP_sysinfo_is_superuser_pre; + struct HPMHookPoint *HP_sysinfo_is_superuser_post; + struct HPMHookPoint *HP_sysinfo_init_pre; + struct HPMHookPoint *HP_sysinfo_init_post; + struct HPMHookPoint *HP_sysinfo_final_pre; + struct HPMHookPoint *HP_sysinfo_final_post; + struct HPMHookPoint *HP_timer_gettick_pre; + struct HPMHookPoint *HP_timer_gettick_post; + struct HPMHookPoint *HP_timer_gettick_nocache_pre; + struct HPMHookPoint *HP_timer_gettick_nocache_post; + struct HPMHookPoint *HP_timer_add_pre; + struct HPMHookPoint *HP_timer_add_post; + struct HPMHookPoint *HP_timer_add_interval_pre; + struct HPMHookPoint *HP_timer_add_interval_post; + struct HPMHookPoint *HP_timer_get_pre; + struct HPMHookPoint *HP_timer_get_post; + struct HPMHookPoint *HP_timer_delete_pre; + struct HPMHookPoint *HP_timer_delete_post; + struct HPMHookPoint *HP_timer_addtick_pre; + struct HPMHookPoint *HP_timer_addtick_post; + struct HPMHookPoint *HP_timer_settick_pre; + struct HPMHookPoint *HP_timer_settick_post; + struct HPMHookPoint *HP_timer_add_func_list_pre; + struct HPMHookPoint *HP_timer_add_func_list_post; + struct HPMHookPoint *HP_timer_get_uptime_pre; + struct HPMHookPoint *HP_timer_get_uptime_post; + struct HPMHookPoint *HP_timer_perform_pre; + struct HPMHookPoint *HP_timer_perform_post; + struct HPMHookPoint *HP_timer_init_pre; + struct HPMHookPoint *HP_timer_init_post; + struct HPMHookPoint *HP_timer_final_pre; + struct HPMHookPoint *HP_timer_final_post; } list; struct { + int HP_HCache_init_pre; + int HP_HCache_init_post; + int HP_HCache_check_pre; + int HP_HCache_check_post; + int HP_HCache_open_pre; + int HP_HCache_open_post; + int HP_cmdline_init_pre; + int HP_cmdline_init_post; + int HP_cmdline_final_pre; + int HP_cmdline_final_post; + int HP_cmdline_arg_add_pre; + int HP_cmdline_arg_add_post; + int HP_cmdline_exec_pre; + int HP_cmdline_exec_post; + int HP_cmdline_arg_next_value_pre; + int HP_cmdline_arg_next_value_post; + int HP_cmdline_arg_source_pre; + int HP_cmdline_arg_source_post; + int HP_console_init_pre; + int HP_console_init_post; + int HP_console_final_pre; + int HP_console_final_post; + int HP_console_display_title_pre; + int HP_console_display_title_post; + int HP_DB_fix_options_pre; + int HP_DB_fix_options_post; + int HP_DB_default_cmp_pre; + int HP_DB_default_cmp_post; + int HP_DB_default_hash_pre; + int HP_DB_default_hash_post; + int HP_DB_default_release_pre; + int HP_DB_default_release_post; + int HP_DB_custom_release_pre; + int HP_DB_custom_release_post; + int HP_DB_alloc_pre; + int HP_DB_alloc_post; + int HP_DB_i2key_pre; + int HP_DB_i2key_post; + int HP_DB_ui2key_pre; + int HP_DB_ui2key_post; + int HP_DB_str2key_pre; + int HP_DB_str2key_post; + int HP_DB_i642key_pre; + int HP_DB_i642key_post; + int HP_DB_ui642key_pre; + int HP_DB_ui642key_post; + int HP_DB_i2data_pre; + int HP_DB_i2data_post; + int HP_DB_ui2data_pre; + int HP_DB_ui2data_post; + int HP_DB_ptr2data_pre; + int HP_DB_ptr2data_post; + int HP_DB_data2i_pre; + int HP_DB_data2i_post; + int HP_DB_data2ui_pre; + int HP_DB_data2ui_post; + int HP_DB_data2ptr_pre; + int HP_DB_data2ptr_post; + int HP_DB_init_pre; + int HP_DB_init_post; + int HP_DB_final_pre; + int HP_DB_final_post; + int HP_libconfig_read_pre; + int HP_libconfig_read_post; + int HP_libconfig_write_pre; + int HP_libconfig_write_post; + int HP_libconfig_set_auto_convert_pre; + int HP_libconfig_set_auto_convert_post; + int HP_libconfig_get_auto_convert_pre; + int HP_libconfig_get_auto_convert_post; + int HP_libconfig_read_string_pre; + int HP_libconfig_read_string_post; + int HP_libconfig_read_file_src_pre; + int HP_libconfig_read_file_src_post; + int HP_libconfig_write_file_pre; + int HP_libconfig_write_file_post; + int HP_libconfig_set_destructor_pre; + int HP_libconfig_set_destructor_post; + int HP_libconfig_set_include_dir_pre; + int HP_libconfig_set_include_dir_post; + int HP_libconfig_init_pre; + int HP_libconfig_init_post; + int HP_libconfig_destroy_pre; + int HP_libconfig_destroy_post; + int HP_libconfig_setting_get_int_pre; + int HP_libconfig_setting_get_int_post; + int HP_libconfig_setting_get_int64_pre; + int HP_libconfig_setting_get_int64_post; + int HP_libconfig_setting_get_float_pre; + int HP_libconfig_setting_get_float_post; + int HP_libconfig_setting_get_bool_pre; + int HP_libconfig_setting_get_bool_post; + int HP_libconfig_setting_get_string_pre; + int HP_libconfig_setting_get_string_post; + int HP_libconfig_setting_lookup_int_pre; + int HP_libconfig_setting_lookup_int_post; + int HP_libconfig_setting_lookup_int64_pre; + int HP_libconfig_setting_lookup_int64_post; + int HP_libconfig_setting_lookup_float_pre; + int HP_libconfig_setting_lookup_float_post; + int HP_libconfig_setting_lookup_bool_pre; + int HP_libconfig_setting_lookup_bool_post; + int HP_libconfig_setting_lookup_string_pre; + int HP_libconfig_setting_lookup_string_post; + int HP_libconfig_setting_set_int_pre; + int HP_libconfig_setting_set_int_post; + int HP_libconfig_setting_set_int64_pre; + int HP_libconfig_setting_set_int64_post; + int HP_libconfig_setting_set_float_pre; + int HP_libconfig_setting_set_float_post; + int HP_libconfig_setting_set_bool_pre; + int HP_libconfig_setting_set_bool_post; + int HP_libconfig_setting_set_string_pre; + int HP_libconfig_setting_set_string_post; + int HP_libconfig_setting_set_format_pre; + int HP_libconfig_setting_set_format_post; + int HP_libconfig_setting_get_format_pre; + int HP_libconfig_setting_get_format_post; + int HP_libconfig_setting_get_int_elem_pre; + int HP_libconfig_setting_get_int_elem_post; + int HP_libconfig_setting_get_int64_elem_pre; + int HP_libconfig_setting_get_int64_elem_post; + int HP_libconfig_setting_get_float_elem_pre; + int HP_libconfig_setting_get_float_elem_post; + int HP_libconfig_setting_get_bool_elem_pre; + int HP_libconfig_setting_get_bool_elem_post; + int HP_libconfig_setting_get_string_elem_pre; + int HP_libconfig_setting_get_string_elem_post; + int HP_libconfig_setting_set_int_elem_pre; + int HP_libconfig_setting_set_int_elem_post; + int HP_libconfig_setting_set_int64_elem_pre; + int HP_libconfig_setting_set_int64_elem_post; + int HP_libconfig_setting_set_float_elem_pre; + int HP_libconfig_setting_set_float_elem_post; + int HP_libconfig_setting_set_bool_elem_pre; + int HP_libconfig_setting_set_bool_elem_post; + int HP_libconfig_setting_set_string_elem_pre; + int HP_libconfig_setting_set_string_elem_post; + int HP_libconfig_setting_index_pre; + int HP_libconfig_setting_index_post; + int HP_libconfig_setting_length_pre; + int HP_libconfig_setting_length_post; + int HP_libconfig_setting_get_elem_pre; + int HP_libconfig_setting_get_elem_post; + int HP_libconfig_setting_get_member_pre; + int HP_libconfig_setting_get_member_post; + int HP_libconfig_setting_add_pre; + int HP_libconfig_setting_add_post; + int HP_libconfig_setting_remove_pre; + int HP_libconfig_setting_remove_post; + int HP_libconfig_setting_remove_elem_pre; + int HP_libconfig_setting_remove_elem_post; + int HP_libconfig_setting_set_hook_pre; + int HP_libconfig_setting_set_hook_post; + int HP_libconfig_lookup_pre; + int HP_libconfig_lookup_post; + int HP_libconfig_lookup_from_pre; + int HP_libconfig_lookup_from_post; + int HP_libconfig_lookup_int_pre; + int HP_libconfig_lookup_int_post; + int HP_libconfig_lookup_int64_pre; + int HP_libconfig_lookup_int64_post; + int HP_libconfig_lookup_float_pre; + int HP_libconfig_lookup_float_post; + int HP_libconfig_lookup_bool_pre; + int HP_libconfig_lookup_bool_post; + int HP_libconfig_lookup_string_pre; + int HP_libconfig_lookup_string_post; + int HP_libconfig_read_file_pre; + int HP_libconfig_read_file_post; + int HP_libconfig_setting_copy_simple_pre; + int HP_libconfig_setting_copy_simple_post; + int HP_libconfig_setting_copy_elem_pre; + int HP_libconfig_setting_copy_elem_post; + int HP_libconfig_setting_copy_aggregate_pre; + int HP_libconfig_setting_copy_aggregate_post; + int HP_libconfig_setting_copy_pre; + int HP_libconfig_setting_copy_post; int HP_login_mmo_auth_pre; int HP_login_mmo_auth_post; int HP_login_mmo_auth_new_pre; @@ -224,8 +860,303 @@ struct { int HP_login_parse_request_connection_post; int HP_login_parse_login_pre; int HP_login_parse_login_post; + int HP_iMalloc_init_pre; + int HP_iMalloc_init_post; + int HP_iMalloc_final_pre; + int HP_iMalloc_final_post; + int HP_iMalloc_malloc_pre; + int HP_iMalloc_malloc_post; + int HP_iMalloc_calloc_pre; + int HP_iMalloc_calloc_post; + int HP_iMalloc_realloc_pre; + int HP_iMalloc_realloc_post; + int HP_iMalloc_reallocz_pre; + int HP_iMalloc_reallocz_post; + int HP_iMalloc_astrdup_pre; + int HP_iMalloc_astrdup_post; + int HP_iMalloc_free_pre; + int HP_iMalloc_free_post; + int HP_iMalloc_memory_check_pre; + int HP_iMalloc_memory_check_post; + int HP_iMalloc_verify_ptr_pre; + int HP_iMalloc_verify_ptr_post; + int HP_iMalloc_usage_pre; + int HP_iMalloc_usage_post; + int HP_iMalloc_post_shutdown_pre; + int HP_iMalloc_post_shutdown_post; + int HP_iMalloc_init_messages_pre; + int HP_iMalloc_init_messages_post; + int HP_nullpo_assert_report_pre; + int HP_nullpo_assert_report_post; + int HP_showmsg_init_pre; + int HP_showmsg_init_post; + int HP_showmsg_final_pre; + int HP_showmsg_final_post; + int HP_showmsg_clearScreen_pre; + int HP_showmsg_clearScreen_post; + int HP_showmsg_showMessageV_pre; + int HP_showmsg_showMessageV_post; + int HP_sockt_init_pre; + int HP_sockt_init_post; + int HP_sockt_final_pre; + int HP_sockt_final_post; + int HP_sockt_perform_pre; + int HP_sockt_perform_post; + int HP_sockt_datasync_pre; + int HP_sockt_datasync_post; + int HP_sockt_make_listen_bind_pre; + int HP_sockt_make_listen_bind_post; + int HP_sockt_make_connection_pre; + int HP_sockt_make_connection_post; + int HP_sockt_realloc_fifo_pre; + int HP_sockt_realloc_fifo_post; + int HP_sockt_realloc_writefifo_pre; + int HP_sockt_realloc_writefifo_post; + int HP_sockt_wfifoset_pre; + int HP_sockt_wfifoset_post; + int HP_sockt_rfifoskip_pre; + int HP_sockt_rfifoskip_post; + int HP_sockt_close_pre; + int HP_sockt_close_post; + int HP_sockt_session_is_valid_pre; + int HP_sockt_session_is_valid_post; + int HP_sockt_session_is_active_pre; + int HP_sockt_session_is_active_post; + int HP_sockt_flush_pre; + int HP_sockt_flush_post; + int HP_sockt_flush_fifos_pre; + int HP_sockt_flush_fifos_post; + int HP_sockt_set_nonblocking_pre; + int HP_sockt_set_nonblocking_post; + int HP_sockt_set_defaultparse_pre; + int HP_sockt_set_defaultparse_post; + int HP_sockt_host2ip_pre; + int HP_sockt_host2ip_post; + int HP_sockt_ip2str_pre; + int HP_sockt_ip2str_post; + int HP_sockt_str2ip_pre; + int HP_sockt_str2ip_post; + int HP_sockt_ntows_pre; + int HP_sockt_ntows_post; + int HP_sockt_getips_pre; + int HP_sockt_getips_post; + int HP_sockt_eof_pre; + int HP_sockt_eof_post; + int HP_sockt_lan_subnet_check_pre; + int HP_sockt_lan_subnet_check_post; + int HP_sockt_allowed_ip_check_pre; + int HP_sockt_allowed_ip_check_post; + int HP_sockt_trusted_ip_check_pre; + int HP_sockt_trusted_ip_check_post; + int HP_sockt_net_config_read_sub_pre; + int HP_sockt_net_config_read_sub_post; + int HP_sockt_net_config_read_pre; + int HP_sockt_net_config_read_post; + int HP_SQL_Connect_pre; + int HP_SQL_Connect_post; + int HP_SQL_GetTimeout_pre; + int HP_SQL_GetTimeout_post; + int HP_SQL_GetColumnNames_pre; + int HP_SQL_GetColumnNames_post; + int HP_SQL_SetEncoding_pre; + int HP_SQL_SetEncoding_post; + int HP_SQL_Ping_pre; + int HP_SQL_Ping_post; + int HP_SQL_EscapeString_pre; + int HP_SQL_EscapeString_post; + int HP_SQL_EscapeStringLen_pre; + int HP_SQL_EscapeStringLen_post; + int HP_SQL_QueryV_pre; + int HP_SQL_QueryV_post; + int HP_SQL_QueryStr_pre; + int HP_SQL_QueryStr_post; + int HP_SQL_LastInsertId_pre; + int HP_SQL_LastInsertId_post; + int HP_SQL_NumColumns_pre; + int HP_SQL_NumColumns_post; + int HP_SQL_NumRows_pre; + int HP_SQL_NumRows_post; + int HP_SQL_NextRow_pre; + int HP_SQL_NextRow_post; + int HP_SQL_GetData_pre; + int HP_SQL_GetData_post; + int HP_SQL_FreeResult_pre; + int HP_SQL_FreeResult_post; + int HP_SQL_ShowDebug__pre; + int HP_SQL_ShowDebug__post; + int HP_SQL_Free_pre; + int HP_SQL_Free_post; + int HP_SQL_Malloc_pre; + int HP_SQL_Malloc_post; + int HP_SQL_StmtMalloc_pre; + int HP_SQL_StmtMalloc_post; + int HP_SQL_StmtPrepareV_pre; + int HP_SQL_StmtPrepareV_post; + int HP_SQL_StmtPrepareStr_pre; + int HP_SQL_StmtPrepareStr_post; + int HP_SQL_StmtNumParams_pre; + int HP_SQL_StmtNumParams_post; + int HP_SQL_StmtBindParam_pre; + int HP_SQL_StmtBindParam_post; + int HP_SQL_StmtExecute_pre; + int HP_SQL_StmtExecute_post; + int HP_SQL_StmtLastInsertId_pre; + int HP_SQL_StmtLastInsertId_post; + int HP_SQL_StmtNumColumns_pre; + int HP_SQL_StmtNumColumns_post; + int HP_SQL_StmtBindColumn_pre; + int HP_SQL_StmtBindColumn_post; + int HP_SQL_StmtNumRows_pre; + int HP_SQL_StmtNumRows_post; + int HP_SQL_StmtNextRow_pre; + int HP_SQL_StmtNextRow_post; + int HP_SQL_StmtFreeResult_pre; + int HP_SQL_StmtFreeResult_post; + int HP_SQL_StmtFree_pre; + int HP_SQL_StmtFree_post; + int HP_SQL_StmtShowDebug__pre; + int HP_SQL_StmtShowDebug__post; + int HP_StrBuf_Malloc_pre; + int HP_StrBuf_Malloc_post; + int HP_StrBuf_Init_pre; + int HP_StrBuf_Init_post; + int HP_StrBuf_Vprintf_pre; + int HP_StrBuf_Vprintf_post; + int HP_StrBuf_Append_pre; + int HP_StrBuf_Append_post; + int HP_StrBuf_AppendStr_pre; + int HP_StrBuf_AppendStr_post; + int HP_StrBuf_Length_pre; + int HP_StrBuf_Length_post; + int HP_StrBuf_Value_pre; + int HP_StrBuf_Value_post; + int HP_StrBuf_Clear_pre; + int HP_StrBuf_Clear_post; + int HP_StrBuf_Destroy_pre; + int HP_StrBuf_Destroy_post; + int HP_StrBuf_Free_pre; + int HP_StrBuf_Free_post; + int HP_strlib_jstrescape_pre; + int HP_strlib_jstrescape_post; + int HP_strlib_jstrescapecpy_pre; + int HP_strlib_jstrescapecpy_post; + int HP_strlib_jmemescapecpy_pre; + int HP_strlib_jmemescapecpy_post; + int HP_strlib_remove_control_chars__pre; + int HP_strlib_remove_control_chars__post; + int HP_strlib_trim__pre; + int HP_strlib_trim__post; + int HP_strlib_normalize_name__pre; + int HP_strlib_normalize_name__post; + int HP_strlib_stristr__pre; + int HP_strlib_stristr__post; + int HP_strlib_strnlen__pre; + int HP_strlib_strnlen__post; + int HP_strlib_strtok_r__pre; + int HP_strlib_strtok_r__post; + int HP_strlib_e_mail_check__pre; + int HP_strlib_e_mail_check__post; + int HP_strlib_config_switch__pre; + int HP_strlib_config_switch__post; + int HP_strlib_safestrncpy__pre; + int HP_strlib_safestrncpy__post; + int HP_strlib_safestrnlen__pre; + int HP_strlib_safestrnlen__post; + int HP_strlib_strline__pre; + int HP_strlib_strline__post; + int HP_strlib_bin2hex__pre; + int HP_strlib_bin2hex__post; + int HP_sv_parse_next_pre; + int HP_sv_parse_next_post; + int HP_sv_parse_pre; + int HP_sv_parse_post; + int HP_sv_split_pre; + int HP_sv_split_post; + int HP_sv_escape_c_pre; + int HP_sv_escape_c_post; + int HP_sv_unescape_c_pre; + int HP_sv_unescape_c_post; + int HP_sv_skip_escaped_c_pre; + int HP_sv_skip_escaped_c_post; + int HP_sv_readdb_pre; + int HP_sv_readdb_post; + int HP_sysinfo_getpagesize_pre; + int HP_sysinfo_getpagesize_post; + int HP_sysinfo_platform_pre; + int HP_sysinfo_platform_post; + int HP_sysinfo_osversion_pre; + int HP_sysinfo_osversion_post; + int HP_sysinfo_cpu_pre; + int HP_sysinfo_cpu_post; + int HP_sysinfo_cpucores_pre; + int HP_sysinfo_cpucores_post; + int HP_sysinfo_arch_pre; + int HP_sysinfo_arch_post; + int HP_sysinfo_is64bit_pre; + int HP_sysinfo_is64bit_post; + int HP_sysinfo_compiler_pre; + int HP_sysinfo_compiler_post; + int HP_sysinfo_cflags_pre; + int HP_sysinfo_cflags_post; + int HP_sysinfo_vcstype_pre; + int HP_sysinfo_vcstype_post; + int HP_sysinfo_vcstypeid_pre; + int HP_sysinfo_vcstypeid_post; + int HP_sysinfo_vcsrevision_src_pre; + int HP_sysinfo_vcsrevision_src_post; + int HP_sysinfo_vcsrevision_scripts_pre; + int HP_sysinfo_vcsrevision_scripts_post; + int HP_sysinfo_vcsrevision_reload_pre; + int HP_sysinfo_vcsrevision_reload_post; + int HP_sysinfo_is_superuser_pre; + int HP_sysinfo_is_superuser_post; + int HP_sysinfo_init_pre; + int HP_sysinfo_init_post; + int HP_sysinfo_final_pre; + int HP_sysinfo_final_post; + int HP_timer_gettick_pre; + int HP_timer_gettick_post; + int HP_timer_gettick_nocache_pre; + int HP_timer_gettick_nocache_post; + int HP_timer_add_pre; + int HP_timer_add_post; + int HP_timer_add_interval_pre; + int HP_timer_add_interval_post; + int HP_timer_get_pre; + int HP_timer_get_post; + int HP_timer_delete_pre; + int HP_timer_delete_post; + int HP_timer_addtick_pre; + int HP_timer_addtick_post; + int HP_timer_settick_pre; + int HP_timer_settick_post; + int HP_timer_add_func_list_pre; + int HP_timer_add_func_list_post; + int HP_timer_get_uptime_pre; + int HP_timer_get_uptime_post; + int HP_timer_perform_pre; + int HP_timer_perform_post; + int HP_timer_init_pre; + int HP_timer_init_post; + int HP_timer_final_pre; + int HP_timer_final_post; } count; struct { + struct HCache_interface HCache; + struct cmdline_interface cmdline; + struct console_interface console; + struct db_interface DB; + struct libconfig_interface libconfig; struct login_interface login; + struct malloc_interface iMalloc; + struct nullpo_interface nullpo; + struct showmsg_interface showmsg; + struct socket_interface sockt; + struct sql_interface SQL; + struct stringbuf_interface StrBuf; + struct strlib_interface strlib; + struct sv_interface sv; + struct sysinfo_interface sysinfo; + struct timer_interface timer; } source; diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc index 00cdfc8c9..93e063746 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc @@ -5,6 +5,100 @@ // as it will get overwritten. struct HookingPointData HookingPoints[] = { +/* HCache */ + { HP_POP(HCache->init, HP_HCache_init) }, + { HP_POP(HCache->check, HP_HCache_check) }, + { HP_POP(HCache->open, HP_HCache_open) }, +/* cmdline */ + { HP_POP(cmdline->init, HP_cmdline_init) }, + { HP_POP(cmdline->final, HP_cmdline_final) }, + { HP_POP(cmdline->arg_add, HP_cmdline_arg_add) }, + { HP_POP(cmdline->exec, HP_cmdline_exec) }, + { HP_POP(cmdline->arg_next_value, HP_cmdline_arg_next_value) }, + { HP_POP(cmdline->arg_source, HP_cmdline_arg_source) }, +/* console */ + { HP_POP(console->init, HP_console_init) }, + { HP_POP(console->final, HP_console_final) }, + { HP_POP(console->display_title, HP_console_display_title) }, +/* DB */ + { HP_POP(DB->fix_options, HP_DB_fix_options) }, + { HP_POP(DB->default_cmp, HP_DB_default_cmp) }, + { HP_POP(DB->default_hash, HP_DB_default_hash) }, + { HP_POP(DB->default_release, HP_DB_default_release) }, + { HP_POP(DB->custom_release, HP_DB_custom_release) }, + { HP_POP(DB->alloc, HP_DB_alloc) }, + { HP_POP(DB->i2key, HP_DB_i2key) }, + { HP_POP(DB->ui2key, HP_DB_ui2key) }, + { HP_POP(DB->str2key, HP_DB_str2key) }, + { HP_POP(DB->i642key, HP_DB_i642key) }, + { HP_POP(DB->ui642key, HP_DB_ui642key) }, + { HP_POP(DB->i2data, HP_DB_i2data) }, + { HP_POP(DB->ui2data, HP_DB_ui2data) }, + { HP_POP(DB->ptr2data, HP_DB_ptr2data) }, + { HP_POP(DB->data2i, HP_DB_data2i) }, + { HP_POP(DB->data2ui, HP_DB_data2ui) }, + { HP_POP(DB->data2ptr, HP_DB_data2ptr) }, + { HP_POP(DB->init, HP_DB_init) }, + { HP_POP(DB->final, HP_DB_final) }, +/* libconfig */ + { HP_POP(libconfig->read, HP_libconfig_read) }, + { HP_POP(libconfig->write, HP_libconfig_write) }, + { HP_POP(libconfig->set_auto_convert, HP_libconfig_set_auto_convert) }, + { HP_POP(libconfig->get_auto_convert, HP_libconfig_get_auto_convert) }, + { HP_POP(libconfig->read_string, HP_libconfig_read_string) }, + { HP_POP(libconfig->read_file_src, HP_libconfig_read_file_src) }, + { HP_POP(libconfig->write_file, HP_libconfig_write_file) }, + { HP_POP(libconfig->set_destructor, HP_libconfig_set_destructor) }, + { HP_POP(libconfig->set_include_dir, HP_libconfig_set_include_dir) }, + { HP_POP(libconfig->init, HP_libconfig_init) }, + { HP_POP(libconfig->destroy, HP_libconfig_destroy) }, + { HP_POP(libconfig->setting_get_int, HP_libconfig_setting_get_int) }, + { HP_POP(libconfig->setting_get_int64, HP_libconfig_setting_get_int64) }, + { HP_POP(libconfig->setting_get_float, HP_libconfig_setting_get_float) }, + { HP_POP(libconfig->setting_get_bool, HP_libconfig_setting_get_bool) }, + { HP_POP(libconfig->setting_get_string, HP_libconfig_setting_get_string) }, + { HP_POP(libconfig->setting_lookup_int, HP_libconfig_setting_lookup_int) }, + { HP_POP(libconfig->setting_lookup_int64, HP_libconfig_setting_lookup_int64) }, + { HP_POP(libconfig->setting_lookup_float, HP_libconfig_setting_lookup_float) }, + { HP_POP(libconfig->setting_lookup_bool, HP_libconfig_setting_lookup_bool) }, + { HP_POP(libconfig->setting_lookup_string, HP_libconfig_setting_lookup_string) }, + { HP_POP(libconfig->setting_set_int, HP_libconfig_setting_set_int) }, + { HP_POP(libconfig->setting_set_int64, HP_libconfig_setting_set_int64) }, + { HP_POP(libconfig->setting_set_float, HP_libconfig_setting_set_float) }, + { HP_POP(libconfig->setting_set_bool, HP_libconfig_setting_set_bool) }, + { HP_POP(libconfig->setting_set_string, HP_libconfig_setting_set_string) }, + { HP_POP(libconfig->setting_set_format, HP_libconfig_setting_set_format) }, + { HP_POP(libconfig->setting_get_format, HP_libconfig_setting_get_format) }, + { HP_POP(libconfig->setting_get_int_elem, HP_libconfig_setting_get_int_elem) }, + { HP_POP(libconfig->setting_get_int64_elem, HP_libconfig_setting_get_int64_elem) }, + { HP_POP(libconfig->setting_get_float_elem, HP_libconfig_setting_get_float_elem) }, + { HP_POP(libconfig->setting_get_bool_elem, HP_libconfig_setting_get_bool_elem) }, + { HP_POP(libconfig->setting_get_string_elem, HP_libconfig_setting_get_string_elem) }, + { HP_POP(libconfig->setting_set_int_elem, HP_libconfig_setting_set_int_elem) }, + { HP_POP(libconfig->setting_set_int64_elem, HP_libconfig_setting_set_int64_elem) }, + { HP_POP(libconfig->setting_set_float_elem, HP_libconfig_setting_set_float_elem) }, + { HP_POP(libconfig->setting_set_bool_elem, HP_libconfig_setting_set_bool_elem) }, + { HP_POP(libconfig->setting_set_string_elem, HP_libconfig_setting_set_string_elem) }, + { HP_POP(libconfig->setting_index, HP_libconfig_setting_index) }, + { HP_POP(libconfig->setting_length, HP_libconfig_setting_length) }, + { HP_POP(libconfig->setting_get_elem, HP_libconfig_setting_get_elem) }, + { HP_POP(libconfig->setting_get_member, HP_libconfig_setting_get_member) }, + { HP_POP(libconfig->setting_add, HP_libconfig_setting_add) }, + { HP_POP(libconfig->setting_remove, HP_libconfig_setting_remove) }, + { HP_POP(libconfig->setting_remove_elem, HP_libconfig_setting_remove_elem) }, + { HP_POP(libconfig->setting_set_hook, HP_libconfig_setting_set_hook) }, + { HP_POP(libconfig->lookup, HP_libconfig_lookup) }, + { HP_POP(libconfig->lookup_from, HP_libconfig_lookup_from) }, + { HP_POP(libconfig->lookup_int, HP_libconfig_lookup_int) }, + { HP_POP(libconfig->lookup_int64, HP_libconfig_lookup_int64) }, + { HP_POP(libconfig->lookup_float, HP_libconfig_lookup_float) }, + { HP_POP(libconfig->lookup_bool, HP_libconfig_lookup_bool) }, + { HP_POP(libconfig->lookup_string, HP_libconfig_lookup_string) }, + { HP_POP(libconfig->read_file, HP_libconfig_read_file) }, + { HP_POP(libconfig->setting_copy_simple, HP_libconfig_setting_copy_simple) }, + { HP_POP(libconfig->setting_copy_elem, HP_libconfig_setting_copy_elem) }, + { HP_POP(libconfig->setting_copy_aggregate, HP_libconfig_setting_copy_aggregate) }, + { HP_POP(libconfig->setting_copy, HP_libconfig_setting_copy) }, /* login */ { HP_POP(login->mmo_auth, HP_login_mmo_auth) }, { HP_POP(login->mmo_auth_new, HP_login_mmo_auth_new) }, @@ -60,6 +154,156 @@ struct HookingPointData HookingPoints[] = { { HP_POP(login->char_server_connection_status, HP_login_char_server_connection_status) }, { HP_POP(login->parse_request_connection, HP_login_parse_request_connection) }, { HP_POP(login->parse_login, HP_login_parse_login) }, +/* iMalloc */ + { HP_POP(iMalloc->init, HP_iMalloc_init) }, + { HP_POP(iMalloc->final, HP_iMalloc_final) }, + { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) }, + { HP_POP(iMalloc->calloc, HP_iMalloc_calloc) }, + { HP_POP(iMalloc->realloc, HP_iMalloc_realloc) }, + { HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) }, + { HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) }, + { HP_POP(iMalloc->free, HP_iMalloc_free) }, + { HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) }, + { HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) }, + { HP_POP(iMalloc->usage, HP_iMalloc_usage) }, + { HP_POP(iMalloc->post_shutdown, HP_iMalloc_post_shutdown) }, + { HP_POP(iMalloc->init_messages, HP_iMalloc_init_messages) }, +/* nullpo */ + { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) }, +/* showmsg */ + { HP_POP(showmsg->init, HP_showmsg_init) }, + { HP_POP(showmsg->final, HP_showmsg_final) }, + { HP_POP(showmsg->clearScreen, HP_showmsg_clearScreen) }, + { HP_POP(showmsg->showMessageV, HP_showmsg_showMessageV) }, +/* sockt */ + { HP_POP(sockt->init, HP_sockt_init) }, + { HP_POP(sockt->final, HP_sockt_final) }, + { HP_POP(sockt->perform, HP_sockt_perform) }, + { HP_POP(sockt->datasync, HP_sockt_datasync) }, + { HP_POP(sockt->make_listen_bind, HP_sockt_make_listen_bind) }, + { HP_POP(sockt->make_connection, HP_sockt_make_connection) }, + { HP_POP(sockt->realloc_fifo, HP_sockt_realloc_fifo) }, + { HP_POP(sockt->realloc_writefifo, HP_sockt_realloc_writefifo) }, + { HP_POP(sockt->wfifoset, HP_sockt_wfifoset) }, + { HP_POP(sockt->rfifoskip, HP_sockt_rfifoskip) }, + { HP_POP(sockt->close, HP_sockt_close) }, + { HP_POP(sockt->session_is_valid, HP_sockt_session_is_valid) }, + { HP_POP(sockt->session_is_active, HP_sockt_session_is_active) }, + { HP_POP(sockt->flush, HP_sockt_flush) }, + { HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) }, + { HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) }, + { HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) }, + { HP_POP(sockt->host2ip, HP_sockt_host2ip) }, + { HP_POP(sockt->ip2str, HP_sockt_ip2str) }, + { HP_POP(sockt->str2ip, HP_sockt_str2ip) }, + { HP_POP(sockt->ntows, HP_sockt_ntows) }, + { HP_POP(sockt->getips, HP_sockt_getips) }, + { HP_POP(sockt->eof, HP_sockt_eof) }, + { HP_POP(sockt->lan_subnet_check, HP_sockt_lan_subnet_check) }, + { HP_POP(sockt->allowed_ip_check, HP_sockt_allowed_ip_check) }, + { HP_POP(sockt->trusted_ip_check, HP_sockt_trusted_ip_check) }, + { HP_POP(sockt->net_config_read_sub, HP_sockt_net_config_read_sub) }, + { HP_POP(sockt->net_config_read, HP_sockt_net_config_read) }, +/* SQL */ + { HP_POP(SQL->Connect, HP_SQL_Connect) }, + { HP_POP(SQL->GetTimeout, HP_SQL_GetTimeout) }, + { HP_POP(SQL->GetColumnNames, HP_SQL_GetColumnNames) }, + { HP_POP(SQL->SetEncoding, HP_SQL_SetEncoding) }, + { HP_POP(SQL->Ping, HP_SQL_Ping) }, + { HP_POP(SQL->EscapeString, HP_SQL_EscapeString) }, + { HP_POP(SQL->EscapeStringLen, HP_SQL_EscapeStringLen) }, + { HP_POP(SQL->QueryV, HP_SQL_QueryV) }, + { HP_POP(SQL->QueryStr, HP_SQL_QueryStr) }, + { HP_POP(SQL->LastInsertId, HP_SQL_LastInsertId) }, + { HP_POP(SQL->NumColumns, HP_SQL_NumColumns) }, + { HP_POP(SQL->NumRows, HP_SQL_NumRows) }, + { HP_POP(SQL->NextRow, HP_SQL_NextRow) }, + { HP_POP(SQL->GetData, HP_SQL_GetData) }, + { HP_POP(SQL->FreeResult, HP_SQL_FreeResult) }, + { HP_POP(SQL->ShowDebug_, HP_SQL_ShowDebug_) }, + { HP_POP(SQL->Free, HP_SQL_Free) }, + { HP_POP(SQL->Malloc, HP_SQL_Malloc) }, + { HP_POP(SQL->StmtMalloc, HP_SQL_StmtMalloc) }, + { HP_POP(SQL->StmtPrepareV, HP_SQL_StmtPrepareV) }, + { HP_POP(SQL->StmtPrepareStr, HP_SQL_StmtPrepareStr) }, + { HP_POP(SQL->StmtNumParams, HP_SQL_StmtNumParams) }, + { HP_POP(SQL->StmtBindParam, HP_SQL_StmtBindParam) }, + { HP_POP(SQL->StmtExecute, HP_SQL_StmtExecute) }, + { HP_POP(SQL->StmtLastInsertId, HP_SQL_StmtLastInsertId) }, + { HP_POP(SQL->StmtNumColumns, HP_SQL_StmtNumColumns) }, + { HP_POP(SQL->StmtBindColumn, HP_SQL_StmtBindColumn) }, + { HP_POP(SQL->StmtNumRows, HP_SQL_StmtNumRows) }, + { HP_POP(SQL->StmtNextRow, HP_SQL_StmtNextRow) }, + { HP_POP(SQL->StmtFreeResult, HP_SQL_StmtFreeResult) }, + { HP_POP(SQL->StmtFree, HP_SQL_StmtFree) }, + { HP_POP(SQL->StmtShowDebug_, HP_SQL_StmtShowDebug_) }, +/* StrBuf */ + { HP_POP(StrBuf->Malloc, HP_StrBuf_Malloc) }, + { HP_POP(StrBuf->Init, HP_StrBuf_Init) }, + { HP_POP(StrBuf->Vprintf, HP_StrBuf_Vprintf) }, + { HP_POP(StrBuf->Append, HP_StrBuf_Append) }, + { HP_POP(StrBuf->AppendStr, HP_StrBuf_AppendStr) }, + { HP_POP(StrBuf->Length, HP_StrBuf_Length) }, + { HP_POP(StrBuf->Value, HP_StrBuf_Value) }, + { HP_POP(StrBuf->Clear, HP_StrBuf_Clear) }, + { HP_POP(StrBuf->Destroy, HP_StrBuf_Destroy) }, + { HP_POP(StrBuf->Free, HP_StrBuf_Free) }, +/* strlib */ + { HP_POP(strlib->jstrescape, HP_strlib_jstrescape) }, + { HP_POP(strlib->jstrescapecpy, HP_strlib_jstrescapecpy) }, + { HP_POP(strlib->jmemescapecpy, HP_strlib_jmemescapecpy) }, + { HP_POP(strlib->remove_control_chars_, HP_strlib_remove_control_chars_) }, + { HP_POP(strlib->trim_, HP_strlib_trim_) }, + { HP_POP(strlib->normalize_name_, HP_strlib_normalize_name_) }, + { HP_POP(strlib->stristr_, HP_strlib_stristr_) }, + { HP_POP(strlib->strnlen_, HP_strlib_strnlen_) }, + { HP_POP(strlib->strtok_r_, HP_strlib_strtok_r_) }, + { HP_POP(strlib->e_mail_check_, HP_strlib_e_mail_check_) }, + { HP_POP(strlib->config_switch_, HP_strlib_config_switch_) }, + { HP_POP(strlib->safestrncpy_, HP_strlib_safestrncpy_) }, + { HP_POP(strlib->safestrnlen_, HP_strlib_safestrnlen_) }, + { HP_POP(strlib->strline_, HP_strlib_strline_) }, + { HP_POP(strlib->bin2hex_, HP_strlib_bin2hex_) }, +/* sv */ + { HP_POP(sv->parse_next, HP_sv_parse_next) }, + { HP_POP(sv->parse, HP_sv_parse) }, + { HP_POP(sv->split, HP_sv_split) }, + { HP_POP(sv->escape_c, HP_sv_escape_c) }, + { HP_POP(sv->unescape_c, HP_sv_unescape_c) }, + { HP_POP(sv->skip_escaped_c, HP_sv_skip_escaped_c) }, + { HP_POP(sv->readdb, HP_sv_readdb) }, +/* sysinfo */ + { HP_POP(sysinfo->getpagesize, HP_sysinfo_getpagesize) }, + { HP_POP(sysinfo->platform, HP_sysinfo_platform) }, + { HP_POP(sysinfo->osversion, HP_sysinfo_osversion) }, + { HP_POP(sysinfo->cpu, HP_sysinfo_cpu) }, + { HP_POP(sysinfo->cpucores, HP_sysinfo_cpucores) }, + { HP_POP(sysinfo->arch, HP_sysinfo_arch) }, + { HP_POP(sysinfo->is64bit, HP_sysinfo_is64bit) }, + { HP_POP(sysinfo->compiler, HP_sysinfo_compiler) }, + { HP_POP(sysinfo->cflags, HP_sysinfo_cflags) }, + { HP_POP(sysinfo->vcstype, HP_sysinfo_vcstype) }, + { HP_POP(sysinfo->vcstypeid, HP_sysinfo_vcstypeid) }, + { HP_POP(sysinfo->vcsrevision_src, HP_sysinfo_vcsrevision_src) }, + { HP_POP(sysinfo->vcsrevision_scripts, HP_sysinfo_vcsrevision_scripts) }, + { HP_POP(sysinfo->vcsrevision_reload, HP_sysinfo_vcsrevision_reload) }, + { HP_POP(sysinfo->is_superuser, HP_sysinfo_is_superuser) }, + { HP_POP(sysinfo->init, HP_sysinfo_init) }, + { HP_POP(sysinfo->final, HP_sysinfo_final) }, +/* timer */ + { HP_POP(timer->gettick, HP_timer_gettick) }, + { HP_POP(timer->gettick_nocache, HP_timer_gettick_nocache) }, + { HP_POP(timer->add, HP_timer_add) }, + { HP_POP(timer->add_interval, HP_timer_add_interval) }, + { HP_POP(timer->get, HP_timer_get) }, + { HP_POP(timer->delete, HP_timer_delete) }, + { HP_POP(timer->addtick, HP_timer_addtick) }, + { HP_POP(timer->settick, HP_timer_settick) }, + { HP_POP(timer->add_func_list, HP_timer_add_func_list) }, + { HP_POP(timer->get_uptime, HP_timer_get_uptime) }, + { HP_POP(timer->perform, HP_timer_perform) }, + { HP_POP(timer->init, HP_timer_init) }, + { HP_POP(timer->final, HP_timer_final) }, }; int HookingPointsLenMax = 42; diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc index 18195af77..588fddcb0 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc @@ -4,43 +4,42 @@ // NOTE: This file was auto-generated and should never be manually edited, // as it will get overwritten. -/* login */ -int HP_login_mmo_auth(struct login_session_data *sd, bool isServer) { +/* HCache */ +void HP_HCache_init(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_login_mmo_auth_pre ) { - int (*preHookFunc) (struct login_session_data *sd, bool *isServer); + if( HPMHooks.count.HP_HCache_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_mmo_auth_pre[hIndex].func; - retVal___ = preHookFunc(sd, &isServer); + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_HCache_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.login.mmo_auth(sd, isServer); + HPMHooks.source.HCache.init(); } - if( HPMHooks.count.HP_login_mmo_auth_post ) { - int (*postHookFunc) (int retVal___, struct login_session_data *sd, bool *isServer); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_mmo_auth_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &isServer); + if( HPMHooks.count.HP_HCache_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_HCache_init_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_login_mmo_auth_new(const char *userid, const char *pass, const char sex, const char *last_ip) { +bool HP_HCache_check(const char *file) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_login_mmo_auth_new_pre ) { - int (*preHookFunc) (const char *userid, const char *pass, const char *sex, const char *last_ip); + bool retVal___ = false; + if( HPMHooks.count.HP_HCache_check_pre ) { + bool (*preHookFunc) (const char *file); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_new_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_mmo_auth_new_pre[hIndex].func; - retVal___ = preHookFunc(userid, pass, &sex, last_ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_HCache_check_pre[hIndex].func; + retVal___ = preHookFunc(file); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48,26 +47,26 @@ int HP_login_mmo_auth_new(const char *userid, const char *pass, const char sex, } } { - retVal___ = HPMHooks.source.login.mmo_auth_new(userid, pass, sex, last_ip); + retVal___ = HPMHooks.source.HCache.check(file); } - if( HPMHooks.count.HP_login_mmo_auth_new_post ) { - int (*postHookFunc) (int retVal___, const char *userid, const char *pass, const char *sex, const char *last_ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_new_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_mmo_auth_new_post[hIndex].func; - retVal___ = postHookFunc(retVal___, userid, pass, &sex, last_ip); + if( HPMHooks.count.HP_HCache_check_post ) { + bool (*postHookFunc) (bool retVal___, const char *file); + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_HCache_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, file); } } return retVal___; } -int HP_login_waiting_disconnect_timer(int tid, int64 tick, int id, intptr_t data) { +FILE* HP_HCache_open(const char *file, const char *opt) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_login_waiting_disconnect_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + FILE* retVal___ = NULL; + if( HPMHooks.count.HP_HCache_open_pre ) { + FILE* (*preHookFunc) (const char *file, const char *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_waiting_disconnect_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_waiting_disconnect_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_HCache_open_pre[hIndex].func; + retVal___ = preHookFunc(file, opt); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -75,115 +74,106 @@ int HP_login_waiting_disconnect_timer(int tid, int64 tick, int id, intptr_t data } } { - retVal___ = HPMHooks.source.login.waiting_disconnect_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.HCache.open(file, opt); } - if( HPMHooks.count.HP_login_waiting_disconnect_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_waiting_disconnect_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_waiting_disconnect_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_HCache_open_post ) { + FILE* (*postHookFunc) (FILE* retVal___, const char *file, const char *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_HCache_open_post[hIndex].func; + retVal___ = postHookFunc(retVal___, file, opt); } } return retVal___; } -DBData HP_login_create_online_user(DBKey key, va_list args) { +/* cmdline */ +void HP_cmdline_init(void) { int hIndex = 0; - DBData retVal___; - memset(&retVal___, '\0', sizeof(DBData)); - if( HPMHooks.count.HP_login_create_online_user_pre ) { - DBData (*preHookFunc) (DBKey *key, va_list args); + if( HPMHooks.count.HP_cmdline_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_create_online_user_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_login_create_online_user_pre[hIndex].func; - retVal___ = preHookFunc(&key, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list args___copy; va_copy(args___copy, args); - retVal___ = HPMHooks.source.login.create_online_user(key, args___copy); - va_end(args___copy); + HPMHooks.source.cmdline.init(); } - if( HPMHooks.count.HP_login_create_online_user_post ) { - DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_create_online_user_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_login_create_online_user_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_cmdline_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_init_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -struct online_login_data* HP_login_add_online_user(int char_server, int account_id) { +void HP_cmdline_final(void) { int hIndex = 0; - struct online_login_data* retVal___ = NULL; - if( HPMHooks.count.HP_login_add_online_user_pre ) { - struct online_login_data* (*preHookFunc) (int *char_server, int *account_id); + if( HPMHooks.count.HP_cmdline_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_add_online_user_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_add_online_user_pre[hIndex].func; - retVal___ = preHookFunc(&char_server, &account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.login.add_online_user(char_server, account_id); + HPMHooks.source.cmdline.final(); } - if( HPMHooks.count.HP_login_add_online_user_post ) { - struct online_login_data* (*postHookFunc) (struct online_login_data* retVal___, int *char_server, int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_add_online_user_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_add_online_user_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_server, &account_id); + if( HPMHooks.count.HP_cmdline_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -void HP_login_remove_online_user(int account_id) { +bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) { int hIndex = 0; - if( HPMHooks.count.HP_login_remove_online_user_pre ) { - void (*preHookFunc) (int *account_id); + bool retVal___ = false; + if( HPMHooks.count.HP_cmdline_arg_add_pre ) { + bool (*preHookFunc) (unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_remove_online_user_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_remove_online_user_pre[hIndex].func; - preHookFunc(&account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_arg_add_pre[hIndex].func; + retVal___ = preHookFunc(&pluginID, name, &shortname, &func, help, &options); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.remove_online_user(account_id); + retVal___ = HPMHooks.source.cmdline.arg_add(pluginID, name, shortname, func, help, options); } - if( HPMHooks.count.HP_login_remove_online_user_post ) { - void (*postHookFunc) (int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_remove_online_user_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_remove_online_user_post[hIndex].func; - postHookFunc(&account_id); + if( HPMHooks.count.HP_cmdline_arg_add_post ) { + bool (*postHookFunc) (bool retVal___, unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_arg_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &pluginID, name, &shortname, &func, help, &options); } } - return; + return retVal___; } -int HP_login_online_db_setoffline(DBKey key, DBData *data, va_list ap) { +int HP_cmdline_exec(int argc, char **argv, unsigned int options) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_online_db_setoffline_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + if( HPMHooks.count.HP_cmdline_exec_pre ) { + int (*preHookFunc) (int *argc, char **argv, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_db_setoffline_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_login_online_db_setoffline_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_exec_pre[hIndex].func; + retVal___ = preHookFunc(&argc, argv, &options); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -191,32 +181,26 @@ int HP_login_online_db_setoffline(DBKey key, DBData *data, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.login.online_db_setoffline(key, data, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.cmdline.exec(argc, argv, options); } - if( HPMHooks.count.HP_login_online_db_setoffline_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_db_setoffline_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_login_online_db_setoffline_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_cmdline_exec_post ) { + int (*postHookFunc) (int retVal___, int *argc, char **argv, unsigned int *options); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_exec_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &argc, argv, &options); } } return retVal___; } -int HP_login_online_data_cleanup_sub(DBKey key, DBData *data, va_list ap) { +bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_login_online_data_cleanup_sub_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + bool retVal___ = false; + if( HPMHooks.count.HP_cmdline_arg_next_value_pre ) { + bool (*preHookFunc) (const char *name, int *current_arg, int *argc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_login_online_data_cleanup_sub_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_pre[hIndex].func; + retVal___ = preHookFunc(name, ¤t_arg, &argc); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -224,30 +208,26 @@ int HP_login_online_data_cleanup_sub(DBKey key, DBData *data, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.login.online_data_cleanup_sub(key, data, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.cmdline.arg_next_value(name, current_arg, argc); } - if( HPMHooks.count.HP_login_online_data_cleanup_sub_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_login_online_data_cleanup_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_cmdline_arg_next_value_post ) { + bool (*postHookFunc) (bool retVal___, const char *name, int *current_arg, int *argc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, ¤t_arg, &argc); } } return retVal___; } -int HP_login_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { +const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_login_online_data_cleanup_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_cmdline_arg_source_pre ) { + const char* (*preHookFunc) (struct CmdlineArgData *arg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_online_data_cleanup_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_arg_source_pre[hIndex].func; + retVal___ = preHookFunc(arg); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -255,107 +235,106 @@ int HP_login_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.login.online_data_cleanup(tid, tick, id, data); + retVal___ = HPMHooks.source.cmdline.arg_source(arg); } - if( HPMHooks.count.HP_login_online_data_cleanup_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_online_data_cleanup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_cmdline_arg_source_post ) { + const char* (*postHookFunc) (const char* retVal___, struct CmdlineArgData *arg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_arg_source_post[hIndex].func; + retVal___ = postHookFunc(retVal___, arg); } } return retVal___; } -int HP_login_sync_ip_addresses(int tid, int64 tick, int id, intptr_t data) { +/* console */ +void HP_console_init(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_login_sync_ip_addresses_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_console_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_sync_ip_addresses_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_sync_ip_addresses_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_console_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.login.sync_ip_addresses(tid, tick, id, data); + HPMHooks.source.console.init(); } - if( HPMHooks.count.HP_login_sync_ip_addresses_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_sync_ip_addresses_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_sync_ip_addresses_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_console_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_console_init_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -bool HP_login_check_encrypted(const char *str1, const char *str2, const char *passwd) { +void HP_console_final(void) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_login_check_encrypted_pre ) { - bool (*preHookFunc) (const char *str1, const char *str2, const char *passwd); + if( HPMHooks.count.HP_console_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_check_encrypted_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_check_encrypted_pre[hIndex].func; - retVal___ = preHookFunc(str1, str2, passwd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_console_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.login.check_encrypted(str1, str2, passwd); + HPMHooks.source.console.final(); } - if( HPMHooks.count.HP_login_check_encrypted_post ) { - bool (*postHookFunc) (bool retVal___, const char *str1, const char *str2, const char *passwd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_check_encrypted_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_check_encrypted_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str1, str2, passwd); + if( HPMHooks.count.HP_console_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_console_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -bool HP_login_check_password(const char *md5key, int passwdenc, const char *passwd, const char *refpass) { +void HP_console_display_title(void) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_login_check_password_pre ) { - bool (*preHookFunc) (const char *md5key, int *passwdenc, const char *passwd, const char *refpass); + if( HPMHooks.count.HP_console_display_title_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_check_password_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_check_password_pre[hIndex].func; - retVal___ = preHookFunc(md5key, &passwdenc, passwd, refpass); + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_console_display_title_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.login.check_password(md5key, passwdenc, passwd, refpass); + HPMHooks.source.console.display_title(); } - if( HPMHooks.count.HP_login_check_password_post ) { - bool (*postHookFunc) (bool retVal___, const char *md5key, int *passwdenc, const char *passwd, const char *refpass); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_check_password_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_check_password_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md5key, &passwdenc, passwd, refpass); + if( HPMHooks.count.HP_console_display_title_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_console_display_title_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -uint32 HP_login_lan_subnet_check(uint32 ip) { +/* DB */ +DBOptions HP_DB_fix_options(DBType type, DBOptions options) { int hIndex = 0; - uint32 retVal___ = 0; - if( HPMHooks.count.HP_login_lan_subnet_check_pre ) { - uint32 (*preHookFunc) (uint32 *ip); + DBOptions retVal___ = DB_OPT_BASE; + if( HPMHooks.count.HP_DB_fix_options_pre ) { + DBOptions (*preHookFunc) (DBType *type, DBOptions *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnet_check_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_lan_subnet_check_pre[hIndex].func; - retVal___ = preHookFunc(&ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_fix_options_pre[hIndex].func; + retVal___ = preHookFunc(&type, &options); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -363,441 +342,465 @@ uint32 HP_login_lan_subnet_check(uint32 ip) { } } { - retVal___ = HPMHooks.source.login.lan_subnet_check(ip); + retVal___ = HPMHooks.source.DB.fix_options(type, options); } - if( HPMHooks.count.HP_login_lan_subnet_check_post ) { - uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnet_check_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_lan_subnet_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip); + if( HPMHooks.count.HP_DB_fix_options_post ) { + DBOptions (*postHookFunc) (DBOptions retVal___, DBType *type, DBOptions *options); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_fix_options_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type, &options); } } return retVal___; } -void HP_login_fromchar_accinfo(int fd, int account_id, int u_fd, int u_aid, int u_group, int map_fd, struct mmo_account *acc) { +DBComparator HP_DB_default_cmp(DBType type) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_accinfo_pre ) { - void (*preHookFunc) (int *fd, int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd, struct mmo_account *acc); + DBComparator retVal___ = NULL; + if( HPMHooks.count.HP_DB_default_cmp_pre ) { + DBComparator (*preHookFunc) (DBType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_accinfo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_accinfo_pre[hIndex].func; - preHookFunc(&fd, &account_id, &u_fd, &u_aid, &u_group, &map_fd, acc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_default_cmp_pre[hIndex].func; + retVal___ = preHookFunc(&type); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.fromchar_accinfo(fd, account_id, u_fd, u_aid, u_group, map_fd, acc); + retVal___ = HPMHooks.source.DB.default_cmp(type); } - if( HPMHooks.count.HP_login_fromchar_accinfo_post ) { - void (*postHookFunc) (int *fd, int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd, struct mmo_account *acc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_accinfo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_accinfo_post[hIndex].func; - postHookFunc(&fd, &account_id, &u_fd, &u_aid, &u_group, &map_fd, acc); + if( HPMHooks.count.HP_DB_default_cmp_post ) { + DBComparator (*postHookFunc) (DBComparator retVal___, DBType *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_default_cmp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type); } } - return; + return retVal___; } -void HP_login_fromchar_account(int fd, int account_id, struct mmo_account *acc) { +DBHasher HP_DB_default_hash(DBType type) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_account_pre ) { - void (*preHookFunc) (int *fd, int *account_id, struct mmo_account *acc); + DBHasher retVal___ = NULL; + if( HPMHooks.count.HP_DB_default_hash_pre ) { + DBHasher (*preHookFunc) (DBType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_account_pre[hIndex].func; - preHookFunc(&fd, &account_id, acc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_default_hash_pre[hIndex].func; + retVal___ = preHookFunc(&type); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.fromchar_account(fd, account_id, acc); + retVal___ = HPMHooks.source.DB.default_hash(type); } - if( HPMHooks.count.HP_login_fromchar_account_post ) { - void (*postHookFunc) (int *fd, int *account_id, struct mmo_account *acc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_account_post[hIndex].func; - postHookFunc(&fd, &account_id, acc); + if( HPMHooks.count.HP_DB_default_hash_post ) { + DBHasher (*postHookFunc) (DBHasher retVal___, DBType *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_default_hash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type); } } - return; + return retVal___; } -void HP_login_fromchar_account_update_other(int account_id, unsigned int state) { +DBReleaser HP_DB_default_release(DBType type, DBOptions options) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_account_update_other_pre ) { - void (*preHookFunc) (int *account_id, unsigned int *state); + DBReleaser retVal___ = NULL; + if( HPMHooks.count.HP_DB_default_release_pre ) { + DBReleaser (*preHookFunc) (DBType *type, DBOptions *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_update_other_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_account_update_other_pre[hIndex].func; - preHookFunc(&account_id, &state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_default_release_pre[hIndex].func; + retVal___ = preHookFunc(&type, &options); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.fromchar_account_update_other(account_id, state); + retVal___ = HPMHooks.source.DB.default_release(type, options); } - if( HPMHooks.count.HP_login_fromchar_account_update_other_post ) { - void (*postHookFunc) (int *account_id, unsigned int *state); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_update_other_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_account_update_other_post[hIndex].func; - postHookFunc(&account_id, &state); + if( HPMHooks.count.HP_DB_default_release_post ) { + DBReleaser (*postHookFunc) (DBReleaser retVal___, DBType *type, DBOptions *options); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_default_release_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type, &options); } } - return; + return retVal___; } -void HP_login_fromchar_auth_ack(int fd, int account_id, uint32 login_id1, uint32 login_id2, uint8 sex, int request_id, struct login_auth_node *node) { +DBReleaser HP_DB_custom_release(DBRelease which) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_auth_ack_pre ) { - void (*preHookFunc) (int *fd, int *account_id, uint32 *login_id1, uint32 *login_id2, uint8 *sex, int *request_id, struct login_auth_node *node); + DBReleaser retVal___ = NULL; + if( HPMHooks.count.HP_DB_custom_release_pre ) { + DBReleaser (*preHookFunc) (DBRelease *which); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_auth_ack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_auth_ack_pre[hIndex].func; - preHookFunc(&fd, &account_id, &login_id1, &login_id2, &sex, &request_id, node); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_custom_release_pre[hIndex].func; + retVal___ = preHookFunc(&which); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.fromchar_auth_ack(fd, account_id, login_id1, login_id2, sex, request_id, node); + retVal___ = HPMHooks.source.DB.custom_release(which); } - if( HPMHooks.count.HP_login_fromchar_auth_ack_post ) { - void (*postHookFunc) (int *fd, int *account_id, uint32 *login_id1, uint32 *login_id2, uint8 *sex, int *request_id, struct login_auth_node *node); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_auth_ack_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_auth_ack_post[hIndex].func; - postHookFunc(&fd, &account_id, &login_id1, &login_id2, &sex, &request_id, node); + if( HPMHooks.count.HP_DB_custom_release_post ) { + DBReleaser (*postHookFunc) (DBReleaser retVal___, DBRelease *which); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_custom_release_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &which); } } - return; + return retVal___; } -void HP_login_fromchar_ban(int account_id, time_t timestamp) { +DBMap* HP_DB_alloc(const char *file, const char *func, int line, DBType type, DBOptions options, unsigned short maxlen) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_ban_pre ) { - void (*preHookFunc) (int *account_id, time_t *timestamp); + DBMap* retVal___ = NULL; + if( HPMHooks.count.HP_DB_alloc_pre ) { + DBMap* (*preHookFunc) (const char *file, const char *func, int *line, DBType *type, DBOptions *options, unsigned short *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_ban_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_ban_pre[hIndex].func; - preHookFunc(&account_id, ×tamp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_alloc_pre[hIndex].func; + retVal___ = preHookFunc(file, func, &line, &type, &options, &maxlen); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.fromchar_ban(account_id, timestamp); + retVal___ = HPMHooks.source.DB.alloc(file, func, line, type, options, maxlen); } - if( HPMHooks.count.HP_login_fromchar_ban_post ) { - void (*postHookFunc) (int *account_id, time_t *timestamp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_ban_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_ban_post[hIndex].func; - postHookFunc(&account_id, ×tamp); + if( HPMHooks.count.HP_DB_alloc_post ) { + DBMap* (*postHookFunc) (DBMap* retVal___, const char *file, const char *func, int *line, DBType *type, DBOptions *options, unsigned short *maxlen); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_alloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, file, func, &line, &type, &options, &maxlen); } } - return; + return retVal___; } -void HP_login_fromchar_change_sex_other(int account_id, char sex) { +DBKey HP_DB_i2key(int key) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_change_sex_other_pre ) { - void (*preHookFunc) (int *account_id, char *sex); + DBKey retVal___; + memset(&retVal___, '\0', sizeof(DBKey)); + if( HPMHooks.count.HP_DB_i2key_pre ) { + DBKey (*preHookFunc) (int *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_change_sex_other_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_change_sex_other_pre[hIndex].func; - preHookFunc(&account_id, &sex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_i2key_pre[hIndex].func; + retVal___ = preHookFunc(&key); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.fromchar_change_sex_other(account_id, sex); + retVal___ = HPMHooks.source.DB.i2key(key); } - if( HPMHooks.count.HP_login_fromchar_change_sex_other_post ) { - void (*postHookFunc) (int *account_id, char *sex); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_change_sex_other_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_change_sex_other_post[hIndex].func; - postHookFunc(&account_id, &sex); + if( HPMHooks.count.HP_DB_i2key_post ) { + DBKey (*postHookFunc) (DBKey retVal___, int *key); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_i2key_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key); } } - return; + return retVal___; } -void HP_login_fromchar_pong(int fd) { +DBKey HP_DB_ui2key(unsigned int key) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_pong_pre ) { - void (*preHookFunc) (int *fd); + DBKey retVal___; + memset(&retVal___, '\0', sizeof(DBKey)); + if( HPMHooks.count.HP_DB_ui2key_pre ) { + DBKey (*preHookFunc) (unsigned int *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_pong_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_pong_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_ui2key_pre[hIndex].func; + retVal___ = preHookFunc(&key); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.fromchar_pong(fd); + retVal___ = HPMHooks.source.DB.ui2key(key); } - if( HPMHooks.count.HP_login_fromchar_pong_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_pong_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_pong_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_DB_ui2key_post ) { + DBKey (*postHookFunc) (DBKey retVal___, unsigned int *key); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_ui2key_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key); } } - return; + return retVal___; } -void HP_login_fromchar_parse_auth(int fd, int id, const char *ip) { +DBKey HP_DB_str2key(const char *key) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_auth_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + DBKey retVal___; + memset(&retVal___, '\0', sizeof(DBKey)); + if( HPMHooks.count.HP_DB_str2key_pre ) { + DBKey (*preHookFunc) (const char *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_auth_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_auth_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_str2key_pre[hIndex].func; + retVal___ = preHookFunc(key); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.fromchar_parse_auth(fd, id, ip); + retVal___ = HPMHooks.source.DB.str2key(key); } - if( HPMHooks.count.HP_login_fromchar_parse_auth_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_auth_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_auth_post[hIndex].func; - postHookFunc(&fd, &id, ip); + if( HPMHooks.count.HP_DB_str2key_post ) { + DBKey (*postHookFunc) (DBKey retVal___, const char *key); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_str2key_post[hIndex].func; + retVal___ = postHookFunc(retVal___, key); } } - return; + return retVal___; } -void HP_login_fromchar_parse_update_users(int fd, int id) { +DBKey HP_DB_i642key(int64 key) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_update_users_pre ) { - void (*preHookFunc) (int *fd, int *id); + DBKey retVal___; + memset(&retVal___, '\0', sizeof(DBKey)); + if( HPMHooks.count.HP_DB_i642key_pre ) { + DBKey (*preHookFunc) (int64 *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_users_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_update_users_pre[hIndex].func; - preHookFunc(&fd, &id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_i642key_pre[hIndex].func; + retVal___ = preHookFunc(&key); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.fromchar_parse_update_users(fd, id); + retVal___ = HPMHooks.source.DB.i642key(key); } - if( HPMHooks.count.HP_login_fromchar_parse_update_users_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_users_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_update_users_post[hIndex].func; - postHookFunc(&fd, &id); + if( HPMHooks.count.HP_DB_i642key_post ) { + DBKey (*postHookFunc) (DBKey retVal___, int64 *key); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_i642key_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key); } } - return; + return retVal___; } -void HP_login_fromchar_parse_request_change_email(int fd, int id, const char *ip) { +DBKey HP_DB_ui642key(uint64 key) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_request_change_email_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + DBKey retVal___; + memset(&retVal___, '\0', sizeof(DBKey)); + if( HPMHooks.count.HP_DB_ui642key_pre ) { + DBKey (*preHookFunc) (uint64 *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_change_email_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_request_change_email_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_ui642key_pre[hIndex].func; + retVal___ = preHookFunc(&key); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.fromchar_parse_request_change_email(fd, id, ip); + retVal___ = HPMHooks.source.DB.ui642key(key); } - if( HPMHooks.count.HP_login_fromchar_parse_request_change_email_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_change_email_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_request_change_email_post[hIndex].func; - postHookFunc(&fd, &id, ip); + if( HPMHooks.count.HP_DB_ui642key_post ) { + DBKey (*postHookFunc) (DBKey retVal___, uint64 *key); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_ui642key_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key); } } - return; + return retVal___; } -void HP_login_fromchar_parse_account_data(int fd, int id, const char *ip) { +DBData HP_DB_i2data(int data) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_account_data_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_DB_i2data_pre ) { + DBData (*preHookFunc) (int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_data_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_data_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_i2data_pre[hIndex].func; + retVal___ = preHookFunc(&data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.fromchar_parse_account_data(fd, id, ip); + retVal___ = HPMHooks.source.DB.i2data(data); } - if( HPMHooks.count.HP_login_fromchar_parse_account_data_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_data_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_data_post[hIndex].func; - postHookFunc(&fd, &id, ip); + if( HPMHooks.count.HP_DB_i2data_post ) { + DBData (*postHookFunc) (DBData retVal___, int *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_i2data_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &data); } } - return; + return retVal___; } -void HP_login_fromchar_parse_ping(int fd) { +DBData HP_DB_ui2data(unsigned int data) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_ping_pre ) { - void (*preHookFunc) (int *fd); + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_DB_ui2data_pre ) { + DBData (*preHookFunc) (unsigned int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ping_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_ping_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_ui2data_pre[hIndex].func; + retVal___ = preHookFunc(&data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.fromchar_parse_ping(fd); + retVal___ = HPMHooks.source.DB.ui2data(data); } - if( HPMHooks.count.HP_login_fromchar_parse_ping_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ping_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_ping_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_DB_ui2data_post ) { + DBData (*postHookFunc) (DBData retVal___, unsigned int *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_ui2data_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &data); } } - return; + return retVal___; } -void HP_login_fromchar_parse_change_email(int fd, int id, const char *ip) { +DBData HP_DB_ptr2data(void *data) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_change_email_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_DB_ptr2data_pre ) { + DBData (*preHookFunc) (void *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_email_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_email_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_ptr2data_pre[hIndex].func; + retVal___ = preHookFunc(data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.fromchar_parse_change_email(fd, id, ip); + retVal___ = HPMHooks.source.DB.ptr2data(data); } - if( HPMHooks.count.HP_login_fromchar_parse_change_email_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_email_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_email_post[hIndex].func; - postHookFunc(&fd, &id, ip); + if( HPMHooks.count.HP_DB_ptr2data_post ) { + DBData (*postHookFunc) (DBData retVal___, void *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_ptr2data_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); } } - return; + return retVal___; } -void HP_login_fromchar_parse_account_update(int fd, int id, const char *ip) { +int HP_DB_data2i(DBData *data) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_account_update_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + int retVal___ = 0; + if( HPMHooks.count.HP_DB_data2i_pre ) { + int (*preHookFunc) (DBData *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_update_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_update_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_data2i_pre[hIndex].func; + retVal___ = preHookFunc(data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.fromchar_parse_account_update(fd, id, ip); + retVal___ = HPMHooks.source.DB.data2i(data); } - if( HPMHooks.count.HP_login_fromchar_parse_account_update_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_update_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_update_post[hIndex].func; - postHookFunc(&fd, &id, ip); + if( HPMHooks.count.HP_DB_data2i_post ) { + int (*postHookFunc) (int retVal___, DBData *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_data2i_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); } } - return; + return retVal___; } -void HP_login_fromchar_parse_ban(int fd, int id, const char *ip) { +unsigned int HP_DB_data2ui(DBData *data) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_ban_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_DB_data2ui_pre ) { + unsigned int (*preHookFunc) (DBData *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ban_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_ban_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_data2ui_pre[hIndex].func; + retVal___ = preHookFunc(data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.fromchar_parse_ban(fd, id, ip); + retVal___ = HPMHooks.source.DB.data2ui(data); } - if( HPMHooks.count.HP_login_fromchar_parse_ban_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ban_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_ban_post[hIndex].func; - postHookFunc(&fd, &id, ip); + if( HPMHooks.count.HP_DB_data2ui_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, DBData *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_data2ui_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); } } - return; + return retVal___; } -void HP_login_fromchar_parse_change_sex(int fd, int id, const char *ip) { +void* HP_DB_data2ptr(DBData *data) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_change_sex_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + void* retVal___ = NULL; + if( HPMHooks.count.HP_DB_data2ptr_pre ) { + void* (*preHookFunc) (DBData *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_sex_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_sex_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_data2ptr_pre[hIndex].func; + retVal___ = preHookFunc(data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.fromchar_parse_change_sex(fd, id, ip); + retVal___ = HPMHooks.source.DB.data2ptr(data); } - if( HPMHooks.count.HP_login_fromchar_parse_change_sex_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_sex_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_sex_post[hIndex].func; - postHookFunc(&fd, &id, ip); + if( HPMHooks.count.HP_DB_data2ptr_post ) { + void* (*postHookFunc) (void* retVal___, DBData *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_data2ptr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); } } - return; + return retVal___; } -void HP_login_fromchar_parse_account_reg2(int fd, int id, const char *ip) { +void HP_DB_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_account_reg2_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + if( HPMHooks.count.HP_DB_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_reg2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_reg2_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -805,25 +808,25 @@ void HP_login_fromchar_parse_account_reg2(int fd, int id, const char *ip) { } } { - HPMHooks.source.login.fromchar_parse_account_reg2(fd, id, ip); + HPMHooks.source.DB.init(); } - if( HPMHooks.count.HP_login_fromchar_parse_account_reg2_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_reg2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_reg2_post[hIndex].func; - postHookFunc(&fd, &id, ip); + if( HPMHooks.count.HP_DB_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_init_post[hIndex].func; + postHookFunc(); } } return; } -void HP_login_fromchar_parse_unban(int fd, int id, const char *ip) { +void HP_DB_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_unban_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + if( HPMHooks.count.HP_DB_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_unban_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_unban_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -831,25 +834,53 @@ void HP_login_fromchar_parse_unban(int fd, int id, const char *ip) { } } { - HPMHooks.source.login.fromchar_parse_unban(fd, id, ip); + HPMHooks.source.DB.final(); } - if( HPMHooks.count.HP_login_fromchar_parse_unban_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_unban_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_unban_post[hIndex].func; - postHookFunc(&fd, &id, ip); + if( HPMHooks.count.HP_DB_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_final_post[hIndex].func; + postHookFunc(); } } return; } -void HP_login_fromchar_parse_account_online(int fd, int id) { +/* libconfig */ +int HP_libconfig_read(config_t *config, FILE *stream) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_account_online_pre ) { - void (*preHookFunc) (int *fd, int *id); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_read_pre ) { + int (*preHookFunc) (config_t *config, FILE *stream); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_online_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_online_pre[hIndex].func; - preHookFunc(&fd, &id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_read_pre[hIndex].func; + retVal___ = preHookFunc(config, stream); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.read(config, stream); + } + if( HPMHooks.count.HP_libconfig_read_post ) { + int (*postHookFunc) (int retVal___, config_t *config, FILE *stream); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, stream); + } + } + return retVal___; +} +void HP_libconfig_write(const config_t *config, FILE *stream) { + int hIndex = 0; + if( HPMHooks.count.HP_libconfig_write_pre ) { + void (*preHookFunc) (const config_t *config, FILE *stream); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_write_pre[hIndex].func; + preHookFunc(config, stream); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -857,25 +888,25 @@ void HP_login_fromchar_parse_account_online(int fd, int id) { } } { - HPMHooks.source.login.fromchar_parse_account_online(fd, id); + HPMHooks.source.libconfig.write(config, stream); } - if( HPMHooks.count.HP_login_fromchar_parse_account_online_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_online_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_online_post[hIndex].func; - postHookFunc(&fd, &id); + if( HPMHooks.count.HP_libconfig_write_post ) { + void (*postHookFunc) (const config_t *config, FILE *stream); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_write_post[hIndex].func; + postHookFunc(config, stream); } } return; } -void HP_login_fromchar_parse_account_offline(int fd) { +void HP_libconfig_set_auto_convert(config_t *config, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_account_offline_pre ) { - void (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_libconfig_set_auto_convert_pre ) { + void (*preHookFunc) (config_t *config, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_offline_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_offline_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_auto_convert_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_set_auto_convert_pre[hIndex].func; + preHookFunc(config, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -883,25 +914,133 @@ void HP_login_fromchar_parse_account_offline(int fd) { } } { - HPMHooks.source.login.fromchar_parse_account_offline(fd); + HPMHooks.source.libconfig.set_auto_convert(config, flag); } - if( HPMHooks.count.HP_login_fromchar_parse_account_offline_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_offline_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_offline_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_libconfig_set_auto_convert_post ) { + void (*postHookFunc) (config_t *config, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_auto_convert_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_set_auto_convert_post[hIndex].func; + postHookFunc(config, &flag); } } return; } -void HP_login_fromchar_parse_online_accounts(int fd, int id) { +int HP_libconfig_get_auto_convert(const config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_online_accounts_pre ) { - void (*preHookFunc) (int *fd, int *id); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_get_auto_convert_pre ) { + int (*preHookFunc) (const config_t *config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_online_accounts_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_online_accounts_pre[hIndex].func; - preHookFunc(&fd, &id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_auto_convert_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_get_auto_convert_pre[hIndex].func; + retVal___ = preHookFunc(config); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.get_auto_convert(config); + } + if( HPMHooks.count.HP_libconfig_get_auto_convert_post ) { + int (*postHookFunc) (int retVal___, const config_t *config); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_auto_convert_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_get_auto_convert_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config); + } + } + return retVal___; +} +int HP_libconfig_read_string(config_t *config, const char *str) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_read_string_pre ) { + int (*preHookFunc) (config_t *config, const char *str); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_read_string_pre[hIndex].func; + retVal___ = preHookFunc(config, str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.read_string(config, str); + } + if( HPMHooks.count.HP_libconfig_read_string_post ) { + int (*postHookFunc) (int retVal___, config_t *config, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_read_string_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, str); + } + } + return retVal___; +} +int HP_libconfig_read_file_src(config_t *config, const char *filename) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_read_file_src_pre ) { + int (*preHookFunc) (config_t *config, const char *filename); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_read_file_src_pre[hIndex].func; + retVal___ = preHookFunc(config, filename); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.read_file_src(config, filename); + } + if( HPMHooks.count.HP_libconfig_read_file_src_post ) { + int (*postHookFunc) (int retVal___, config_t *config, const char *filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_read_file_src_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filename); + } + } + return retVal___; +} +int HP_libconfig_write_file(config_t *config, const char *filename) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_write_file_pre ) { + int (*preHookFunc) (config_t *config, const char *filename); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_write_file_pre[hIndex].func; + retVal___ = preHookFunc(config, filename); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.write_file(config, filename); + } + if( HPMHooks.count.HP_libconfig_write_file_post ) { + int (*postHookFunc) (int retVal___, config_t *config, const char *filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_write_file_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filename); + } + } + return retVal___; +} +void HP_libconfig_set_destructor(config_t *config, void ( *destructor ) (void *)) { + int hIndex = 0; + if( HPMHooks.count.HP_libconfig_set_destructor_pre ) { + void (*preHookFunc) (config_t *config, void ( *destructor ) (void *)); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_set_destructor_pre[hIndex].func; + preHookFunc(config, destructor); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -909,25 +1048,25 @@ void HP_login_fromchar_parse_online_accounts(int fd, int id) { } } { - HPMHooks.source.login.fromchar_parse_online_accounts(fd, id); + HPMHooks.source.libconfig.set_destructor(config, destructor); } - if( HPMHooks.count.HP_login_fromchar_parse_online_accounts_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_online_accounts_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_online_accounts_post[hIndex].func; - postHookFunc(&fd, &id); + if( HPMHooks.count.HP_libconfig_set_destructor_post ) { + void (*postHookFunc) (config_t *config, void ( *destructor ) (void *)); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_set_destructor_post[hIndex].func; + postHookFunc(config, destructor); } } return; } -void HP_login_fromchar_parse_request_account_reg2(int fd) { +void HP_libconfig_set_include_dir(config_t *config, const char *include_dir) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_pre ) { - void (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_libconfig_set_include_dir_pre ) { + void (*preHookFunc) (config_t *config, const char *include_dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_request_account_reg2_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_pre[hIndex].func; + preHookFunc(config, include_dir); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -935,25 +1074,25 @@ void HP_login_fromchar_parse_request_account_reg2(int fd) { } } { - HPMHooks.source.login.fromchar_parse_request_account_reg2(fd); + HPMHooks.source.libconfig.set_include_dir(config, include_dir); } - if( HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_request_account_reg2_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_libconfig_set_include_dir_post ) { + void (*postHookFunc) (config_t *config, const char *include_dir); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_post[hIndex].func; + postHookFunc(config, include_dir); } } return; } -void HP_login_fromchar_parse_update_wan_ip(int fd, int id) { +void HP_libconfig_init(config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_pre ) { - void (*preHookFunc) (int *fd, int *id); + if( HPMHooks.count.HP_libconfig_init_pre ) { + void (*preHookFunc) (config_t *config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_update_wan_ip_pre[hIndex].func; - preHookFunc(&fd, &id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_init_pre[hIndex].func; + preHookFunc(config); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -961,25 +1100,25 @@ void HP_login_fromchar_parse_update_wan_ip(int fd, int id) { } } { - HPMHooks.source.login.fromchar_parse_update_wan_ip(fd, id); + HPMHooks.source.libconfig.init(config); } - if( HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_update_wan_ip_post[hIndex].func; - postHookFunc(&fd, &id); + if( HPMHooks.count.HP_libconfig_init_post ) { + void (*postHookFunc) (config_t *config); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_init_post[hIndex].func; + postHookFunc(config); } } return; } -void HP_login_fromchar_parse_all_offline(int fd, int id) { +void HP_libconfig_destroy(config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_all_offline_pre ) { - void (*preHookFunc) (int *fd, int *id); + if( HPMHooks.count.HP_libconfig_destroy_pre ) { + void (*preHookFunc) (config_t *config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_all_offline_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_all_offline_pre[hIndex].func; - preHookFunc(&fd, &id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_destroy_pre[hIndex].func; + preHookFunc(config); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -987,25 +1126,6054 @@ void HP_login_fromchar_parse_all_offline(int fd, int id) { } } { - HPMHooks.source.login.fromchar_parse_all_offline(fd, id); + HPMHooks.source.libconfig.destroy(config); } - if( HPMHooks.count.HP_login_fromchar_parse_all_offline_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_all_offline_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_all_offline_post[hIndex].func; - postHookFunc(&fd, &id); + if( HPMHooks.count.HP_libconfig_destroy_post ) { + void (*postHookFunc) (config_t *config); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_destroy_post[hIndex].func; + postHookFunc(config); } } return; } -void HP_login_fromchar_parse_change_pincode(int fd) { +int HP_libconfig_setting_get_int(const config_setting_t *setting) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_change_pincode_pre ) { - void (*preHookFunc) (int *fd); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_int_pre ) { + int (*preHookFunc) (const config_setting_t *setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_pincode_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_pincode_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_pre[hIndex].func; + retVal___ = preHookFunc(setting); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_int(setting); + } + if( HPMHooks.count.HP_libconfig_setting_get_int_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); + } + } + return retVal___; +} +long long HP_libconfig_setting_get_int64(const config_setting_t *setting) { + int hIndex = 0; + long long retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_int64_pre ) { + long long (*preHookFunc) (const config_setting_t *setting); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_pre[hIndex].func; + retVal___ = preHookFunc(setting); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_int64(setting); + } + if( HPMHooks.count.HP_libconfig_setting_get_int64_post ) { + long long (*postHookFunc) (long long retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); + } + } + return retVal___; +} +double HP_libconfig_setting_get_float(const config_setting_t *setting) { + int hIndex = 0; + double retVal___ = 0.; + if( HPMHooks.count.HP_libconfig_setting_get_float_pre ) { + double (*preHookFunc) (const config_setting_t *setting); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_pre[hIndex].func; + retVal___ = preHookFunc(setting); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_float(setting); + } + if( HPMHooks.count.HP_libconfig_setting_get_float_post ) { + double (*postHookFunc) (double retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); + } + } + return retVal___; +} +int HP_libconfig_setting_get_bool(const config_setting_t *setting) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_bool_pre ) { + int (*preHookFunc) (const config_setting_t *setting); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_pre[hIndex].func; + retVal___ = preHookFunc(setting); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_bool(setting); + } + if( HPMHooks.count.HP_libconfig_setting_get_bool_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); + } + } + return retVal___; +} +const char* HP_libconfig_setting_get_string(const config_setting_t *setting) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_get_string_pre ) { + const char* (*preHookFunc) (const config_setting_t *setting); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_pre[hIndex].func; + retVal___ = preHookFunc(setting); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_string(setting); + } + if( HPMHooks.count.HP_libconfig_setting_get_string_post ) { + const char* (*postHookFunc) (const char* retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); + } + } + return retVal___; +} +int HP_libconfig_setting_lookup_int(const config_setting_t *setting, const char *name, int *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_lookup_int_pre ) { + int (*preHookFunc) (const config_setting_t *setting, const char *name, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_pre[hIndex].func; + retVal___ = preHookFunc(setting, name, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_lookup_int(setting, name, value); + } + if( HPMHooks.count.HP_libconfig_setting_lookup_int_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name, value); + } + } + return retVal___; +} +int HP_libconfig_setting_lookup_int64(const config_setting_t *setting, const char *name, long long *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_lookup_int64_pre ) { + int (*preHookFunc) (const config_setting_t *setting, const char *name, long long *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_pre[hIndex].func; + retVal___ = preHookFunc(setting, name, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_lookup_int64(setting, name, value); + } + if( HPMHooks.count.HP_libconfig_setting_lookup_int64_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, long long *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name, value); + } + } + return retVal___; +} +int HP_libconfig_setting_lookup_float(const config_setting_t *setting, const char *name, double *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_lookup_float_pre ) { + int (*preHookFunc) (const config_setting_t *setting, const char *name, double *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_pre[hIndex].func; + retVal___ = preHookFunc(setting, name, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_lookup_float(setting, name, value); + } + if( HPMHooks.count.HP_libconfig_setting_lookup_float_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, double *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name, value); + } + } + return retVal___; +} +int HP_libconfig_setting_lookup_bool(const config_setting_t *setting, const char *name, int *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_lookup_bool_pre ) { + int (*preHookFunc) (const config_setting_t *setting, const char *name, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_pre[hIndex].func; + retVal___ = preHookFunc(setting, name, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_lookup_bool(setting, name, value); + } + if( HPMHooks.count.HP_libconfig_setting_lookup_bool_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name, value); + } + } + return retVal___; +} +int HP_libconfig_setting_lookup_string(const config_setting_t *setting, const char *name, const char **value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_lookup_string_pre ) { + int (*preHookFunc) (const config_setting_t *setting, const char *name, const char **value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_pre[hIndex].func; + retVal___ = preHookFunc(setting, name, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_lookup_string(setting, name, value); + } + if( HPMHooks.count.HP_libconfig_setting_lookup_string_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, const char **value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name, value); + } + } + return retVal___; +} +int HP_libconfig_setting_set_int(config_setting_t *setting, int value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_set_int_pre ) { + int (*preHookFunc) (config_setting_t *setting, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_pre[hIndex].func; + retVal___ = preHookFunc(setting, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_int(setting, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_int_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &value); + } + } + return retVal___; +} +int HP_libconfig_setting_set_int64(config_setting_t *setting, long long value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_set_int64_pre ) { + int (*preHookFunc) (config_setting_t *setting, long long *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_pre[hIndex].func; + retVal___ = preHookFunc(setting, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_int64(setting, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_int64_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, long long *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &value); + } + } + return retVal___; +} +int HP_libconfig_setting_set_float(config_setting_t *setting, double value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_set_float_pre ) { + int (*preHookFunc) (config_setting_t *setting, double *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_pre[hIndex].func; + retVal___ = preHookFunc(setting, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_float(setting, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_float_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, double *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &value); + } + } + return retVal___; +} +int HP_libconfig_setting_set_bool(config_setting_t *setting, int value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_set_bool_pre ) { + int (*preHookFunc) (config_setting_t *setting, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_pre[hIndex].func; + retVal___ = preHookFunc(setting, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_bool(setting, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_bool_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &value); + } + } + return retVal___; +} +int HP_libconfig_setting_set_string(config_setting_t *setting, const char *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_set_string_pre ) { + int (*preHookFunc) (config_setting_t *setting, const char *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_pre[hIndex].func; + retVal___ = preHookFunc(setting, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_string(setting, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_string_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, const char *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, value); + } + } + return retVal___; +} +int HP_libconfig_setting_set_format(config_setting_t *setting, short format) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_set_format_pre ) { + int (*preHookFunc) (config_setting_t *setting, short *format); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_pre[hIndex].func; + retVal___ = preHookFunc(setting, &format); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_format(setting, format); + } + if( HPMHooks.count.HP_libconfig_setting_set_format_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, short *format); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &format); + } + } + return retVal___; +} +short HP_libconfig_setting_get_format(const config_setting_t *setting) { + int hIndex = 0; + short retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_format_pre ) { + short (*preHookFunc) (const config_setting_t *setting); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_pre[hIndex].func; + retVal___ = preHookFunc(setting); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_format(setting); + } + if( HPMHooks.count.HP_libconfig_setting_get_format_post ) { + short (*postHookFunc) (short retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); + } + } + return retVal___; +} +int HP_libconfig_setting_get_int_elem(const config_setting_t *setting, int idx) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_int_elem_pre ) { + int (*preHookFunc) (const config_setting_t *setting, int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_int_elem(setting, idx); + } + if( HPMHooks.count.HP_libconfig_setting_get_int_elem_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); + } + } + return retVal___; +} +long long HP_libconfig_setting_get_int64_elem(const config_setting_t *setting, int idx) { + int hIndex = 0; + long long retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre ) { + long long (*preHookFunc) (const config_setting_t *setting, int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_int64_elem(setting, idx); + } + if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_post ) { + long long (*postHookFunc) (long long retVal___, const config_setting_t *setting, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); + } + } + return retVal___; +} +double HP_libconfig_setting_get_float_elem(const config_setting_t *setting, int idx) { + int hIndex = 0; + double retVal___ = 0.; + if( HPMHooks.count.HP_libconfig_setting_get_float_elem_pre ) { + double (*preHookFunc) (const config_setting_t *setting, int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_float_elem(setting, idx); + } + if( HPMHooks.count.HP_libconfig_setting_get_float_elem_post ) { + double (*postHookFunc) (double retVal___, const config_setting_t *setting, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); + } + } + return retVal___; +} +int HP_libconfig_setting_get_bool_elem(const config_setting_t *setting, int idx) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre ) { + int (*preHookFunc) (const config_setting_t *setting, int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_bool_elem(setting, idx); + } + if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); + } + } + return retVal___; +} +const char* HP_libconfig_setting_get_string_elem(const config_setting_t *setting, int idx) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_get_string_elem_pre ) { + const char* (*preHookFunc) (const config_setting_t *setting, int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_string_elem(setting, idx); + } + if( HPMHooks.count.HP_libconfig_setting_get_string_elem_post ) { + const char* (*postHookFunc) (const char* retVal___, const config_setting_t *setting, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_setting_set_int_elem(config_setting_t *setting, int idx, int value) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_set_int_elem_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_int_elem(setting, idx, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_int_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx, &value); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_setting_set_int64_elem(config_setting_t *setting, int idx, long long value) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, long long *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_int64_elem(setting, idx, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, long long *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx, &value); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_setting_set_float_elem(config_setting_t *setting, int idx, double value) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_set_float_elem_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, double *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_float_elem(setting, idx, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_float_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, double *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx, &value); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_setting_set_bool_elem(config_setting_t *setting, int idx, int value) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_bool_elem(setting, idx, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx, &value); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_setting_set_string_elem(config_setting_t *setting, int idx, const char *value) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_set_string_elem_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, const char *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_set_string_elem(setting, idx, value); + } + if( HPMHooks.count.HP_libconfig_setting_set_string_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, const char *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx, value); + } + } + return retVal___; +} +int HP_libconfig_setting_index(const config_setting_t *setting) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_index_pre ) { + int (*preHookFunc) (const config_setting_t *setting); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_index_pre[hIndex].func; + retVal___ = preHookFunc(setting); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_index(setting); + } + if( HPMHooks.count.HP_libconfig_setting_index_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_index_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); + } + } + return retVal___; +} +int HP_libconfig_setting_length(const config_setting_t *setting) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_length_pre ) { + int (*preHookFunc) (const config_setting_t *setting); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_length_pre[hIndex].func; + retVal___ = preHookFunc(setting); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_length(setting); + } + if( HPMHooks.count.HP_libconfig_setting_length_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_length_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_setting_get_elem(const config_setting_t *setting, unsigned int idx) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_get_elem_pre ) { + config_setting_t* (*preHookFunc) (const config_setting_t *setting, unsigned int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_elem(setting, idx); + } + if( HPMHooks.count.HP_libconfig_setting_get_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_setting_t *setting, unsigned int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_setting_get_member(const config_setting_t *setting, const char *name) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_get_member_pre ) { + config_setting_t* (*preHookFunc) (const config_setting_t *setting, const char *name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_pre[hIndex].func; + retVal___ = preHookFunc(setting, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_get_member(setting, name); + } + if( HPMHooks.count.HP_libconfig_setting_get_member_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_setting_t *setting, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_setting_add(config_setting_t *parent, const char *name, int type) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_add_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *parent, const char *name, int *type); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_add_pre[hIndex].func; + retVal___ = preHookFunc(parent, name, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_add(parent, name, type); + } + if( HPMHooks.count.HP_libconfig_setting_add_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *parent, const char *name, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, parent, name, &type); + } + } + return retVal___; +} +int HP_libconfig_setting_remove(config_setting_t *parent, const char *name) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_remove_pre ) { + int (*preHookFunc) (config_setting_t *parent, const char *name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_pre[hIndex].func; + retVal___ = preHookFunc(parent, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_remove(parent, name); + } + if( HPMHooks.count.HP_libconfig_setting_remove_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *parent, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_post[hIndex].func; + retVal___ = postHookFunc(retVal___, parent, name); + } + } + return retVal___; +} +int HP_libconfig_setting_remove_elem(config_setting_t *parent, unsigned int idx) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_remove_elem_pre ) { + int (*preHookFunc) (config_setting_t *parent, unsigned int *idx); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_pre[hIndex].func; + retVal___ = preHookFunc(parent, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_remove_elem(parent, idx); + } + if( HPMHooks.count.HP_libconfig_setting_remove_elem_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *parent, unsigned int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, parent, &idx); + } + } + return retVal___; +} +void HP_libconfig_setting_set_hook(config_setting_t *setting, void *hook) { + int hIndex = 0; + if( HPMHooks.count.HP_libconfig_setting_set_hook_pre ) { + void (*preHookFunc) (config_setting_t *setting, void *hook); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_pre[hIndex].func; + preHookFunc(setting, hook); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.setting_set_hook(setting, hook); + } + if( HPMHooks.count.HP_libconfig_setting_set_hook_post ) { + void (*postHookFunc) (config_setting_t *setting, void *hook); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_post[hIndex].func; + postHookFunc(setting, hook); + } + } + return; +} +config_setting_t* HP_libconfig_lookup(const config_t *config, const char *filepath) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_lookup_pre ) { + config_setting_t* (*preHookFunc) (const config_t *config, const char *filepath); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.lookup(config, filepath); + } + if( HPMHooks.count.HP_libconfig_lookup_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_t *config, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath); + } + } + return retVal___; +} +config_setting_t* HP_libconfig_lookup_from(config_setting_t *setting, const char *filepath) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_lookup_from_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, const char *filepath); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_from_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_from_pre[hIndex].func; + retVal___ = preHookFunc(setting, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.lookup_from(setting, filepath); + } + if( HPMHooks.count.HP_libconfig_lookup_from_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_from_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_from_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, filepath); + } + } + return retVal___; +} +int HP_libconfig_lookup_int(const config_t *config, const char *filepath, int *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_lookup_int_pre ) { + int (*preHookFunc) (const config_t *config, const char *filepath, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_int_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.lookup_int(config, filepath, value); + } + if( HPMHooks.count.HP_libconfig_lookup_int_post ) { + int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_int_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath, value); + } + } + return retVal___; +} +int HP_libconfig_lookup_int64(const config_t *config, const char *filepath, long long *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_lookup_int64_pre ) { + int (*preHookFunc) (const config_t *config, const char *filepath, long long *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.lookup_int64(config, filepath, value); + } + if( HPMHooks.count.HP_libconfig_lookup_int64_post ) { + int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, long long *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath, value); + } + } + return retVal___; +} +int HP_libconfig_lookup_float(const config_t *config, const char *filepath, double *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_lookup_float_pre ) { + int (*preHookFunc) (const config_t *config, const char *filepath, double *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_float_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.lookup_float(config, filepath, value); + } + if( HPMHooks.count.HP_libconfig_lookup_float_post ) { + int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, double *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_float_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath, value); + } + } + return retVal___; +} +int HP_libconfig_lookup_bool(const config_t *config, const char *filepath, int *value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_lookup_bool_pre ) { + int (*preHookFunc) (const config_t *config, const char *filepath, int *value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.lookup_bool(config, filepath, value); + } + if( HPMHooks.count.HP_libconfig_lookup_bool_post ) { + int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath, value); + } + } + return retVal___; +} +int HP_libconfig_lookup_string(const config_t *config, const char *filepath, const char **value) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_lookup_string_pre ) { + int (*preHookFunc) (const config_t *config, const char *filepath, const char **value); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_string_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.lookup_string(config, filepath, value); + } + if( HPMHooks.count.HP_libconfig_lookup_string_post ) { + int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, const char **value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_string_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath, value); + } + } + return retVal___; +} +int HP_libconfig_read_file(config_t *config, const char *config_filename) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_read_file_pre ) { + int (*preHookFunc) (config_t *config, const char *config_filename); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_read_file_pre[hIndex].func; + retVal___ = preHookFunc(config, config_filename); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.read_file(config, config_filename); + } + if( HPMHooks.count.HP_libconfig_read_file_post ) { + int (*postHookFunc) (int retVal___, config_t *config, const char *config_filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_read_file_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, config_filename); + } + } + return retVal___; +} +void HP_libconfig_setting_copy_simple(config_setting_t *parent, const config_setting_t *src) { + int hIndex = 0; + if( HPMHooks.count.HP_libconfig_setting_copy_simple_pre ) { + void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_pre[hIndex].func; + preHookFunc(parent, src); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.setting_copy_simple(parent, src); + } + if( HPMHooks.count.HP_libconfig_setting_copy_simple_post ) { + void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_post[hIndex].func; + postHookFunc(parent, src); + } + } + return; +} +void HP_libconfig_setting_copy_elem(config_setting_t *parent, const config_setting_t *src) { + int hIndex = 0; + if( HPMHooks.count.HP_libconfig_setting_copy_elem_pre ) { + void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_pre[hIndex].func; + preHookFunc(parent, src); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.setting_copy_elem(parent, src); + } + if( HPMHooks.count.HP_libconfig_setting_copy_elem_post ) { + void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_post[hIndex].func; + postHookFunc(parent, src); + } + } + return; +} +void HP_libconfig_setting_copy_aggregate(config_setting_t *parent, const config_setting_t *src) { + int hIndex = 0; + if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre ) { + void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_pre[hIndex].func; + preHookFunc(parent, src); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.setting_copy_aggregate(parent, src); + } + if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_post ) { + void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_post[hIndex].func; + postHookFunc(parent, src); + } + } + return; +} +int HP_libconfig_setting_copy(config_setting_t *parent, const config_setting_t *src) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_copy_pre ) { + int (*preHookFunc) (config_setting_t *parent, const config_setting_t *src); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_pre[hIndex].func; + retVal___ = preHookFunc(parent, src); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_copy(parent, src); + } + if( HPMHooks.count.HP_libconfig_setting_copy_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *parent, const config_setting_t *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, parent, src); + } + } + return retVal___; +} +/* login */ +int HP_login_mmo_auth(struct login_session_data *sd, bool isServer) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_login_mmo_auth_pre ) { + int (*preHookFunc) (struct login_session_data *sd, bool *isServer); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_mmo_auth_pre[hIndex].func; + retVal___ = preHookFunc(sd, &isServer); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.mmo_auth(sd, isServer); + } + if( HPMHooks.count.HP_login_mmo_auth_post ) { + int (*postHookFunc) (int retVal___, struct login_session_data *sd, bool *isServer); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_mmo_auth_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &isServer); + } + } + return retVal___; +} +int HP_login_mmo_auth_new(const char *userid, const char *pass, const char sex, const char *last_ip) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_login_mmo_auth_new_pre ) { + int (*preHookFunc) (const char *userid, const char *pass, const char *sex, const char *last_ip); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_new_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_mmo_auth_new_pre[hIndex].func; + retVal___ = preHookFunc(userid, pass, &sex, last_ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.mmo_auth_new(userid, pass, sex, last_ip); + } + if( HPMHooks.count.HP_login_mmo_auth_new_post ) { + int (*postHookFunc) (int retVal___, const char *userid, const char *pass, const char *sex, const char *last_ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_new_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_mmo_auth_new_post[hIndex].func; + retVal___ = postHookFunc(retVal___, userid, pass, &sex, last_ip); + } + } + return retVal___; +} +int HP_login_waiting_disconnect_timer(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_login_waiting_disconnect_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_waiting_disconnect_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_waiting_disconnect_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.waiting_disconnect_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_login_waiting_disconnect_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_waiting_disconnect_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_waiting_disconnect_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +DBData HP_login_create_online_user(DBKey key, va_list args) { + int hIndex = 0; + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_login_create_online_user_pre ) { + DBData (*preHookFunc) (DBKey *key, va_list args); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_create_online_user_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_login_create_online_user_pre[hIndex].func; + retVal___ = preHookFunc(&key, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.login.create_online_user(key, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_login_create_online_user_post ) { + DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_create_online_user_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_login_create_online_user_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +struct online_login_data* HP_login_add_online_user(int char_server, int account_id) { + int hIndex = 0; + struct online_login_data* retVal___ = NULL; + if( HPMHooks.count.HP_login_add_online_user_pre ) { + struct online_login_data* (*preHookFunc) (int *char_server, int *account_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_add_online_user_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_add_online_user_pre[hIndex].func; + retVal___ = preHookFunc(&char_server, &account_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.add_online_user(char_server, account_id); + } + if( HPMHooks.count.HP_login_add_online_user_post ) { + struct online_login_data* (*postHookFunc) (struct online_login_data* retVal___, int *char_server, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_add_online_user_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_add_online_user_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_server, &account_id); + } + } + return retVal___; +} +void HP_login_remove_online_user(int account_id) { + int hIndex = 0; + if( HPMHooks.count.HP_login_remove_online_user_pre ) { + void (*preHookFunc) (int *account_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_remove_online_user_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_remove_online_user_pre[hIndex].func; + preHookFunc(&account_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.remove_online_user(account_id); + } + if( HPMHooks.count.HP_login_remove_online_user_post ) { + void (*postHookFunc) (int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_remove_online_user_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_remove_online_user_post[hIndex].func; + postHookFunc(&account_id); + } + } + return; +} +int HP_login_online_db_setoffline(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_login_online_db_setoffline_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_db_setoffline_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_login_online_db_setoffline_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.login.online_db_setoffline(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_login_online_db_setoffline_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_db_setoffline_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_login_online_db_setoffline_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_login_online_data_cleanup_sub(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_login_online_data_cleanup_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_login_online_data_cleanup_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.login.online_data_cleanup_sub(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_login_online_data_cleanup_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_login_online_data_cleanup_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_login_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_login_online_data_cleanup_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_online_data_cleanup_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.online_data_cleanup(tid, tick, id, data); + } + if( HPMHooks.count.HP_login_online_data_cleanup_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_online_data_cleanup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_login_sync_ip_addresses(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_login_sync_ip_addresses_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_sync_ip_addresses_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_sync_ip_addresses_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.sync_ip_addresses(tid, tick, id, data); + } + if( HPMHooks.count.HP_login_sync_ip_addresses_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_sync_ip_addresses_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_sync_ip_addresses_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +bool HP_login_check_encrypted(const char *str1, const char *str2, const char *passwd) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_login_check_encrypted_pre ) { + bool (*preHookFunc) (const char *str1, const char *str2, const char *passwd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_check_encrypted_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_check_encrypted_pre[hIndex].func; + retVal___ = preHookFunc(str1, str2, passwd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.check_encrypted(str1, str2, passwd); + } + if( HPMHooks.count.HP_login_check_encrypted_post ) { + bool (*postHookFunc) (bool retVal___, const char *str1, const char *str2, const char *passwd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_check_encrypted_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_check_encrypted_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str1, str2, passwd); + } + } + return retVal___; +} +bool HP_login_check_password(const char *md5key, int passwdenc, const char *passwd, const char *refpass) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_login_check_password_pre ) { + bool (*preHookFunc) (const char *md5key, int *passwdenc, const char *passwd, const char *refpass); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_check_password_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_check_password_pre[hIndex].func; + retVal___ = preHookFunc(md5key, &passwdenc, passwd, refpass); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.check_password(md5key, passwdenc, passwd, refpass); + } + if( HPMHooks.count.HP_login_check_password_post ) { + bool (*postHookFunc) (bool retVal___, const char *md5key, int *passwdenc, const char *passwd, const char *refpass); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_check_password_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_check_password_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md5key, &passwdenc, passwd, refpass); + } + } + return retVal___; +} +uint32 HP_login_lan_subnet_check(uint32 ip) { + int hIndex = 0; + uint32 retVal___ = 0; + if( HPMHooks.count.HP_login_lan_subnet_check_pre ) { + uint32 (*preHookFunc) (uint32 *ip); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnet_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_lan_subnet_check_pre[hIndex].func; + retVal___ = preHookFunc(&ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.lan_subnet_check(ip); + } + if( HPMHooks.count.HP_login_lan_subnet_check_post ) { + uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnet_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_lan_subnet_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip); + } + } + return retVal___; +} +void HP_login_fromchar_accinfo(int fd, int account_id, int u_fd, int u_aid, int u_group, int map_fd, struct mmo_account *acc) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_accinfo_pre ) { + void (*preHookFunc) (int *fd, int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd, struct mmo_account *acc); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_accinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_accinfo_pre[hIndex].func; + preHookFunc(&fd, &account_id, &u_fd, &u_aid, &u_group, &map_fd, acc); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_accinfo(fd, account_id, u_fd, u_aid, u_group, map_fd, acc); + } + if( HPMHooks.count.HP_login_fromchar_accinfo_post ) { + void (*postHookFunc) (int *fd, int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd, struct mmo_account *acc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_accinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_accinfo_post[hIndex].func; + postHookFunc(&fd, &account_id, &u_fd, &u_aid, &u_group, &map_fd, acc); + } + } + return; +} +void HP_login_fromchar_account(int fd, int account_id, struct mmo_account *acc) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_account_pre ) { + void (*preHookFunc) (int *fd, int *account_id, struct mmo_account *acc); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_account_pre[hIndex].func; + preHookFunc(&fd, &account_id, acc); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_account(fd, account_id, acc); + } + if( HPMHooks.count.HP_login_fromchar_account_post ) { + void (*postHookFunc) (int *fd, int *account_id, struct mmo_account *acc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_account_post[hIndex].func; + postHookFunc(&fd, &account_id, acc); + } + } + return; +} +void HP_login_fromchar_account_update_other(int account_id, unsigned int state) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_account_update_other_pre ) { + void (*preHookFunc) (int *account_id, unsigned int *state); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_update_other_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_account_update_other_pre[hIndex].func; + preHookFunc(&account_id, &state); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_account_update_other(account_id, state); + } + if( HPMHooks.count.HP_login_fromchar_account_update_other_post ) { + void (*postHookFunc) (int *account_id, unsigned int *state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_update_other_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_account_update_other_post[hIndex].func; + postHookFunc(&account_id, &state); + } + } + return; +} +void HP_login_fromchar_auth_ack(int fd, int account_id, uint32 login_id1, uint32 login_id2, uint8 sex, int request_id, struct login_auth_node *node) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_auth_ack_pre ) { + void (*preHookFunc) (int *fd, int *account_id, uint32 *login_id1, uint32 *login_id2, uint8 *sex, int *request_id, struct login_auth_node *node); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_auth_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_auth_ack_pre[hIndex].func; + preHookFunc(&fd, &account_id, &login_id1, &login_id2, &sex, &request_id, node); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_auth_ack(fd, account_id, login_id1, login_id2, sex, request_id, node); + } + if( HPMHooks.count.HP_login_fromchar_auth_ack_post ) { + void (*postHookFunc) (int *fd, int *account_id, uint32 *login_id1, uint32 *login_id2, uint8 *sex, int *request_id, struct login_auth_node *node); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_auth_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_auth_ack_post[hIndex].func; + postHookFunc(&fd, &account_id, &login_id1, &login_id2, &sex, &request_id, node); + } + } + return; +} +void HP_login_fromchar_ban(int account_id, time_t timestamp) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_ban_pre ) { + void (*preHookFunc) (int *account_id, time_t *timestamp); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_ban_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_ban_pre[hIndex].func; + preHookFunc(&account_id, ×tamp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_ban(account_id, timestamp); + } + if( HPMHooks.count.HP_login_fromchar_ban_post ) { + void (*postHookFunc) (int *account_id, time_t *timestamp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_ban_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_ban_post[hIndex].func; + postHookFunc(&account_id, ×tamp); + } + } + return; +} +void HP_login_fromchar_change_sex_other(int account_id, char sex) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_change_sex_other_pre ) { + void (*preHookFunc) (int *account_id, char *sex); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_change_sex_other_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_change_sex_other_pre[hIndex].func; + preHookFunc(&account_id, &sex); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_change_sex_other(account_id, sex); + } + if( HPMHooks.count.HP_login_fromchar_change_sex_other_post ) { + void (*postHookFunc) (int *account_id, char *sex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_change_sex_other_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_change_sex_other_post[hIndex].func; + postHookFunc(&account_id, &sex); + } + } + return; +} +void HP_login_fromchar_pong(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_pong_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_pong_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_pong_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_pong(fd); + } + if( HPMHooks.count.HP_login_fromchar_pong_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_pong_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_pong_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_login_fromchar_parse_auth(int fd, int id, const char *ip) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_auth_pre ) { + void (*preHookFunc) (int *fd, int *id, const char *ip); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_auth_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_auth_pre[hIndex].func; + preHookFunc(&fd, &id, ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_auth(fd, id, ip); + } + if( HPMHooks.count.HP_login_fromchar_parse_auth_post ) { + void (*postHookFunc) (int *fd, int *id, const char *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_auth_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_auth_post[hIndex].func; + postHookFunc(&fd, &id, ip); + } + } + return; +} +void HP_login_fromchar_parse_update_users(int fd, int id) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_update_users_pre ) { + void (*preHookFunc) (int *fd, int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_users_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_update_users_pre[hIndex].func; + preHookFunc(&fd, &id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_update_users(fd, id); + } + if( HPMHooks.count.HP_login_fromchar_parse_update_users_post ) { + void (*postHookFunc) (int *fd, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_users_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_update_users_post[hIndex].func; + postHookFunc(&fd, &id); + } + } + return; +} +void HP_login_fromchar_parse_request_change_email(int fd, int id, const char *ip) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_request_change_email_pre ) { + void (*preHookFunc) (int *fd, int *id, const char *ip); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_change_email_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_request_change_email_pre[hIndex].func; + preHookFunc(&fd, &id, ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_request_change_email(fd, id, ip); + } + if( HPMHooks.count.HP_login_fromchar_parse_request_change_email_post ) { + void (*postHookFunc) (int *fd, int *id, const char *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_change_email_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_request_change_email_post[hIndex].func; + postHookFunc(&fd, &id, ip); + } + } + return; +} +void HP_login_fromchar_parse_account_data(int fd, int id, const char *ip) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_account_data_pre ) { + void (*preHookFunc) (int *fd, int *id, const char *ip); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_data_pre[hIndex].func; + preHookFunc(&fd, &id, ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_account_data(fd, id, ip); + } + if( HPMHooks.count.HP_login_fromchar_parse_account_data_post ) { + void (*postHookFunc) (int *fd, int *id, const char *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_data_post[hIndex].func; + postHookFunc(&fd, &id, ip); + } + } + return; +} +void HP_login_fromchar_parse_ping(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_ping_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ping_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_ping_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_ping(fd); + } + if( HPMHooks.count.HP_login_fromchar_parse_ping_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ping_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_ping_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_login_fromchar_parse_change_email(int fd, int id, const char *ip) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_change_email_pre ) { + void (*preHookFunc) (int *fd, int *id, const char *ip); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_email_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_email_pre[hIndex].func; + preHookFunc(&fd, &id, ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_change_email(fd, id, ip); + } + if( HPMHooks.count.HP_login_fromchar_parse_change_email_post ) { + void (*postHookFunc) (int *fd, int *id, const char *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_email_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_email_post[hIndex].func; + postHookFunc(&fd, &id, ip); + } + } + return; +} +void HP_login_fromchar_parse_account_update(int fd, int id, const char *ip) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_account_update_pre ) { + void (*preHookFunc) (int *fd, int *id, const char *ip); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_update_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_update_pre[hIndex].func; + preHookFunc(&fd, &id, ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_account_update(fd, id, ip); + } + if( HPMHooks.count.HP_login_fromchar_parse_account_update_post ) { + void (*postHookFunc) (int *fd, int *id, const char *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_update_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_update_post[hIndex].func; + postHookFunc(&fd, &id, ip); + } + } + return; +} +void HP_login_fromchar_parse_ban(int fd, int id, const char *ip) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_ban_pre ) { + void (*preHookFunc) (int *fd, int *id, const char *ip); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ban_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_ban_pre[hIndex].func; + preHookFunc(&fd, &id, ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_ban(fd, id, ip); + } + if( HPMHooks.count.HP_login_fromchar_parse_ban_post ) { + void (*postHookFunc) (int *fd, int *id, const char *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ban_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_ban_post[hIndex].func; + postHookFunc(&fd, &id, ip); + } + } + return; +} +void HP_login_fromchar_parse_change_sex(int fd, int id, const char *ip) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_change_sex_pre ) { + void (*preHookFunc) (int *fd, int *id, const char *ip); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_sex_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_sex_pre[hIndex].func; + preHookFunc(&fd, &id, ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_change_sex(fd, id, ip); + } + if( HPMHooks.count.HP_login_fromchar_parse_change_sex_post ) { + void (*postHookFunc) (int *fd, int *id, const char *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_sex_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_sex_post[hIndex].func; + postHookFunc(&fd, &id, ip); + } + } + return; +} +void HP_login_fromchar_parse_account_reg2(int fd, int id, const char *ip) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_account_reg2_pre ) { + void (*preHookFunc) (int *fd, int *id, const char *ip); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_reg2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_reg2_pre[hIndex].func; + preHookFunc(&fd, &id, ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_account_reg2(fd, id, ip); + } + if( HPMHooks.count.HP_login_fromchar_parse_account_reg2_post ) { + void (*postHookFunc) (int *fd, int *id, const char *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_reg2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_reg2_post[hIndex].func; + postHookFunc(&fd, &id, ip); + } + } + return; +} +void HP_login_fromchar_parse_unban(int fd, int id, const char *ip) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_unban_pre ) { + void (*preHookFunc) (int *fd, int *id, const char *ip); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_unban_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_unban_pre[hIndex].func; + preHookFunc(&fd, &id, ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_unban(fd, id, ip); + } + if( HPMHooks.count.HP_login_fromchar_parse_unban_post ) { + void (*postHookFunc) (int *fd, int *id, const char *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_unban_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_unban_post[hIndex].func; + postHookFunc(&fd, &id, ip); + } + } + return; +} +void HP_login_fromchar_parse_account_online(int fd, int id) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_account_online_pre ) { + void (*preHookFunc) (int *fd, int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_online_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_online_pre[hIndex].func; + preHookFunc(&fd, &id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_account_online(fd, id); + } + if( HPMHooks.count.HP_login_fromchar_parse_account_online_post ) { + void (*postHookFunc) (int *fd, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_online_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_online_post[hIndex].func; + postHookFunc(&fd, &id); + } + } + return; +} +void HP_login_fromchar_parse_account_offline(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_account_offline_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_offline_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_offline_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_account_offline(fd); + } + if( HPMHooks.count.HP_login_fromchar_parse_account_offline_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_offline_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_offline_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_login_fromchar_parse_online_accounts(int fd, int id) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_online_accounts_pre ) { + void (*preHookFunc) (int *fd, int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_online_accounts_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_online_accounts_pre[hIndex].func; + preHookFunc(&fd, &id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_online_accounts(fd, id); + } + if( HPMHooks.count.HP_login_fromchar_parse_online_accounts_post ) { + void (*postHookFunc) (int *fd, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_online_accounts_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_online_accounts_post[hIndex].func; + postHookFunc(&fd, &id); + } + } + return; +} +void HP_login_fromchar_parse_request_account_reg2(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_request_account_reg2_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_request_account_reg2(fd); + } + if( HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_request_account_reg2_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_login_fromchar_parse_update_wan_ip(int fd, int id) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_pre ) { + void (*preHookFunc) (int *fd, int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_update_wan_ip_pre[hIndex].func; + preHookFunc(&fd, &id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_update_wan_ip(fd, id); + } + if( HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_post ) { + void (*postHookFunc) (int *fd, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_update_wan_ip_post[hIndex].func; + postHookFunc(&fd, &id); + } + } + return; +} +void HP_login_fromchar_parse_all_offline(int fd, int id) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_all_offline_pre ) { + void (*preHookFunc) (int *fd, int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_all_offline_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_all_offline_pre[hIndex].func; + preHookFunc(&fd, &id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_all_offline(fd, id); + } + if( HPMHooks.count.HP_login_fromchar_parse_all_offline_post ) { + void (*postHookFunc) (int *fd, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_all_offline_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_all_offline_post[hIndex].func; + postHookFunc(&fd, &id); + } + } + return; +} +void HP_login_fromchar_parse_change_pincode(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_change_pincode_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_pincode_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_pincode_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_change_pincode(fd); + } + if( HPMHooks.count.HP_login_fromchar_parse_change_pincode_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_pincode_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_pincode_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +bool HP_login_fromchar_parse_wrong_pincode(int fd) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_pre ) { + bool (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_wrong_pincode_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.fromchar_parse_wrong_pincode(fd); + } + if( HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_post ) { + bool (*postHookFunc) (bool retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_wrong_pincode_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +void HP_login_fromchar_parse_accinfo(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_login_fromchar_parse_accinfo_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_accinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_fromchar_parse_accinfo_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.fromchar_parse_accinfo(fd); + } + if( HPMHooks.count.HP_login_fromchar_parse_accinfo_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_accinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_fromchar_parse_accinfo_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +int HP_login_parse_fromchar(int fd) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_login_parse_fromchar_pre ) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_fromchar_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_parse_fromchar_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.parse_fromchar(fd); + } + if( HPMHooks.count.HP_login_parse_fromchar_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_fromchar_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_parse_fromchar_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +void HP_login_connection_problem(int fd, uint8 status) { + int hIndex = 0; + if( HPMHooks.count.HP_login_connection_problem_pre ) { + void (*preHookFunc) (int *fd, uint8 *status); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_connection_problem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_connection_problem_pre[hIndex].func; + preHookFunc(&fd, &status); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.connection_problem(fd, status); + } + if( HPMHooks.count.HP_login_connection_problem_post ) { + void (*postHookFunc) (int *fd, uint8 *status); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_connection_problem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_connection_problem_post[hIndex].func; + postHookFunc(&fd, &status); + } + } + return; +} +void HP_login_kick(struct login_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_login_kick_pre ) { + void (*preHookFunc) (struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_kick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_kick_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.kick(sd); + } + if( HPMHooks.count.HP_login_kick_post ) { + void (*postHookFunc) (struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_kick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_kick_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_login_auth_ok(struct login_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_login_auth_ok_pre ) { + void (*preHookFunc) (struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_ok_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_auth_ok_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.auth_ok(sd); + } + if( HPMHooks.count.HP_login_auth_ok_post ) { + void (*postHookFunc) (struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_ok_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_auth_ok_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_login_auth_failed(struct login_session_data *sd, int result) { + int hIndex = 0; + if( HPMHooks.count.HP_login_auth_failed_pre ) { + void (*preHookFunc) (struct login_session_data *sd, int *result); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_failed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_auth_failed_pre[hIndex].func; + preHookFunc(sd, &result); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.auth_failed(sd, result); + } + if( HPMHooks.count.HP_login_auth_failed_post ) { + void (*postHookFunc) (struct login_session_data *sd, int *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_failed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_auth_failed_post[hIndex].func; + postHookFunc(sd, &result); + } + } + return; +} +void HP_login_login_error(int fd, uint8 status) { + int hIndex = 0; + if( HPMHooks.count.HP_login_login_error_pre ) { + void (*preHookFunc) (int *fd, uint8 *status); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_login_error_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_login_error_pre[hIndex].func; + preHookFunc(&fd, &status); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.login_error(fd, status); + } + if( HPMHooks.count.HP_login_login_error_post ) { + void (*postHookFunc) (int *fd, uint8 *status); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_login_error_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_login_error_post[hIndex].func; + postHookFunc(&fd, &status); + } + } + return; +} +void HP_login_parse_ping(int fd, struct login_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_login_parse_ping_pre ) { + void (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_ping_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_parse_ping_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.parse_ping(fd, sd); + } + if( HPMHooks.count.HP_login_parse_ping_post ) { + void (*postHookFunc) (int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_ping_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_parse_ping_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_login_parse_client_md5(int fd, struct login_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_login_parse_client_md5_pre ) { + void (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_client_md5_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_parse_client_md5_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.parse_client_md5(fd, sd); + } + if( HPMHooks.count.HP_login_parse_client_md5_post ) { + void (*postHookFunc) (int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_client_md5_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_parse_client_md5_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +bool HP_login_parse_client_login(int fd, struct login_session_data *sd, const char *ip) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_login_parse_client_login_pre ) { + bool (*preHookFunc) (int *fd, struct login_session_data *sd, const char *ip); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_client_login_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_parse_client_login_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd, ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.parse_client_login(fd, sd, ip); + } + if( HPMHooks.count.HP_login_parse_client_login_post ) { + bool (*postHookFunc) (bool retVal___, int *fd, struct login_session_data *sd, const char *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_client_login_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_parse_client_login_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd, ip); + } + } + return retVal___; +} +void HP_login_send_coding_key(int fd, struct login_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_login_send_coding_key_pre ) { + void (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_send_coding_key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_send_coding_key_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.send_coding_key(fd, sd); + } + if( HPMHooks.count.HP_login_send_coding_key_post ) { + void (*postHookFunc) (int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_send_coding_key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_send_coding_key_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_login_parse_request_coding_key(int fd, struct login_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_login_parse_request_coding_key_pre ) { + void (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_coding_key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_parse_request_coding_key_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.parse_request_coding_key(fd, sd); + } + if( HPMHooks.count.HP_login_parse_request_coding_key_post ) { + void (*postHookFunc) (int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_coding_key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_parse_request_coding_key_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_login_char_server_connection_status(int fd, struct login_session_data *sd, uint8 status) { + int hIndex = 0; + if( HPMHooks.count.HP_login_char_server_connection_status_pre ) { + void (*preHookFunc) (int *fd, struct login_session_data *sd, uint8 *status); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_char_server_connection_status_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_char_server_connection_status_pre[hIndex].func; + preHookFunc(&fd, sd, &status); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.char_server_connection_status(fd, sd, status); + } + if( HPMHooks.count.HP_login_char_server_connection_status_post ) { + void (*postHookFunc) (int *fd, struct login_session_data *sd, uint8 *status); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_char_server_connection_status_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_char_server_connection_status_post[hIndex].func; + postHookFunc(&fd, sd, &status); + } + } + return; +} +void HP_login_parse_request_connection(int fd, struct login_session_data *sd, const char *ip, uint32 ipl) { + int hIndex = 0; + if( HPMHooks.count.HP_login_parse_request_connection_pre ) { + void (*preHookFunc) (int *fd, struct login_session_data *sd, const char *ip, uint32 *ipl); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_connection_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_parse_request_connection_pre[hIndex].func; + preHookFunc(&fd, sd, ip, &ipl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.parse_request_connection(fd, sd, ip, ipl); + } + if( HPMHooks.count.HP_login_parse_request_connection_post ) { + void (*postHookFunc) (int *fd, struct login_session_data *sd, const char *ip, uint32 *ipl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_connection_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_parse_request_connection_post[hIndex].func; + postHookFunc(&fd, sd, ip, &ipl); + } + } + return; +} +int HP_login_parse_login(int fd) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_login_parse_login_pre ) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_login_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_parse_login_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.parse_login(fd); + } + if( HPMHooks.count.HP_login_parse_login_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_login_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_parse_login_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +/* iMalloc */ +void HP_iMalloc_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.init(); + } + if( HPMHooks.count.HP_iMalloc_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_iMalloc_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.final(); + } + if( HPMHooks.count.HP_iMalloc_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void* HP_iMalloc_malloc(size_t size, const char *file, int line, const char *func) { + int hIndex = 0; + void* retVal___ = NULL; + if( HPMHooks.count.HP_iMalloc_malloc_pre ) { + void* (*preHookFunc) (size_t *size, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_malloc_pre[hIndex].func; + retVal___ = preHookFunc(&size, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.malloc(size, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_malloc_post ) { + void* (*postHookFunc) (void* retVal___, size_t *size, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_malloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &size, file, &line, func); + } + } + return retVal___; +} +void* HP_iMalloc_calloc(size_t num, size_t size, const char *file, int line, const char *func) { + int hIndex = 0; + void* retVal___ = NULL; + if( HPMHooks.count.HP_iMalloc_calloc_pre ) { + void* (*preHookFunc) (size_t *num, size_t *size, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_calloc_pre[hIndex].func; + retVal___ = preHookFunc(&num, &size, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.calloc(num, size, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_calloc_post ) { + void* (*postHookFunc) (void* retVal___, size_t *num, size_t *size, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_calloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &num, &size, file, &line, func); + } + } + return retVal___; +} +void* HP_iMalloc_realloc(void *p, size_t size, const char *file, int line, const char *func) { + int hIndex = 0; + void* retVal___ = NULL; + if( HPMHooks.count.HP_iMalloc_realloc_pre ) { + void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_realloc_pre[hIndex].func; + retVal___ = preHookFunc(p, &size, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.realloc(p, size, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_realloc_post ) { + void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_realloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, &size, file, &line, func); + } + } + return retVal___; +} +void* HP_iMalloc_reallocz(void *p, size_t size, const char *file, int line, const char *func) { + int hIndex = 0; + void* retVal___ = NULL; + if( HPMHooks.count.HP_iMalloc_reallocz_pre ) { + void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_reallocz_pre[hIndex].func; + retVal___ = preHookFunc(p, &size, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.reallocz(p, size, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_reallocz_post ) { + void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_reallocz_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, &size, file, &line, func); + } + } + return retVal___; +} +char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *func) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_iMalloc_astrdup_pre ) { + char* (*preHookFunc) (const char *p, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_astrdup_pre[hIndex].func; + retVal___ = preHookFunc(p, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.astrdup(p, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_astrdup_post ) { + char* (*postHookFunc) (char* retVal___, const char *p, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_astrdup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, file, &line, func); + } + } + return retVal___; +} +void HP_iMalloc_free(void *p, const char *file, int line, const char *func) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_free_pre ) { + void (*preHookFunc) (void *p, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_free_pre[hIndex].func; + preHookFunc(p, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.free(p, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_free_post ) { + void (*postHookFunc) (void *p, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_free_post[hIndex].func; + postHookFunc(p, file, &line, func); + } + } + return; +} +void HP_iMalloc_memory_check(void) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_memory_check_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_memory_check_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.memory_check(); + } + if( HPMHooks.count.HP_iMalloc_memory_check_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_memory_check_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_iMalloc_verify_ptr(void *ptr) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_iMalloc_verify_ptr_pre ) { + bool (*preHookFunc) (void *ptr); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_pre[hIndex].func; + retVal___ = preHookFunc(ptr); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.verify_ptr(ptr); + } + if( HPMHooks.count.HP_iMalloc_verify_ptr_post ) { + bool (*postHookFunc) (bool retVal___, void *ptr); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ptr); + } + } + return retVal___; +} +size_t HP_iMalloc_usage(void) { + int hIndex = 0; + size_t retVal___ = 0; + if( HPMHooks.count.HP_iMalloc_usage_pre ) { + size_t (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_usage_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.usage(); + } + if( HPMHooks.count.HP_iMalloc_usage_post ) { + size_t (*postHookFunc) (size_t retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_usage_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_iMalloc_post_shutdown(void) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_post_shutdown_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.post_shutdown(); + } + if( HPMHooks.count.HP_iMalloc_post_shutdown_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_iMalloc_init_messages(void) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_init_messages_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_init_messages_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.init_messages(); + } + if( HPMHooks.count.HP_iMalloc_init_messages_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_init_messages_post[hIndex].func; + postHookFunc(); + } + } + return; +} +/* nullpo */ +void HP_nullpo_assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) { + int hIndex = 0; + if( HPMHooks.count.HP_nullpo_assert_report_pre ) { + void (*preHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_nullpo_assert_report_pre[hIndex].func; + preHookFunc(file, &line, func, targetname, title); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.nullpo.assert_report(file, line, func, targetname, title); + } + if( HPMHooks.count.HP_nullpo_assert_report_post ) { + void (*postHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title); + for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_nullpo_assert_report_post[hIndex].func; + postHookFunc(file, &line, func, targetname, title); + } + } + return; +} +/* showmsg */ +void HP_showmsg_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_showmsg_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_showmsg_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.showmsg.init(); + } + if( HPMHooks.count.HP_showmsg_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_showmsg_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_showmsg_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_showmsg_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_showmsg_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.showmsg.final(); + } + if( HPMHooks.count.HP_showmsg_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_showmsg_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_showmsg_clearScreen(void) { + int hIndex = 0; + if( HPMHooks.count.HP_showmsg_clearScreen_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_showmsg_clearScreen_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.showmsg.clearScreen(); + } + if( HPMHooks.count.HP_showmsg_clearScreen_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_showmsg_clearScreen_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_showmsg_showMessageV(const char *string, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_showmsg_showMessageV_pre ) { + int (*preHookFunc) (const char *string, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_showmsg_showMessageV_pre[hIndex].func; + retVal___ = preHookFunc(string, 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.showmsg.showMessageV(string, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_showmsg_showMessageV_post ) { + int (*postHookFunc) (int retVal___, const char *string, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_showmsg_showMessageV_post[hIndex].func; + retVal___ = postHookFunc(retVal___, string, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +/* sockt */ +void HP_sockt_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_sockt_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.init(); + } + if( HPMHooks.count.HP_sockt_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_sockt_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_sockt_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.final(); + } + if( HPMHooks.count.HP_sockt_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_sockt_perform(int next) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_sockt_perform_pre ) { + int (*preHookFunc) (int *next); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_perform_pre[hIndex].func; + retVal___ = preHookFunc(&next); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.perform(next); + } + if( HPMHooks.count.HP_sockt_perform_post ) { + int (*postHookFunc) (int retVal___, int *next); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_perform_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &next); + } + } + return retVal___; +} +void HP_sockt_datasync(int fd, bool send) { + int hIndex = 0; + if( HPMHooks.count.HP_sockt_datasync_pre ) { + void (*preHookFunc) (int *fd, bool *send); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_datasync_pre[hIndex].func; + preHookFunc(&fd, &send); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.datasync(fd, send); + } + if( HPMHooks.count.HP_sockt_datasync_post ) { + void (*postHookFunc) (int *fd, bool *send); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_datasync_post[hIndex].func; + postHookFunc(&fd, &send); + } + } + return; +} +int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_sockt_make_listen_bind_pre ) { + int (*preHookFunc) (uint32 *ip, uint16 *port); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_pre[hIndex].func; + retVal___ = preHookFunc(&ip, &port); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.make_listen_bind(ip, port); + } + if( HPMHooks.count.HP_sockt_make_listen_bind_post ) { + int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip, &port); + } + } + return retVal___; +} +int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_sockt_make_connection_pre ) { + int (*preHookFunc) (uint32 *ip, uint16 *port, struct hSockOpt *opt); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_make_connection_pre[hIndex].func; + retVal___ = preHookFunc(&ip, &port, opt); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.make_connection(ip, port, opt); + } + if( HPMHooks.count.HP_sockt_make_connection_post ) { + int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port, struct hSockOpt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_make_connection_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip, &port, opt); + } + } + return retVal___; +} +int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_sockt_realloc_fifo_pre ) { + int (*preHookFunc) (int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &rfifo_size, &wfifo_size); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.realloc_fifo(fd, rfifo_size, wfifo_size); + } + if( HPMHooks.count.HP_sockt_realloc_fifo_post ) { + int (*postHookFunc) (int retVal___, int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &rfifo_size, &wfifo_size); + } + } + return retVal___; +} +int HP_sockt_realloc_writefifo(int fd, size_t addition) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_sockt_realloc_writefifo_pre ) { + int (*preHookFunc) (int *fd, size_t *addition); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &addition); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.realloc_writefifo(fd, addition); + } + if( HPMHooks.count.HP_sockt_realloc_writefifo_post ) { + int (*postHookFunc) (int retVal___, int *fd, size_t *addition); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &addition); + } + } + return retVal___; +} +int HP_sockt_wfifoset(int fd, size_t len) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_sockt_wfifoset_pre ) { + int (*preHookFunc) (int *fd, size_t *len); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_wfifoset_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.wfifoset(fd, len); + } + if( HPMHooks.count.HP_sockt_wfifoset_post ) { + int (*postHookFunc) (int retVal___, int *fd, size_t *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_wfifoset_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &len); + } + } + return retVal___; +} +int HP_sockt_rfifoskip(int fd, size_t len) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_sockt_rfifoskip_pre ) { + int (*preHookFunc) (int *fd, size_t *len); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_rfifoskip_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.rfifoskip(fd, len); + } + if( HPMHooks.count.HP_sockt_rfifoskip_post ) { + int (*postHookFunc) (int retVal___, int *fd, size_t *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_rfifoskip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &len); + } + } + return retVal___; +} +void HP_sockt_close(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_sockt_close_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_close_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.close(fd); + } + if( HPMHooks.count.HP_sockt_close_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_close_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +bool HP_sockt_session_is_valid(int fd) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_sockt_session_is_valid_pre ) { + bool (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_session_is_valid_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.session_is_valid(fd); + } + if( HPMHooks.count.HP_sockt_session_is_valid_post ) { + bool (*postHookFunc) (bool retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_session_is_valid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +bool HP_sockt_session_is_active(int fd) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_sockt_session_is_active_pre ) { + bool (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_session_is_active_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.session_is_active(fd); + } + if( HPMHooks.count.HP_sockt_session_is_active_post ) { + bool (*postHookFunc) (bool retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_session_is_active_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +void HP_sockt_flush(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_sockt_flush_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_flush_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.flush(fd); + } + if( HPMHooks.count.HP_sockt_flush_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_flush_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_sockt_flush_fifos(void) { + int hIndex = 0; + if( HPMHooks.count.HP_sockt_flush_fifos_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_flush_fifos_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.flush_fifos(); + } + if( HPMHooks.count.HP_sockt_flush_fifos_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_flush_fifos_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_sockt_set_nonblocking(int fd, unsigned long yes) { + int hIndex = 0; + if( HPMHooks.count.HP_sockt_set_nonblocking_pre ) { + void (*preHookFunc) (int *fd, unsigned long *yes); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_pre[hIndex].func; + preHookFunc(&fd, &yes); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.set_nonblocking(fd, yes); + } + if( HPMHooks.count.HP_sockt_set_nonblocking_post ) { + void (*postHookFunc) (int *fd, unsigned long *yes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_post[hIndex].func; + postHookFunc(&fd, &yes); + } + } + return; +} +void HP_sockt_set_defaultparse(ParseFunc defaultparse) { + int hIndex = 0; + if( HPMHooks.count.HP_sockt_set_defaultparse_pre ) { + void (*preHookFunc) (ParseFunc *defaultparse); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_pre[hIndex].func; + preHookFunc(&defaultparse); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.set_defaultparse(defaultparse); + } + if( HPMHooks.count.HP_sockt_set_defaultparse_post ) { + void (*postHookFunc) (ParseFunc *defaultparse); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_post[hIndex].func; + postHookFunc(&defaultparse); + } + } + return; +} +uint32 HP_sockt_host2ip(const char *hostname) { + int hIndex = 0; + uint32 retVal___ = 0; + if( HPMHooks.count.HP_sockt_host2ip_pre ) { + uint32 (*preHookFunc) (const char *hostname); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_host2ip_pre[hIndex].func; + retVal___ = preHookFunc(hostname); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.host2ip(hostname); + } + if( HPMHooks.count.HP_sockt_host2ip_post ) { + uint32 (*postHookFunc) (uint32 retVal___, const char *hostname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_host2ip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hostname); + } + } + return retVal___; +} +const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sockt_ip2str_pre ) { + const char* (*preHookFunc) (uint32 *ip, char *ip_str); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_ip2str_pre[hIndex].func; + retVal___ = preHookFunc(&ip, ip_str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.ip2str(ip, ip_str); + } + if( HPMHooks.count.HP_sockt_ip2str_post ) { + const char* (*postHookFunc) (const char* retVal___, uint32 *ip, char *ip_str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_ip2str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip, ip_str); + } + } + return retVal___; +} +uint32 HP_sockt_str2ip(const char *ip_str) { + int hIndex = 0; + uint32 retVal___ = 0; + if( HPMHooks.count.HP_sockt_str2ip_pre ) { + uint32 (*preHookFunc) (const char *ip_str); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_str2ip_pre[hIndex].func; + retVal___ = preHookFunc(ip_str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.str2ip(ip_str); + } + if( HPMHooks.count.HP_sockt_str2ip_post ) { + uint32 (*postHookFunc) (uint32 retVal___, const char *ip_str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_str2ip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ip_str); + } + } + return retVal___; +} +uint16 HP_sockt_ntows(uint16 netshort) { + int hIndex = 0; + uint16 retVal___ = 0; + if( HPMHooks.count.HP_sockt_ntows_pre ) { + uint16 (*preHookFunc) (uint16 *netshort); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_ntows_pre[hIndex].func; + retVal___ = preHookFunc(&netshort); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.ntows(netshort); + } + if( HPMHooks.count.HP_sockt_ntows_post ) { + uint16 (*postHookFunc) (uint16 retVal___, uint16 *netshort); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_ntows_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &netshort); + } + } + return retVal___; +} +int HP_sockt_getips(uint32 *ips, int max) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_sockt_getips_pre ) { + int (*preHookFunc) (uint32 *ips, int *max); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_getips_pre[hIndex].func; + retVal___ = preHookFunc(ips, &max); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.getips(ips, max); + } + if( HPMHooks.count.HP_sockt_getips_post ) { + int (*postHookFunc) (int retVal___, uint32 *ips, int *max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_getips_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ips, &max); + } + } + return retVal___; +} +void HP_sockt_eof(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_sockt_eof_pre ) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_eof_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.eof(fd); + } + if( HPMHooks.count.HP_sockt_eof_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_eof_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { + int hIndex = 0; + uint32 retVal___ = 0; + if( HPMHooks.count.HP_sockt_lan_subnet_check_pre ) { + uint32 (*preHookFunc) (uint32 *ip, struct s_subnet *info); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_pre[hIndex].func; + retVal___ = preHookFunc(&ip, info); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.lan_subnet_check(ip, info); + } + if( HPMHooks.count.HP_sockt_lan_subnet_check_post ) { + uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip, struct s_subnet *info); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip, info); + } + } + return retVal___; +} +bool HP_sockt_allowed_ip_check(uint32 ip) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_sockt_allowed_ip_check_pre ) { + bool (*preHookFunc) (uint32 *ip); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_pre[hIndex].func; + retVal___ = preHookFunc(&ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.allowed_ip_check(ip); + } + if( HPMHooks.count.HP_sockt_allowed_ip_check_post ) { + bool (*postHookFunc) (bool retVal___, uint32 *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip); + } + } + return retVal___; +} +bool HP_sockt_trusted_ip_check(uint32 ip) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_sockt_trusted_ip_check_pre ) { + bool (*preHookFunc) (uint32 *ip); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_pre[hIndex].func; + retVal___ = preHookFunc(&ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.trusted_ip_check(ip); + } + if( HPMHooks.count.HP_sockt_trusted_ip_check_post ) { + bool (*postHookFunc) (bool retVal___, uint32 *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip); + } + } + return retVal___; +} +int HP_sockt_net_config_read_sub(config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_sockt_net_config_read_sub_pre ) { + int (*preHookFunc) (config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_pre[hIndex].func; + retVal___ = preHookFunc(t, list, count, filename, groupname); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.net_config_read_sub(t, list, count, filename, groupname); + } + if( HPMHooks.count.HP_sockt_net_config_read_sub_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, t, list, count, filename, groupname); + } + } + return retVal___; +} +void HP_sockt_net_config_read(const char *filename) { + int hIndex = 0; + if( HPMHooks.count.HP_sockt_net_config_read_pre ) { + void (*preHookFunc) (const char *filename); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_net_config_read_pre[hIndex].func; + preHookFunc(filename); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.net_config_read(filename); + } + if( HPMHooks.count.HP_sockt_net_config_read_post ) { + void (*postHookFunc) (const char *filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_net_config_read_post[hIndex].func; + postHookFunc(filename); + } + } + return; +} +/* SQL */ +int HP_SQL_Connect(Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_Connect_pre ) { + int (*preHookFunc) (Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_Connect_pre[hIndex].func; + retVal___ = preHookFunc(self, user, passwd, host, &port, db); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.Connect(self, user, passwd, host, port, db); + } + if( HPMHooks.count.HP_SQL_Connect_post ) { + int (*postHookFunc) (int retVal___, Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_Connect_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, user, passwd, host, &port, db); + } + } + return retVal___; +} +int HP_SQL_GetTimeout(Sql *self, uint32 *out_timeout) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_GetTimeout_pre ) { + int (*preHookFunc) (Sql *self, uint32 *out_timeout); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_GetTimeout_pre[hIndex].func; + retVal___ = preHookFunc(self, out_timeout); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.GetTimeout(self, out_timeout); + } + if( HPMHooks.count.HP_SQL_GetTimeout_post ) { + int (*postHookFunc) (int retVal___, Sql *self, uint32 *out_timeout); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_GetTimeout_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, out_timeout); + } + } + return retVal___; +} +int HP_SQL_GetColumnNames(Sql *self, const char *table, char *out_buf, size_t buf_len, char sep) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_GetColumnNames_pre ) { + int (*preHookFunc) (Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_pre[hIndex].func; + retVal___ = preHookFunc(self, table, out_buf, &buf_len, &sep); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.GetColumnNames(self, table, out_buf, buf_len, sep); + } + if( HPMHooks.count.HP_SQL_GetColumnNames_post ) { + int (*postHookFunc) (int retVal___, Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, table, out_buf, &buf_len, &sep); + } + } + return retVal___; +} +int HP_SQL_SetEncoding(Sql *self, const char *encoding) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_SetEncoding_pre ) { + int (*preHookFunc) (Sql *self, const char *encoding); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_SetEncoding_pre[hIndex].func; + retVal___ = preHookFunc(self, encoding); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.SetEncoding(self, encoding); + } + if( HPMHooks.count.HP_SQL_SetEncoding_post ) { + int (*postHookFunc) (int retVal___, Sql *self, const char *encoding); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_SetEncoding_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, encoding); + } + } + return retVal___; +} +int HP_SQL_Ping(Sql *self) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_Ping_pre ) { + int (*preHookFunc) (Sql *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_Ping_pre[hIndex].func; + retVal___ = preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.Ping(self); + } + if( HPMHooks.count.HP_SQL_Ping_post ) { + int (*postHookFunc) (int retVal___, Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_Ping_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); + } + } + return retVal___; +} +size_t HP_SQL_EscapeString(Sql *self, char *out_to, const char *from) { + int hIndex = 0; + size_t retVal___ = 0; + if( HPMHooks.count.HP_SQL_EscapeString_pre ) { + size_t (*preHookFunc) (Sql *self, char *out_to, const char *from); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_EscapeString_pre[hIndex].func; + retVal___ = preHookFunc(self, out_to, from); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.EscapeString(self, out_to, from); + } + if( HPMHooks.count.HP_SQL_EscapeString_post ) { + size_t (*postHookFunc) (size_t retVal___, Sql *self, char *out_to, const char *from); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_EscapeString_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, out_to, from); + } + } + return retVal___; +} +size_t HP_SQL_EscapeStringLen(Sql *self, char *out_to, const char *from, size_t from_len) { + int hIndex = 0; + size_t retVal___ = 0; + if( HPMHooks.count.HP_SQL_EscapeStringLen_pre ) { + size_t (*preHookFunc) (Sql *self, char *out_to, const char *from, size_t *from_len); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_pre[hIndex].func; + retVal___ = preHookFunc(self, out_to, from, &from_len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.EscapeStringLen(self, out_to, from, from_len); + } + if( HPMHooks.count.HP_SQL_EscapeStringLen_post ) { + size_t (*postHookFunc) (size_t retVal___, Sql *self, char *out_to, const char *from, size_t *from_len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, out_to, from, &from_len); + } + } + return retVal___; +} +int HP_SQL_QueryV(Sql *self, const char *query, va_list args) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_QueryV_pre ) { + int (*preHookFunc) (Sql *self, const char *query, va_list args); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_SQL_QueryV_pre[hIndex].func; + retVal___ = preHookFunc(self, query, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.SQL.QueryV(self, query, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_SQL_QueryV_post ) { + int (*postHookFunc) (int retVal___, Sql *self, const char *query, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_SQL_QueryV_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, query, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_SQL_QueryStr(Sql *self, const char *query) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_QueryStr_pre ) { + int (*preHookFunc) (Sql *self, const char *query); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_QueryStr_pre[hIndex].func; + retVal___ = preHookFunc(self, query); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.QueryStr(self, query); + } + if( HPMHooks.count.HP_SQL_QueryStr_post ) { + int (*postHookFunc) (int retVal___, Sql *self, const char *query); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_QueryStr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, query); + } + } + return retVal___; +} +uint64 HP_SQL_LastInsertId(Sql *self) { + int hIndex = 0; + uint64 retVal___ = 0; + if( HPMHooks.count.HP_SQL_LastInsertId_pre ) { + uint64 (*preHookFunc) (Sql *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_LastInsertId_pre[hIndex].func; + retVal___ = preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.LastInsertId(self); + } + if( HPMHooks.count.HP_SQL_LastInsertId_post ) { + uint64 (*postHookFunc) (uint64 retVal___, Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_LastInsertId_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); + } + } + return retVal___; +} +uint32 HP_SQL_NumColumns(Sql *self) { + int hIndex = 0; + uint32 retVal___ = 0; + if( HPMHooks.count.HP_SQL_NumColumns_pre ) { + uint32 (*preHookFunc) (Sql *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_NumColumns_pre[hIndex].func; + retVal___ = preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.NumColumns(self); + } + if( HPMHooks.count.HP_SQL_NumColumns_post ) { + uint32 (*postHookFunc) (uint32 retVal___, Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_NumColumns_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); + } + } + return retVal___; +} +uint64 HP_SQL_NumRows(Sql *self) { + int hIndex = 0; + uint64 retVal___ = 0; + if( HPMHooks.count.HP_SQL_NumRows_pre ) { + uint64 (*preHookFunc) (Sql *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_NumRows_pre[hIndex].func; + retVal___ = preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.NumRows(self); + } + if( HPMHooks.count.HP_SQL_NumRows_post ) { + uint64 (*postHookFunc) (uint64 retVal___, Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_NumRows_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); + } + } + return retVal___; +} +int HP_SQL_NextRow(Sql *self) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_NextRow_pre ) { + int (*preHookFunc) (Sql *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_NextRow_pre[hIndex].func; + retVal___ = preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.NextRow(self); + } + if( HPMHooks.count.HP_SQL_NextRow_post ) { + int (*postHookFunc) (int retVal___, Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_NextRow_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); + } + } + return retVal___; +} +int HP_SQL_GetData(Sql *self, size_t col, char **out_buf, size_t *out_len) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_GetData_pre ) { + int (*preHookFunc) (Sql *self, size_t *col, char **out_buf, size_t *out_len); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_GetData_pre[hIndex].func; + retVal___ = preHookFunc(self, &col, out_buf, out_len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.GetData(self, col, out_buf, out_len); + } + if( HPMHooks.count.HP_SQL_GetData_post ) { + int (*postHookFunc) (int retVal___, Sql *self, size_t *col, char **out_buf, size_t *out_len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_GetData_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, &col, out_buf, out_len); + } + } + return retVal___; +} +void HP_SQL_FreeResult(Sql *self) { + int hIndex = 0; + if( HPMHooks.count.HP_SQL_FreeResult_pre ) { + void (*preHookFunc) (Sql *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_FreeResult_pre[hIndex].func; + preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.SQL.FreeResult(self); + } + if( HPMHooks.count.HP_SQL_FreeResult_post ) { + void (*postHookFunc) (Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_FreeResult_post[hIndex].func; + postHookFunc(self); + } + } + return; +} +void HP_SQL_ShowDebug_(Sql *self, const char *debug_file, const unsigned long debug_line) { + int hIndex = 0; + if( HPMHooks.count.HP_SQL_ShowDebug__pre ) { + void (*preHookFunc) (Sql *self, const char *debug_file, const unsigned long *debug_line); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_ShowDebug__pre[hIndex].func; + preHookFunc(self, debug_file, &debug_line); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.SQL.ShowDebug_(self, debug_file, debug_line); + } + if( HPMHooks.count.HP_SQL_ShowDebug__post ) { + void (*postHookFunc) (Sql *self, const char *debug_file, const unsigned long *debug_line); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_ShowDebug__post[hIndex].func; + postHookFunc(self, debug_file, &debug_line); + } + } + return; +} +void HP_SQL_Free(Sql *self) { + int hIndex = 0; + if( HPMHooks.count.HP_SQL_Free_pre ) { + void (*preHookFunc) (Sql *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_Free_pre[hIndex].func; + preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.SQL.Free(self); + } + if( HPMHooks.count.HP_SQL_Free_post ) { + void (*postHookFunc) (Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_Free_post[hIndex].func; + postHookFunc(self); + } + } + return; +} +struct Sql* HP_SQL_Malloc(void) { + int hIndex = 0; + struct Sql* retVal___ = NULL; + if( HPMHooks.count.HP_SQL_Malloc_pre ) { + struct Sql* (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_Malloc_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.Malloc(); + } + if( HPMHooks.count.HP_SQL_Malloc_post ) { + struct Sql* (*postHookFunc) (struct Sql* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_Malloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +struct SqlStmt* HP_SQL_StmtMalloc(Sql *sql) { + int hIndex = 0; + struct SqlStmt* retVal___ = NULL; + if( HPMHooks.count.HP_SQL_StmtMalloc_pre ) { + struct SqlStmt* (*preHookFunc) (Sql *sql); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_pre[hIndex].func; + retVal___ = preHookFunc(sql); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.StmtMalloc(sql); + } + if( HPMHooks.count.HP_SQL_StmtMalloc_post ) { + struct SqlStmt* (*postHookFunc) (struct SqlStmt* retVal___, Sql *sql); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sql); + } + } + return retVal___; +} +int HP_SQL_StmtPrepareV(SqlStmt *self, const char *query, va_list args) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtPrepareV_pre ) { + int (*preHookFunc) (SqlStmt *self, const char *query, va_list args); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_pre[hIndex].func; + retVal___ = preHookFunc(self, query, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.SQL.StmtPrepareV(self, query, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_SQL_StmtPrepareV_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self, const char *query, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, query, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_SQL_StmtPrepareStr(SqlStmt *self, const char *query) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtPrepareStr_pre ) { + int (*preHookFunc) (SqlStmt *self, const char *query); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_pre[hIndex].func; + retVal___ = preHookFunc(self, query); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.StmtPrepareStr(self, query); + } + if( HPMHooks.count.HP_SQL_StmtPrepareStr_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self, const char *query); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, query); + } + } + return retVal___; +} +size_t HP_SQL_StmtNumParams(SqlStmt *self) { + int hIndex = 0; + size_t retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtNumParams_pre ) { + size_t (*preHookFunc) (SqlStmt *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_pre[hIndex].func; + retVal___ = preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.StmtNumParams(self); + } + if( HPMHooks.count.HP_SQL_StmtNumParams_post ) { + size_t (*postHookFunc) (size_t retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); + } + } + return retVal___; +} +int HP_SQL_StmtBindParam(SqlStmt *self, size_t idx, SqlDataType buffer_type, void *buffer, size_t buffer_len) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtBindParam_pre ) { + int (*preHookFunc) (SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_pre[hIndex].func; + retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.StmtBindParam(self, idx, buffer_type, buffer, buffer_len); + } + if( HPMHooks.count.HP_SQL_StmtBindParam_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len); + } + } + return retVal___; +} +int HP_SQL_StmtExecute(SqlStmt *self) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtExecute_pre ) { + int (*preHookFunc) (SqlStmt *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtExecute_pre[hIndex].func; + retVal___ = preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.StmtExecute(self); + } + if( HPMHooks.count.HP_SQL_StmtExecute_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtExecute_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); + } + } + return retVal___; +} +uint64 HP_SQL_StmtLastInsertId(SqlStmt *self) { + int hIndex = 0; + uint64 retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtLastInsertId_pre ) { + uint64 (*preHookFunc) (SqlStmt *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_pre[hIndex].func; + retVal___ = preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.StmtLastInsertId(self); + } + if( HPMHooks.count.HP_SQL_StmtLastInsertId_post ) { + uint64 (*postHookFunc) (uint64 retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); + } + } + return retVal___; +} +size_t HP_SQL_StmtNumColumns(SqlStmt *self) { + int hIndex = 0; + size_t retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtNumColumns_pre ) { + size_t (*preHookFunc) (SqlStmt *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_pre[hIndex].func; + retVal___ = preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.StmtNumColumns(self); + } + if( HPMHooks.count.HP_SQL_StmtNumColumns_post ) { + size_t (*postHookFunc) (size_t retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); + } + } + return retVal___; +} +int HP_SQL_StmtBindColumn(SqlStmt *self, size_t idx, SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtBindColumn_pre ) { + int (*preHookFunc) (SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_pre[hIndex].func; + retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.StmtBindColumn(self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null); + } + if( HPMHooks.count.HP_SQL_StmtBindColumn_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null); + } + } + return retVal___; +} +uint64 HP_SQL_StmtNumRows(SqlStmt *self) { + int hIndex = 0; + uint64 retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtNumRows_pre ) { + uint64 (*preHookFunc) (SqlStmt *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_pre[hIndex].func; + retVal___ = preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.StmtNumRows(self); + } + if( HPMHooks.count.HP_SQL_StmtNumRows_post ) { + uint64 (*postHookFunc) (uint64 retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); + } + } + return retVal___; +} +int HP_SQL_StmtNextRow(SqlStmt *self) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtNextRow_pre ) { + int (*preHookFunc) (SqlStmt *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_pre[hIndex].func; + retVal___ = preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.SQL.StmtNextRow(self); + } + if( HPMHooks.count.HP_SQL_StmtNextRow_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); + } + } + return retVal___; +} +void HP_SQL_StmtFreeResult(SqlStmt *self) { + int hIndex = 0; + if( HPMHooks.count.HP_SQL_StmtFreeResult_pre ) { + void (*preHookFunc) (SqlStmt *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_pre[hIndex].func; + preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.SQL.StmtFreeResult(self); + } + if( HPMHooks.count.HP_SQL_StmtFreeResult_post ) { + void (*postHookFunc) (SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_post[hIndex].func; + postHookFunc(self); + } + } + return; +} +void HP_SQL_StmtFree(SqlStmt *self) { + int hIndex = 0; + if( HPMHooks.count.HP_SQL_StmtFree_pre ) { + void (*preHookFunc) (SqlStmt *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtFree_pre[hIndex].func; + preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.SQL.StmtFree(self); + } + if( HPMHooks.count.HP_SQL_StmtFree_post ) { + void (*postHookFunc) (SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtFree_post[hIndex].func; + postHookFunc(self); + } + } + return; +} +void HP_SQL_StmtShowDebug_(SqlStmt *self, const char *debug_file, const unsigned long debug_line) { + int hIndex = 0; + if( HPMHooks.count.HP_SQL_StmtShowDebug__pre ) { + void (*preHookFunc) (SqlStmt *self, const char *debug_file, const unsigned long *debug_line); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__pre[hIndex].func; + preHookFunc(self, debug_file, &debug_line); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.SQL.StmtShowDebug_(self, debug_file, debug_line); + } + if( HPMHooks.count.HP_SQL_StmtShowDebug__post ) { + void (*postHookFunc) (SqlStmt *self, const char *debug_file, const unsigned long *debug_line); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__post[hIndex].func; + postHookFunc(self, debug_file, &debug_line); + } + } + return; +} +/* StrBuf */ +StringBuf* HP_StrBuf_Malloc(void) { + int hIndex = 0; + StringBuf* retVal___ = NULL; + if( HPMHooks.count.HP_StrBuf_Malloc_pre ) { + StringBuf* (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Malloc_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.StrBuf.Malloc(); + } + if( HPMHooks.count.HP_StrBuf_Malloc_post ) { + StringBuf* (*postHookFunc) (StringBuf* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Malloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_StrBuf_Init(StringBuf *self) { + int hIndex = 0; + if( HPMHooks.count.HP_StrBuf_Init_pre ) { + void (*preHookFunc) (StringBuf *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Init_pre[hIndex].func; + preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.StrBuf.Init(self); + } + if( HPMHooks.count.HP_StrBuf_Init_post ) { + void (*postHookFunc) (StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Init_post[hIndex].func; + postHookFunc(self); + } + } + return; +} +int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_StrBuf_Vprintf_pre ) { + int (*preHookFunc) (StringBuf *self, const char *fmt, va_list args); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_pre[hIndex].func; + retVal___ = preHookFunc(self, fmt, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.StrBuf.Vprintf(self, fmt, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_StrBuf_Vprintf_post ) { + int (*postHookFunc) (int retVal___, StringBuf *self, const char *fmt, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, fmt, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_StrBuf_Append_pre ) { + int (*preHookFunc) (StringBuf *self, const StringBuf *sbuf); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Append_pre[hIndex].func; + retVal___ = preHookFunc(self, sbuf); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.StrBuf.Append(self, sbuf); + } + if( HPMHooks.count.HP_StrBuf_Append_post ) { + int (*postHookFunc) (int retVal___, StringBuf *self, const StringBuf *sbuf); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Append_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, sbuf); + } + } + return retVal___; +} +int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_StrBuf_AppendStr_pre ) { + int (*preHookFunc) (StringBuf *self, const char *str); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_pre[hIndex].func; + retVal___ = preHookFunc(self, str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.StrBuf.AppendStr(self, str); + } + if( HPMHooks.count.HP_StrBuf_AppendStr_post ) { + int (*postHookFunc) (int retVal___, StringBuf *self, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, str); + } + } + return retVal___; +} +int HP_StrBuf_Length(StringBuf *self) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_StrBuf_Length_pre ) { + int (*preHookFunc) (StringBuf *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Length_pre[hIndex].func; + retVal___ = preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.StrBuf.Length(self); + } + if( HPMHooks.count.HP_StrBuf_Length_post ) { + int (*postHookFunc) (int retVal___, StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Length_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); + } + } + return retVal___; +} +char* HP_StrBuf_Value(StringBuf *self) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_StrBuf_Value_pre ) { + char* (*preHookFunc) (StringBuf *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Value_pre[hIndex].func; + retVal___ = preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.StrBuf.Value(self); + } + if( HPMHooks.count.HP_StrBuf_Value_post ) { + char* (*postHookFunc) (char* retVal___, StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Value_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); + } + } + return retVal___; +} +void HP_StrBuf_Clear(StringBuf *self) { + int hIndex = 0; + if( HPMHooks.count.HP_StrBuf_Clear_pre ) { + void (*preHookFunc) (StringBuf *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Clear_pre[hIndex].func; + preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.StrBuf.Clear(self); + } + if( HPMHooks.count.HP_StrBuf_Clear_post ) { + void (*postHookFunc) (StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Clear_post[hIndex].func; + postHookFunc(self); + } + } + return; +} +void HP_StrBuf_Destroy(StringBuf *self) { + int hIndex = 0; + if( HPMHooks.count.HP_StrBuf_Destroy_pre ) { + void (*preHookFunc) (StringBuf *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Destroy_pre[hIndex].func; + preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.StrBuf.Destroy(self); + } + if( HPMHooks.count.HP_StrBuf_Destroy_post ) { + void (*postHookFunc) (StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Destroy_post[hIndex].func; + postHookFunc(self); + } + } + return; +} +void HP_StrBuf_Free(StringBuf *self) { + int hIndex = 0; + if( HPMHooks.count.HP_StrBuf_Free_pre ) { + void (*preHookFunc) (StringBuf *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Free_pre[hIndex].func; + preHookFunc(self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.StrBuf.Free(self); + } + if( HPMHooks.count.HP_StrBuf_Free_post ) { + void (*postHookFunc) (StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Free_post[hIndex].func; + postHookFunc(self); + } + } + return; +} +/* strlib */ +char* HP_strlib_jstrescape(char *pt) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_jstrescape_pre ) { + char* (*preHookFunc) (char *pt); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_jstrescape_pre[hIndex].func; + retVal___ = preHookFunc(pt); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.strlib.jstrescape(pt); + } + if( HPMHooks.count.HP_strlib_jstrescape_post ) { + char* (*postHookFunc) (char* retVal___, char *pt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_jstrescape_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pt); + } + } + return retVal___; +} +char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_jstrescapecpy_pre ) { + char* (*preHookFunc) (char *pt, const char *spt); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_pre[hIndex].func; + retVal___ = preHookFunc(pt, spt); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.strlib.jstrescapecpy(pt, spt); + } + if( HPMHooks.count.HP_strlib_jstrescapecpy_post ) { + char* (*postHookFunc) (char* retVal___, char *pt, const char *spt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pt, spt); + } + } + return retVal___; +} +int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_strlib_jmemescapecpy_pre ) { + int (*preHookFunc) (char *pt, const char *spt, int *size); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_pre[hIndex].func; + retVal___ = preHookFunc(pt, spt, &size); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.strlib.jmemescapecpy(pt, spt, size); + } + if( HPMHooks.count.HP_strlib_jmemescapecpy_post ) { + int (*postHookFunc) (int retVal___, char *pt, const char *spt, int *size); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pt, spt, &size); + } + } + return retVal___; +} +int HP_strlib_remove_control_chars_(char *str) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_strlib_remove_control_chars__pre ) { + int (*preHookFunc) (char *str); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__pre[hIndex].func; + retVal___ = preHookFunc(str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.strlib.remove_control_chars_(str); + } + if( HPMHooks.count.HP_strlib_remove_control_chars__post ) { + int (*postHookFunc) (int retVal___, char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); + } + } + return retVal___; +} +char* HP_strlib_trim_(char *str) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_trim__pre ) { + char* (*preHookFunc) (char *str); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_trim__pre[hIndex].func; + retVal___ = preHookFunc(str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.strlib.trim_(str); + } + if( HPMHooks.count.HP_strlib_trim__post ) { + char* (*postHookFunc) (char* retVal___, char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_trim__post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); + } + } + return retVal___; +} +char* HP_strlib_normalize_name_(char *str, const char *delims) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_normalize_name__pre ) { + char* (*preHookFunc) (char *str, const char *delims); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_normalize_name__pre[hIndex].func; + retVal___ = preHookFunc(str, delims); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.strlib.normalize_name_(str, delims); + } + if( HPMHooks.count.HP_strlib_normalize_name__post ) { + char* (*postHookFunc) (char* retVal___, char *str, const char *delims); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_normalize_name__post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, delims); + } + } + return retVal___; +} +const char* HP_strlib_stristr_(const char *haystack, const char *needle) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_stristr__pre ) { + const char* (*preHookFunc) (const char *haystack, const char *needle); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_stristr__pre[hIndex].func; + retVal___ = preHookFunc(haystack, needle); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.strlib.stristr_(haystack, needle); + } + if( HPMHooks.count.HP_strlib_stristr__post ) { + const char* (*postHookFunc) (const char* retVal___, const char *haystack, const char *needle); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_stristr__post[hIndex].func; + retVal___ = postHookFunc(retVal___, haystack, needle); + } + } + return retVal___; +} +size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { + int hIndex = 0; + size_t retVal___ = 0; + if( HPMHooks.count.HP_strlib_strnlen__pre ) { + size_t (*preHookFunc) (const char *string, size_t *maxlen); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_strnlen__pre[hIndex].func; + retVal___ = preHookFunc(string, &maxlen); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.strlib.strnlen_(string, maxlen); + } + if( HPMHooks.count.HP_strlib_strnlen__post ) { + size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_strnlen__post[hIndex].func; + retVal___ = postHookFunc(retVal___, string, &maxlen); + } + } + return retVal___; +} +char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_strtok_r__pre ) { + char* (*preHookFunc) (char *s1, const char *s2, char **lasts); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_strtok_r__pre[hIndex].func; + retVal___ = preHookFunc(s1, s2, lasts); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.strlib.strtok_r_(s1, s2, lasts); + } + if( HPMHooks.count.HP_strlib_strtok_r__post ) { + char* (*postHookFunc) (char* retVal___, char *s1, const char *s2, char **lasts); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_strtok_r__post[hIndex].func; + retVal___ = postHookFunc(retVal___, s1, s2, lasts); + } + } + return retVal___; +} +int HP_strlib_e_mail_check_(char *email) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_strlib_e_mail_check__pre ) { + int (*preHookFunc) (char *email); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_e_mail_check__pre[hIndex].func; + retVal___ = preHookFunc(email); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.strlib.e_mail_check_(email); + } + if( HPMHooks.count.HP_strlib_e_mail_check__post ) { + int (*postHookFunc) (int retVal___, char *email); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_e_mail_check__post[hIndex].func; + retVal___ = postHookFunc(retVal___, email); + } + } + return retVal___; +} +int HP_strlib_config_switch_(const char *str) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_strlib_config_switch__pre ) { + int (*preHookFunc) (const char *str); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_config_switch__pre[hIndex].func; + retVal___ = preHookFunc(str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.strlib.config_switch_(str); + } + if( HPMHooks.count.HP_strlib_config_switch__post ) { + int (*postHookFunc) (int retVal___, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_config_switch__post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); + } + } + return retVal___; +} +char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_safestrncpy__pre ) { + char* (*preHookFunc) (char *dst, const char *src, size_t *n); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_safestrncpy__pre[hIndex].func; + retVal___ = preHookFunc(dst, src, &n); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.strlib.safestrncpy_(dst, src, n); + } + if( HPMHooks.count.HP_strlib_safestrncpy__post ) { + char* (*postHookFunc) (char* retVal___, char *dst, const char *src, size_t *n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_safestrncpy__post[hIndex].func; + retVal___ = postHookFunc(retVal___, dst, src, &n); + } + } + return retVal___; +} +size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { + int hIndex = 0; + size_t retVal___ = 0; + if( HPMHooks.count.HP_strlib_safestrnlen__pre ) { + size_t (*preHookFunc) (const char *string, size_t *maxlen); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_safestrnlen__pre[hIndex].func; + retVal___ = preHookFunc(string, &maxlen); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.strlib.safestrnlen_(string, maxlen); + } + if( HPMHooks.count.HP_strlib_safestrnlen__post ) { + size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_safestrnlen__post[hIndex].func; + retVal___ = postHookFunc(retVal___, string, &maxlen); + } + } + return retVal___; +} +int HP_strlib_strline_(const char *str, size_t pos) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_strlib_strline__pre ) { + int (*preHookFunc) (const char *str, size_t *pos); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_strline__pre[hIndex].func; + retVal___ = preHookFunc(str, &pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.strlib.strline_(str, pos); + } + if( HPMHooks.count.HP_strlib_strline__post ) { + int (*postHookFunc) (int retVal___, const char *str, size_t *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_strline__post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &pos); + } + } + return retVal___; +} +bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_strlib_bin2hex__pre ) { + bool (*preHookFunc) (char *output, unsigned char *input, size_t *count); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_bin2hex__pre[hIndex].func; + retVal___ = preHookFunc(output, input, &count); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.strlib.bin2hex_(output, input, count); + } + if( HPMHooks.count.HP_strlib_bin2hex__post ) { + bool (*postHookFunc) (bool retVal___, char *output, unsigned char *input, size_t *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_bin2hex__post[hIndex].func; + retVal___ = postHookFunc(retVal___, output, input, &count); + } + } + return retVal___; +} +/* sv */ +int HP_sv_parse_next(struct s_svstate *svstate) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_sv_parse_next_pre ) { + int (*preHookFunc) (struct s_svstate *svstate); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_parse_next_pre[hIndex].func; + retVal___ = preHookFunc(svstate); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sv.parse_next(svstate); + } + if( HPMHooks.count.HP_sv_parse_next_post ) { + int (*postHookFunc) (int retVal___, struct s_svstate *svstate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_parse_next_post[hIndex].func; + retVal___ = postHookFunc(retVal___, svstate); + } + } + return retVal___; +} +int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_sv_parse_pre ) { + int (*preHookFunc) (const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_parse_pre[hIndex].func; + retVal___ = preHookFunc(str, &len, &startoff, &delim, out_pos, &npos, &opt); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sv.parse(str, len, startoff, delim, out_pos, npos, opt); + } + if( HPMHooks.count.HP_sv_parse_post ) { + int (*postHookFunc) (int retVal___, const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_parse_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_pos, &npos, &opt); + } + } + return retVal___; +} +int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_sv_split_pre ) { + int (*preHookFunc) (char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_split_pre[hIndex].func; + retVal___ = preHookFunc(str, &len, &startoff, &delim, out_fields, &nfields, &opt); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sv.split(str, len, startoff, delim, out_fields, nfields, opt); + } + if( HPMHooks.count.HP_sv_split_post ) { + int (*postHookFunc) (int retVal___, char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_split_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_fields, &nfields, &opt); + } + } + return retVal___; +} +size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *escapes) { + int hIndex = 0; + size_t retVal___ = 0; + if( HPMHooks.count.HP_sv_escape_c_pre ) { + size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len, const char *escapes); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_escape_c_pre[hIndex].func; + retVal___ = preHookFunc(out_dest, src, &len, escapes); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sv.escape_c(out_dest, src, len, escapes); + } + if( HPMHooks.count.HP_sv_escape_c_post ) { + size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len, const char *escapes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_escape_c_post[hIndex].func; + retVal___ = postHookFunc(retVal___, out_dest, src, &len, escapes); + } + } + return retVal___; +} +size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { + int hIndex = 0; + size_t retVal___ = 0; + if( HPMHooks.count.HP_sv_unescape_c_pre ) { + size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_unescape_c_pre[hIndex].func; + retVal___ = preHookFunc(out_dest, src, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sv.unescape_c(out_dest, src, len); + } + if( HPMHooks.count.HP_sv_unescape_c_post ) { + size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_unescape_c_post[hIndex].func; + retVal___ = postHookFunc(retVal___, out_dest, src, &len); + } + } + return retVal___; +} +const char* HP_sv_skip_escaped_c(const char *p) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sv_skip_escaped_c_pre ) { + const char* (*preHookFunc) (const char *p); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_pre[hIndex].func; + retVal___ = preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sv.skip_escaped_c(p); + } + if( HPMHooks.count.HP_sv_skip_escaped_c_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +bool HP_sv_readdb(const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_sv_readdb_pre ) { + bool (*preHookFunc) (const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_readdb_pre[hIndex].func; + retVal___ = preHookFunc(directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sv.readdb(directory, filename, delim, mincols, maxcols, maxrows, parseproc); + } + if( HPMHooks.count.HP_sv_readdb_post ) { + bool (*postHookFunc) (bool retVal___, const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_readdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc); + } + } + return retVal___; +} +/* sysinfo */ +int HP_sysinfo_getpagesize(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_sysinfo_getpagesize_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sysinfo.getpagesize(); + } + if( HPMHooks.count.HP_sysinfo_getpagesize_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +const char* HP_sysinfo_platform(void) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_platform_pre ) { + const char* (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_platform_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sysinfo.platform(); + } + if( HPMHooks.count.HP_sysinfo_platform_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_platform_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +const char* HP_sysinfo_osversion(void) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_osversion_pre ) { + const char* (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_osversion_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sysinfo.osversion(); + } + if( HPMHooks.count.HP_sysinfo_osversion_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_osversion_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +const char* HP_sysinfo_cpu(void) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_cpu_pre ) { + const char* (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_cpu_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sysinfo.cpu(); + } + if( HPMHooks.count.HP_sysinfo_cpu_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_cpu_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_sysinfo_cpucores(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_sysinfo_cpucores_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_cpucores_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sysinfo.cpucores(); + } + if( HPMHooks.count.HP_sysinfo_cpucores_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_cpucores_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +const char* HP_sysinfo_arch(void) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_arch_pre ) { + const char* (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_arch_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sysinfo.arch(); + } + if( HPMHooks.count.HP_sysinfo_arch_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_arch_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_sysinfo_is64bit(void) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_sysinfo_is64bit_pre ) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_is64bit_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sysinfo.is64bit(); + } + if( HPMHooks.count.HP_sysinfo_is64bit_post ) { + bool (*postHookFunc) (bool retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_is64bit_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +const char* HP_sysinfo_compiler(void) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_compiler_pre ) { + const char* (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_compiler_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sysinfo.compiler(); + } + if( HPMHooks.count.HP_sysinfo_compiler_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_compiler_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +const char* HP_sysinfo_cflags(void) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_cflags_pre ) { + const char* (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_cflags_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sysinfo.cflags(); + } + if( HPMHooks.count.HP_sysinfo_cflags_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_cflags_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +const char* HP_sysinfo_vcstype(void) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_vcstype_pre ) { + const char* (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_vcstype_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sysinfo.vcstype(); + } + if( HPMHooks.count.HP_sysinfo_vcstype_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_vcstype_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_sysinfo_vcstypeid(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_sysinfo_vcstypeid_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sysinfo.vcstypeid(); + } + if( HPMHooks.count.HP_sysinfo_vcstypeid_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +const char* HP_sysinfo_vcsrevision_src(void) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_vcsrevision_src_pre ) { + const char* (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sysinfo.vcsrevision_src(); + } + if( HPMHooks.count.HP_sysinfo_vcsrevision_src_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +const char* HP_sysinfo_vcsrevision_scripts(void) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre ) { + const char* (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sysinfo.vcsrevision_scripts(); + } + if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_sysinfo_vcsrevision_reload(void) { + int hIndex = 0; + if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -1013,26 +7181,26 @@ void HP_login_fromchar_parse_change_pincode(int fd) { } } { - HPMHooks.source.login.fromchar_parse_change_pincode(fd); + HPMHooks.source.sysinfo.vcsrevision_reload(); } - if( HPMHooks.count.HP_login_fromchar_parse_change_pincode_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_pincode_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_pincode_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_post[hIndex].func; + postHookFunc(); } } return; } -bool HP_login_fromchar_parse_wrong_pincode(int fd) { +bool HP_sysinfo_is_superuser(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_pre ) { - bool (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_sysinfo_is_superuser_pre ) { + bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_wrong_pincode_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -1040,25 +7208,25 @@ bool HP_login_fromchar_parse_wrong_pincode(int fd) { } } { - retVal___ = HPMHooks.source.login.fromchar_parse_wrong_pincode(fd); + retVal___ = HPMHooks.source.sysinfo.is_superuser(); } - if( HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_post ) { - bool (*postHookFunc) (bool retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_wrong_pincode_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_sysinfo_is_superuser_post ) { + bool (*postHookFunc) (bool retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -void HP_login_fromchar_parse_accinfo(int fd) { +void HP_sysinfo_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_accinfo_pre ) { - void (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_sysinfo_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_accinfo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_fromchar_parse_accinfo_pre[hIndex].func; - preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -1066,235 +7234,242 @@ void HP_login_fromchar_parse_accinfo(int fd) { } } { - HPMHooks.source.login.fromchar_parse_accinfo(fd); + HPMHooks.source.sysinfo.init(); } - if( HPMHooks.count.HP_login_fromchar_parse_accinfo_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_accinfo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_fromchar_parse_accinfo_post[hIndex].func; - postHookFunc(&fd); + if( HPMHooks.count.HP_sysinfo_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_init_post[hIndex].func; + postHookFunc(); } } return; } -int HP_login_parse_fromchar(int fd) { +void HP_sysinfo_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_login_parse_fromchar_pre ) { - int (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_sysinfo_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_fromchar_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_fromchar_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.login.parse_fromchar(fd); + HPMHooks.source.sysinfo.final(); } - if( HPMHooks.count.HP_login_parse_fromchar_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_fromchar_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_fromchar_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_sysinfo_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -void HP_login_connection_problem(int fd, uint8 status) { +/* timer */ +int64 HP_timer_gettick(void) { int hIndex = 0; - if( HPMHooks.count.HP_login_connection_problem_pre ) { - void (*preHookFunc) (int *fd, uint8 *status); + int64 retVal___ = 0; + if( HPMHooks.count.HP_timer_gettick_pre ) { + int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_connection_problem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_connection_problem_pre[hIndex].func; - preHookFunc(&fd, &status); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_gettick_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.connection_problem(fd, status); + retVal___ = HPMHooks.source.timer.gettick(); } - if( HPMHooks.count.HP_login_connection_problem_post ) { - void (*postHookFunc) (int *fd, uint8 *status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_connection_problem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_connection_problem_post[hIndex].func; - postHookFunc(&fd, &status); + if( HPMHooks.count.HP_timer_gettick_post ) { + int64 (*postHookFunc) (int64 retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_gettick_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -void HP_login_kick(struct login_session_data *sd) { +int64 HP_timer_gettick_nocache(void) { int hIndex = 0; - if( HPMHooks.count.HP_login_kick_pre ) { - void (*preHookFunc) (struct login_session_data *sd); + int64 retVal___ = 0; + if( HPMHooks.count.HP_timer_gettick_nocache_pre ) { + int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_kick_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_kick_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_gettick_nocache_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.kick(sd); + retVal___ = HPMHooks.source.timer.gettick_nocache(); } - if( HPMHooks.count.HP_login_kick_post ) { - void (*postHookFunc) (struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_kick_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_kick_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_timer_gettick_nocache_post ) { + int64 (*postHookFunc) (int64 retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_gettick_nocache_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -void HP_login_auth_ok(struct login_session_data *sd) { +int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { int hIndex = 0; - if( HPMHooks.count.HP_login_auth_ok_pre ) { - void (*preHookFunc) (struct login_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_timer_add_pre ) { + int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_ok_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_auth_ok_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_add_pre[hIndex].func; + retVal___ = preHookFunc(&tick, &func, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.auth_ok(sd); + retVal___ = HPMHooks.source.timer.add(tick, func, id, data); } - if( HPMHooks.count.HP_login_auth_ok_post ) { - void (*postHookFunc) (struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_ok_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_auth_ok_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_timer_add_post ) { + int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data); } } - return; + return retVal___; } -void HP_login_auth_failed(struct login_session_data *sd, int result) { +int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int interval) { int hIndex = 0; - if( HPMHooks.count.HP_login_auth_failed_pre ) { - void (*preHookFunc) (struct login_session_data *sd, int *result); + int retVal___ = 0; + if( HPMHooks.count.HP_timer_add_interval_pre ) { + int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_failed_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_auth_failed_pre[hIndex].func; - preHookFunc(sd, &result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_add_interval_pre[hIndex].func; + retVal___ = preHookFunc(&tick, &func, &id, &data, &interval); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.auth_failed(sd, result); + retVal___ = HPMHooks.source.timer.add_interval(tick, func, id, data, interval); } - if( HPMHooks.count.HP_login_auth_failed_post ) { - void (*postHookFunc) (struct login_session_data *sd, int *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_failed_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_auth_failed_post[hIndex].func; - postHookFunc(sd, &result); + if( HPMHooks.count.HP_timer_add_interval_post ) { + int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_add_interval_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data, &interval); } } - return; + return retVal___; } -void HP_login_login_error(int fd, uint8 status) { +const struct TimerData* HP_timer_get(int tid) { int hIndex = 0; - if( HPMHooks.count.HP_login_login_error_pre ) { - void (*preHookFunc) (int *fd, uint8 *status); + const struct TimerData* retVal___ = NULL; + if( HPMHooks.count.HP_timer_get_pre ) { + const struct TimerData* (*preHookFunc) (int *tid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_login_error_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_login_error_pre[hIndex].func; - preHookFunc(&fd, &status); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_get_pre[hIndex].func; + retVal___ = preHookFunc(&tid); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.login_error(fd, status); + retVal___ = HPMHooks.source.timer.get(tid); } - if( HPMHooks.count.HP_login_login_error_post ) { - void (*postHookFunc) (int *fd, uint8 *status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_login_error_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_login_error_post[hIndex].func; - postHookFunc(&fd, &status); + if( HPMHooks.count.HP_timer_get_post ) { + const struct TimerData* (*postHookFunc) (const struct TimerData* retVal___, int *tid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_get_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid); } } - return; + return retVal___; } -void HP_login_parse_ping(int fd, struct login_session_data *sd) { +int HP_timer_delete(int tid, TimerFunc func) { int hIndex = 0; - if( HPMHooks.count.HP_login_parse_ping_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_timer_delete_pre ) { + int (*preHookFunc) (int *tid, TimerFunc *func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_ping_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_ping_pre[hIndex].func; - preHookFunc(&fd, sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_delete_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &func); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.parse_ping(fd, sd); + retVal___ = HPMHooks.source.timer.delete(tid, func); } - if( HPMHooks.count.HP_login_parse_ping_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_ping_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_ping_post[hIndex].func; - postHookFunc(&fd, sd); + if( HPMHooks.count.HP_timer_delete_post ) { + int (*postHookFunc) (int retVal___, int *tid, TimerFunc *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &func); } } - return; + return retVal___; } -void HP_login_parse_client_md5(int fd, struct login_session_data *sd) { +int64 HP_timer_addtick(int tid, int64 tick) { int hIndex = 0; - if( HPMHooks.count.HP_login_parse_client_md5_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd); + int64 retVal___ = 0; + if( HPMHooks.count.HP_timer_addtick_pre ) { + int64 (*preHookFunc) (int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_client_md5_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_client_md5_pre[hIndex].func; - preHookFunc(&fd, sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_addtick_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.parse_client_md5(fd, sd); + retVal___ = HPMHooks.source.timer.addtick(tid, tick); } - if( HPMHooks.count.HP_login_parse_client_md5_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_client_md5_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_client_md5_post[hIndex].func; - postHookFunc(&fd, sd); + if( HPMHooks.count.HP_timer_addtick_post ) { + int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_addtick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick); } } - return; + return retVal___; } -bool HP_login_parse_client_login(int fd, struct login_session_data *sd, const char *ip) { +int64 HP_timer_settick(int tid, int64 tick) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_login_parse_client_login_pre ) { - bool (*preHookFunc) (int *fd, struct login_session_data *sd, const char *ip); + int64 retVal___ = 0; + if( HPMHooks.count.HP_timer_settick_pre ) { + int64 (*preHookFunc) (int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_client_login_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_client_login_pre[hIndex].func; - retVal___ = preHookFunc(&fd, sd, ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_settick_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -1302,103 +7477,106 @@ bool HP_login_parse_client_login(int fd, struct login_session_data *sd, const ch } } { - retVal___ = HPMHooks.source.login.parse_client_login(fd, sd, ip); + retVal___ = HPMHooks.source.timer.settick(tid, tick); } - if( HPMHooks.count.HP_login_parse_client_login_post ) { - bool (*postHookFunc) (bool retVal___, int *fd, struct login_session_data *sd, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_client_login_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_client_login_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, sd, ip); + if( HPMHooks.count.HP_timer_settick_post ) { + int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_settick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick); } } return retVal___; } -void HP_login_send_coding_key(int fd, struct login_session_data *sd) { +int HP_timer_add_func_list(TimerFunc func, char *name) { int hIndex = 0; - if( HPMHooks.count.HP_login_send_coding_key_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_timer_add_func_list_pre ) { + int (*preHookFunc) (TimerFunc *func, char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_send_coding_key_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_send_coding_key_pre[hIndex].func; - preHookFunc(&fd, sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_add_func_list_pre[hIndex].func; + retVal___ = preHookFunc(&func, name); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.send_coding_key(fd, sd); + retVal___ = HPMHooks.source.timer.add_func_list(func, name); } - if( HPMHooks.count.HP_login_send_coding_key_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_send_coding_key_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_send_coding_key_post[hIndex].func; - postHookFunc(&fd, sd); + if( HPMHooks.count.HP_timer_add_func_list_post ) { + int (*postHookFunc) (int retVal___, TimerFunc *func, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_add_func_list_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &func, name); } } - return; + return retVal___; } -void HP_login_parse_request_coding_key(int fd, struct login_session_data *sd) { +unsigned long HP_timer_get_uptime(void) { int hIndex = 0; - if( HPMHooks.count.HP_login_parse_request_coding_key_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd); + unsigned long retVal___ = 0; + if( HPMHooks.count.HP_timer_get_uptime_pre ) { + unsigned long (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_coding_key_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_request_coding_key_pre[hIndex].func; - preHookFunc(&fd, sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_get_uptime_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.parse_request_coding_key(fd, sd); + retVal___ = HPMHooks.source.timer.get_uptime(); } - if( HPMHooks.count.HP_login_parse_request_coding_key_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_coding_key_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_request_coding_key_post[hIndex].func; - postHookFunc(&fd, sd); + if( HPMHooks.count.HP_timer_get_uptime_post ) { + unsigned long (*postHookFunc) (unsigned long retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_get_uptime_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -void HP_login_char_server_connection_status(int fd, struct login_session_data *sd, uint8 status) { +int HP_timer_perform(int64 tick) { int hIndex = 0; - if( HPMHooks.count.HP_login_char_server_connection_status_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd, uint8 *status); + int retVal___ = 0; + if( HPMHooks.count.HP_timer_perform_pre ) { + int (*preHookFunc) (int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_char_server_connection_status_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_char_server_connection_status_pre[hIndex].func; - preHookFunc(&fd, sd, &status); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_perform_pre[hIndex].func; + retVal___ = preHookFunc(&tick); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.char_server_connection_status(fd, sd, status); + retVal___ = HPMHooks.source.timer.perform(tick); } - if( HPMHooks.count.HP_login_char_server_connection_status_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd, uint8 *status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_char_server_connection_status_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_char_server_connection_status_post[hIndex].func; - postHookFunc(&fd, sd, &status); + if( HPMHooks.count.HP_timer_perform_post ) { + int (*postHookFunc) (int retVal___, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_perform_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tick); } } - return; + return retVal___; } -void HP_login_parse_request_connection(int fd, struct login_session_data *sd, const char *ip, uint32 ipl) { +void HP_timer_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_login_parse_request_connection_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd, const char *ip, uint32 *ipl); + if( HPMHooks.count.HP_timer_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_connection_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_request_connection_pre[hIndex].func; - preHookFunc(&fd, sd, ip, &ipl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -1406,41 +7584,40 @@ void HP_login_parse_request_connection(int fd, struct login_session_data *sd, co } } { - HPMHooks.source.login.parse_request_connection(fd, sd, ip, ipl); + HPMHooks.source.timer.init(); } - if( HPMHooks.count.HP_login_parse_request_connection_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd, const char *ip, uint32 *ipl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_connection_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_request_connection_post[hIndex].func; - postHookFunc(&fd, sd, ip, &ipl); + if( HPMHooks.count.HP_timer_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_init_post[hIndex].func; + postHookFunc(); } } return; } -int HP_login_parse_login(int fd) { +void HP_timer_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_login_parse_login_pre ) { - int (*preHookFunc) (int *fd); + if( HPMHooks.count.HP_timer_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_login_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_login_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.login.parse_login(fd); + HPMHooks.source.timer.final(); } - if( HPMHooks.count.HP_login_parse_login_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_login_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_login_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if( HPMHooks.count.HP_timer_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } diff --git a/src/plugins/HPMHooking/HPMHooking_login.sources.inc b/src/plugins/HPMHooking/HPMHooking_login.sources.inc index aa1bb2625..8bafb6a68 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.sources.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.sources.inc @@ -4,4 +4,19 @@ // NOTE: This file was auto-generated and should never be manually edited, // as it will get overwritten. +memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface)); +memcpy(&HPMHooks.source.cmdline, cmdline, sizeof(struct cmdline_interface)); +memcpy(&HPMHooks.source.console, console, sizeof(struct console_interface)); +memcpy(&HPMHooks.source.DB, DB, sizeof(struct db_interface)); +memcpy(&HPMHooks.source.libconfig, libconfig, sizeof(struct libconfig_interface)); memcpy(&HPMHooks.source.login, login, sizeof(struct login_interface)); +memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface)); +memcpy(&HPMHooks.source.nullpo, nullpo, sizeof(struct nullpo_interface)); +memcpy(&HPMHooks.source.showmsg, showmsg, sizeof(struct showmsg_interface)); +memcpy(&HPMHooks.source.sockt, sockt, sizeof(struct socket_interface)); +memcpy(&HPMHooks.source.SQL, SQL, sizeof(struct sql_interface)); +memcpy(&HPMHooks.source.StrBuf, StrBuf, sizeof(struct stringbuf_interface)); +memcpy(&HPMHooks.source.strlib, strlib, sizeof(struct strlib_interface)); +memcpy(&HPMHooks.source.sv, sv, sizeof(struct sv_interface)); +memcpy(&HPMHooks.source.sysinfo, sysinfo, sizeof(struct sysinfo_interface)); +memcpy(&HPMHooks.source.timer, timer, sizeof(struct timer_interface)); diff --git a/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc index 88fe7745a..5f8ab313c 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc @@ -4,6 +4,7 @@ // NOTE: This file was auto-generated and should never be manually edited, // as it will get overwritten. +if( !(HCache = GET_SYMBOL("HCache") ) ) return "HCache"; if( !(atcommand = GET_SYMBOL("atcommand") ) ) return "atcommand"; if( !(battle = GET_SYMBOL("battle") ) ) return "battle"; if( !(bg = GET_SYMBOL("battlegrounds") ) ) return "battlegrounds"; @@ -12,6 +13,9 @@ if( !(channel = GET_SYMBOL("channel") ) ) return "channel"; if( !(chat = GET_SYMBOL("chat") ) ) return "chat"; if( !(chrif = GET_SYMBOL("chrif") ) ) return "chrif"; if( !(clif = GET_SYMBOL("clif") ) ) return "clif"; +if( !(cmdline = GET_SYMBOL("cmdline") ) ) return "cmdline"; +if( !(console = GET_SYMBOL("console") ) ) return "console"; +if( !(DB = GET_SYMBOL("DB") ) ) return "DB"; if( !(duel = GET_SYMBOL("duel") ) ) return "duel"; if( !(elemental = GET_SYMBOL("elemental") ) ) return "elemental"; if( !(guild = GET_SYMBOL("guild") ) ) return "guild"; @@ -21,14 +25,18 @@ if( !(instance = GET_SYMBOL("instance") ) ) return "instance"; if( !(intif = GET_SYMBOL("intif") ) ) return "intif"; if( !(ircbot = GET_SYMBOL("ircbot") ) ) return "ircbot"; if( !(itemdb = GET_SYMBOL("itemdb") ) ) return "itemdb"; +if( !(libconfig = GET_SYMBOL("libconfig") ) ) return "libconfig"; if( !(logs = GET_SYMBOL("logs") ) ) return "logs"; if( !(mail = GET_SYMBOL("mail") ) ) return "mail"; +if( !(iMalloc = GET_SYMBOL("iMalloc") ) ) return "iMalloc"; if( !(map = GET_SYMBOL("map") ) ) return "map"; +if( !(mapindex = GET_SYMBOL("mapindex") ) ) return "mapindex"; if( !(mapit = GET_SYMBOL("mapit") ) ) return "mapit"; if( !(mapreg = GET_SYMBOL("mapreg") ) ) return "mapreg"; if( !(mercenary = GET_SYMBOL("mercenary") ) ) return "mercenary"; if( !(mob = GET_SYMBOL("mob") ) ) return "mob"; if( !(npc = GET_SYMBOL("npc") ) ) return "npc"; +if( !(nullpo = GET_SYMBOL("nullpo") ) ) return "nullpo"; if( !(party = GET_SYMBOL("party") ) ) return "party"; if( !(path = GET_SYMBOL("path") ) ) return "path"; if( !(pcg = GET_SYMBOL("pc_groups") ) ) return "pc_groups"; @@ -37,9 +45,17 @@ if( !(pet = GET_SYMBOL("pet") ) ) return "pet"; if( !(quest = GET_SYMBOL("quest") ) ) return "quest"; if( !(script = GET_SYMBOL("script") ) ) return "script"; if( !(searchstore = GET_SYMBOL("searchstore") ) ) return "searchstore"; +if( !(showmsg = GET_SYMBOL("showmsg") ) ) return "showmsg"; if( !(skill = GET_SYMBOL("skill") ) ) return "skill"; +if( !(sockt = GET_SYMBOL("sockt") ) ) return "sockt"; +if( !(SQL = GET_SYMBOL("SQL") ) ) return "SQL"; if( !(status = GET_SYMBOL("status") ) ) return "status"; if( !(storage = GET_SYMBOL("storage") ) ) return "storage"; +if( !(StrBuf = GET_SYMBOL("StrBuf") ) ) return "StrBuf"; +if( !(strlib = GET_SYMBOL("strlib") ) ) return "strlib"; +if( !(sv = GET_SYMBOL("sv") ) ) return "sv"; +if( !(sysinfo = GET_SYMBOL("sysinfo") ) ) return "sysinfo"; +if( !(timer = GET_SYMBOL("timer") ) ) return "timer"; if( !(trade = GET_SYMBOL("trade") ) ) return "trade"; if( !(unit = GET_SYMBOL("unit") ) ) return "unit"; if( !(vending = GET_SYMBOL("vending") ) ) return "vending"; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 33c991933..471853956 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -5,6 +5,12 @@ // as it will get overwritten. struct { + struct HPMHookPoint *HP_HCache_init_pre; + struct HPMHookPoint *HP_HCache_init_post; + struct HPMHookPoint *HP_HCache_check_pre; + struct HPMHookPoint *HP_HCache_check_post; + struct HPMHookPoint *HP_HCache_open_pre; + struct HPMHookPoint *HP_HCache_open_post; struct HPMHookPoint *HP_atcommand_init_pre; struct HPMHookPoint *HP_atcommand_init_post; struct HPMHookPoint *HP_atcommand_final_pre; @@ -1807,6 +1813,62 @@ struct { struct HPMHookPoint *HP_clif_pNPCMarketClosed_post; struct HPMHookPoint *HP_clif_pNPCMarketPurchase_pre; struct HPMHookPoint *HP_clif_pNPCMarketPurchase_post; + struct HPMHookPoint *HP_cmdline_init_pre; + struct HPMHookPoint *HP_cmdline_init_post; + struct HPMHookPoint *HP_cmdline_final_pre; + struct HPMHookPoint *HP_cmdline_final_post; + struct HPMHookPoint *HP_cmdline_arg_add_pre; + struct HPMHookPoint *HP_cmdline_arg_add_post; + struct HPMHookPoint *HP_cmdline_exec_pre; + struct HPMHookPoint *HP_cmdline_exec_post; + struct HPMHookPoint *HP_cmdline_arg_next_value_pre; + struct HPMHookPoint *HP_cmdline_arg_next_value_post; + struct HPMHookPoint *HP_cmdline_arg_source_pre; + struct HPMHookPoint *HP_cmdline_arg_source_post; + struct HPMHookPoint *HP_console_init_pre; + struct HPMHookPoint *HP_console_init_post; + struct HPMHookPoint *HP_console_final_pre; + struct HPMHookPoint *HP_console_final_post; + struct HPMHookPoint *HP_console_display_title_pre; + struct HPMHookPoint *HP_console_display_title_post; + struct HPMHookPoint *HP_DB_fix_options_pre; + struct HPMHookPoint *HP_DB_fix_options_post; + struct HPMHookPoint *HP_DB_default_cmp_pre; + struct HPMHookPoint *HP_DB_default_cmp_post; + struct HPMHookPoint *HP_DB_default_hash_pre; + struct HPMHookPoint *HP_DB_default_hash_post; + struct HPMHookPoint *HP_DB_default_release_pre; + struct HPMHookPoint *HP_DB_default_release_post; + struct HPMHookPoint *HP_DB_custom_release_pre; + struct HPMHookPoint *HP_DB_custom_release_post; + struct HPMHookPoint *HP_DB_alloc_pre; + struct HPMHookPoint *HP_DB_alloc_post; + struct HPMHookPoint *HP_DB_i2key_pre; + struct HPMHookPoint *HP_DB_i2key_post; + struct HPMHookPoint *HP_DB_ui2key_pre; + struct HPMHookPoint *HP_DB_ui2key_post; + struct HPMHookPoint *HP_DB_str2key_pre; + struct HPMHookPoint *HP_DB_str2key_post; + struct HPMHookPoint *HP_DB_i642key_pre; + struct HPMHookPoint *HP_DB_i642key_post; + struct HPMHookPoint *HP_DB_ui642key_pre; + struct HPMHookPoint *HP_DB_ui642key_post; + struct HPMHookPoint *HP_DB_i2data_pre; + struct HPMHookPoint *HP_DB_i2data_post; + struct HPMHookPoint *HP_DB_ui2data_pre; + struct HPMHookPoint *HP_DB_ui2data_post; + struct HPMHookPoint *HP_DB_ptr2data_pre; + struct HPMHookPoint *HP_DB_ptr2data_post; + struct HPMHookPoint *HP_DB_data2i_pre; + struct HPMHookPoint *HP_DB_data2i_post; + struct HPMHookPoint *HP_DB_data2ui_pre; + struct HPMHookPoint *HP_DB_data2ui_post; + struct HPMHookPoint *HP_DB_data2ptr_pre; + struct HPMHookPoint *HP_DB_data2ptr_post; + struct HPMHookPoint *HP_DB_init_pre; + struct HPMHookPoint *HP_DB_init_post; + struct HPMHookPoint *HP_DB_final_pre; + struct HPMHookPoint *HP_DB_final_post; struct HPMHookPoint *HP_duel_create_pre; struct HPMHookPoint *HP_duel_create_post; struct HPMHookPoint *HP_duel_invite_pre; @@ -2635,6 +2697,122 @@ struct { struct HPMHookPoint *HP_itemdb_is_item_usable_post; struct HPMHookPoint *HP_itemdb_lookup_const_pre; struct HPMHookPoint *HP_itemdb_lookup_const_post; + struct HPMHookPoint *HP_libconfig_read_pre; + struct HPMHookPoint *HP_libconfig_read_post; + struct HPMHookPoint *HP_libconfig_write_pre; + struct HPMHookPoint *HP_libconfig_write_post; + struct HPMHookPoint *HP_libconfig_set_auto_convert_pre; + struct HPMHookPoint *HP_libconfig_set_auto_convert_post; + struct HPMHookPoint *HP_libconfig_get_auto_convert_pre; + struct HPMHookPoint *HP_libconfig_get_auto_convert_post; + struct HPMHookPoint *HP_libconfig_read_string_pre; + struct HPMHookPoint *HP_libconfig_read_string_post; + struct HPMHookPoint *HP_libconfig_read_file_src_pre; + struct HPMHookPoint *HP_libconfig_read_file_src_post; + struct HPMHookPoint *HP_libconfig_write_file_pre; + struct HPMHookPoint *HP_libconfig_write_file_post; + struct HPMHookPoint *HP_libconfig_set_destructor_pre; + struct HPMHookPoint *HP_libconfig_set_destructor_post; + struct HPMHookPoint *HP_libconfig_set_include_dir_pre; + struct HPMHookPoint *HP_libconfig_set_include_dir_post; + struct HPMHookPoint *HP_libconfig_init_pre; + struct HPMHookPoint *HP_libconfig_init_post; + struct HPMHookPoint *HP_libconfig_destroy_pre; + struct HPMHookPoint *HP_libconfig_destroy_post; + struct HPMHookPoint *HP_libconfig_setting_get_int_pre; + struct HPMHookPoint *HP_libconfig_setting_get_int_post; + struct HPMHookPoint *HP_libconfig_setting_get_int64_pre; + struct HPMHookPoint *HP_libconfig_setting_get_int64_post; + struct HPMHookPoint *HP_libconfig_setting_get_float_pre; + struct HPMHookPoint *HP_libconfig_setting_get_float_post; + struct HPMHookPoint *HP_libconfig_setting_get_bool_pre; + struct HPMHookPoint *HP_libconfig_setting_get_bool_post; + struct HPMHookPoint *HP_libconfig_setting_get_string_pre; + struct HPMHookPoint *HP_libconfig_setting_get_string_post; + struct HPMHookPoint *HP_libconfig_setting_lookup_int_pre; + struct HPMHookPoint *HP_libconfig_setting_lookup_int_post; + struct HPMHookPoint *HP_libconfig_setting_lookup_int64_pre; + struct HPMHookPoint *HP_libconfig_setting_lookup_int64_post; + struct HPMHookPoint *HP_libconfig_setting_lookup_float_pre; + struct HPMHookPoint *HP_libconfig_setting_lookup_float_post; + struct HPMHookPoint *HP_libconfig_setting_lookup_bool_pre; + struct HPMHookPoint *HP_libconfig_setting_lookup_bool_post; + struct HPMHookPoint *HP_libconfig_setting_lookup_string_pre; + struct HPMHookPoint *HP_libconfig_setting_lookup_string_post; + struct HPMHookPoint *HP_libconfig_setting_set_int_pre; + struct HPMHookPoint *HP_libconfig_setting_set_int_post; + struct HPMHookPoint *HP_libconfig_setting_set_int64_pre; + struct HPMHookPoint *HP_libconfig_setting_set_int64_post; + struct HPMHookPoint *HP_libconfig_setting_set_float_pre; + struct HPMHookPoint *HP_libconfig_setting_set_float_post; + struct HPMHookPoint *HP_libconfig_setting_set_bool_pre; + struct HPMHookPoint *HP_libconfig_setting_set_bool_post; + struct HPMHookPoint *HP_libconfig_setting_set_string_pre; + struct HPMHookPoint *HP_libconfig_setting_set_string_post; + struct HPMHookPoint *HP_libconfig_setting_set_format_pre; + struct HPMHookPoint *HP_libconfig_setting_set_format_post; + struct HPMHookPoint *HP_libconfig_setting_get_format_pre; + struct HPMHookPoint *HP_libconfig_setting_get_format_post; + struct HPMHookPoint *HP_libconfig_setting_get_int_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_int_elem_post; + struct HPMHookPoint *HP_libconfig_setting_get_int64_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_int64_elem_post; + struct HPMHookPoint *HP_libconfig_setting_get_float_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_float_elem_post; + struct HPMHookPoint *HP_libconfig_setting_get_bool_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_bool_elem_post; + struct HPMHookPoint *HP_libconfig_setting_get_string_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_string_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_int_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_set_int_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_int64_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_set_int64_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_float_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_set_float_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_bool_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_set_bool_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_string_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_set_string_elem_post; + struct HPMHookPoint *HP_libconfig_setting_index_pre; + struct HPMHookPoint *HP_libconfig_setting_index_post; + struct HPMHookPoint *HP_libconfig_setting_length_pre; + struct HPMHookPoint *HP_libconfig_setting_length_post; + struct HPMHookPoint *HP_libconfig_setting_get_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_get_elem_post; + struct HPMHookPoint *HP_libconfig_setting_get_member_pre; + struct HPMHookPoint *HP_libconfig_setting_get_member_post; + struct HPMHookPoint *HP_libconfig_setting_add_pre; + struct HPMHookPoint *HP_libconfig_setting_add_post; + struct HPMHookPoint *HP_libconfig_setting_remove_pre; + struct HPMHookPoint *HP_libconfig_setting_remove_post; + struct HPMHookPoint *HP_libconfig_setting_remove_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_remove_elem_post; + struct HPMHookPoint *HP_libconfig_setting_set_hook_pre; + struct HPMHookPoint *HP_libconfig_setting_set_hook_post; + struct HPMHookPoint *HP_libconfig_lookup_pre; + struct HPMHookPoint *HP_libconfig_lookup_post; + struct HPMHookPoint *HP_libconfig_lookup_from_pre; + struct HPMHookPoint *HP_libconfig_lookup_from_post; + struct HPMHookPoint *HP_libconfig_lookup_int_pre; + struct HPMHookPoint *HP_libconfig_lookup_int_post; + struct HPMHookPoint *HP_libconfig_lookup_int64_pre; + struct HPMHookPoint *HP_libconfig_lookup_int64_post; + struct HPMHookPoint *HP_libconfig_lookup_float_pre; + struct HPMHookPoint *HP_libconfig_lookup_float_post; + struct HPMHookPoint *HP_libconfig_lookup_bool_pre; + struct HPMHookPoint *HP_libconfig_lookup_bool_post; + struct HPMHookPoint *HP_libconfig_lookup_string_pre; + struct HPMHookPoint *HP_libconfig_lookup_string_post; + struct HPMHookPoint *HP_libconfig_read_file_pre; + struct HPMHookPoint *HP_libconfig_read_file_post; + struct HPMHookPoint *HP_libconfig_setting_copy_simple_pre; + struct HPMHookPoint *HP_libconfig_setting_copy_simple_post; + struct HPMHookPoint *HP_libconfig_setting_copy_elem_pre; + struct HPMHookPoint *HP_libconfig_setting_copy_elem_post; + struct HPMHookPoint *HP_libconfig_setting_copy_aggregate_pre; + struct HPMHookPoint *HP_libconfig_setting_copy_aggregate_post; + struct HPMHookPoint *HP_libconfig_setting_copy_pre; + struct HPMHookPoint *HP_libconfig_setting_copy_post; struct HPMHookPoint *HP_logs_pick_pc_pre; struct HPMHookPoint *HP_logs_pick_pc_post; struct HPMHookPoint *HP_logs_pick_mob_pre; @@ -2697,6 +2875,32 @@ struct { struct HPMHookPoint *HP_mail_deliveryfail_post; struct HPMHookPoint *HP_mail_invalid_operation_pre; struct HPMHookPoint *HP_mail_invalid_operation_post; + struct HPMHookPoint *HP_iMalloc_init_pre; + struct HPMHookPoint *HP_iMalloc_init_post; + struct HPMHookPoint *HP_iMalloc_final_pre; + struct HPMHookPoint *HP_iMalloc_final_post; + struct HPMHookPoint *HP_iMalloc_malloc_pre; + struct HPMHookPoint *HP_iMalloc_malloc_post; + struct HPMHookPoint *HP_iMalloc_calloc_pre; + struct HPMHookPoint *HP_iMalloc_calloc_post; + struct HPMHookPoint *HP_iMalloc_realloc_pre; + struct HPMHookPoint *HP_iMalloc_realloc_post; + struct HPMHookPoint *HP_iMalloc_reallocz_pre; + struct HPMHookPoint *HP_iMalloc_reallocz_post; + struct HPMHookPoint *HP_iMalloc_astrdup_pre; + struct HPMHookPoint *HP_iMalloc_astrdup_post; + struct HPMHookPoint *HP_iMalloc_free_pre; + struct HPMHookPoint *HP_iMalloc_free_post; + struct HPMHookPoint *HP_iMalloc_memory_check_pre; + struct HPMHookPoint *HP_iMalloc_memory_check_post; + struct HPMHookPoint *HP_iMalloc_verify_ptr_pre; + struct HPMHookPoint *HP_iMalloc_verify_ptr_post; + struct HPMHookPoint *HP_iMalloc_usage_pre; + struct HPMHookPoint *HP_iMalloc_usage_post; + struct HPMHookPoint *HP_iMalloc_post_shutdown_pre; + struct HPMHookPoint *HP_iMalloc_post_shutdown_post; + struct HPMHookPoint *HP_iMalloc_init_messages_pre; + struct HPMHookPoint *HP_iMalloc_init_messages_post; struct HPMHookPoint *HP_map_zone_init_pre; struct HPMHookPoint *HP_map_zone_init_post; struct HPMHookPoint *HP_map_zone_remove_pre; @@ -2953,6 +3157,24 @@ struct { struct HPMHookPoint *HP_map_merge_zone_post; struct HPMHookPoint *HP_map_zone_clear_single_pre; struct HPMHookPoint *HP_map_zone_clear_single_post; + struct HPMHookPoint *HP_mapindex_init_pre; + struct HPMHookPoint *HP_mapindex_init_post; + struct HPMHookPoint *HP_mapindex_final_pre; + struct HPMHookPoint *HP_mapindex_final_post; + struct HPMHookPoint *HP_mapindex_addmap_pre; + struct HPMHookPoint *HP_mapindex_addmap_post; + struct HPMHookPoint *HP_mapindex_removemap_pre; + struct HPMHookPoint *HP_mapindex_removemap_post; + struct HPMHookPoint *HP_mapindex_getmapname_pre; + struct HPMHookPoint *HP_mapindex_getmapname_post; + struct HPMHookPoint *HP_mapindex_getmapname_ext_pre; + struct HPMHookPoint *HP_mapindex_getmapname_ext_post; + struct HPMHookPoint *HP_mapindex_name2id_pre; + struct HPMHookPoint *HP_mapindex_name2id_post; + struct HPMHookPoint *HP_mapindex_id2name_pre; + struct HPMHookPoint *HP_mapindex_id2name_post; + struct HPMHookPoint *HP_mapindex_check_default_pre; + struct HPMHookPoint *HP_mapindex_check_default_post; struct HPMHookPoint *HP_mapit_alloc_pre; struct HPMHookPoint *HP_mapit_alloc_post; struct HPMHookPoint *HP_mapit_free_pre; @@ -3441,6 +3663,8 @@ struct { struct HPMHookPoint *HP_npc_db_checkid_post; struct HPMHookPoint *HP_npc_secure_timeout_timer_pre; struct HPMHookPoint *HP_npc_secure_timeout_timer_post; + struct HPMHookPoint *HP_nullpo_assert_report_pre; + struct HPMHookPoint *HP_nullpo_assert_report_post; struct HPMHookPoint *HP_party_init_pre; struct HPMHookPoint *HP_party_init_post; struct HPMHookPoint *HP_party_final_pre; @@ -4421,6 +4645,14 @@ struct { struct HPMHookPoint *HP_searchstore_clearremote_post; struct HPMHookPoint *HP_searchstore_result_pre; struct HPMHookPoint *HP_searchstore_result_post; + struct HPMHookPoint *HP_showmsg_init_pre; + struct HPMHookPoint *HP_showmsg_init_post; + struct HPMHookPoint *HP_showmsg_final_pre; + struct HPMHookPoint *HP_showmsg_final_post; + struct HPMHookPoint *HP_showmsg_clearScreen_pre; + struct HPMHookPoint *HP_showmsg_clearScreen_post; + struct HPMHookPoint *HP_showmsg_showMessageV_pre; + struct HPMHookPoint *HP_showmsg_showMessageV_post; struct HPMHookPoint *HP_skill_init_pre; struct HPMHookPoint *HP_skill_init_post; struct HPMHookPoint *HP_skill_final_pre; @@ -4855,6 +5087,126 @@ struct { struct HPMHookPoint *HP_skill_get_requirement_item_unknown_post; struct HPMHookPoint *HP_skill_get_requirement_unknown_pre; struct HPMHookPoint *HP_skill_get_requirement_unknown_post; + struct HPMHookPoint *HP_sockt_init_pre; + struct HPMHookPoint *HP_sockt_init_post; + struct HPMHookPoint *HP_sockt_final_pre; + struct HPMHookPoint *HP_sockt_final_post; + struct HPMHookPoint *HP_sockt_perform_pre; + struct HPMHookPoint *HP_sockt_perform_post; + struct HPMHookPoint *HP_sockt_datasync_pre; + struct HPMHookPoint *HP_sockt_datasync_post; + struct HPMHookPoint *HP_sockt_make_listen_bind_pre; + struct HPMHookPoint *HP_sockt_make_listen_bind_post; + struct HPMHookPoint *HP_sockt_make_connection_pre; + struct HPMHookPoint *HP_sockt_make_connection_post; + struct HPMHookPoint *HP_sockt_realloc_fifo_pre; + struct HPMHookPoint *HP_sockt_realloc_fifo_post; + struct HPMHookPoint *HP_sockt_realloc_writefifo_pre; + struct HPMHookPoint *HP_sockt_realloc_writefifo_post; + struct HPMHookPoint *HP_sockt_wfifoset_pre; + struct HPMHookPoint *HP_sockt_wfifoset_post; + struct HPMHookPoint *HP_sockt_rfifoskip_pre; + struct HPMHookPoint *HP_sockt_rfifoskip_post; + struct HPMHookPoint *HP_sockt_close_pre; + struct HPMHookPoint *HP_sockt_close_post; + struct HPMHookPoint *HP_sockt_session_is_valid_pre; + struct HPMHookPoint *HP_sockt_session_is_valid_post; + struct HPMHookPoint *HP_sockt_session_is_active_pre; + struct HPMHookPoint *HP_sockt_session_is_active_post; + struct HPMHookPoint *HP_sockt_flush_pre; + struct HPMHookPoint *HP_sockt_flush_post; + struct HPMHookPoint *HP_sockt_flush_fifos_pre; + struct HPMHookPoint *HP_sockt_flush_fifos_post; + struct HPMHookPoint *HP_sockt_set_nonblocking_pre; + struct HPMHookPoint *HP_sockt_set_nonblocking_post; + struct HPMHookPoint *HP_sockt_set_defaultparse_pre; + struct HPMHookPoint *HP_sockt_set_defaultparse_post; + struct HPMHookPoint *HP_sockt_host2ip_pre; + struct HPMHookPoint *HP_sockt_host2ip_post; + struct HPMHookPoint *HP_sockt_ip2str_pre; + struct HPMHookPoint *HP_sockt_ip2str_post; + struct HPMHookPoint *HP_sockt_str2ip_pre; + struct HPMHookPoint *HP_sockt_str2ip_post; + struct HPMHookPoint *HP_sockt_ntows_pre; + struct HPMHookPoint *HP_sockt_ntows_post; + struct HPMHookPoint *HP_sockt_getips_pre; + struct HPMHookPoint *HP_sockt_getips_post; + struct HPMHookPoint *HP_sockt_eof_pre; + struct HPMHookPoint *HP_sockt_eof_post; + struct HPMHookPoint *HP_sockt_lan_subnet_check_pre; + struct HPMHookPoint *HP_sockt_lan_subnet_check_post; + struct HPMHookPoint *HP_sockt_allowed_ip_check_pre; + struct HPMHookPoint *HP_sockt_allowed_ip_check_post; + struct HPMHookPoint *HP_sockt_trusted_ip_check_pre; + struct HPMHookPoint *HP_sockt_trusted_ip_check_post; + struct HPMHookPoint *HP_sockt_net_config_read_sub_pre; + struct HPMHookPoint *HP_sockt_net_config_read_sub_post; + struct HPMHookPoint *HP_sockt_net_config_read_pre; + struct HPMHookPoint *HP_sockt_net_config_read_post; + struct HPMHookPoint *HP_SQL_Connect_pre; + struct HPMHookPoint *HP_SQL_Connect_post; + struct HPMHookPoint *HP_SQL_GetTimeout_pre; + struct HPMHookPoint *HP_SQL_GetTimeout_post; + struct HPMHookPoint *HP_SQL_GetColumnNames_pre; + struct HPMHookPoint *HP_SQL_GetColumnNames_post; + struct HPMHookPoint *HP_SQL_SetEncoding_pre; + struct HPMHookPoint *HP_SQL_SetEncoding_post; + struct HPMHookPoint *HP_SQL_Ping_pre; + struct HPMHookPoint *HP_SQL_Ping_post; + struct HPMHookPoint *HP_SQL_EscapeString_pre; + struct HPMHookPoint *HP_SQL_EscapeString_post; + struct HPMHookPoint *HP_SQL_EscapeStringLen_pre; + struct HPMHookPoint *HP_SQL_EscapeStringLen_post; + struct HPMHookPoint *HP_SQL_QueryV_pre; + struct HPMHookPoint *HP_SQL_QueryV_post; + struct HPMHookPoint *HP_SQL_QueryStr_pre; + struct HPMHookPoint *HP_SQL_QueryStr_post; + struct HPMHookPoint *HP_SQL_LastInsertId_pre; + struct HPMHookPoint *HP_SQL_LastInsertId_post; + struct HPMHookPoint *HP_SQL_NumColumns_pre; + struct HPMHookPoint *HP_SQL_NumColumns_post; + struct HPMHookPoint *HP_SQL_NumRows_pre; + struct HPMHookPoint *HP_SQL_NumRows_post; + struct HPMHookPoint *HP_SQL_NextRow_pre; + struct HPMHookPoint *HP_SQL_NextRow_post; + struct HPMHookPoint *HP_SQL_GetData_pre; + struct HPMHookPoint *HP_SQL_GetData_post; + struct HPMHookPoint *HP_SQL_FreeResult_pre; + struct HPMHookPoint *HP_SQL_FreeResult_post; + struct HPMHookPoint *HP_SQL_ShowDebug__pre; + struct HPMHookPoint *HP_SQL_ShowDebug__post; + struct HPMHookPoint *HP_SQL_Free_pre; + struct HPMHookPoint *HP_SQL_Free_post; + struct HPMHookPoint *HP_SQL_Malloc_pre; + struct HPMHookPoint *HP_SQL_Malloc_post; + struct HPMHookPoint *HP_SQL_StmtMalloc_pre; + struct HPMHookPoint *HP_SQL_StmtMalloc_post; + struct HPMHookPoint *HP_SQL_StmtPrepareV_pre; + struct HPMHookPoint *HP_SQL_StmtPrepareV_post; + struct HPMHookPoint *HP_SQL_StmtPrepareStr_pre; + struct HPMHookPoint *HP_SQL_StmtPrepareStr_post; + struct HPMHookPoint *HP_SQL_StmtNumParams_pre; + struct HPMHookPoint *HP_SQL_StmtNumParams_post; + struct HPMHookPoint *HP_SQL_StmtBindParam_pre; + struct HPMHookPoint *HP_SQL_StmtBindParam_post; + struct HPMHookPoint *HP_SQL_StmtExecute_pre; + struct HPMHookPoint *HP_SQL_StmtExecute_post; + struct HPMHookPoint *HP_SQL_StmtLastInsertId_pre; + struct HPMHookPoint *HP_SQL_StmtLastInsertId_post; + struct HPMHookPoint *HP_SQL_StmtNumColumns_pre; + struct HPMHookPoint *HP_SQL_StmtNumColumns_post; + struct HPMHookPoint *HP_SQL_StmtBindColumn_pre; + struct HPMHookPoint *HP_SQL_StmtBindColumn_post; + struct HPMHookPoint *HP_SQL_StmtNumRows_pre; + struct HPMHookPoint *HP_SQL_StmtNumRows_post; + struct HPMHookPoint *HP_SQL_StmtNextRow_pre; + struct HPMHookPoint *HP_SQL_StmtNextRow_post; + struct HPMHookPoint *HP_SQL_StmtFreeResult_pre; + struct HPMHookPoint *HP_SQL_StmtFreeResult_post; + struct HPMHookPoint *HP_SQL_StmtFree_pre; + struct HPMHookPoint *HP_SQL_StmtFree_post; + struct HPMHookPoint *HP_SQL_StmtShowDebug__pre; + struct HPMHookPoint *HP_SQL_StmtShowDebug__post; struct HPMHookPoint *HP_status_init_pre; struct HPMHookPoint *HP_status_init_post; struct HPMHookPoint *HP_status_final_pre; @@ -5103,6 +5455,130 @@ struct { struct HPMHookPoint *HP_storage_sortitem_post; struct HPMHookPoint *HP_storage_reconnect_sub_pre; struct HPMHookPoint *HP_storage_reconnect_sub_post; + struct HPMHookPoint *HP_StrBuf_Malloc_pre; + struct HPMHookPoint *HP_StrBuf_Malloc_post; + struct HPMHookPoint *HP_StrBuf_Init_pre; + struct HPMHookPoint *HP_StrBuf_Init_post; + struct HPMHookPoint *HP_StrBuf_Vprintf_pre; + struct HPMHookPoint *HP_StrBuf_Vprintf_post; + struct HPMHookPoint *HP_StrBuf_Append_pre; + struct HPMHookPoint *HP_StrBuf_Append_post; + struct HPMHookPoint *HP_StrBuf_AppendStr_pre; + struct HPMHookPoint *HP_StrBuf_AppendStr_post; + struct HPMHookPoint *HP_StrBuf_Length_pre; + struct HPMHookPoint *HP_StrBuf_Length_post; + struct HPMHookPoint *HP_StrBuf_Value_pre; + struct HPMHookPoint *HP_StrBuf_Value_post; + struct HPMHookPoint *HP_StrBuf_Clear_pre; + struct HPMHookPoint *HP_StrBuf_Clear_post; + struct HPMHookPoint *HP_StrBuf_Destroy_pre; + struct HPMHookPoint *HP_StrBuf_Destroy_post; + struct HPMHookPoint *HP_StrBuf_Free_pre; + struct HPMHookPoint *HP_StrBuf_Free_post; + struct HPMHookPoint *HP_strlib_jstrescape_pre; + struct HPMHookPoint *HP_strlib_jstrescape_post; + struct HPMHookPoint *HP_strlib_jstrescapecpy_pre; + struct HPMHookPoint *HP_strlib_jstrescapecpy_post; + struct HPMHookPoint *HP_strlib_jmemescapecpy_pre; + struct HPMHookPoint *HP_strlib_jmemescapecpy_post; + struct HPMHookPoint *HP_strlib_remove_control_chars__pre; + struct HPMHookPoint *HP_strlib_remove_control_chars__post; + struct HPMHookPoint *HP_strlib_trim__pre; + struct HPMHookPoint *HP_strlib_trim__post; + struct HPMHookPoint *HP_strlib_normalize_name__pre; + struct HPMHookPoint *HP_strlib_normalize_name__post; + struct HPMHookPoint *HP_strlib_stristr__pre; + struct HPMHookPoint *HP_strlib_stristr__post; + struct HPMHookPoint *HP_strlib_strnlen__pre; + struct HPMHookPoint *HP_strlib_strnlen__post; + struct HPMHookPoint *HP_strlib_strtok_r__pre; + struct HPMHookPoint *HP_strlib_strtok_r__post; + struct HPMHookPoint *HP_strlib_e_mail_check__pre; + struct HPMHookPoint *HP_strlib_e_mail_check__post; + struct HPMHookPoint *HP_strlib_config_switch__pre; + struct HPMHookPoint *HP_strlib_config_switch__post; + struct HPMHookPoint *HP_strlib_safestrncpy__pre; + struct HPMHookPoint *HP_strlib_safestrncpy__post; + struct HPMHookPoint *HP_strlib_safestrnlen__pre; + struct HPMHookPoint *HP_strlib_safestrnlen__post; + struct HPMHookPoint *HP_strlib_strline__pre; + struct HPMHookPoint *HP_strlib_strline__post; + struct HPMHookPoint *HP_strlib_bin2hex__pre; + struct HPMHookPoint *HP_strlib_bin2hex__post; + struct HPMHookPoint *HP_sv_parse_next_pre; + struct HPMHookPoint *HP_sv_parse_next_post; + struct HPMHookPoint *HP_sv_parse_pre; + struct HPMHookPoint *HP_sv_parse_post; + struct HPMHookPoint *HP_sv_split_pre; + struct HPMHookPoint *HP_sv_split_post; + struct HPMHookPoint *HP_sv_escape_c_pre; + struct HPMHookPoint *HP_sv_escape_c_post; + struct HPMHookPoint *HP_sv_unescape_c_pre; + struct HPMHookPoint *HP_sv_unescape_c_post; + struct HPMHookPoint *HP_sv_skip_escaped_c_pre; + struct HPMHookPoint *HP_sv_skip_escaped_c_post; + struct HPMHookPoint *HP_sv_readdb_pre; + struct HPMHookPoint *HP_sv_readdb_post; + struct HPMHookPoint *HP_sysinfo_getpagesize_pre; + struct HPMHookPoint *HP_sysinfo_getpagesize_post; + struct HPMHookPoint *HP_sysinfo_platform_pre; + struct HPMHookPoint *HP_sysinfo_platform_post; + struct HPMHookPoint *HP_sysinfo_osversion_pre; + struct HPMHookPoint *HP_sysinfo_osversion_post; + struct HPMHookPoint *HP_sysinfo_cpu_pre; + struct HPMHookPoint *HP_sysinfo_cpu_post; + struct HPMHookPoint *HP_sysinfo_cpucores_pre; + struct HPMHookPoint *HP_sysinfo_cpucores_post; + struct HPMHookPoint *HP_sysinfo_arch_pre; + struct HPMHookPoint *HP_sysinfo_arch_post; + struct HPMHookPoint *HP_sysinfo_is64bit_pre; + struct HPMHookPoint *HP_sysinfo_is64bit_post; + struct HPMHookPoint *HP_sysinfo_compiler_pre; + struct HPMHookPoint *HP_sysinfo_compiler_post; + struct HPMHookPoint *HP_sysinfo_cflags_pre; + struct HPMHookPoint *HP_sysinfo_cflags_post; + struct HPMHookPoint *HP_sysinfo_vcstype_pre; + struct HPMHookPoint *HP_sysinfo_vcstype_post; + struct HPMHookPoint *HP_sysinfo_vcstypeid_pre; + struct HPMHookPoint *HP_sysinfo_vcstypeid_post; + struct HPMHookPoint *HP_sysinfo_vcsrevision_src_pre; + struct HPMHookPoint *HP_sysinfo_vcsrevision_src_post; + struct HPMHookPoint *HP_sysinfo_vcsrevision_scripts_pre; + struct HPMHookPoint *HP_sysinfo_vcsrevision_scripts_post; + struct HPMHookPoint *HP_sysinfo_vcsrevision_reload_pre; + struct HPMHookPoint *HP_sysinfo_vcsrevision_reload_post; + struct HPMHookPoint *HP_sysinfo_is_superuser_pre; + struct HPMHookPoint *HP_sysinfo_is_superuser_post; + struct HPMHookPoint *HP_sysinfo_init_pre; + struct HPMHookPoint *HP_sysinfo_init_post; + struct HPMHookPoint *HP_sysinfo_final_pre; + struct HPMHookPoint *HP_sysinfo_final_post; + struct HPMHookPoint *HP_timer_gettick_pre; + struct HPMHookPoint *HP_timer_gettick_post; + struct HPMHookPoint *HP_timer_gettick_nocache_pre; + struct HPMHookPoint *HP_timer_gettick_nocache_post; + struct HPMHookPoint *HP_timer_add_pre; + struct HPMHookPoint *HP_timer_add_post; + struct HPMHookPoint *HP_timer_add_interval_pre; + struct HPMHookPoint *HP_timer_add_interval_post; + struct HPMHookPoint *HP_timer_get_pre; + struct HPMHookPoint *HP_timer_get_post; + struct HPMHookPoint *HP_timer_delete_pre; + struct HPMHookPoint *HP_timer_delete_post; + struct HPMHookPoint *HP_timer_addtick_pre; + struct HPMHookPoint *HP_timer_addtick_post; + struct HPMHookPoint *HP_timer_settick_pre; + struct HPMHookPoint *HP_timer_settick_post; + struct HPMHookPoint *HP_timer_add_func_list_pre; + struct HPMHookPoint *HP_timer_add_func_list_post; + struct HPMHookPoint *HP_timer_get_uptime_pre; + struct HPMHookPoint *HP_timer_get_uptime_post; + struct HPMHookPoint *HP_timer_perform_pre; + struct HPMHookPoint *HP_timer_perform_post; + struct HPMHookPoint *HP_timer_init_pre; + struct HPMHookPoint *HP_timer_init_post; + struct HPMHookPoint *HP_timer_final_pre; + struct HPMHookPoint *HP_timer_final_post; struct HPMHookPoint *HP_trade_request_pre; struct HPMHookPoint *HP_trade_request_post; struct HPMHookPoint *HP_trade_ack_pre; @@ -5236,6 +5712,12 @@ struct { } list; struct { + int HP_HCache_init_pre; + int HP_HCache_init_post; + int HP_HCache_check_pre; + int HP_HCache_check_post; + int HP_HCache_open_pre; + int HP_HCache_open_post; int HP_atcommand_init_pre; int HP_atcommand_init_post; int HP_atcommand_final_pre; @@ -7038,6 +7520,62 @@ struct { int HP_clif_pNPCMarketClosed_post; int HP_clif_pNPCMarketPurchase_pre; int HP_clif_pNPCMarketPurchase_post; + int HP_cmdline_init_pre; + int HP_cmdline_init_post; + int HP_cmdline_final_pre; + int HP_cmdline_final_post; + int HP_cmdline_arg_add_pre; + int HP_cmdline_arg_add_post; + int HP_cmdline_exec_pre; + int HP_cmdline_exec_post; + int HP_cmdline_arg_next_value_pre; + int HP_cmdline_arg_next_value_post; + int HP_cmdline_arg_source_pre; + int HP_cmdline_arg_source_post; + int HP_console_init_pre; + int HP_console_init_post; + int HP_console_final_pre; + int HP_console_final_post; + int HP_console_display_title_pre; + int HP_console_display_title_post; + int HP_DB_fix_options_pre; + int HP_DB_fix_options_post; + int HP_DB_default_cmp_pre; + int HP_DB_default_cmp_post; + int HP_DB_default_hash_pre; + int HP_DB_default_hash_post; + int HP_DB_default_release_pre; + int HP_DB_default_release_post; + int HP_DB_custom_release_pre; + int HP_DB_custom_release_post; + int HP_DB_alloc_pre; + int HP_DB_alloc_post; + int HP_DB_i2key_pre; + int HP_DB_i2key_post; + int HP_DB_ui2key_pre; + int HP_DB_ui2key_post; + int HP_DB_str2key_pre; + int HP_DB_str2key_post; + int HP_DB_i642key_pre; + int HP_DB_i642key_post; + int HP_DB_ui642key_pre; + int HP_DB_ui642key_post; + int HP_DB_i2data_pre; + int HP_DB_i2data_post; + int HP_DB_ui2data_pre; + int HP_DB_ui2data_post; + int HP_DB_ptr2data_pre; + int HP_DB_ptr2data_post; + int HP_DB_data2i_pre; + int HP_DB_data2i_post; + int HP_DB_data2ui_pre; + int HP_DB_data2ui_post; + int HP_DB_data2ptr_pre; + int HP_DB_data2ptr_post; + int HP_DB_init_pre; + int HP_DB_init_post; + int HP_DB_final_pre; + int HP_DB_final_post; int HP_duel_create_pre; int HP_duel_create_post; int HP_duel_invite_pre; @@ -7866,6 +8404,122 @@ struct { int HP_itemdb_is_item_usable_post; int HP_itemdb_lookup_const_pre; int HP_itemdb_lookup_const_post; + int HP_libconfig_read_pre; + int HP_libconfig_read_post; + int HP_libconfig_write_pre; + int HP_libconfig_write_post; + int HP_libconfig_set_auto_convert_pre; + int HP_libconfig_set_auto_convert_post; + int HP_libconfig_get_auto_convert_pre; + int HP_libconfig_get_auto_convert_post; + int HP_libconfig_read_string_pre; + int HP_libconfig_read_string_post; + int HP_libconfig_read_file_src_pre; + int HP_libconfig_read_file_src_post; + int HP_libconfig_write_file_pre; + int HP_libconfig_write_file_post; + int HP_libconfig_set_destructor_pre; + int HP_libconfig_set_destructor_post; + int HP_libconfig_set_include_dir_pre; + int HP_libconfig_set_include_dir_post; + int HP_libconfig_init_pre; + int HP_libconfig_init_post; + int HP_libconfig_destroy_pre; + int HP_libconfig_destroy_post; + int HP_libconfig_setting_get_int_pre; + int HP_libconfig_setting_get_int_post; + int HP_libconfig_setting_get_int64_pre; + int HP_libconfig_setting_get_int64_post; + int HP_libconfig_setting_get_float_pre; + int HP_libconfig_setting_get_float_post; + int HP_libconfig_setting_get_bool_pre; + int HP_libconfig_setting_get_bool_post; + int HP_libconfig_setting_get_string_pre; + int HP_libconfig_setting_get_string_post; + int HP_libconfig_setting_lookup_int_pre; + int HP_libconfig_setting_lookup_int_post; + int HP_libconfig_setting_lookup_int64_pre; + int HP_libconfig_setting_lookup_int64_post; + int HP_libconfig_setting_lookup_float_pre; + int HP_libconfig_setting_lookup_float_post; + int HP_libconfig_setting_lookup_bool_pre; + int HP_libconfig_setting_lookup_bool_post; + int HP_libconfig_setting_lookup_string_pre; + int HP_libconfig_setting_lookup_string_post; + int HP_libconfig_setting_set_int_pre; + int HP_libconfig_setting_set_int_post; + int HP_libconfig_setting_set_int64_pre; + int HP_libconfig_setting_set_int64_post; + int HP_libconfig_setting_set_float_pre; + int HP_libconfig_setting_set_float_post; + int HP_libconfig_setting_set_bool_pre; + int HP_libconfig_setting_set_bool_post; + int HP_libconfig_setting_set_string_pre; + int HP_libconfig_setting_set_string_post; + int HP_libconfig_setting_set_format_pre; + int HP_libconfig_setting_set_format_post; + int HP_libconfig_setting_get_format_pre; + int HP_libconfig_setting_get_format_post; + int HP_libconfig_setting_get_int_elem_pre; + int HP_libconfig_setting_get_int_elem_post; + int HP_libconfig_setting_get_int64_elem_pre; + int HP_libconfig_setting_get_int64_elem_post; + int HP_libconfig_setting_get_float_elem_pre; + int HP_libconfig_setting_get_float_elem_post; + int HP_libconfig_setting_get_bool_elem_pre; + int HP_libconfig_setting_get_bool_elem_post; + int HP_libconfig_setting_get_string_elem_pre; + int HP_libconfig_setting_get_string_elem_post; + int HP_libconfig_setting_set_int_elem_pre; + int HP_libconfig_setting_set_int_elem_post; + int HP_libconfig_setting_set_int64_elem_pre; + int HP_libconfig_setting_set_int64_elem_post; + int HP_libconfig_setting_set_float_elem_pre; + int HP_libconfig_setting_set_float_elem_post; + int HP_libconfig_setting_set_bool_elem_pre; + int HP_libconfig_setting_set_bool_elem_post; + int HP_libconfig_setting_set_string_elem_pre; + int HP_libconfig_setting_set_string_elem_post; + int HP_libconfig_setting_index_pre; + int HP_libconfig_setting_index_post; + int HP_libconfig_setting_length_pre; + int HP_libconfig_setting_length_post; + int HP_libconfig_setting_get_elem_pre; + int HP_libconfig_setting_get_elem_post; + int HP_libconfig_setting_get_member_pre; + int HP_libconfig_setting_get_member_post; + int HP_libconfig_setting_add_pre; + int HP_libconfig_setting_add_post; + int HP_libconfig_setting_remove_pre; + int HP_libconfig_setting_remove_post; + int HP_libconfig_setting_remove_elem_pre; + int HP_libconfig_setting_remove_elem_post; + int HP_libconfig_setting_set_hook_pre; + int HP_libconfig_setting_set_hook_post; + int HP_libconfig_lookup_pre; + int HP_libconfig_lookup_post; + int HP_libconfig_lookup_from_pre; + int HP_libconfig_lookup_from_post; + int HP_libconfig_lookup_int_pre; + int HP_libconfig_lookup_int_post; + int HP_libconfig_lookup_int64_pre; + int HP_libconfig_lookup_int64_post; + int HP_libconfig_lookup_float_pre; + int HP_libconfig_lookup_float_post; + int HP_libconfig_lookup_bool_pre; + int HP_libconfig_lookup_bool_post; + int HP_libconfig_lookup_string_pre; + int HP_libconfig_lookup_string_post; + int HP_libconfig_read_file_pre; + int HP_libconfig_read_file_post; + int HP_libconfig_setting_copy_simple_pre; + int HP_libconfig_setting_copy_simple_post; + int HP_libconfig_setting_copy_elem_pre; + int HP_libconfig_setting_copy_elem_post; + int HP_libconfig_setting_copy_aggregate_pre; + int HP_libconfig_setting_copy_aggregate_post; + int HP_libconfig_setting_copy_pre; + int HP_libconfig_setting_copy_post; int HP_logs_pick_pc_pre; int HP_logs_pick_pc_post; int HP_logs_pick_mob_pre; @@ -7928,6 +8582,32 @@ struct { int HP_mail_deliveryfail_post; int HP_mail_invalid_operation_pre; int HP_mail_invalid_operation_post; + int HP_iMalloc_init_pre; + int HP_iMalloc_init_post; + int HP_iMalloc_final_pre; + int HP_iMalloc_final_post; + int HP_iMalloc_malloc_pre; + int HP_iMalloc_malloc_post; + int HP_iMalloc_calloc_pre; + int HP_iMalloc_calloc_post; + int HP_iMalloc_realloc_pre; + int HP_iMalloc_realloc_post; + int HP_iMalloc_reallocz_pre; + int HP_iMalloc_reallocz_post; + int HP_iMalloc_astrdup_pre; + int HP_iMalloc_astrdup_post; + int HP_iMalloc_free_pre; + int HP_iMalloc_free_post; + int HP_iMalloc_memory_check_pre; + int HP_iMalloc_memory_check_post; + int HP_iMalloc_verify_ptr_pre; + int HP_iMalloc_verify_ptr_post; + int HP_iMalloc_usage_pre; + int HP_iMalloc_usage_post; + int HP_iMalloc_post_shutdown_pre; + int HP_iMalloc_post_shutdown_post; + int HP_iMalloc_init_messages_pre; + int HP_iMalloc_init_messages_post; int HP_map_zone_init_pre; int HP_map_zone_init_post; int HP_map_zone_remove_pre; @@ -8184,6 +8864,24 @@ struct { int HP_map_merge_zone_post; int HP_map_zone_clear_single_pre; int HP_map_zone_clear_single_post; + int HP_mapindex_init_pre; + int HP_mapindex_init_post; + int HP_mapindex_final_pre; + int HP_mapindex_final_post; + int HP_mapindex_addmap_pre; + int HP_mapindex_addmap_post; + int HP_mapindex_removemap_pre; + int HP_mapindex_removemap_post; + int HP_mapindex_getmapname_pre; + int HP_mapindex_getmapname_post; + int HP_mapindex_getmapname_ext_pre; + int HP_mapindex_getmapname_ext_post; + int HP_mapindex_name2id_pre; + int HP_mapindex_name2id_post; + int HP_mapindex_id2name_pre; + int HP_mapindex_id2name_post; + int HP_mapindex_check_default_pre; + int HP_mapindex_check_default_post; int HP_mapit_alloc_pre; int HP_mapit_alloc_post; int HP_mapit_free_pre; @@ -8672,6 +9370,8 @@ struct { int HP_npc_db_checkid_post; int HP_npc_secure_timeout_timer_pre; int HP_npc_secure_timeout_timer_post; + int HP_nullpo_assert_report_pre; + int HP_nullpo_assert_report_post; int HP_party_init_pre; int HP_party_init_post; int HP_party_final_pre; @@ -9652,6 +10352,14 @@ struct { int HP_searchstore_clearremote_post; int HP_searchstore_result_pre; int HP_searchstore_result_post; + int HP_showmsg_init_pre; + int HP_showmsg_init_post; + int HP_showmsg_final_pre; + int HP_showmsg_final_post; + int HP_showmsg_clearScreen_pre; + int HP_showmsg_clearScreen_post; + int HP_showmsg_showMessageV_pre; + int HP_showmsg_showMessageV_post; int HP_skill_init_pre; int HP_skill_init_post; int HP_skill_final_pre; @@ -10086,6 +10794,126 @@ struct { int HP_skill_get_requirement_item_unknown_post; int HP_skill_get_requirement_unknown_pre; int HP_skill_get_requirement_unknown_post; + int HP_sockt_init_pre; + int HP_sockt_init_post; + int HP_sockt_final_pre; + int HP_sockt_final_post; + int HP_sockt_perform_pre; + int HP_sockt_perform_post; + int HP_sockt_datasync_pre; + int HP_sockt_datasync_post; + int HP_sockt_make_listen_bind_pre; + int HP_sockt_make_listen_bind_post; + int HP_sockt_make_connection_pre; + int HP_sockt_make_connection_post; + int HP_sockt_realloc_fifo_pre; + int HP_sockt_realloc_fifo_post; + int HP_sockt_realloc_writefifo_pre; + int HP_sockt_realloc_writefifo_post; + int HP_sockt_wfifoset_pre; + int HP_sockt_wfifoset_post; + int HP_sockt_rfifoskip_pre; + int HP_sockt_rfifoskip_post; + int HP_sockt_close_pre; + int HP_sockt_close_post; + int HP_sockt_session_is_valid_pre; + int HP_sockt_session_is_valid_post; + int HP_sockt_session_is_active_pre; + int HP_sockt_session_is_active_post; + int HP_sockt_flush_pre; + int HP_sockt_flush_post; + int HP_sockt_flush_fifos_pre; + int HP_sockt_flush_fifos_post; + int HP_sockt_set_nonblocking_pre; + int HP_sockt_set_nonblocking_post; + int HP_sockt_set_defaultparse_pre; + int HP_sockt_set_defaultparse_post; + int HP_sockt_host2ip_pre; + int HP_sockt_host2ip_post; + int HP_sockt_ip2str_pre; + int HP_sockt_ip2str_post; + int HP_sockt_str2ip_pre; + int HP_sockt_str2ip_post; + int HP_sockt_ntows_pre; + int HP_sockt_ntows_post; + int HP_sockt_getips_pre; + int HP_sockt_getips_post; + int HP_sockt_eof_pre; + int HP_sockt_eof_post; + int HP_sockt_lan_subnet_check_pre; + int HP_sockt_lan_subnet_check_post; + int HP_sockt_allowed_ip_check_pre; + int HP_sockt_allowed_ip_check_post; + int HP_sockt_trusted_ip_check_pre; + int HP_sockt_trusted_ip_check_post; + int HP_sockt_net_config_read_sub_pre; + int HP_sockt_net_config_read_sub_post; + int HP_sockt_net_config_read_pre; + int HP_sockt_net_config_read_post; + int HP_SQL_Connect_pre; + int HP_SQL_Connect_post; + int HP_SQL_GetTimeout_pre; + int HP_SQL_GetTimeout_post; + int HP_SQL_GetColumnNames_pre; + int HP_SQL_GetColumnNames_post; + int HP_SQL_SetEncoding_pre; + int HP_SQL_SetEncoding_post; + int HP_SQL_Ping_pre; + int HP_SQL_Ping_post; + int HP_SQL_EscapeString_pre; + int HP_SQL_EscapeString_post; + int HP_SQL_EscapeStringLen_pre; + int HP_SQL_EscapeStringLen_post; + int HP_SQL_QueryV_pre; + int HP_SQL_QueryV_post; + int HP_SQL_QueryStr_pre; + int HP_SQL_QueryStr_post; + int HP_SQL_LastInsertId_pre; + int HP_SQL_LastInsertId_post; + int HP_SQL_NumColumns_pre; + int HP_SQL_NumColumns_post; + int HP_SQL_NumRows_pre; + int HP_SQL_NumRows_post; + int HP_SQL_NextRow_pre; + int HP_SQL_NextRow_post; + int HP_SQL_GetData_pre; + int HP_SQL_GetData_post; + int HP_SQL_FreeResult_pre; + int HP_SQL_FreeResult_post; + int HP_SQL_ShowDebug__pre; + int HP_SQL_ShowDebug__post; + int HP_SQL_Free_pre; + int HP_SQL_Free_post; + int HP_SQL_Malloc_pre; + int HP_SQL_Malloc_post; + int HP_SQL_StmtMalloc_pre; + int HP_SQL_StmtMalloc_post; + int HP_SQL_StmtPrepareV_pre; + int HP_SQL_StmtPrepareV_post; + int HP_SQL_StmtPrepareStr_pre; + int HP_SQL_StmtPrepareStr_post; + int HP_SQL_StmtNumParams_pre; + int HP_SQL_StmtNumParams_post; + int HP_SQL_StmtBindParam_pre; + int HP_SQL_StmtBindParam_post; + int HP_SQL_StmtExecute_pre; + int HP_SQL_StmtExecute_post; + int HP_SQL_StmtLastInsertId_pre; + int HP_SQL_StmtLastInsertId_post; + int HP_SQL_StmtNumColumns_pre; + int HP_SQL_StmtNumColumns_post; + int HP_SQL_StmtBindColumn_pre; + int HP_SQL_StmtBindColumn_post; + int HP_SQL_StmtNumRows_pre; + int HP_SQL_StmtNumRows_post; + int HP_SQL_StmtNextRow_pre; + int HP_SQL_StmtNextRow_post; + int HP_SQL_StmtFreeResult_pre; + int HP_SQL_StmtFreeResult_post; + int HP_SQL_StmtFree_pre; + int HP_SQL_StmtFree_post; + int HP_SQL_StmtShowDebug__pre; + int HP_SQL_StmtShowDebug__post; int HP_status_init_pre; int HP_status_init_post; int HP_status_final_pre; @@ -10334,6 +11162,130 @@ struct { int HP_storage_sortitem_post; int HP_storage_reconnect_sub_pre; int HP_storage_reconnect_sub_post; + int HP_StrBuf_Malloc_pre; + int HP_StrBuf_Malloc_post; + int HP_StrBuf_Init_pre; + int HP_StrBuf_Init_post; + int HP_StrBuf_Vprintf_pre; + int HP_StrBuf_Vprintf_post; + int HP_StrBuf_Append_pre; + int HP_StrBuf_Append_post; + int HP_StrBuf_AppendStr_pre; + int HP_StrBuf_AppendStr_post; + int HP_StrBuf_Length_pre; + int HP_StrBuf_Length_post; + int HP_StrBuf_Value_pre; + int HP_StrBuf_Value_post; + int HP_StrBuf_Clear_pre; + int HP_StrBuf_Clear_post; + int HP_StrBuf_Destroy_pre; + int HP_StrBuf_Destroy_post; + int HP_StrBuf_Free_pre; + int HP_StrBuf_Free_post; + int HP_strlib_jstrescape_pre; + int HP_strlib_jstrescape_post; + int HP_strlib_jstrescapecpy_pre; + int HP_strlib_jstrescapecpy_post; + int HP_strlib_jmemescapecpy_pre; + int HP_strlib_jmemescapecpy_post; + int HP_strlib_remove_control_chars__pre; + int HP_strlib_remove_control_chars__post; + int HP_strlib_trim__pre; + int HP_strlib_trim__post; + int HP_strlib_normalize_name__pre; + int HP_strlib_normalize_name__post; + int HP_strlib_stristr__pre; + int HP_strlib_stristr__post; + int HP_strlib_strnlen__pre; + int HP_strlib_strnlen__post; + int HP_strlib_strtok_r__pre; + int HP_strlib_strtok_r__post; + int HP_strlib_e_mail_check__pre; + int HP_strlib_e_mail_check__post; + int HP_strlib_config_switch__pre; + int HP_strlib_config_switch__post; + int HP_strlib_safestrncpy__pre; + int HP_strlib_safestrncpy__post; + int HP_strlib_safestrnlen__pre; + int HP_strlib_safestrnlen__post; + int HP_strlib_strline__pre; + int HP_strlib_strline__post; + int HP_strlib_bin2hex__pre; + int HP_strlib_bin2hex__post; + int HP_sv_parse_next_pre; + int HP_sv_parse_next_post; + int HP_sv_parse_pre; + int HP_sv_parse_post; + int HP_sv_split_pre; + int HP_sv_split_post; + int HP_sv_escape_c_pre; + int HP_sv_escape_c_post; + int HP_sv_unescape_c_pre; + int HP_sv_unescape_c_post; + int HP_sv_skip_escaped_c_pre; + int HP_sv_skip_escaped_c_post; + int HP_sv_readdb_pre; + int HP_sv_readdb_post; + int HP_sysinfo_getpagesize_pre; + int HP_sysinfo_getpagesize_post; + int HP_sysinfo_platform_pre; + int HP_sysinfo_platform_post; + int HP_sysinfo_osversion_pre; + int HP_sysinfo_osversion_post; + int HP_sysinfo_cpu_pre; + int HP_sysinfo_cpu_post; + int HP_sysinfo_cpucores_pre; + int HP_sysinfo_cpucores_post; + int HP_sysinfo_arch_pre; + int HP_sysinfo_arch_post; + int HP_sysinfo_is64bit_pre; + int HP_sysinfo_is64bit_post; + int HP_sysinfo_compiler_pre; + int HP_sysinfo_compiler_post; + int HP_sysinfo_cflags_pre; + int HP_sysinfo_cflags_post; + int HP_sysinfo_vcstype_pre; + int HP_sysinfo_vcstype_post; + int HP_sysinfo_vcstypeid_pre; + int HP_sysinfo_vcstypeid_post; + int HP_sysinfo_vcsrevision_src_pre; + int HP_sysinfo_vcsrevision_src_post; + int HP_sysinfo_vcsrevision_scripts_pre; + int HP_sysinfo_vcsrevision_scripts_post; + int HP_sysinfo_vcsrevision_reload_pre; + int HP_sysinfo_vcsrevision_reload_post; + int HP_sysinfo_is_superuser_pre; + int HP_sysinfo_is_superuser_post; + int HP_sysinfo_init_pre; + int HP_sysinfo_init_post; + int HP_sysinfo_final_pre; + int HP_sysinfo_final_post; + int HP_timer_gettick_pre; + int HP_timer_gettick_post; + int HP_timer_gettick_nocache_pre; + int HP_timer_gettick_nocache_post; + int HP_timer_add_pre; + int HP_timer_add_post; + int HP_timer_add_interval_pre; + int HP_timer_add_interval_post; + int HP_timer_get_pre; + int HP_timer_get_post; + int HP_timer_delete_pre; + int HP_timer_delete_post; + int HP_timer_addtick_pre; + int HP_timer_addtick_post; + int HP_timer_settick_pre; + int HP_timer_settick_post; + int HP_timer_add_func_list_pre; + int HP_timer_add_func_list_post; + int HP_timer_get_uptime_pre; + int HP_timer_get_uptime_post; + int HP_timer_perform_pre; + int HP_timer_perform_post; + int HP_timer_init_pre; + int HP_timer_init_post; + int HP_timer_final_pre; + int HP_timer_final_post; int HP_trade_request_pre; int HP_trade_request_post; int HP_trade_ack_pre; @@ -10467,6 +11419,7 @@ struct { } count; struct { + struct HCache_interface HCache; struct atcommand_interface atcommand; struct battle_interface battle; struct battleground_interface bg; @@ -10475,6 +11428,9 @@ struct { struct chat_interface chat; struct chrif_interface chrif; struct clif_interface clif; + struct cmdline_interface cmdline; + struct console_interface console; + struct db_interface DB; struct duel_interface duel; struct elemental_interface elemental; struct guild_interface guild; @@ -10484,14 +11440,18 @@ struct { struct intif_interface intif; struct irc_bot_interface ircbot; struct itemdb_interface itemdb; + struct libconfig_interface libconfig; struct log_interface logs; struct mail_interface mail; + struct malloc_interface iMalloc; struct map_interface map; + struct mapindex_interface mapindex; struct mapit_interface mapit; struct mapreg_interface mapreg; struct mercenary_interface mercenary; struct mob_interface mob; struct npc_interface npc; + struct nullpo_interface nullpo; struct party_interface party; struct path_interface path; struct pc_groups_interface pcg; @@ -10500,9 +11460,17 @@ struct { struct quest_interface quest; struct script_interface script; struct searchstore_interface searchstore; + struct showmsg_interface showmsg; struct skill_interface skill; + struct socket_interface sockt; + struct sql_interface SQL; struct status_interface status; struct storage_interface storage; + struct stringbuf_interface StrBuf; + struct strlib_interface strlib; + struct sv_interface sv; + struct sysinfo_interface sysinfo; + struct timer_interface timer; struct trade_interface trade; struct unit_interface unit; struct vending_interface vending; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 720d76b6c..74d073b0d 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -5,6 +5,10 @@ // as it will get overwritten. struct HookingPointData HookingPoints[] = { +/* HCache */ + { HP_POP(HCache->init, HP_HCache_init) }, + { HP_POP(HCache->check, HP_HCache_check) }, + { HP_POP(HCache->open, HP_HCache_open) }, /* atcommand */ { HP_POP(atcommand->init, HP_atcommand_init) }, { HP_POP(atcommand->final, HP_atcommand_final) }, @@ -914,6 +918,37 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pNPCShopClosed, HP_clif_pNPCShopClosed) }, { HP_POP(clif->pNPCMarketClosed, HP_clif_pNPCMarketClosed) }, { HP_POP(clif->pNPCMarketPurchase, HP_clif_pNPCMarketPurchase) }, +/* cmdline */ + { HP_POP(cmdline->init, HP_cmdline_init) }, + { HP_POP(cmdline->final, HP_cmdline_final) }, + { HP_POP(cmdline->arg_add, HP_cmdline_arg_add) }, + { HP_POP(cmdline->exec, HP_cmdline_exec) }, + { HP_POP(cmdline->arg_next_value, HP_cmdline_arg_next_value) }, + { HP_POP(cmdline->arg_source, HP_cmdline_arg_source) }, +/* console */ + { HP_POP(console->init, HP_console_init) }, + { HP_POP(console->final, HP_console_final) }, + { HP_POP(console->display_title, HP_console_display_title) }, +/* DB */ + { HP_POP(DB->fix_options, HP_DB_fix_options) }, + { HP_POP(DB->default_cmp, HP_DB_default_cmp) }, + { HP_POP(DB->default_hash, HP_DB_default_hash) }, + { HP_POP(DB->default_release, HP_DB_default_release) }, + { HP_POP(DB->custom_release, HP_DB_custom_release) }, + { HP_POP(DB->alloc, HP_DB_alloc) }, + { HP_POP(DB->i2key, HP_DB_i2key) }, + { HP_POP(DB->ui2key, HP_DB_ui2key) }, + { HP_POP(DB->str2key, HP_DB_str2key) }, + { HP_POP(DB->i642key, HP_DB_i642key) }, + { HP_POP(DB->ui642key, HP_DB_ui642key) }, + { HP_POP(DB->i2data, HP_DB_i2data) }, + { HP_POP(DB->ui2data, HP_DB_ui2data) }, + { HP_POP(DB->ptr2data, HP_DB_ptr2data) }, + { HP_POP(DB->data2i, HP_DB_data2i) }, + { HP_POP(DB->data2ui, HP_DB_data2ui) }, + { HP_POP(DB->data2ptr, HP_DB_data2ptr) }, + { HP_POP(DB->init, HP_DB_init) }, + { HP_POP(DB->final, HP_DB_final) }, /* duel */ { HP_POP(duel->create, HP_duel_create) }, { HP_POP(duel->invite, HP_duel_invite) }, @@ -1337,6 +1372,65 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->id2combo, HP_itemdb_id2combo) }, { HP_POP(itemdb->is_item_usable, HP_itemdb_is_item_usable) }, { HP_POP(itemdb->lookup_const, HP_itemdb_lookup_const) }, +/* libconfig */ + { HP_POP(libconfig->read, HP_libconfig_read) }, + { HP_POP(libconfig->write, HP_libconfig_write) }, + { HP_POP(libconfig->set_auto_convert, HP_libconfig_set_auto_convert) }, + { HP_POP(libconfig->get_auto_convert, HP_libconfig_get_auto_convert) }, + { HP_POP(libconfig->read_string, HP_libconfig_read_string) }, + { HP_POP(libconfig->read_file_src, HP_libconfig_read_file_src) }, + { HP_POP(libconfig->write_file, HP_libconfig_write_file) }, + { HP_POP(libconfig->set_destructor, HP_libconfig_set_destructor) }, + { HP_POP(libconfig->set_include_dir, HP_libconfig_set_include_dir) }, + { HP_POP(libconfig->init, HP_libconfig_init) }, + { HP_POP(libconfig->destroy, HP_libconfig_destroy) }, + { HP_POP(libconfig->setting_get_int, HP_libconfig_setting_get_int) }, + { HP_POP(libconfig->setting_get_int64, HP_libconfig_setting_get_int64) }, + { HP_POP(libconfig->setting_get_float, HP_libconfig_setting_get_float) }, + { HP_POP(libconfig->setting_get_bool, HP_libconfig_setting_get_bool) }, + { HP_POP(libconfig->setting_get_string, HP_libconfig_setting_get_string) }, + { HP_POP(libconfig->setting_lookup_int, HP_libconfig_setting_lookup_int) }, + { HP_POP(libconfig->setting_lookup_int64, HP_libconfig_setting_lookup_int64) }, + { HP_POP(libconfig->setting_lookup_float, HP_libconfig_setting_lookup_float) }, + { HP_POP(libconfig->setting_lookup_bool, HP_libconfig_setting_lookup_bool) }, + { HP_POP(libconfig->setting_lookup_string, HP_libconfig_setting_lookup_string) }, + { HP_POP(libconfig->setting_set_int, HP_libconfig_setting_set_int) }, + { HP_POP(libconfig->setting_set_int64, HP_libconfig_setting_set_int64) }, + { HP_POP(libconfig->setting_set_float, HP_libconfig_setting_set_float) }, + { HP_POP(libconfig->setting_set_bool, HP_libconfig_setting_set_bool) }, + { HP_POP(libconfig->setting_set_string, HP_libconfig_setting_set_string) }, + { HP_POP(libconfig->setting_set_format, HP_libconfig_setting_set_format) }, + { HP_POP(libconfig->setting_get_format, HP_libconfig_setting_get_format) }, + { HP_POP(libconfig->setting_get_int_elem, HP_libconfig_setting_get_int_elem) }, + { HP_POP(libconfig->setting_get_int64_elem, HP_libconfig_setting_get_int64_elem) }, + { HP_POP(libconfig->setting_get_float_elem, HP_libconfig_setting_get_float_elem) }, + { HP_POP(libconfig->setting_get_bool_elem, HP_libconfig_setting_get_bool_elem) }, + { HP_POP(libconfig->setting_get_string_elem, HP_libconfig_setting_get_string_elem) }, + { HP_POP(libconfig->setting_set_int_elem, HP_libconfig_setting_set_int_elem) }, + { HP_POP(libconfig->setting_set_int64_elem, HP_libconfig_setting_set_int64_elem) }, + { HP_POP(libconfig->setting_set_float_elem, HP_libconfig_setting_set_float_elem) }, + { HP_POP(libconfig->setting_set_bool_elem, HP_libconfig_setting_set_bool_elem) }, + { HP_POP(libconfig->setting_set_string_elem, HP_libconfig_setting_set_string_elem) }, + { HP_POP(libconfig->setting_index, HP_libconfig_setting_index) }, + { HP_POP(libconfig->setting_length, HP_libconfig_setting_length) }, + { HP_POP(libconfig->setting_get_elem, HP_libconfig_setting_get_elem) }, + { HP_POP(libconfig->setting_get_member, HP_libconfig_setting_get_member) }, + { HP_POP(libconfig->setting_add, HP_libconfig_setting_add) }, + { HP_POP(libconfig->setting_remove, HP_libconfig_setting_remove) }, + { HP_POP(libconfig->setting_remove_elem, HP_libconfig_setting_remove_elem) }, + { HP_POP(libconfig->setting_set_hook, HP_libconfig_setting_set_hook) }, + { HP_POP(libconfig->lookup, HP_libconfig_lookup) }, + { HP_POP(libconfig->lookup_from, HP_libconfig_lookup_from) }, + { HP_POP(libconfig->lookup_int, HP_libconfig_lookup_int) }, + { HP_POP(libconfig->lookup_int64, HP_libconfig_lookup_int64) }, + { HP_POP(libconfig->lookup_float, HP_libconfig_lookup_float) }, + { HP_POP(libconfig->lookup_bool, HP_libconfig_lookup_bool) }, + { HP_POP(libconfig->lookup_string, HP_libconfig_lookup_string) }, + { HP_POP(libconfig->read_file, HP_libconfig_read_file) }, + { HP_POP(libconfig->setting_copy_simple, HP_libconfig_setting_copy_simple) }, + { HP_POP(libconfig->setting_copy_elem, HP_libconfig_setting_copy_elem) }, + { HP_POP(libconfig->setting_copy_aggregate, HP_libconfig_setting_copy_aggregate) }, + { HP_POP(libconfig->setting_copy, HP_libconfig_setting_copy) }, /* logs */ { HP_POP(logs->pick_pc, HP_logs_pick_pc) }, { HP_POP(logs->pick_mob, HP_logs_pick_mob) }, @@ -1370,6 +1464,20 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mail->openmail, HP_mail_openmail) }, { HP_POP(mail->deliveryfail, HP_mail_deliveryfail) }, { HP_POP(mail->invalid_operation, HP_mail_invalid_operation) }, +/* iMalloc */ + { HP_POP(iMalloc->init, HP_iMalloc_init) }, + { HP_POP(iMalloc->final, HP_iMalloc_final) }, + { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) }, + { HP_POP(iMalloc->calloc, HP_iMalloc_calloc) }, + { HP_POP(iMalloc->realloc, HP_iMalloc_realloc) }, + { HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) }, + { HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) }, + { HP_POP(iMalloc->free, HP_iMalloc_free) }, + { HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) }, + { HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) }, + { HP_POP(iMalloc->usage, HP_iMalloc_usage) }, + { HP_POP(iMalloc->post_shutdown, HP_iMalloc_post_shutdown) }, + { HP_POP(iMalloc->init_messages, HP_iMalloc_init_messages) }, /* map */ { HP_POP(map->zone_init, HP_map_zone_init) }, { HP_POP(map->zone_remove, HP_map_zone_remove) }, @@ -1499,6 +1607,16 @@ struct HookingPointData HookingPoints[] = { { HP_POP(map->remove_questinfo, HP_map_remove_questinfo) }, { HP_POP(map->merge_zone, HP_map_merge_zone) }, { HP_POP(map->zone_clear_single, HP_map_zone_clear_single) }, +/* mapindex */ + { HP_POP(mapindex->init, HP_mapindex_init) }, + { HP_POP(mapindex->final, HP_mapindex_final) }, + { HP_POP(mapindex->addmap, HP_mapindex_addmap) }, + { HP_POP(mapindex->removemap, HP_mapindex_removemap) }, + { HP_POP(mapindex->getmapname, HP_mapindex_getmapname) }, + { HP_POP(mapindex->getmapname_ext, HP_mapindex_getmapname_ext) }, + { HP_POP(mapindex->name2id, HP_mapindex_name2id) }, + { HP_POP(mapindex->id2name, HP_mapindex_id2name) }, + { HP_POP(mapindex->check_default, HP_mapindex_check_default) }, /* mapit */ { HP_POP(mapit->alloc, HP_mapit_alloc) }, { HP_POP(mapit->free, HP_mapit_free) }, @@ -1748,6 +1866,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(npc->market_delfromsql_sub, HP_npc_market_delfromsql_sub) }, { HP_POP(npc->db_checkid, HP_npc_db_checkid) }, { HP_POP(npc->secure_timeout_timer, HP_npc_secure_timeout_timer) }, +/* nullpo */ + { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) }, /* party */ { HP_POP(party->init, HP_party_init) }, { HP_POP(party->final, HP_party_final) }, @@ -2246,6 +2366,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(searchstore->queryremote, HP_searchstore_queryremote) }, { HP_POP(searchstore->clearremote, HP_searchstore_clearremote) }, { HP_POP(searchstore->result, HP_searchstore_result) }, +/* showmsg */ + { HP_POP(showmsg->init, HP_showmsg_init) }, + { HP_POP(showmsg->final, HP_showmsg_final) }, + { HP_POP(showmsg->clearScreen, HP_showmsg_clearScreen) }, + { HP_POP(showmsg->showMessageV, HP_showmsg_showMessageV) }, /* skill */ { HP_POP(skill->init, HP_skill_init) }, { HP_POP(skill->final, HP_skill_final) }, @@ -2464,6 +2589,68 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->get_requirement_off_unknown, HP_skill_get_requirement_off_unknown) }, { HP_POP(skill->get_requirement_item_unknown, HP_skill_get_requirement_item_unknown) }, { HP_POP(skill->get_requirement_unknown, HP_skill_get_requirement_unknown) }, +/* sockt */ + { HP_POP(sockt->init, HP_sockt_init) }, + { HP_POP(sockt->final, HP_sockt_final) }, + { HP_POP(sockt->perform, HP_sockt_perform) }, + { HP_POP(sockt->datasync, HP_sockt_datasync) }, + { HP_POP(sockt->make_listen_bind, HP_sockt_make_listen_bind) }, + { HP_POP(sockt->make_connection, HP_sockt_make_connection) }, + { HP_POP(sockt->realloc_fifo, HP_sockt_realloc_fifo) }, + { HP_POP(sockt->realloc_writefifo, HP_sockt_realloc_writefifo) }, + { HP_POP(sockt->wfifoset, HP_sockt_wfifoset) }, + { HP_POP(sockt->rfifoskip, HP_sockt_rfifoskip) }, + { HP_POP(sockt->close, HP_sockt_close) }, + { HP_POP(sockt->session_is_valid, HP_sockt_session_is_valid) }, + { HP_POP(sockt->session_is_active, HP_sockt_session_is_active) }, + { HP_POP(sockt->flush, HP_sockt_flush) }, + { HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) }, + { HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) }, + { HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) }, + { HP_POP(sockt->host2ip, HP_sockt_host2ip) }, + { HP_POP(sockt->ip2str, HP_sockt_ip2str) }, + { HP_POP(sockt->str2ip, HP_sockt_str2ip) }, + { HP_POP(sockt->ntows, HP_sockt_ntows) }, + { HP_POP(sockt->getips, HP_sockt_getips) }, + { HP_POP(sockt->eof, HP_sockt_eof) }, + { HP_POP(sockt->lan_subnet_check, HP_sockt_lan_subnet_check) }, + { HP_POP(sockt->allowed_ip_check, HP_sockt_allowed_ip_check) }, + { HP_POP(sockt->trusted_ip_check, HP_sockt_trusted_ip_check) }, + { HP_POP(sockt->net_config_read_sub, HP_sockt_net_config_read_sub) }, + { HP_POP(sockt->net_config_read, HP_sockt_net_config_read) }, +/* SQL */ + { HP_POP(SQL->Connect, HP_SQL_Connect) }, + { HP_POP(SQL->GetTimeout, HP_SQL_GetTimeout) }, + { HP_POP(SQL->GetColumnNames, HP_SQL_GetColumnNames) }, + { HP_POP(SQL->SetEncoding, HP_SQL_SetEncoding) }, + { HP_POP(SQL->Ping, HP_SQL_Ping) }, + { HP_POP(SQL->EscapeString, HP_SQL_EscapeString) }, + { HP_POP(SQL->EscapeStringLen, HP_SQL_EscapeStringLen) }, + { HP_POP(SQL->QueryV, HP_SQL_QueryV) }, + { HP_POP(SQL->QueryStr, HP_SQL_QueryStr) }, + { HP_POP(SQL->LastInsertId, HP_SQL_LastInsertId) }, + { HP_POP(SQL->NumColumns, HP_SQL_NumColumns) }, + { HP_POP(SQL->NumRows, HP_SQL_NumRows) }, + { HP_POP(SQL->NextRow, HP_SQL_NextRow) }, + { HP_POP(SQL->GetData, HP_SQL_GetData) }, + { HP_POP(SQL->FreeResult, HP_SQL_FreeResult) }, + { HP_POP(SQL->ShowDebug_, HP_SQL_ShowDebug_) }, + { HP_POP(SQL->Free, HP_SQL_Free) }, + { HP_POP(SQL->Malloc, HP_SQL_Malloc) }, + { HP_POP(SQL->StmtMalloc, HP_SQL_StmtMalloc) }, + { HP_POP(SQL->StmtPrepareV, HP_SQL_StmtPrepareV) }, + { HP_POP(SQL->StmtPrepareStr, HP_SQL_StmtPrepareStr) }, + { HP_POP(SQL->StmtNumParams, HP_SQL_StmtNumParams) }, + { HP_POP(SQL->StmtBindParam, HP_SQL_StmtBindParam) }, + { HP_POP(SQL->StmtExecute, HP_SQL_StmtExecute) }, + { HP_POP(SQL->StmtLastInsertId, HP_SQL_StmtLastInsertId) }, + { HP_POP(SQL->StmtNumColumns, HP_SQL_StmtNumColumns) }, + { HP_POP(SQL->StmtBindColumn, HP_SQL_StmtBindColumn) }, + { HP_POP(SQL->StmtNumRows, HP_SQL_StmtNumRows) }, + { HP_POP(SQL->StmtNextRow, HP_SQL_StmtNextRow) }, + { HP_POP(SQL->StmtFreeResult, HP_SQL_StmtFreeResult) }, + { HP_POP(SQL->StmtFree, HP_SQL_StmtFree) }, + { HP_POP(SQL->StmtShowDebug_, HP_SQL_StmtShowDebug_) }, /* status */ { HP_POP(status->init, HP_status_init) }, { HP_POP(status->final, HP_status_final) }, @@ -2590,6 +2777,73 @@ struct HookingPointData HookingPoints[] = { { HP_POP(storage->comp_item, HP_storage_comp_item) }, { HP_POP(storage->sortitem, HP_storage_sortitem) }, { HP_POP(storage->reconnect_sub, HP_storage_reconnect_sub) }, +/* StrBuf */ + { HP_POP(StrBuf->Malloc, HP_StrBuf_Malloc) }, + { HP_POP(StrBuf->Init, HP_StrBuf_Init) }, + { HP_POP(StrBuf->Vprintf, HP_StrBuf_Vprintf) }, + { HP_POP(StrBuf->Append, HP_StrBuf_Append) }, + { HP_POP(StrBuf->AppendStr, HP_StrBuf_AppendStr) }, + { HP_POP(StrBuf->Length, HP_StrBuf_Length) }, + { HP_POP(StrBuf->Value, HP_StrBuf_Value) }, + { HP_POP(StrBuf->Clear, HP_StrBuf_Clear) }, + { HP_POP(StrBuf->Destroy, HP_StrBuf_Destroy) }, + { HP_POP(StrBuf->Free, HP_StrBuf_Free) }, +/* strlib */ + { HP_POP(strlib->jstrescape, HP_strlib_jstrescape) }, + { HP_POP(strlib->jstrescapecpy, HP_strlib_jstrescapecpy) }, + { HP_POP(strlib->jmemescapecpy, HP_strlib_jmemescapecpy) }, + { HP_POP(strlib->remove_control_chars_, HP_strlib_remove_control_chars_) }, + { HP_POP(strlib->trim_, HP_strlib_trim_) }, + { HP_POP(strlib->normalize_name_, HP_strlib_normalize_name_) }, + { HP_POP(strlib->stristr_, HP_strlib_stristr_) }, + { HP_POP(strlib->strnlen_, HP_strlib_strnlen_) }, + { HP_POP(strlib->strtok_r_, HP_strlib_strtok_r_) }, + { HP_POP(strlib->e_mail_check_, HP_strlib_e_mail_check_) }, + { HP_POP(strlib->config_switch_, HP_strlib_config_switch_) }, + { HP_POP(strlib->safestrncpy_, HP_strlib_safestrncpy_) }, + { HP_POP(strlib->safestrnlen_, HP_strlib_safestrnlen_) }, + { HP_POP(strlib->strline_, HP_strlib_strline_) }, + { HP_POP(strlib->bin2hex_, HP_strlib_bin2hex_) }, +/* sv */ + { HP_POP(sv->parse_next, HP_sv_parse_next) }, + { HP_POP(sv->parse, HP_sv_parse) }, + { HP_POP(sv->split, HP_sv_split) }, + { HP_POP(sv->escape_c, HP_sv_escape_c) }, + { HP_POP(sv->unescape_c, HP_sv_unescape_c) }, + { HP_POP(sv->skip_escaped_c, HP_sv_skip_escaped_c) }, + { HP_POP(sv->readdb, HP_sv_readdb) }, +/* sysinfo */ + { HP_POP(sysinfo->getpagesize, HP_sysinfo_getpagesize) }, + { HP_POP(sysinfo->platform, HP_sysinfo_platform) }, + { HP_POP(sysinfo->osversion, HP_sysinfo_osversion) }, + { HP_POP(sysinfo->cpu, HP_sysinfo_cpu) }, + { HP_POP(sysinfo->cpucores, HP_sysinfo_cpucores) }, + { HP_POP(sysinfo->arch, HP_sysinfo_arch) }, + { HP_POP(sysinfo->is64bit, HP_sysinfo_is64bit) }, + { HP_POP(sysinfo->compiler, HP_sysinfo_compiler) }, + { HP_POP(sysinfo->cflags, HP_sysinfo_cflags) }, + { HP_POP(sysinfo->vcstype, HP_sysinfo_vcstype) }, + { HP_POP(sysinfo->vcstypeid, HP_sysinfo_vcstypeid) }, + { HP_POP(sysinfo->vcsrevision_src, HP_sysinfo_vcsrevision_src) }, + { HP_POP(sysinfo->vcsrevision_scripts, HP_sysinfo_vcsrevision_scripts) }, + { HP_POP(sysinfo->vcsrevision_reload, HP_sysinfo_vcsrevision_reload) }, + { HP_POP(sysinfo->is_superuser, HP_sysinfo_is_superuser) }, + { HP_POP(sysinfo->init, HP_sysinfo_init) }, + { HP_POP(sysinfo->final, HP_sysinfo_final) }, +/* timer */ + { HP_POP(timer->gettick, HP_timer_gettick) }, + { HP_POP(timer->gettick_nocache, HP_timer_gettick_nocache) }, + { HP_POP(timer->add, HP_timer_add) }, + { HP_POP(timer->add_interval, HP_timer_add_interval) }, + { HP_POP(timer->get, HP_timer_get) }, + { HP_POP(timer->delete, HP_timer_delete) }, + { HP_POP(timer->addtick, HP_timer_addtick) }, + { HP_POP(timer->settick, HP_timer_settick) }, + { HP_POP(timer->add_func_list, HP_timer_add_func_list) }, + { HP_POP(timer->get_uptime, HP_timer_get_uptime) }, + { HP_POP(timer->perform, HP_timer_perform) }, + { HP_POP(timer->init, HP_timer_init) }, + { HP_POP(timer->final, HP_timer_final) }, /* trade */ { HP_POP(trade->request, HP_trade_request) }, { HP_POP(trade->ack, HP_trade_ack) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index a6724f0f7..ef6922678 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -4,6 +4,87 @@ // NOTE: This file was auto-generated and should never be manually edited, // as it will get overwritten. +/* HCache */ +void HP_HCache_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_HCache_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_HCache_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.HCache.init(); + } + if( HPMHooks.count.HP_HCache_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_HCache_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_HCache_check(const char *file) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_HCache_check_pre ) { + bool (*preHookFunc) (const char *file); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_HCache_check_pre[hIndex].func; + retVal___ = preHookFunc(file); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.HCache.check(file); + } + if( HPMHooks.count.HP_HCache_check_post ) { + bool (*postHookFunc) (bool retVal___, const char *file); + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_HCache_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, file); + } + } + return retVal___; +} +FILE* HP_HCache_open(const char *file, const char *opt) { + int hIndex = 0; + FILE* retVal___ = NULL; + if( HPMHooks.count.HP_HCache_open_pre ) { + FILE* (*preHookFunc) (const char *file, const char *opt); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_HCache_open_pre[hIndex].func; + retVal___ = preHookFunc(file, opt); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.HCache.open(file, opt); + } + if( HPMHooks.count.HP_HCache_open_post ) { + FILE* (*postHookFunc) (FILE* retVal___, const char *file, const char *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_HCache_open_post[hIndex].func; + retVal___ = postHookFunc(retVal___, file, opt); + } + } + return retVal___; +} /* atcommand */ void HP_atcommand_init(bool minimal) { int hIndex = 0; @@ -23758,6 +23839,766 @@ void HP_clif_pNPCMarketPurchase(int fd, struct map_session_data *sd) { } return; } +/* cmdline */ +void HP_cmdline_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_cmdline_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.cmdline.init(); + } + if( HPMHooks.count.HP_cmdline_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_cmdline_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_cmdline_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.cmdline.final(); + } + if( HPMHooks.count.HP_cmdline_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_cmdline_arg_add_pre ) { + bool (*preHookFunc) (unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_arg_add_pre[hIndex].func; + retVal___ = preHookFunc(&pluginID, name, &shortname, &func, help, &options); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.cmdline.arg_add(pluginID, name, shortname, func, help, options); + } + if( HPMHooks.count.HP_cmdline_arg_add_post ) { + bool (*postHookFunc) (bool retVal___, unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_arg_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &pluginID, name, &shortname, &func, help, &options); + } + } + return retVal___; +} +int HP_cmdline_exec(int argc, char **argv, unsigned int options) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_cmdline_exec_pre ) { + int (*preHookFunc) (int *argc, char **argv, unsigned int *options); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_exec_pre[hIndex].func; + retVal___ = preHookFunc(&argc, argv, &options); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.cmdline.exec(argc, argv, options); + } + if( HPMHooks.count.HP_cmdline_exec_post ) { + int (*postHookFunc) (int retVal___, int *argc, char **argv, unsigned int *options); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_exec_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &argc, argv, &options); + } + } + return retVal___; +} +bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_cmdline_arg_next_value_pre ) { + bool (*preHookFunc) (const char *name, int *current_arg, int *argc); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_pre[hIndex].func; + retVal___ = preHookFunc(name, ¤t_arg, &argc); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.cmdline.arg_next_value(name, current_arg, argc); + } + if( HPMHooks.count.HP_cmdline_arg_next_value_post ) { + bool (*postHookFunc) (bool retVal___, const char *name, int *current_arg, int *argc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, ¤t_arg, &argc); + } + } + return retVal___; +} +const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_cmdline_arg_source_pre ) { + const char* (*preHookFunc) (struct CmdlineArgData *arg); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_cmdline_arg_source_pre[hIndex].func; + retVal___ = preHookFunc(arg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.cmdline.arg_source(arg); + } + if( HPMHooks.count.HP_cmdline_arg_source_post ) { + const char* (*postHookFunc) (const char* retVal___, struct CmdlineArgData *arg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_cmdline_arg_source_post[hIndex].func; + retVal___ = postHookFunc(retVal___, arg); + } + } + return retVal___; +} +/* console */ +void HP_console_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_console_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_console_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.console.init(); + } + if( HPMHooks.count.HP_console_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_console_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_console_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_console_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_console_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.console.final(); + } + if( HPMHooks.count.HP_console_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_console_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_console_display_title(void) { + int hIndex = 0; + if( HPMHooks.count.HP_console_display_title_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_console_display_title_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.console.display_title(); + } + if( HPMHooks.count.HP_console_display_title_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_console_display_title_post[hIndex].func; + postHookFunc(); + } + } + return; +} +/* DB */ +DBOptions HP_DB_fix_options(DBType type, DBOptions options) { + int hIndex = 0; + DBOptions retVal___ = DB_OPT_BASE; + if( HPMHooks.count.HP_DB_fix_options_pre ) { + DBOptions (*preHookFunc) (DBType *type, DBOptions *options); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_fix_options_pre[hIndex].func; + retVal___ = preHookFunc(&type, &options); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.fix_options(type, options); + } + if( HPMHooks.count.HP_DB_fix_options_post ) { + DBOptions (*postHookFunc) (DBOptions retVal___, DBType *type, DBOptions *options); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_fix_options_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type, &options); + } + } + return retVal___; +} +DBComparator HP_DB_default_cmp(DBType type) { + int hIndex = 0; + DBComparator retVal___ = NULL; + if( HPMHooks.count.HP_DB_default_cmp_pre ) { + DBComparator (*preHookFunc) (DBType *type); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_default_cmp_pre[hIndex].func; + retVal___ = preHookFunc(&type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.default_cmp(type); + } + if( HPMHooks.count.HP_DB_default_cmp_post ) { + DBComparator (*postHookFunc) (DBComparator retVal___, DBType *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_default_cmp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type); + } + } + return retVal___; +} +DBHasher HP_DB_default_hash(DBType type) { + int hIndex = 0; + DBHasher retVal___ = NULL; + if( HPMHooks.count.HP_DB_default_hash_pre ) { + DBHasher (*preHookFunc) (DBType *type); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_default_hash_pre[hIndex].func; + retVal___ = preHookFunc(&type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.default_hash(type); + } + if( HPMHooks.count.HP_DB_default_hash_post ) { + DBHasher (*postHookFunc) (DBHasher retVal___, DBType *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_default_hash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type); + } + } + return retVal___; +} +DBReleaser HP_DB_default_release(DBType type, DBOptions options) { + int hIndex = 0; + DBReleaser retVal___ = NULL; + if( HPMHooks.count.HP_DB_default_release_pre ) { + DBReleaser (*preHookFunc) (DBType *type, DBOptions *options); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_default_release_pre[hIndex].func; + retVal___ = preHookFunc(&type, &options); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.default_release(type, options); + } + if( HPMHooks.count.HP_DB_default_release_post ) { + DBReleaser (*postHookFunc) (DBReleaser retVal___, DBType *type, DBOptions *options); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_default_release_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type, &options); + } + } + return retVal___; +} +DBReleaser HP_DB_custom_release(DBRelease which) { + int hIndex = 0; + DBReleaser retVal___ = NULL; + if( HPMHooks.count.HP_DB_custom_release_pre ) { + DBReleaser (*preHookFunc) (DBRelease *which); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_custom_release_pre[hIndex].func; + retVal___ = preHookFunc(&which); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.custom_release(which); + } + if( HPMHooks.count.HP_DB_custom_release_post ) { + DBReleaser (*postHookFunc) (DBReleaser retVal___, DBRelease *which); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_custom_release_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &which); + } + } + return retVal___; +} +DBMap* HP_DB_alloc(const char *file, const char *func, int line, DBType type, DBOptions options, unsigned short maxlen) { + int hIndex = 0; + DBMap* retVal___ = NULL; + if( HPMHooks.count.HP_DB_alloc_pre ) { + DBMap* (*preHookFunc) (const char *file, const char *func, int *line, DBType *type, DBOptions *options, unsigned short *maxlen); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_alloc_pre[hIndex].func; + retVal___ = preHookFunc(file, func, &line, &type, &options, &maxlen); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.alloc(file, func, line, type, options, maxlen); + } + if( HPMHooks.count.HP_DB_alloc_post ) { + DBMap* (*postHookFunc) (DBMap* retVal___, const char *file, const char *func, int *line, DBType *type, DBOptions *options, unsigned short *maxlen); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_alloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, file, func, &line, &type, &options, &maxlen); + } + } + return retVal___; +} +DBKey HP_DB_i2key(int key) { + int hIndex = 0; + DBKey retVal___; + memset(&retVal___, '\0', sizeof(DBKey)); + if( HPMHooks.count.HP_DB_i2key_pre ) { + DBKey (*preHookFunc) (int *key); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_i2key_pre[hIndex].func; + retVal___ = preHookFunc(&key); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.i2key(key); + } + if( HPMHooks.count.HP_DB_i2key_post ) { + DBKey (*postHookFunc) (DBKey retVal___, int *key); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_i2key_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key); + } + } + return retVal___; +} +DBKey HP_DB_ui2key(unsigned int key) { + int hIndex = 0; + DBKey retVal___; + memset(&retVal___, '\0', sizeof(DBKey)); + if( HPMHooks.count.HP_DB_ui2key_pre ) { + DBKey (*preHookFunc) (unsigned int *key); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_ui2key_pre[hIndex].func; + retVal___ = preHookFunc(&key); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.ui2key(key); + } + if( HPMHooks.count.HP_DB_ui2key_post ) { + DBKey (*postHookFunc) (DBKey retVal___, unsigned int *key); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_ui2key_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key); + } + } + return retVal___; +} +DBKey HP_DB_str2key(const char *key) { + int hIndex = 0; + DBKey retVal___; + memset(&retVal___, '\0', sizeof(DBKey)); + if( HPMHooks.count.HP_DB_str2key_pre ) { + DBKey (*preHookFunc) (const char *key); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_str2key_pre[hIndex].func; + retVal___ = preHookFunc(key); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.str2key(key); + } + if( HPMHooks.count.HP_DB_str2key_post ) { + DBKey (*postHookFunc) (DBKey retVal___, const char *key); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_str2key_post[hIndex].func; + retVal___ = postHookFunc(retVal___, key); + } + } + return retVal___; +} +DBKey HP_DB_i642key(int64 key) { + int hIndex = 0; + DBKey retVal___; + memset(&retVal___, '\0', sizeof(DBKey)); + if( HPMHooks.count.HP_DB_i642key_pre ) { + DBKey (*preHookFunc) (int64 *key); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_i642key_pre[hIndex].func; + retVal___ = preHookFunc(&key); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.i642key(key); + } + if( HPMHooks.count.HP_DB_i642key_post ) { + DBKey (*postHookFunc) (DBKey retVal___, int64 *key); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_i642key_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key); + } + } + return retVal___; +} +DBKey HP_DB_ui642key(uint64 key) { + int hIndex = 0; + DBKey retVal___; + memset(&retVal___, '\0', sizeof(DBKey)); + if( HPMHooks.count.HP_DB_ui642key_pre ) { + DBKey (*preHookFunc) (uint64 *key); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_ui642key_pre[hIndex].func; + retVal___ = preHookFunc(&key); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.ui642key(key); + } + if( HPMHooks.count.HP_DB_ui642key_post ) { + DBKey (*postHookFunc) (DBKey retVal___, uint64 *key); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_ui642key_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key); + } + } + return retVal___; +} +DBData HP_DB_i2data(int data) { + int hIndex = 0; + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_DB_i2data_pre ) { + DBData (*preHookFunc) (int *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_i2data_pre[hIndex].func; + retVal___ = preHookFunc(&data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.i2data(data); + } + if( HPMHooks.count.HP_DB_i2data_post ) { + DBData (*postHookFunc) (DBData retVal___, int *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_i2data_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &data); + } + } + return retVal___; +} +DBData HP_DB_ui2data(unsigned int data) { + int hIndex = 0; + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_DB_ui2data_pre ) { + DBData (*preHookFunc) (unsigned int *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_ui2data_pre[hIndex].func; + retVal___ = preHookFunc(&data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.ui2data(data); + } + if( HPMHooks.count.HP_DB_ui2data_post ) { + DBData (*postHookFunc) (DBData retVal___, unsigned int *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_ui2data_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &data); + } + } + return retVal___; +} +DBData HP_DB_ptr2data(void *data) { + int hIndex = 0; + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_DB_ptr2data_pre ) { + DBData (*preHookFunc) (void *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_ptr2data_pre[hIndex].func; + retVal___ = preHookFunc(data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.ptr2data(data); + } + if( HPMHooks.count.HP_DB_ptr2data_post ) { + DBData (*postHookFunc) (DBData retVal___, void *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_ptr2data_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); + } + } + return retVal___; +} +int HP_DB_data2i(DBData *data) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_DB_data2i_pre ) { + int (*preHookFunc) (DBData *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_data2i_pre[hIndex].func; + retVal___ = preHookFunc(data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.data2i(data); + } + if( HPMHooks.count.HP_DB_data2i_post ) { + int (*postHookFunc) (int retVal___, DBData *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_data2i_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); + } + } + return retVal___; +} +unsigned int HP_DB_data2ui(DBData *data) { + int hIndex = 0; + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_DB_data2ui_pre ) { + unsigned int (*preHookFunc) (DBData *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_data2ui_pre[hIndex].func; + retVal___ = preHookFunc(data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.data2ui(data); + } + if( HPMHooks.count.HP_DB_data2ui_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, DBData *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_data2ui_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); + } + } + return retVal___; +} +void* HP_DB_data2ptr(DBData *data) { + int hIndex = 0; + void* retVal___ = NULL; + if( HPMHooks.count.HP_DB_data2ptr_pre ) { + void* (*preHookFunc) (DBData *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_data2ptr_pre[hIndex].func; + retVal___ = preHookFunc(data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.DB.data2ptr(data); + } + if( HPMHooks.count.HP_DB_data2ptr_post ) { + void* (*postHookFunc) (void* retVal___, DBData *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_data2ptr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); + } + } + return retVal___; +} +void HP_DB_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_DB_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.DB.init(); + } + if( HPMHooks.count.HP_DB_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_DB_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_DB_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_DB_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.DB.final(); + } + if( HPMHooks.count.HP_DB_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_DB_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} /* duel */ int HP_duel_create(struct map_session_data *sd, const unsigned int maxpl) { int hIndex = 0; @@ -34907,41 +35748,42 @@ bool HP_itemdb_lookup_const(const config_setting_t *it, const char *name, int *v } return retVal___; } -/* logs */ -void HP_logs_pick_pc(struct map_session_data *sd, e_log_pick_type type, int amount, struct item *itm, struct item_data *data) { +/* libconfig */ +int HP_libconfig_read(config_t *config, FILE *stream) { int hIndex = 0; - if( HPMHooks.count.HP_logs_pick_pc_pre ) { - void (*preHookFunc) (struct map_session_data *sd, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_read_pre ) { + int (*preHookFunc) (config_t *config, FILE *stream); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_pc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_pick_pc_pre[hIndex].func; - preHookFunc(sd, &type, &amount, itm, data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_read_pre[hIndex].func; + retVal___ = preHookFunc(config, stream); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.logs.pick_pc(sd, type, amount, itm, data); + retVal___ = HPMHooks.source.libconfig.read(config, stream); } - if( HPMHooks.count.HP_logs_pick_pc_post ) { - void (*postHookFunc) (struct map_session_data *sd, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_pc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_pick_pc_post[hIndex].func; - postHookFunc(sd, &type, &amount, itm, data); + if( HPMHooks.count.HP_libconfig_read_post ) { + int (*postHookFunc) (int retVal___, config_t *config, FILE *stream); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, stream); } } - return; + return retVal___; } -void HP_logs_pick_mob(struct mob_data *md, e_log_pick_type type, int amount, struct item *itm, struct item_data *data) { +void HP_libconfig_write(const config_t *config, FILE *stream) { int hIndex = 0; - if( HPMHooks.count.HP_logs_pick_mob_pre ) { - void (*preHookFunc) (struct mob_data *md, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); + if( HPMHooks.count.HP_libconfig_write_pre ) { + void (*preHookFunc) (const config_t *config, FILE *stream); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_mob_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_pick_mob_pre[hIndex].func; - preHookFunc(md, &type, &amount, itm, data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_write_pre[hIndex].func; + preHookFunc(config, stream); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -34949,25 +35791,25 @@ void HP_logs_pick_mob(struct mob_data *md, e_log_pick_type type, int amount, str } } { - HPMHooks.source.logs.pick_mob(md, type, amount, itm, data); + HPMHooks.source.libconfig.write(config, stream); } - if( HPMHooks.count.HP_logs_pick_mob_post ) { - void (*postHookFunc) (struct mob_data *md, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_mob_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_pick_mob_post[hIndex].func; - postHookFunc(md, &type, &amount, itm, data); + if( HPMHooks.count.HP_libconfig_write_post ) { + void (*postHookFunc) (const config_t *config, FILE *stream); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_write_post[hIndex].func; + postHookFunc(config, stream); } } return; } -void HP_logs_zeny(struct map_session_data *sd, e_log_pick_type type, struct map_session_data *src_sd, int amount) { +void HP_libconfig_set_auto_convert(config_t *config, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_logs_zeny_pre ) { - void (*preHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount); + if( HPMHooks.count.HP_libconfig_set_auto_convert_pre ) { + void (*preHookFunc) (config_t *config, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_zeny_pre[hIndex].func; - preHookFunc(sd, &type, src_sd, &amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_auto_convert_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_set_auto_convert_pre[hIndex].func; + preHookFunc(config, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -34975,129 +35817,133 @@ void HP_logs_zeny(struct map_session_data *sd, e_log_pick_type type, struct map_ } } { - HPMHooks.source.logs.zeny(sd, type, src_sd, amount); + HPMHooks.source.libconfig.set_auto_convert(config, flag); } - if( HPMHooks.count.HP_logs_zeny_post ) { - void (*postHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_zeny_post[hIndex].func; - postHookFunc(sd, &type, src_sd, &amount); + if( HPMHooks.count.HP_libconfig_set_auto_convert_post ) { + void (*postHookFunc) (config_t *config, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_auto_convert_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_set_auto_convert_post[hIndex].func; + postHookFunc(config, &flag); } } return; } -void HP_logs_npc(struct map_session_data *sd, const char *message) { +int HP_libconfig_get_auto_convert(const config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_logs_npc_pre ) { - void (*preHookFunc) (struct map_session_data *sd, const char *message); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_get_auto_convert_pre ) { + int (*preHookFunc) (const config_t *config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_npc_pre[hIndex].func; - preHookFunc(sd, message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_auto_convert_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_get_auto_convert_pre[hIndex].func; + retVal___ = preHookFunc(config); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.logs.npc(sd, message); + retVal___ = HPMHooks.source.libconfig.get_auto_convert(config); } - if( HPMHooks.count.HP_logs_npc_post ) { - void (*postHookFunc) (struct map_session_data *sd, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_npc_post[hIndex].func; - postHookFunc(sd, message); + if( HPMHooks.count.HP_libconfig_get_auto_convert_post ) { + int (*postHookFunc) (int retVal___, const config_t *config); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_auto_convert_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_get_auto_convert_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config); } } - return; + return retVal___; } -void HP_logs_chat(e_log_chat_type type, int type_id, int src_charid, int src_accid, const char *mapname, int x, int y, const char *dst_charname, const char *message) { +int HP_libconfig_read_string(config_t *config, const char *str) { int hIndex = 0; - if( HPMHooks.count.HP_logs_chat_pre ) { - void (*preHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_read_string_pre ) { + int (*preHookFunc) (config_t *config, const char *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_chat_pre[hIndex].func; - preHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_read_string_pre[hIndex].func; + retVal___ = preHookFunc(config, str); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.logs.chat(type, type_id, src_charid, src_accid, mapname, x, y, dst_charname, message); + retVal___ = HPMHooks.source.libconfig.read_string(config, str); } - if( HPMHooks.count.HP_logs_chat_post ) { - void (*postHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_chat_post[hIndex].func; - postHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message); + if( HPMHooks.count.HP_libconfig_read_string_post ) { + int (*postHookFunc) (int retVal___, config_t *config, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_read_string_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, str); } } - return; + return retVal___; } -void HP_logs_atcommand(struct map_session_data *sd, const char *message) { +int HP_libconfig_read_file_src(config_t *config, const char *filename) { int hIndex = 0; - if( HPMHooks.count.HP_logs_atcommand_pre ) { - void (*preHookFunc) (struct map_session_data *sd, const char *message); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_read_file_src_pre ) { + int (*preHookFunc) (config_t *config, const char *filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_atcommand_pre[hIndex].func; - preHookFunc(sd, message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_read_file_src_pre[hIndex].func; + retVal___ = preHookFunc(config, filename); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.logs.atcommand(sd, message); + retVal___ = HPMHooks.source.libconfig.read_file_src(config, filename); } - if( HPMHooks.count.HP_logs_atcommand_post ) { - void (*postHookFunc) (struct map_session_data *sd, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_atcommand_post[hIndex].func; - postHookFunc(sd, message); + if( HPMHooks.count.HP_libconfig_read_file_src_post ) { + int (*postHookFunc) (int retVal___, config_t *config, const char *filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_read_file_src_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filename); } } - return; + return retVal___; } -void HP_logs_branch(struct map_session_data *sd) { +int HP_libconfig_write_file(config_t *config, const char *filename) { int hIndex = 0; - if( HPMHooks.count.HP_logs_branch_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_write_file_pre ) { + int (*preHookFunc) (config_t *config, const char *filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_branch_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_write_file_pre[hIndex].func; + retVal___ = preHookFunc(config, filename); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.logs.branch(sd); + retVal___ = HPMHooks.source.libconfig.write_file(config, filename); } - if( HPMHooks.count.HP_logs_branch_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_branch_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_libconfig_write_file_post ) { + int (*postHookFunc) (int retVal___, config_t *config, const char *filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_write_file_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filename); } } - return; + return retVal___; } -void HP_logs_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp) { +void HP_libconfig_set_destructor(config_t *config, void ( *destructor ) (void *)) { int hIndex = 0; - if( HPMHooks.count.HP_logs_mvpdrop_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp); + if( HPMHooks.count.HP_libconfig_set_destructor_pre ) { + void (*preHookFunc) (config_t *config, void ( *destructor ) (void *)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_mvpdrop_pre[hIndex].func; - preHookFunc(sd, &monster_id, log_mvp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_set_destructor_pre[hIndex].func; + preHookFunc(config, destructor); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35105,25 +35951,25 @@ void HP_logs_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp) } } { - HPMHooks.source.logs.mvpdrop(sd, monster_id, log_mvp); + HPMHooks.source.libconfig.set_destructor(config, destructor); } - if( HPMHooks.count.HP_logs_mvpdrop_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_mvpdrop_post[hIndex].func; - postHookFunc(sd, &monster_id, log_mvp); + if( HPMHooks.count.HP_libconfig_set_destructor_post ) { + void (*postHookFunc) (config_t *config, void ( *destructor ) (void *)); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_set_destructor_post[hIndex].func; + postHookFunc(config, destructor); } } return; } -void HP_logs_pick_sub(int id, int16 m, e_log_pick_type type, int amount, struct item *itm, struct item_data *data) { +void HP_libconfig_set_include_dir(config_t *config, const char *include_dir) { int hIndex = 0; - if( HPMHooks.count.HP_logs_pick_sub_pre ) { - void (*preHookFunc) (int *id, int16 *m, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); + if( HPMHooks.count.HP_libconfig_set_include_dir_pre ) { + void (*preHookFunc) (config_t *config, const char *include_dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_pick_sub_pre[hIndex].func; - preHookFunc(&id, &m, &type, &amount, itm, data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_pre[hIndex].func; + preHookFunc(config, include_dir); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35131,25 +35977,25 @@ void HP_logs_pick_sub(int id, int16 m, e_log_pick_type type, int amount, struct } } { - HPMHooks.source.logs.pick_sub(id, m, type, amount, itm, data); + HPMHooks.source.libconfig.set_include_dir(config, include_dir); } - if( HPMHooks.count.HP_logs_pick_sub_post ) { - void (*postHookFunc) (int *id, int16 *m, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_pick_sub_post[hIndex].func; - postHookFunc(&id, &m, &type, &amount, itm, data); + if( HPMHooks.count.HP_libconfig_set_include_dir_post ) { + void (*postHookFunc) (config_t *config, const char *include_dir); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_post[hIndex].func; + postHookFunc(config, include_dir); } } return; } -void HP_logs_zeny_sub(struct map_session_data *sd, e_log_pick_type type, struct map_session_data *src_sd, int amount) { +void HP_libconfig_init(config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_logs_zeny_sub_pre ) { - void (*preHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount); + if( HPMHooks.count.HP_libconfig_init_pre ) { + void (*preHookFunc) (config_t *config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_zeny_sub_pre[hIndex].func; - preHookFunc(sd, &type, src_sd, &amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_init_pre[hIndex].func; + preHookFunc(config); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35157,25 +36003,25 @@ void HP_logs_zeny_sub(struct map_session_data *sd, e_log_pick_type type, struct } } { - HPMHooks.source.logs.zeny_sub(sd, type, src_sd, amount); + HPMHooks.source.libconfig.init(config); } - if( HPMHooks.count.HP_logs_zeny_sub_post ) { - void (*postHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_zeny_sub_post[hIndex].func; - postHookFunc(sd, &type, src_sd, &amount); + if( HPMHooks.count.HP_libconfig_init_post ) { + void (*postHookFunc) (config_t *config); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_init_post[hIndex].func; + postHookFunc(config); } } return; } -void HP_logs_npc_sub(struct map_session_data *sd, const char *message) { +void HP_libconfig_destroy(config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_logs_npc_sub_pre ) { - void (*preHookFunc) (struct map_session_data *sd, const char *message); + if( HPMHooks.count.HP_libconfig_destroy_pre ) { + void (*preHookFunc) (config_t *config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_npc_sub_pre[hIndex].func; - preHookFunc(sd, message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_destroy_pre[hIndex].func; + preHookFunc(config); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35183,130 +36029,134 @@ void HP_logs_npc_sub(struct map_session_data *sd, const char *message) { } } { - HPMHooks.source.logs.npc_sub(sd, message); + HPMHooks.source.libconfig.destroy(config); } - if( HPMHooks.count.HP_logs_npc_sub_post ) { - void (*postHookFunc) (struct map_session_data *sd, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_npc_sub_post[hIndex].func; - postHookFunc(sd, message); + if( HPMHooks.count.HP_libconfig_destroy_post ) { + void (*postHookFunc) (config_t *config); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_destroy_post[hIndex].func; + postHookFunc(config); } } return; } -void HP_logs_chat_sub(e_log_chat_type type, int type_id, int src_charid, int src_accid, const char *mapname, int x, int y, const char *dst_charname, const char *message) { +int HP_libconfig_setting_get_int(const config_setting_t *setting) { int hIndex = 0; - if( HPMHooks.count.HP_logs_chat_sub_pre ) { - void (*preHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_int_pre ) { + int (*preHookFunc) (const config_setting_t *setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_chat_sub_pre[hIndex].func; - preHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_pre[hIndex].func; + retVal___ = preHookFunc(setting); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.logs.chat_sub(type, type_id, src_charid, src_accid, mapname, x, y, dst_charname, message); + retVal___ = HPMHooks.source.libconfig.setting_get_int(setting); } - if( HPMHooks.count.HP_logs_chat_sub_post ) { - void (*postHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_chat_sub_post[hIndex].func; - postHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message); + if( HPMHooks.count.HP_libconfig_setting_get_int_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); } } - return; + return retVal___; } -void HP_logs_atcommand_sub(struct map_session_data *sd, const char *message) { +long long HP_libconfig_setting_get_int64(const config_setting_t *setting) { int hIndex = 0; - if( HPMHooks.count.HP_logs_atcommand_sub_pre ) { - void (*preHookFunc) (struct map_session_data *sd, const char *message); + long long retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_int64_pre ) { + long long (*preHookFunc) (const config_setting_t *setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_atcommand_sub_pre[hIndex].func; - preHookFunc(sd, message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_pre[hIndex].func; + retVal___ = preHookFunc(setting); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.logs.atcommand_sub(sd, message); + retVal___ = HPMHooks.source.libconfig.setting_get_int64(setting); } - if( HPMHooks.count.HP_logs_atcommand_sub_post ) { - void (*postHookFunc) (struct map_session_data *sd, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_atcommand_sub_post[hIndex].func; - postHookFunc(sd, message); + if( HPMHooks.count.HP_libconfig_setting_get_int64_post ) { + long long (*postHookFunc) (long long retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); } } - return; + return retVal___; } -void HP_logs_branch_sub(struct map_session_data *sd) { +double HP_libconfig_setting_get_float(const config_setting_t *setting) { int hIndex = 0; - if( HPMHooks.count.HP_logs_branch_sub_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + double retVal___ = 0.; + if( HPMHooks.count.HP_libconfig_setting_get_float_pre ) { + double (*preHookFunc) (const config_setting_t *setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_branch_sub_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_pre[hIndex].func; + retVal___ = preHookFunc(setting); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.logs.branch_sub(sd); + retVal___ = HPMHooks.source.libconfig.setting_get_float(setting); } - if( HPMHooks.count.HP_logs_branch_sub_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_branch_sub_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_libconfig_setting_get_float_post ) { + double (*postHookFunc) (double retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); } } - return; + return retVal___; } -void HP_logs_mvpdrop_sub(struct map_session_data *sd, int monster_id, int *log_mvp) { +int HP_libconfig_setting_get_bool(const config_setting_t *setting) { int hIndex = 0; - if( HPMHooks.count.HP_logs_mvpdrop_sub_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_bool_pre ) { + int (*preHookFunc) (const config_setting_t *setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_mvpdrop_sub_pre[hIndex].func; - preHookFunc(sd, &monster_id, log_mvp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_pre[hIndex].func; + retVal___ = preHookFunc(setting); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.logs.mvpdrop_sub(sd, monster_id, log_mvp); + retVal___ = HPMHooks.source.libconfig.setting_get_bool(setting); } - if( HPMHooks.count.HP_logs_mvpdrop_sub_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_mvpdrop_sub_post[hIndex].func; - postHookFunc(sd, &monster_id, log_mvp); + if( HPMHooks.count.HP_libconfig_setting_get_bool_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); } } - return; + return retVal___; } -int HP_logs_config_read(const char *cfgName) { +const char* HP_libconfig_setting_get_string(const config_setting_t *setting) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_logs_config_read_pre ) { - int (*preHookFunc) (const char *cfgName); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_get_string_pre ) { + const char* (*preHookFunc) (const config_setting_t *setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_read_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_config_read_pre[hIndex].func; - retVal___ = preHookFunc(cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_pre[hIndex].func; + retVal___ = preHookFunc(setting); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35314,104 +36164,107 @@ int HP_logs_config_read(const char *cfgName) { } } { - retVal___ = HPMHooks.source.logs.config_read(cfgName); + retVal___ = HPMHooks.source.libconfig.setting_get_string(setting); } - if( HPMHooks.count.HP_logs_config_read_post ) { - int (*postHookFunc) (int retVal___, const char *cfgName); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_read_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_config_read_post[hIndex].func; - retVal___ = postHookFunc(retVal___, cfgName); + if( HPMHooks.count.HP_libconfig_setting_get_string_post ) { + const char* (*postHookFunc) (const char* retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); } } return retVal___; } -void HP_logs_config_done(void) { +int HP_libconfig_setting_lookup_int(const config_setting_t *setting, const char *name, int *value) { int hIndex = 0; - if( HPMHooks.count.HP_logs_config_done_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_lookup_int_pre ) { + int (*preHookFunc) (const config_setting_t *setting, const char *name, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_done_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_config_done_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_pre[hIndex].func; + retVal___ = preHookFunc(setting, name, value); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.logs.config_done(); + retVal___ = HPMHooks.source.libconfig.setting_lookup_int(setting, name, value); } - if( HPMHooks.count.HP_logs_config_done_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_done_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_config_done_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_libconfig_setting_lookup_int_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name, value); } } - return; + return retVal___; } -void HP_logs_sql_init(void) { +int HP_libconfig_setting_lookup_int64(const config_setting_t *setting, const char *name, long long *value) { int hIndex = 0; - if( HPMHooks.count.HP_logs_sql_init_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_lookup_int64_pre ) { + int (*preHookFunc) (const config_setting_t *setting, const char *name, long long *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_sql_init_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_pre[hIndex].func; + retVal___ = preHookFunc(setting, name, value); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.logs.sql_init(); + retVal___ = HPMHooks.source.libconfig.setting_lookup_int64(setting, name, value); } - if( HPMHooks.count.HP_logs_sql_init_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_sql_init_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_libconfig_setting_lookup_int64_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, long long *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name, value); } } - return; + return retVal___; } -void HP_logs_sql_final(void) { +int HP_libconfig_setting_lookup_float(const config_setting_t *setting, const char *name, double *value) { int hIndex = 0; - if( HPMHooks.count.HP_logs_sql_final_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_lookup_float_pre ) { + int (*preHookFunc) (const config_setting_t *setting, const char *name, double *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_sql_final_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_pre[hIndex].func; + retVal___ = preHookFunc(setting, name, value); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.logs.sql_final(); + retVal___ = HPMHooks.source.libconfig.setting_lookup_float(setting, name, value); } - if( HPMHooks.count.HP_logs_sql_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_sql_final_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_libconfig_setting_lookup_float_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, double *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name, value); } } - return; + return retVal___; } -char HP_logs_picktype2char(e_log_pick_type type) { +int HP_libconfig_setting_lookup_bool(const config_setting_t *setting, const char *name, int *value) { int hIndex = 0; - char retVal___ = 0; - if( HPMHooks.count.HP_logs_picktype2char_pre ) { - char (*preHookFunc) (e_log_pick_type *type); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_lookup_bool_pre ) { + int (*preHookFunc) (const config_setting_t *setting, const char *name, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_picktype2char_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_picktype2char_pre[hIndex].func; - retVal___ = preHookFunc(&type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_pre[hIndex].func; + retVal___ = preHookFunc(setting, name, value); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35419,26 +36272,26 @@ char HP_logs_picktype2char(e_log_pick_type type) { } } { - retVal___ = HPMHooks.source.logs.picktype2char(type); + retVal___ = HPMHooks.source.libconfig.setting_lookup_bool(setting, name, value); } - if( HPMHooks.count.HP_logs_picktype2char_post ) { - char (*postHookFunc) (char retVal___, e_log_pick_type *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_picktype2char_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_picktype2char_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type); + if( HPMHooks.count.HP_libconfig_setting_lookup_bool_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name, value); } } return retVal___; } -char HP_logs_chattype2char(e_log_chat_type type) { +int HP_libconfig_setting_lookup_string(const config_setting_t *setting, const char *name, const char **value) { int hIndex = 0; - char retVal___ = 0; - if( HPMHooks.count.HP_logs_chattype2char_pre ) { - char (*preHookFunc) (e_log_chat_type *type); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_lookup_string_pre ) { + int (*preHookFunc) (const config_setting_t *setting, const char *name, const char **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chattype2char_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_chattype2char_pre[hIndex].func; - retVal___ = preHookFunc(&type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_pre[hIndex].func; + retVal___ = preHookFunc(setting, name, value); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35446,26 +36299,26 @@ char HP_logs_chattype2char(e_log_chat_type type) { } } { - retVal___ = HPMHooks.source.logs.chattype2char(type); + retVal___ = HPMHooks.source.libconfig.setting_lookup_string(setting, name, value); } - if( HPMHooks.count.HP_logs_chattype2char_post ) { - char (*postHookFunc) (char retVal___, e_log_chat_type *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chattype2char_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_chattype2char_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type); + if( HPMHooks.count.HP_libconfig_setting_lookup_string_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, const char **value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name, value); } } return retVal___; } -bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_data *id) { +int HP_libconfig_setting_set_int(config_setting_t *setting, int value) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_logs_should_log_item_pre ) { - bool (*preHookFunc) (int *nameid, int *amount, int *refine, struct item_data *id); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_set_int_pre ) { + int (*preHookFunc) (config_setting_t *setting, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_logs_should_log_item_pre[hIndex].func; - retVal___ = preHookFunc(&nameid, &amount, &refine, id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_pre[hIndex].func; + retVal___ = preHookFunc(setting, &value); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35473,53 +36326,53 @@ bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_dat } } { - retVal___ = HPMHooks.source.logs.should_log_item(nameid, amount, refine, id); + retVal___ = HPMHooks.source.libconfig.setting_set_int(setting, value); } - if( HPMHooks.count.HP_logs_should_log_item_post ) { - bool (*postHookFunc) (bool retVal___, int *nameid, int *amount, int *refine, struct item_data *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_logs_should_log_item_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &nameid, &amount, &refine, id); + if( HPMHooks.count.HP_libconfig_setting_set_int_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &value); } } return retVal___; } -/* mail */ -void HP_mail_clear(struct map_session_data *sd) { +int HP_libconfig_setting_set_int64(config_setting_t *setting, long long value) { int hIndex = 0; - if( HPMHooks.count.HP_mail_clear_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_set_int64_pre ) { + int (*preHookFunc) (config_setting_t *setting, long long *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_clear_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mail_clear_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_pre[hIndex].func; + retVal___ = preHookFunc(setting, &value); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mail.clear(sd); + retVal___ = HPMHooks.source.libconfig.setting_set_int64(setting, value); } - if( HPMHooks.count.HP_mail_clear_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_clear_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mail_clear_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_libconfig_setting_set_int64_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, long long *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &value); } } - return; + return retVal___; } -int HP_mail_removeitem(struct map_session_data *sd, short flag) { +int HP_libconfig_setting_set_float(config_setting_t *setting, double value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mail_removeitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, short *flag); + if( HPMHooks.count.HP_libconfig_setting_set_float_pre ) { + int (*preHookFunc) (config_setting_t *setting, double *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removeitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mail_removeitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_pre[hIndex].func; + retVal___ = preHookFunc(setting, &value); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35527,26 +36380,26 @@ int HP_mail_removeitem(struct map_session_data *sd, short flag) { } } { - retVal___ = HPMHooks.source.mail.removeitem(sd, flag); + retVal___ = HPMHooks.source.libconfig.setting_set_float(setting, value); } - if( HPMHooks.count.HP_mail_removeitem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removeitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mail_removeitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &flag); + if( HPMHooks.count.HP_libconfig_setting_set_float_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, double *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &value); } } return retVal___; } -int HP_mail_removezeny(struct map_session_data *sd, short flag) { +int HP_libconfig_setting_set_bool(config_setting_t *setting, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mail_removezeny_pre ) { - int (*preHookFunc) (struct map_session_data *sd, short *flag); + if( HPMHooks.count.HP_libconfig_setting_set_bool_pre ) { + int (*preHookFunc) (config_setting_t *setting, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removezeny_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mail_removezeny_pre[hIndex].func; - retVal___ = preHookFunc(sd, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_pre[hIndex].func; + retVal___ = preHookFunc(setting, &value); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35554,26 +36407,26 @@ int HP_mail_removezeny(struct map_session_data *sd, short flag) { } } { - retVal___ = HPMHooks.source.mail.removezeny(sd, flag); + retVal___ = HPMHooks.source.libconfig.setting_set_bool(setting, value); } - if( HPMHooks.count.HP_mail_removezeny_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removezeny_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mail_removezeny_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &flag); + if( HPMHooks.count.HP_libconfig_setting_set_bool_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &value); } } return retVal___; } -unsigned char HP_mail_setitem(struct map_session_data *sd, int idx, int amount) { +int HP_libconfig_setting_set_string(config_setting_t *setting, const char *value) { int hIndex = 0; - unsigned char retVal___ = 0; - if( HPMHooks.count.HP_mail_setitem_pre ) { - unsigned char (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_set_string_pre ) { + int (*preHookFunc) (config_setting_t *setting, const char *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mail_setitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, &idx, &amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_pre[hIndex].func; + retVal___ = preHookFunc(setting, value); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35581,26 +36434,26 @@ unsigned char HP_mail_setitem(struct map_session_data *sd, int idx, int amount) } } { - retVal___ = HPMHooks.source.mail.setitem(sd, idx, amount); + retVal___ = HPMHooks.source.libconfig.setting_set_string(setting, value); } - if( HPMHooks.count.HP_mail_setitem_post ) { - unsigned char (*postHookFunc) (unsigned char retVal___, struct map_session_data *sd, int *idx, int *amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mail_setitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &idx, &amount); + if( HPMHooks.count.HP_libconfig_setting_set_string_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, const char *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, value); } } return retVal___; } -bool HP_mail_setattachment(struct map_session_data *sd, struct mail_message *msg) { +int HP_libconfig_setting_set_format(config_setting_t *setting, short format) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mail_setattachment_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, struct mail_message *msg); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_set_format_pre ) { + int (*preHookFunc) (config_setting_t *setting, short *format); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setattachment_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mail_setattachment_pre[hIndex].func; - retVal___ = preHookFunc(sd, msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_pre[hIndex].func; + retVal___ = preHookFunc(setting, &format); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35608,52 +36461,53 @@ bool HP_mail_setattachment(struct map_session_data *sd, struct mail_message *msg } } { - retVal___ = HPMHooks.source.mail.setattachment(sd, msg); + retVal___ = HPMHooks.source.libconfig.setting_set_format(setting, format); } - if( HPMHooks.count.HP_mail_setattachment_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setattachment_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mail_setattachment_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, msg); + if( HPMHooks.count.HP_libconfig_setting_set_format_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *setting, short *format); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &format); } } return retVal___; } -void HP_mail_getattachment(struct map_session_data *sd, int zeny, struct item *item) { +short HP_libconfig_setting_get_format(const config_setting_t *setting) { int hIndex = 0; - if( HPMHooks.count.HP_mail_getattachment_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *zeny, struct item *item); + short retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_format_pre ) { + short (*preHookFunc) (const config_setting_t *setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_getattachment_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mail_getattachment_pre[hIndex].func; - preHookFunc(sd, &zeny, item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_pre[hIndex].func; + retVal___ = preHookFunc(setting); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mail.getattachment(sd, zeny, item); + retVal___ = HPMHooks.source.libconfig.setting_get_format(setting); } - if( HPMHooks.count.HP_mail_getattachment_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *zeny, struct item *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_getattachment_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mail_getattachment_post[hIndex].func; - postHookFunc(sd, &zeny, item); + if( HPMHooks.count.HP_libconfig_setting_get_format_post ) { + short (*postHookFunc) (short retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); } } - return; + return retVal___; } -int HP_mail_openmail(struct map_session_data *sd) { +int HP_libconfig_setting_get_int_elem(const config_setting_t *setting, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mail_openmail_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_libconfig_setting_get_int_elem_pre ) { + int (*preHookFunc) (const config_setting_t *setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_openmail_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mail_openmail_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35661,52 +36515,53 @@ int HP_mail_openmail(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.mail.openmail(sd); + retVal___ = HPMHooks.source.libconfig.setting_get_int_elem(setting, idx); } - if( HPMHooks.count.HP_mail_openmail_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_openmail_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mail_openmail_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_libconfig_setting_get_int_elem_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); } } return retVal___; } -void HP_mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg) { +long long HP_libconfig_setting_get_int64_elem(const config_setting_t *setting, int idx) { int hIndex = 0; - if( HPMHooks.count.HP_mail_deliveryfail_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct mail_message *msg); + long long retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre ) { + long long (*preHookFunc) (const config_setting_t *setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_deliveryfail_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mail_deliveryfail_pre[hIndex].func; - preHookFunc(sd, msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mail.deliveryfail(sd, msg); + retVal___ = HPMHooks.source.libconfig.setting_get_int64_elem(setting, idx); } - if( HPMHooks.count.HP_mail_deliveryfail_post ) { - void (*postHookFunc) (struct map_session_data *sd, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_deliveryfail_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mail_deliveryfail_post[hIndex].func; - postHookFunc(sd, msg); + if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_post ) { + long long (*postHookFunc) (long long retVal___, const config_setting_t *setting, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); } } - return; + return retVal___; } -bool HP_mail_invalid_operation(struct map_session_data *sd) { +double HP_libconfig_setting_get_float_elem(const config_setting_t *setting, int idx) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mail_invalid_operation_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + double retVal___ = 0.; + if( HPMHooks.count.HP_libconfig_setting_get_float_elem_pre ) { + double (*preHookFunc) (const config_setting_t *setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_invalid_operation_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mail_invalid_operation_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35714,157 +36569,134 @@ bool HP_mail_invalid_operation(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.mail.invalid_operation(sd); + retVal___ = HPMHooks.source.libconfig.setting_get_float_elem(setting, idx); } - if( HPMHooks.count.HP_mail_invalid_operation_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_invalid_operation_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mail_invalid_operation_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_libconfig_setting_get_float_elem_post ) { + double (*postHookFunc) (double retVal___, const config_setting_t *setting, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); } } return retVal___; } -/* map */ -void HP_map_zone_init(void) { +int HP_libconfig_setting_get_bool_elem(const config_setting_t *setting, int idx) { int hIndex = 0; - if( HPMHooks.count.HP_map_zone_init_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre ) { + int (*preHookFunc) (const config_setting_t *setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_zone_init_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.zone_init(); + retVal___ = HPMHooks.source.libconfig.setting_get_bool_elem(setting, idx); } - if( HPMHooks.count.HP_map_zone_init_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_zone_init_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); } } - return; + return retVal___; } -void HP_map_zone_remove(int m) { +const char* HP_libconfig_setting_get_string_elem(const config_setting_t *setting, int idx) { int hIndex = 0; - if( HPMHooks.count.HP_map_zone_remove_pre ) { - void (*preHookFunc) (int *m); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_get_string_elem_pre ) { + const char* (*preHookFunc) (const config_setting_t *setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_zone_remove_pre[hIndex].func; - preHookFunc(&m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.zone_remove(m); + retVal___ = HPMHooks.source.libconfig.setting_get_string_elem(setting, idx); } - if( HPMHooks.count.HP_map_zone_remove_post ) { - void (*postHookFunc) (int *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_zone_remove_post[hIndex].func; - postHookFunc(&m); + if( HPMHooks.count.HP_libconfig_setting_get_string_elem_post ) { + const char* (*postHookFunc) (const char* retVal___, const config_setting_t *setting, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); } } - return; + return retVal___; } -void HP_map_zone_apply(int m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath) { +config_setting_t* HP_libconfig_setting_set_int_elem(config_setting_t *setting, int idx, int value) { int hIndex = 0; - if( HPMHooks.count.HP_map_zone_apply_pre ) { - void (*preHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath); + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_set_int_elem_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_apply_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_zone_apply_pre[hIndex].func; - preHookFunc(&m, zone, start, buffer, filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx, &value); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.zone_apply(m, zone, start, buffer, filepath); + retVal___ = HPMHooks.source.libconfig.setting_set_int_elem(setting, idx, value); } - if( HPMHooks.count.HP_map_zone_apply_post ) { - void (*postHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_apply_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_zone_apply_post[hIndex].func; - postHookFunc(&m, zone, start, buffer, filepath); + if( HPMHooks.count.HP_libconfig_setting_set_int_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx, &value); } } - return; + return retVal___; } -void HP_map_zone_change(int m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath) { +config_setting_t* HP_libconfig_setting_set_int64_elem(config_setting_t *setting, int idx, long long value) { int hIndex = 0; - if( HPMHooks.count.HP_map_zone_change_pre ) { - void (*preHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_zone_change_pre[hIndex].func; - preHookFunc(&m, zone, start, buffer, filepath); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.map.zone_change(m, zone, start, buffer, filepath); - } - if( HPMHooks.count.HP_map_zone_change_post ) { - void (*postHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_zone_change_post[hIndex].func; - postHookFunc(&m, zone, start, buffer, filepath); - } - } - return; -} -void HP_map_zone_change2(int m, struct map_zone_data *zone) { - int hIndex = 0; - if( HPMHooks.count.HP_map_zone_change2_pre ) { - void (*preHookFunc) (int *m, struct map_zone_data *zone); + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, long long *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_zone_change2_pre[hIndex].func; - preHookFunc(&m, zone); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx, &value); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.zone_change2(m, zone); + retVal___ = HPMHooks.source.libconfig.setting_set_int64_elem(setting, idx, value); } - if( HPMHooks.count.HP_map_zone_change2_post ) { - void (*postHookFunc) (int *m, struct map_zone_data *zone); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_zone_change2_post[hIndex].func; - postHookFunc(&m, zone); + if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, long long *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx, &value); } } - return; + return retVal___; } -int HP_map_getcell(int16 m, int16 x, int16 y, cell_chk cellchk) { +config_setting_t* HP_libconfig_setting_set_float_elem(config_setting_t *setting, int idx, double value) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_getcell_pre ) { - int (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_chk *cellchk); + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_set_float_elem_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, double *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcell_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_getcell_pre[hIndex].func; - retVal___ = preHookFunc(&m, &x, &y, &cellchk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx, &value); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35872,104 +36704,107 @@ int HP_map_getcell(int16 m, int16 x, int16 y, cell_chk cellchk) { } } { - retVal___ = HPMHooks.source.map.getcell(m, x, y, cellchk); + retVal___ = HPMHooks.source.libconfig.setting_set_float_elem(setting, idx, value); } - if( HPMHooks.count.HP_map_getcell_post ) { - int (*postHookFunc) (int retVal___, int16 *m, int16 *x, int16 *y, cell_chk *cellchk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcell_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_getcell_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &m, &x, &y, &cellchk); + if( HPMHooks.count.HP_libconfig_setting_set_float_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, double *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx, &value); } } return retVal___; } -void HP_map_setgatcell(int16 m, int16 x, int16 y, int gat) { +config_setting_t* HP_libconfig_setting_set_bool_elem(config_setting_t *setting, int idx, int value) { int hIndex = 0; - if( HPMHooks.count.HP_map_setgatcell_pre ) { - void (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *gat); + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setgatcell_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_setgatcell_pre[hIndex].func; - preHookFunc(&m, &x, &y, &gat); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx, &value); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.setgatcell(m, x, y, gat); + retVal___ = HPMHooks.source.libconfig.setting_set_bool_elem(setting, idx, value); } - if( HPMHooks.count.HP_map_setgatcell_post ) { - void (*postHookFunc) (int16 *m, int16 *x, int16 *y, int *gat); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setgatcell_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_setgatcell_post[hIndex].func; - postHookFunc(&m, &x, &y, &gat); + if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx, &value); } } - return; + return retVal___; } -void HP_map_cellfromcache(struct map_data *m) { +config_setting_t* HP_libconfig_setting_set_string_elem(config_setting_t *setting, int idx, const char *value) { int hIndex = 0; - if( HPMHooks.count.HP_map_cellfromcache_pre ) { - void (*preHookFunc) (struct map_data *m); + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_set_string_elem_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, const char *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cellfromcache_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_cellfromcache_pre[hIndex].func; - preHookFunc(m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx, value); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.cellfromcache(m); + retVal___ = HPMHooks.source.libconfig.setting_set_string_elem(setting, idx, value); } - if( HPMHooks.count.HP_map_cellfromcache_post ) { - void (*postHookFunc) (struct map_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cellfromcache_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_cellfromcache_post[hIndex].func; - postHookFunc(m); + if( HPMHooks.count.HP_libconfig_setting_set_string_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, const char *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx, value); } } - return; + return retVal___; } -void HP_map_setusers(int p1) { +int HP_libconfig_setting_index(const config_setting_t *setting) { int hIndex = 0; - if( HPMHooks.count.HP_map_setusers_pre ) { - void (*preHookFunc) (int *p1); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_setting_index_pre ) { + int (*preHookFunc) (const config_setting_t *setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setusers_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_setusers_pre[hIndex].func; - preHookFunc(&p1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_index_pre[hIndex].func; + retVal___ = preHookFunc(setting); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.setusers(p1); + retVal___ = HPMHooks.source.libconfig.setting_index(setting); } - if( HPMHooks.count.HP_map_setusers_post ) { - void (*postHookFunc) (int *p1); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setusers_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_setusers_post[hIndex].func; - postHookFunc(&p1); + if( HPMHooks.count.HP_libconfig_setting_index_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_index_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); } } - return; + return retVal___; } -int HP_map_getusers(void) { +int HP_libconfig_setting_length(const config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_getusers_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_libconfig_setting_length_pre ) { + int (*preHookFunc) (const config_setting_t *setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getusers_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_getusers_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_length_pre[hIndex].func; + retVal___ = preHookFunc(setting); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -35977,26 +36812,26 @@ int HP_map_getusers(void) { } } { - retVal___ = HPMHooks.source.map.getusers(); + retVal___ = HPMHooks.source.libconfig.setting_length(setting); } - if( HPMHooks.count.HP_map_getusers_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getusers_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_getusers_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_libconfig_setting_length_post ) { + int (*postHookFunc) (int retVal___, const config_setting_t *setting); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_length_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting); } } return retVal___; } -int HP_map_usercount(void) { +config_setting_t* HP_libconfig_setting_get_elem(const config_setting_t *setting, unsigned int idx) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_usercount_pre ) { - int (*preHookFunc) (void); + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_get_elem_pre ) { + config_setting_t* (*preHookFunc) (const config_setting_t *setting, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_usercount_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_usercount_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_pre[hIndex].func; + retVal___ = preHookFunc(setting, &idx); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36004,26 +36839,26 @@ int HP_map_usercount(void) { } } { - retVal___ = HPMHooks.source.map.usercount(); + retVal___ = HPMHooks.source.libconfig.setting_get_elem(setting, idx); } - if( HPMHooks.count.HP_map_usercount_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_usercount_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_usercount_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_libconfig_setting_get_elem_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_setting_t *setting, unsigned int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, &idx); } } return retVal___; } -int HP_map_freeblock(struct block_list *bl) { +config_setting_t* HP_libconfig_setting_get_member(const config_setting_t *setting, const char *name) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_freeblock_pre ) { - int (*preHookFunc) (struct block_list *bl); + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_get_member_pre ) { + config_setting_t* (*preHookFunc) (const config_setting_t *setting, const char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_freeblock_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_pre[hIndex].func; + retVal___ = preHookFunc(setting, name); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36031,26 +36866,26 @@ int HP_map_freeblock(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.map.freeblock(bl); + retVal___ = HPMHooks.source.libconfig.setting_get_member(setting, name); } - if( HPMHooks.count.HP_map_freeblock_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_freeblock_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_libconfig_setting_get_member_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_setting_t *setting, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name); } } return retVal___; } -int HP_map_freeblock_lock(void) { +config_setting_t* HP_libconfig_setting_add(config_setting_t *parent, const char *name, int type) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_freeblock_lock_pre ) { - int (*preHookFunc) (void); + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_add_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *parent, const char *name, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_lock_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_freeblock_lock_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_add_pre[hIndex].func; + retVal___ = preHookFunc(parent, name, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36058,26 +36893,26 @@ int HP_map_freeblock_lock(void) { } } { - retVal___ = HPMHooks.source.map.freeblock_lock(); + retVal___ = HPMHooks.source.libconfig.setting_add(parent, name, type); } - if( HPMHooks.count.HP_map_freeblock_lock_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_lock_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_freeblock_lock_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_libconfig_setting_add_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *parent, const char *name, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, parent, name, &type); } } return retVal___; } -int HP_map_freeblock_unlock(void) { +int HP_libconfig_setting_remove(config_setting_t *parent, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_freeblock_unlock_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_libconfig_setting_remove_pre ) { + int (*preHookFunc) (config_setting_t *parent, const char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_unlock_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_freeblock_unlock_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_pre[hIndex].func; + retVal___ = preHookFunc(parent, name); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36085,26 +36920,26 @@ int HP_map_freeblock_unlock(void) { } } { - retVal___ = HPMHooks.source.map.freeblock_unlock(); + retVal___ = HPMHooks.source.libconfig.setting_remove(parent, name); } - if( HPMHooks.count.HP_map_freeblock_unlock_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_unlock_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_freeblock_unlock_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_libconfig_setting_remove_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *parent, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_post[hIndex].func; + retVal___ = postHookFunc(retVal___, parent, name); } } return retVal___; } -int HP_map_addblock(struct block_list *bl) { +int HP_libconfig_setting_remove_elem(config_setting_t *parent, unsigned int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_addblock_pre ) { - int (*preHookFunc) (struct block_list *bl); + if( HPMHooks.count.HP_libconfig_setting_remove_elem_pre ) { + int (*preHookFunc) (config_setting_t *parent, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblock_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_addblock_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_pre[hIndex].func; + retVal___ = preHookFunc(parent, &idx); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36112,53 +36947,52 @@ int HP_map_addblock(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.map.addblock(bl); + retVal___ = HPMHooks.source.libconfig.setting_remove_elem(parent, idx); } - if( HPMHooks.count.HP_map_addblock_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblock_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_addblock_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_libconfig_setting_remove_elem_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *parent, unsigned int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, parent, &idx); } } return retVal___; } -int HP_map_delblock(struct block_list *bl) { +void HP_libconfig_setting_set_hook(config_setting_t *setting, void *hook) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_delblock_pre ) { - int (*preHookFunc) (struct block_list *bl); + if( HPMHooks.count.HP_libconfig_setting_set_hook_pre ) { + void (*preHookFunc) (config_setting_t *setting, void *hook); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblock_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_delblock_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_pre[hIndex].func; + preHookFunc(setting, hook); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.map.delblock(bl); + HPMHooks.source.libconfig.setting_set_hook(setting, hook); } - if( HPMHooks.count.HP_map_delblock_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblock_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_delblock_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_libconfig_setting_set_hook_post ) { + void (*postHookFunc) (config_setting_t *setting, void *hook); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_post[hIndex].func; + postHookFunc(setting, hook); } } - return retVal___; + return; } -int HP_map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) { +config_setting_t* HP_libconfig_lookup(const config_t *config, const char *filepath) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_moveblock_pre ) { - int (*preHookFunc) (struct block_list *bl, int *x1, int *y1, int64 *tick); + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_lookup_pre ) { + config_setting_t* (*preHookFunc) (const config_t *config, const char *filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_moveblock_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_moveblock_pre[hIndex].func; - retVal___ = preHookFunc(bl, &x1, &y1, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36166,26 +37000,26 @@ int HP_map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) { } } { - retVal___ = HPMHooks.source.map.moveblock(bl, x1, y1, tick); + retVal___ = HPMHooks.source.libconfig.lookup(config, filepath); } - if( HPMHooks.count.HP_map_moveblock_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int *x1, int *y1, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_moveblock_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_moveblock_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &x1, &y1, &tick); + if( HPMHooks.count.HP_libconfig_lookup_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_t *config, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath); } } return retVal___; } -int HP_map_count_oncell(int16 m, int16 x, int16 y, int type, int flag) { +config_setting_t* HP_libconfig_lookup_from(config_setting_t *setting, const char *filepath) { 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 *flag); + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_lookup_from_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, const char *filepath); *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, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_from_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_from_pre[hIndex].func; + retVal___ = preHookFunc(setting, filepath); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36193,26 +37027,26 @@ int HP_map_count_oncell(int16 m, int16 x, int16 y, int type, int flag) { } } { - retVal___ = HPMHooks.source.map.count_oncell(m, x, y, type, flag); + retVal___ = HPMHooks.source.libconfig.lookup_from(setting, filepath); } - if( HPMHooks.count.HP_map_count_oncell_post ) { - 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, &flag); + if( HPMHooks.count.HP_libconfig_lookup_from_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_from_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_from_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, filepath); } } return retVal___; } -struct skill_unit* HP_map_find_skill_unit_oncell(struct block_list *target, int16 x, int16 y, uint16 skill_id, struct skill_unit *out_unit, int flag) { +int HP_libconfig_lookup_int(const config_t *config, const char *filepath, int *value) { int hIndex = 0; - struct skill_unit* retVal___ = NULL; - if( HPMHooks.count.HP_map_find_skill_unit_oncell_pre ) { - struct skill_unit* (*preHookFunc) (struct block_list *target, int16 *x, int16 *y, uint16 *skill_id, struct skill_unit *out_unit, int *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_lookup_int_pre ) { + int (*preHookFunc) (const config_t *config, const char *filepath, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_find_skill_unit_oncell_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_find_skill_unit_oncell_pre[hIndex].func; - retVal___ = preHookFunc(target, &x, &y, &skill_id, out_unit, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_int_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath, value); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36220,26 +37054,26 @@ struct skill_unit* HP_map_find_skill_unit_oncell(struct block_list *target, int1 } } { - retVal___ = HPMHooks.source.map.find_skill_unit_oncell(target, x, y, skill_id, out_unit, flag); + retVal___ = HPMHooks.source.libconfig.lookup_int(config, filepath, value); } - if( HPMHooks.count.HP_map_find_skill_unit_oncell_post ) { - struct skill_unit* (*postHookFunc) (struct skill_unit* retVal___, struct block_list *target, int16 *x, int16 *y, uint16 *skill_id, struct skill_unit *out_unit, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_find_skill_unit_oncell_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_find_skill_unit_oncell_post[hIndex].func; - retVal___ = postHookFunc(retVal___, target, &x, &y, &skill_id, out_unit, &flag); + if( HPMHooks.count.HP_libconfig_lookup_int_post ) { + int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_int_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath, value); } } return retVal___; } -int HP_map_get_new_object_id(void) { +int HP_libconfig_lookup_int64(const config_t *config, const char *filepath, long long *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_get_new_object_id_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_libconfig_lookup_int64_pre ) { + int (*preHookFunc) (const config_t *config, const char *filepath, long long *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_object_id_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_get_new_object_id_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath, value); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36247,26 +37081,26 @@ int HP_map_get_new_object_id(void) { } } { - retVal___ = HPMHooks.source.map.get_new_object_id(); + retVal___ = HPMHooks.source.libconfig.lookup_int64(config, filepath, value); } - if( HPMHooks.count.HP_map_get_new_object_id_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_object_id_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_get_new_object_id_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_libconfig_lookup_int64_post ) { + int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, long long *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath, value); } } return retVal___; } -int HP_map_search_freecell(struct block_list *src, int16 m, int16 *x, int16 *y, int16 rx, int16 ry, int flag) { +int HP_libconfig_lookup_float(const config_t *config, const char *filepath, double *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_search_freecell_pre ) { - int (*preHookFunc) (struct block_list *src, int16 *m, int16 *x, int16 *y, int16 *rx, int16 *ry, int *flag); + if( HPMHooks.count.HP_libconfig_lookup_float_pre ) { + int (*preHookFunc) (const config_t *config, const char *filepath, double *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_search_freecell_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_search_freecell_pre[hIndex].func; - retVal___ = preHookFunc(src, &m, x, y, &rx, &ry, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_float_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath, value); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36274,26 +37108,26 @@ int HP_map_search_freecell(struct block_list *src, int16 m, int16 *x, int16 *y, } } { - retVal___ = HPMHooks.source.map.search_freecell(src, m, x, y, rx, ry, flag); + retVal___ = HPMHooks.source.libconfig.lookup_float(config, filepath, value); } - if( HPMHooks.count.HP_map_search_freecell_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, int16 *m, int16 *x, int16 *y, int16 *rx, int16 *ry, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_search_freecell_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_search_freecell_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, &m, x, y, &rx, &ry, &flag); + if( HPMHooks.count.HP_libconfig_lookup_float_post ) { + int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, double *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_float_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath, value); } } return retVal___; } -bool HP_map_closest_freecell(int16 m, int16 *x, int16 *y, int type, int flag) { +int HP_libconfig_lookup_bool(const config_t *config, const char *filepath, int *value) { 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); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_lookup_bool_pre ) { + int (*preHookFunc) (const config_t *config, const char *filepath, int *value); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath, value); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36301,26 +37135,26 @@ bool HP_map_closest_freecell(int16 m, int16 *x, int16 *y, int type, int flag) { } } { - retVal___ = HPMHooks.source.map.closest_freecell(m, x, y, type, flag); + retVal___ = HPMHooks.source.libconfig.lookup_bool(config, filepath, value); } - 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); + if( HPMHooks.count.HP_libconfig_lookup_bool_post ) { + int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath, value); } } return retVal___; } -int HP_map_quit(struct map_session_data *sd) { +int HP_libconfig_lookup_string(const config_t *config, const char *filepath, const char **value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_quit_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_libconfig_lookup_string_pre ) { + int (*preHookFunc) (const config_t *config, const char *filepath, const char **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_quit_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_quit_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_lookup_string_pre[hIndex].func; + retVal___ = preHookFunc(config, filepath, value); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36328,26 +37162,26 @@ int HP_map_quit(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.map.quit(sd); + retVal___ = HPMHooks.source.libconfig.lookup_string(config, filepath, value); } - if( HPMHooks.count.HP_map_quit_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_quit_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_quit_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_libconfig_lookup_string_post ) { + int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, const char **value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_lookup_string_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, filepath, value); } } return retVal___; } -bool HP_map_addnpc(int16 m, struct npc_data *nd) { +int HP_libconfig_read_file(config_t *config, const char *config_filename) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_map_addnpc_pre ) { - bool (*preHookFunc) (int16 *m, struct npc_data *nd); + int retVal___ = 0; + if( HPMHooks.count.HP_libconfig_read_file_pre ) { + int (*preHookFunc) (config_t *config, const char *config_filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnpc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_addnpc_pre[hIndex].func; - retVal___ = preHookFunc(&m, nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_read_file_pre[hIndex].func; + retVal___ = preHookFunc(config, config_filename); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36355,79 +37189,77 @@ bool HP_map_addnpc(int16 m, struct npc_data *nd) { } } { - retVal___ = HPMHooks.source.map.addnpc(m, nd); + retVal___ = HPMHooks.source.libconfig.read_file(config, config_filename); } - if( HPMHooks.count.HP_map_addnpc_post ) { - bool (*postHookFunc) (bool retVal___, int16 *m, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnpc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_addnpc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &m, nd); + if( HPMHooks.count.HP_libconfig_read_file_post ) { + int (*postHookFunc) (int retVal___, config_t *config, const char *config_filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_read_file_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config, config_filename); } } return retVal___; } -int HP_map_clearflooritem_timer(int tid, int64 tick, int id, intptr_t data) { +void HP_libconfig_setting_copy_simple(config_setting_t *parent, const config_setting_t *src) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_clearflooritem_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_libconfig_setting_copy_simple_pre ) { + void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_clearflooritem_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_pre[hIndex].func; + preHookFunc(parent, src); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.map.clearflooritem_timer(tid, tick, id, data); + HPMHooks.source.libconfig.setting_copy_simple(parent, src); } - if( HPMHooks.count.HP_map_clearflooritem_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_clearflooritem_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_libconfig_setting_copy_simple_post ) { + void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_post[hIndex].func; + postHookFunc(parent, src); } } - return retVal___; + return; } -int HP_map_removemobs_timer(int tid, int64 tick, int id, intptr_t data) { +void HP_libconfig_setting_copy_elem(config_setting_t *parent, const config_setting_t *src) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_removemobs_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_libconfig_setting_copy_elem_pre ) { + void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_removemobs_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_pre[hIndex].func; + preHookFunc(parent, src); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.map.removemobs_timer(tid, tick, id, data); + HPMHooks.source.libconfig.setting_copy_elem(parent, src); } - if( HPMHooks.count.HP_map_removemobs_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_removemobs_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_libconfig_setting_copy_elem_post ) { + void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_post[hIndex].func; + postHookFunc(parent, src); } } - return retVal___; + return; } -void HP_map_clearflooritem(struct block_list *bl) { +void HP_libconfig_setting_copy_aggregate(config_setting_t *parent, const config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_map_clearflooritem_pre ) { - void (*preHookFunc) (struct block_list *bl); + if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre ) { + void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_clearflooritem_pre[hIndex].func; - preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_pre[hIndex].func; + preHookFunc(parent, src); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36435,26 +37267,26 @@ void HP_map_clearflooritem(struct block_list *bl) { } } { - HPMHooks.source.map.clearflooritem(bl); + HPMHooks.source.libconfig.setting_copy_aggregate(parent, src); } - if( HPMHooks.count.HP_map_clearflooritem_post ) { - void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_clearflooritem_post[hIndex].func; - postHookFunc(bl); + if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_post ) { + void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_post[hIndex].func; + postHookFunc(parent, src); } } return; } -int HP_map_addflooritem(struct item *item_data, int amount, int16 m, int16 x, int16 y, int first_charid, int second_charid, int third_charid, int flags) { +int HP_libconfig_setting_copy(config_setting_t *parent, const config_setting_t *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_addflooritem_pre ) { - int (*preHookFunc) (struct item *item_data, int *amount, int16 *m, int16 *x, int16 *y, int *first_charid, int *second_charid, int *third_charid, int *flags); + if( HPMHooks.count.HP_libconfig_setting_copy_pre ) { + int (*preHookFunc) (config_setting_t *parent, const config_setting_t *src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addflooritem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_addflooritem_pre[hIndex].func; - retVal___ = preHookFunc(item_data, &amount, &m, &x, &y, &first_charid, &second_charid, &third_charid, &flags); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_pre[hIndex].func; + retVal___ = preHookFunc(parent, src); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36462,25 +37294,26 @@ int HP_map_addflooritem(struct item *item_data, int amount, int16 m, int16 x, in } } { - retVal___ = HPMHooks.source.map.addflooritem(item_data, amount, m, x, y, first_charid, second_charid, third_charid, flags); + retVal___ = HPMHooks.source.libconfig.setting_copy(parent, src); } - if( HPMHooks.count.HP_map_addflooritem_post ) { - int (*postHookFunc) (int retVal___, struct item *item_data, int *amount, int16 *m, int16 *x, int16 *y, int *first_charid, int *second_charid, int *third_charid, int *flags); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addflooritem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_addflooritem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, item_data, &amount, &m, &x, &y, &first_charid, &second_charid, &third_charid, &flags); + if( HPMHooks.count.HP_libconfig_setting_copy_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *parent, const config_setting_t *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, parent, src); } } return retVal___; } -void HP_map_addnickdb(int charid, const char *nick) { +/* logs */ +void HP_logs_pick_pc(struct map_session_data *sd, e_log_pick_type type, int amount, struct item *itm, struct item_data *data) { int hIndex = 0; - if( HPMHooks.count.HP_map_addnickdb_pre ) { - void (*preHookFunc) (int *charid, const char *nick); + if( HPMHooks.count.HP_logs_pick_pc_pre ) { + void (*preHookFunc) (struct map_session_data *sd, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnickdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_addnickdb_pre[hIndex].func; - preHookFunc(&charid, nick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_pc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_pick_pc_pre[hIndex].func; + preHookFunc(sd, &type, &amount, itm, data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36488,25 +37321,25 @@ void HP_map_addnickdb(int charid, const char *nick) { } } { - HPMHooks.source.map.addnickdb(charid, nick); + HPMHooks.source.logs.pick_pc(sd, type, amount, itm, data); } - if( HPMHooks.count.HP_map_addnickdb_post ) { - void (*postHookFunc) (int *charid, const char *nick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnickdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_addnickdb_post[hIndex].func; - postHookFunc(&charid, nick); + if( HPMHooks.count.HP_logs_pick_pc_post ) { + void (*postHookFunc) (struct map_session_data *sd, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_pc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_pick_pc_post[hIndex].func; + postHookFunc(sd, &type, &amount, itm, data); } } return; } -void HP_map_delnickdb(int charid, const char *nick) { +void HP_logs_pick_mob(struct mob_data *md, e_log_pick_type type, int amount, struct item *itm, struct item_data *data) { int hIndex = 0; - if( HPMHooks.count.HP_map_delnickdb_pre ) { - void (*preHookFunc) (int *charid, const char *nick); + if( HPMHooks.count.HP_logs_pick_mob_pre ) { + void (*preHookFunc) (struct mob_data *md, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delnickdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_delnickdb_pre[hIndex].func; - preHookFunc(&charid, nick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_mob_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_pick_mob_pre[hIndex].func; + preHookFunc(md, &type, &amount, itm, data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36514,25 +37347,25 @@ void HP_map_delnickdb(int charid, const char *nick) { } } { - HPMHooks.source.map.delnickdb(charid, nick); + HPMHooks.source.logs.pick_mob(md, type, amount, itm, data); } - if( HPMHooks.count.HP_map_delnickdb_post ) { - void (*postHookFunc) (int *charid, const char *nick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delnickdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_delnickdb_post[hIndex].func; - postHookFunc(&charid, nick); + if( HPMHooks.count.HP_logs_pick_mob_post ) { + void (*postHookFunc) (struct mob_data *md, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_mob_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_pick_mob_post[hIndex].func; + postHookFunc(md, &type, &amount, itm, data); } } return; } -void HP_map_reqnickdb(struct map_session_data *sd, int charid) { +void HP_logs_zeny(struct map_session_data *sd, e_log_pick_type type, struct map_session_data *src_sd, int amount) { int hIndex = 0; - if( HPMHooks.count.HP_map_reqnickdb_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *charid); + if( HPMHooks.count.HP_logs_zeny_pre ) { + void (*preHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reqnickdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_reqnickdb_pre[hIndex].func; - preHookFunc(sd, &charid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_zeny_pre[hIndex].func; + preHookFunc(sd, &type, src_sd, &amount); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36540,81 +37373,77 @@ void HP_map_reqnickdb(struct map_session_data *sd, int charid) { } } { - HPMHooks.source.map.reqnickdb(sd, charid); + HPMHooks.source.logs.zeny(sd, type, src_sd, amount); } - if( HPMHooks.count.HP_map_reqnickdb_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *charid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reqnickdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_reqnickdb_post[hIndex].func; - postHookFunc(sd, &charid); + if( HPMHooks.count.HP_logs_zeny_post ) { + void (*postHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_zeny_post[hIndex].func; + postHookFunc(sd, &type, src_sd, &amount); } } return; } -const char* HP_map_charid2nick(int charid) { +void HP_logs_npc(struct map_session_data *sd, const char *message) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_map_charid2nick_pre ) { - const char* (*preHookFunc) (int *charid); + if( HPMHooks.count.HP_logs_npc_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2nick_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_charid2nick_pre[hIndex].func; - retVal___ = preHookFunc(&charid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_npc_pre[hIndex].func; + preHookFunc(sd, message); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.map.charid2nick(charid); + HPMHooks.source.logs.npc(sd, message); } - if( HPMHooks.count.HP_map_charid2nick_post ) { - const char* (*postHookFunc) (const char* retVal___, int *charid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2nick_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_charid2nick_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &charid); + if( HPMHooks.count.HP_logs_npc_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_npc_post[hIndex].func; + postHookFunc(sd, message); } } - return retVal___; + return; } -struct map_session_data* HP_map_charid2sd(int charid) { +void HP_logs_chat(e_log_chat_type type, int type_id, int src_charid, int src_accid, const char *mapname, int x, int y, const char *dst_charname, const char *message) { int hIndex = 0; - struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_charid2sd_pre ) { - struct map_session_data* (*preHookFunc) (int *charid); + if( HPMHooks.count.HP_logs_chat_pre ) { + void (*preHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2sd_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_charid2sd_pre[hIndex].func; - retVal___ = preHookFunc(&charid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_chat_pre[hIndex].func; + preHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.map.charid2sd(charid); + HPMHooks.source.logs.chat(type, type_id, src_charid, src_accid, mapname, x, y, dst_charname, message); } - if( HPMHooks.count.HP_map_charid2sd_post ) { - struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, int *charid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2sd_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_charid2sd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &charid); + if( HPMHooks.count.HP_logs_chat_post ) { + void (*postHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_chat_post[hIndex].func; + postHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message); } } - return retVal___; + return; } -void HP_map_vforeachpc(int ( *func ) (struct map_session_data *sd, va_list args), va_list args) { +void HP_logs_atcommand(struct map_session_data *sd, const char *message) { int hIndex = 0; - if( HPMHooks.count.HP_map_vforeachpc_pre ) { - void (*preHookFunc) (int ( *func ) (struct map_session_data *sd, va_list args), va_list args); + if( HPMHooks.count.HP_logs_atcommand_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachpc_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_map_vforeachpc_pre[hIndex].func; - preHookFunc(func, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_atcommand_pre[hIndex].func; + preHookFunc(sd, message); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36622,63 +37451,5521 @@ void HP_map_vforeachpc(int ( *func ) (struct map_session_data *sd, va_list args) } } { - va_list args___copy; va_copy(args___copy, args); - HPMHooks.source.map.vforeachpc(func, args___copy); - va_end(args___copy); + HPMHooks.source.logs.atcommand(sd, message); } - if( HPMHooks.count.HP_map_vforeachpc_post ) { - void (*postHookFunc) (int ( *func ) (struct map_session_data *sd, va_list args), va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachpc_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_map_vforeachpc_post[hIndex].func; - postHookFunc(func, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_logs_atcommand_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_atcommand_post[hIndex].func; + postHookFunc(sd, message); + } + } + return; +} +void HP_logs_branch(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_branch_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_branch_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.branch(sd); + } + if( HPMHooks.count.HP_logs_branch_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_branch_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_logs_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_mvpdrop_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_mvpdrop_pre[hIndex].func; + preHookFunc(sd, &monster_id, log_mvp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.mvpdrop(sd, monster_id, log_mvp); + } + if( HPMHooks.count.HP_logs_mvpdrop_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_mvpdrop_post[hIndex].func; + postHookFunc(sd, &monster_id, log_mvp); + } + } + return; +} +void HP_logs_pick_sub(int id, int16 m, e_log_pick_type type, int amount, struct item *itm, struct item_data *data) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_pick_sub_pre ) { + void (*preHookFunc) (int *id, int16 *m, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_pick_sub_pre[hIndex].func; + preHookFunc(&id, &m, &type, &amount, itm, data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.pick_sub(id, m, type, amount, itm, data); + } + if( HPMHooks.count.HP_logs_pick_sub_post ) { + void (*postHookFunc) (int *id, int16 *m, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_pick_sub_post[hIndex].func; + postHookFunc(&id, &m, &type, &amount, itm, data); + } + } + return; +} +void HP_logs_zeny_sub(struct map_session_data *sd, e_log_pick_type type, struct map_session_data *src_sd, int amount) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_zeny_sub_pre ) { + void (*preHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_zeny_sub_pre[hIndex].func; + preHookFunc(sd, &type, src_sd, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.zeny_sub(sd, type, src_sd, amount); + } + if( HPMHooks.count.HP_logs_zeny_sub_post ) { + void (*postHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_zeny_sub_post[hIndex].func; + postHookFunc(sd, &type, src_sd, &amount); + } + } + return; +} +void HP_logs_npc_sub(struct map_session_data *sd, const char *message) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_npc_sub_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *message); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_npc_sub_pre[hIndex].func; + preHookFunc(sd, message); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.npc_sub(sd, message); + } + if( HPMHooks.count.HP_logs_npc_sub_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_npc_sub_post[hIndex].func; + postHookFunc(sd, message); + } + } + return; +} +void HP_logs_chat_sub(e_log_chat_type type, int type_id, int src_charid, int src_accid, const char *mapname, int x, int y, const char *dst_charname, const char *message) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_chat_sub_pre ) { + void (*preHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_chat_sub_pre[hIndex].func; + preHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.chat_sub(type, type_id, src_charid, src_accid, mapname, x, y, dst_charname, message); + } + if( HPMHooks.count.HP_logs_chat_sub_post ) { + void (*postHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_chat_sub_post[hIndex].func; + postHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message); + } + } + return; +} +void HP_logs_atcommand_sub(struct map_session_data *sd, const char *message) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_atcommand_sub_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *message); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_atcommand_sub_pre[hIndex].func; + preHookFunc(sd, message); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.atcommand_sub(sd, message); + } + if( HPMHooks.count.HP_logs_atcommand_sub_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_atcommand_sub_post[hIndex].func; + postHookFunc(sd, message); + } + } + return; +} +void HP_logs_branch_sub(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_branch_sub_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_branch_sub_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.branch_sub(sd); + } + if( HPMHooks.count.HP_logs_branch_sub_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_branch_sub_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_logs_mvpdrop_sub(struct map_session_data *sd, int monster_id, int *log_mvp) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_mvpdrop_sub_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_mvpdrop_sub_pre[hIndex].func; + preHookFunc(sd, &monster_id, log_mvp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.mvpdrop_sub(sd, monster_id, log_mvp); + } + if( HPMHooks.count.HP_logs_mvpdrop_sub_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_mvpdrop_sub_post[hIndex].func; + postHookFunc(sd, &monster_id, log_mvp); + } + } + return; +} +int HP_logs_config_read(const char *cfgName) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_logs_config_read_pre ) { + int (*preHookFunc) (const char *cfgName); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_config_read_pre[hIndex].func; + retVal___ = preHookFunc(cfgName); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.logs.config_read(cfgName); + } + if( HPMHooks.count.HP_logs_config_read_post ) { + int (*postHookFunc) (int retVal___, const char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cfgName); + } + } + return retVal___; +} +void HP_logs_config_done(void) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_config_done_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_done_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_config_done_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.config_done(); + } + if( HPMHooks.count.HP_logs_config_done_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_done_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_config_done_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_logs_sql_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_sql_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_sql_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.sql_init(); + } + if( HPMHooks.count.HP_logs_sql_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_sql_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_logs_sql_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_sql_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_sql_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.sql_final(); + } + if( HPMHooks.count.HP_logs_sql_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_sql_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +char HP_logs_picktype2char(e_log_pick_type type) { + int hIndex = 0; + char retVal___ = 0; + if( HPMHooks.count.HP_logs_picktype2char_pre ) { + char (*preHookFunc) (e_log_pick_type *type); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_picktype2char_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_picktype2char_pre[hIndex].func; + retVal___ = preHookFunc(&type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.logs.picktype2char(type); + } + if( HPMHooks.count.HP_logs_picktype2char_post ) { + char (*postHookFunc) (char retVal___, e_log_pick_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_picktype2char_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_picktype2char_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type); + } + } + return retVal___; +} +char HP_logs_chattype2char(e_log_chat_type type) { + int hIndex = 0; + char retVal___ = 0; + if( HPMHooks.count.HP_logs_chattype2char_pre ) { + char (*preHookFunc) (e_log_chat_type *type); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chattype2char_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_chattype2char_pre[hIndex].func; + retVal___ = preHookFunc(&type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.logs.chattype2char(type); + } + if( HPMHooks.count.HP_logs_chattype2char_post ) { + char (*postHookFunc) (char retVal___, e_log_chat_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chattype2char_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_chattype2char_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type); + } + } + return retVal___; +} +bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_data *id) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_logs_should_log_item_pre ) { + bool (*preHookFunc) (int *nameid, int *amount, int *refine, struct item_data *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_should_log_item_pre[hIndex].func; + retVal___ = preHookFunc(&nameid, &amount, &refine, id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.logs.should_log_item(nameid, amount, refine, id); + } + if( HPMHooks.count.HP_logs_should_log_item_post ) { + bool (*postHookFunc) (bool retVal___, int *nameid, int *amount, int *refine, struct item_data *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_should_log_item_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &nameid, &amount, &refine, id); + } + } + return retVal___; +} +/* mail */ +void HP_mail_clear(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_mail_clear_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_clear_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mail.clear(sd); + } + if( HPMHooks.count.HP_mail_clear_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_clear_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_mail_removeitem(struct map_session_data *sd, short flag) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mail_removeitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, short *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removeitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_removeitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mail.removeitem(sd, flag); + } + if( HPMHooks.count.HP_mail_removeitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removeitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_removeitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &flag); + } + } + return retVal___; +} +int HP_mail_removezeny(struct map_session_data *sd, short flag) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mail_removezeny_pre ) { + int (*preHookFunc) (struct map_session_data *sd, short *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removezeny_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_removezeny_pre[hIndex].func; + retVal___ = preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mail.removezeny(sd, flag); + } + if( HPMHooks.count.HP_mail_removezeny_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removezeny_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_removezeny_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &flag); + } + } + return retVal___; +} +unsigned char HP_mail_setitem(struct map_session_data *sd, int idx, int amount) { + int hIndex = 0; + unsigned char retVal___ = 0; + if( HPMHooks.count.HP_mail_setitem_pre ) { + unsigned char (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_setitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &idx, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mail.setitem(sd, idx, amount); + } + if( HPMHooks.count.HP_mail_setitem_post ) { + unsigned char (*postHookFunc) (unsigned char retVal___, struct map_session_data *sd, int *idx, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_setitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &idx, &amount); + } + } + return retVal___; +} +bool HP_mail_setattachment(struct map_session_data *sd, struct mail_message *msg) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mail_setattachment_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, struct mail_message *msg); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setattachment_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_setattachment_pre[hIndex].func; + retVal___ = preHookFunc(sd, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mail.setattachment(sd, msg); + } + if( HPMHooks.count.HP_mail_setattachment_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct mail_message *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setattachment_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_setattachment_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, msg); + } + } + return retVal___; +} +void HP_mail_getattachment(struct map_session_data *sd, int zeny, struct item *item) { + int hIndex = 0; + if( HPMHooks.count.HP_mail_getattachment_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *zeny, struct item *item); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_getattachment_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_getattachment_pre[hIndex].func; + preHookFunc(sd, &zeny, item); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mail.getattachment(sd, zeny, item); + } + if( HPMHooks.count.HP_mail_getattachment_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *zeny, struct item *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_getattachment_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_getattachment_post[hIndex].func; + postHookFunc(sd, &zeny, item); + } + } + return; +} +int HP_mail_openmail(struct map_session_data *sd) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mail_openmail_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_openmail_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_openmail_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mail.openmail(sd); + } + if( HPMHooks.count.HP_mail_openmail_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_openmail_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_openmail_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +void HP_mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg) { + int hIndex = 0; + if( HPMHooks.count.HP_mail_deliveryfail_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct mail_message *msg); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_deliveryfail_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_deliveryfail_pre[hIndex].func; + preHookFunc(sd, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mail.deliveryfail(sd, msg); + } + if( HPMHooks.count.HP_mail_deliveryfail_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct mail_message *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_deliveryfail_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_deliveryfail_post[hIndex].func; + postHookFunc(sd, msg); + } + } + return; +} +bool HP_mail_invalid_operation(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mail_invalid_operation_pre ) { + bool (*preHookFunc) (struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_invalid_operation_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_invalid_operation_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mail.invalid_operation(sd); + } + if( HPMHooks.count.HP_mail_invalid_operation_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_invalid_operation_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_invalid_operation_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +/* iMalloc */ +void HP_iMalloc_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.init(); + } + if( HPMHooks.count.HP_iMalloc_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_iMalloc_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.final(); + } + if( HPMHooks.count.HP_iMalloc_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void* HP_iMalloc_malloc(size_t size, const char *file, int line, const char *func) { + int hIndex = 0; + void* retVal___ = NULL; + if( HPMHooks.count.HP_iMalloc_malloc_pre ) { + void* (*preHookFunc) (size_t *size, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_malloc_pre[hIndex].func; + retVal___ = preHookFunc(&size, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.malloc(size, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_malloc_post ) { + void* (*postHookFunc) (void* retVal___, size_t *size, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_malloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &size, file, &line, func); + } + } + return retVal___; +} +void* HP_iMalloc_calloc(size_t num, size_t size, const char *file, int line, const char *func) { + int hIndex = 0; + void* retVal___ = NULL; + if( HPMHooks.count.HP_iMalloc_calloc_pre ) { + void* (*preHookFunc) (size_t *num, size_t *size, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_calloc_pre[hIndex].func; + retVal___ = preHookFunc(&num, &size, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.calloc(num, size, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_calloc_post ) { + void* (*postHookFunc) (void* retVal___, size_t *num, size_t *size, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_calloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &num, &size, file, &line, func); + } + } + return retVal___; +} +void* HP_iMalloc_realloc(void *p, size_t size, const char *file, int line, const char *func) { + int hIndex = 0; + void* retVal___ = NULL; + if( HPMHooks.count.HP_iMalloc_realloc_pre ) { + void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_realloc_pre[hIndex].func; + retVal___ = preHookFunc(p, &size, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.realloc(p, size, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_realloc_post ) { + void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_realloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, &size, file, &line, func); + } + } + return retVal___; +} +void* HP_iMalloc_reallocz(void *p, size_t size, const char *file, int line, const char *func) { + int hIndex = 0; + void* retVal___ = NULL; + if( HPMHooks.count.HP_iMalloc_reallocz_pre ) { + void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_reallocz_pre[hIndex].func; + retVal___ = preHookFunc(p, &size, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.reallocz(p, size, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_reallocz_post ) { + void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_reallocz_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, &size, file, &line, func); + } + } + return retVal___; +} +char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *func) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_iMalloc_astrdup_pre ) { + char* (*preHookFunc) (const char *p, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_astrdup_pre[hIndex].func; + retVal___ = preHookFunc(p, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.astrdup(p, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_astrdup_post ) { + char* (*postHookFunc) (char* retVal___, const char *p, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_astrdup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, file, &line, func); + } + } + return retVal___; +} +void HP_iMalloc_free(void *p, const char *file, int line, const char *func) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_free_pre ) { + void (*preHookFunc) (void *p, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_free_pre[hIndex].func; + preHookFunc(p, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.free(p, file, line, func); + } + if( HPMHooks.count.HP_iMalloc_free_post ) { + void (*postHookFunc) (void *p, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_free_post[hIndex].func; + postHookFunc(p, file, &line, func); + } + } + return; +} +void HP_iMalloc_memory_check(void) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_memory_check_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_memory_check_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.memory_check(); + } + if( HPMHooks.count.HP_iMalloc_memory_check_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_memory_check_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_iMalloc_verify_ptr(void *ptr) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_iMalloc_verify_ptr_pre ) { + bool (*preHookFunc) (void *ptr); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_pre[hIndex].func; + retVal___ = preHookFunc(ptr); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.verify_ptr(ptr); + } + if( HPMHooks.count.HP_iMalloc_verify_ptr_post ) { + bool (*postHookFunc) (bool retVal___, void *ptr); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ptr); + } + } + return retVal___; +} +size_t HP_iMalloc_usage(void) { + int hIndex = 0; + size_t retVal___ = 0; + if( HPMHooks.count.HP_iMalloc_usage_pre ) { + size_t (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_usage_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.iMalloc.usage(); + } + if( HPMHooks.count.HP_iMalloc_usage_post ) { + size_t (*postHookFunc) (size_t retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_usage_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_iMalloc_post_shutdown(void) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_post_shutdown_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.post_shutdown(); + } + if( HPMHooks.count.HP_iMalloc_post_shutdown_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_iMalloc_init_messages(void) { + int hIndex = 0; + if( HPMHooks.count.HP_iMalloc_init_messages_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_iMalloc_init_messages_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.iMalloc.init_messages(); + } + if( HPMHooks.count.HP_iMalloc_init_messages_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_iMalloc_init_messages_post[hIndex].func; + postHookFunc(); + } + } + return; +} +/* map */ +void HP_map_zone_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_map_zone_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.zone_init(); + } + if( HPMHooks.count.HP_map_zone_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_map_zone_remove(int m) { + int hIndex = 0; + if( HPMHooks.count.HP_map_zone_remove_pre ) { + void (*preHookFunc) (int *m); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_remove_pre[hIndex].func; + preHookFunc(&m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.zone_remove(m); + } + if( HPMHooks.count.HP_map_zone_remove_post ) { + void (*postHookFunc) (int *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_remove_post[hIndex].func; + postHookFunc(&m); + } + } + return; +} +void HP_map_zone_apply(int m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath) { + int hIndex = 0; + if( HPMHooks.count.HP_map_zone_apply_pre ) { + void (*preHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_apply_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_apply_pre[hIndex].func; + preHookFunc(&m, zone, start, buffer, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.zone_apply(m, zone, start, buffer, filepath); + } + if( HPMHooks.count.HP_map_zone_apply_post ) { + void (*postHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_apply_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_apply_post[hIndex].func; + postHookFunc(&m, zone, start, buffer, filepath); + } + } + return; +} +void HP_map_zone_change(int m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath) { + int hIndex = 0; + if( HPMHooks.count.HP_map_zone_change_pre ) { + void (*preHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_change_pre[hIndex].func; + preHookFunc(&m, zone, start, buffer, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.zone_change(m, zone, start, buffer, filepath); + } + if( HPMHooks.count.HP_map_zone_change_post ) { + void (*postHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_change_post[hIndex].func; + postHookFunc(&m, zone, start, buffer, filepath); + } + } + return; +} +void HP_map_zone_change2(int m, struct map_zone_data *zone) { + int hIndex = 0; + if( HPMHooks.count.HP_map_zone_change2_pre ) { + void (*preHookFunc) (int *m, struct map_zone_data *zone); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_change2_pre[hIndex].func; + preHookFunc(&m, zone); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.zone_change2(m, zone); + } + if( HPMHooks.count.HP_map_zone_change2_post ) { + void (*postHookFunc) (int *m, struct map_zone_data *zone); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_change2_post[hIndex].func; + postHookFunc(&m, zone); + } + } + return; +} +int HP_map_getcell(int16 m, int16 x, int16 y, cell_chk cellchk) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_getcell_pre ) { + int (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_chk *cellchk); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_getcell_pre[hIndex].func; + retVal___ = preHookFunc(&m, &x, &y, &cellchk); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.getcell(m, x, y, cellchk); + } + if( HPMHooks.count.HP_map_getcell_post ) { + int (*postHookFunc) (int retVal___, int16 *m, int16 *x, int16 *y, cell_chk *cellchk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_getcell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, &x, &y, &cellchk); + } + } + return retVal___; +} +void HP_map_setgatcell(int16 m, int16 x, int16 y, int gat) { + int hIndex = 0; + if( HPMHooks.count.HP_map_setgatcell_pre ) { + void (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *gat); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setgatcell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_setgatcell_pre[hIndex].func; + preHookFunc(&m, &x, &y, &gat); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.setgatcell(m, x, y, gat); + } + if( HPMHooks.count.HP_map_setgatcell_post ) { + void (*postHookFunc) (int16 *m, int16 *x, int16 *y, int *gat); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setgatcell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_setgatcell_post[hIndex].func; + postHookFunc(&m, &x, &y, &gat); + } + } + return; +} +void HP_map_cellfromcache(struct map_data *m) { + int hIndex = 0; + if( HPMHooks.count.HP_map_cellfromcache_pre ) { + void (*preHookFunc) (struct map_data *m); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cellfromcache_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_cellfromcache_pre[hIndex].func; + preHookFunc(m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.cellfromcache(m); + } + if( HPMHooks.count.HP_map_cellfromcache_post ) { + void (*postHookFunc) (struct map_data *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cellfromcache_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_cellfromcache_post[hIndex].func; + postHookFunc(m); + } + } + return; +} +void HP_map_setusers(int p1) { + int hIndex = 0; + if( HPMHooks.count.HP_map_setusers_pre ) { + void (*preHookFunc) (int *p1); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setusers_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_setusers_pre[hIndex].func; + preHookFunc(&p1); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.setusers(p1); + } + if( HPMHooks.count.HP_map_setusers_post ) { + void (*postHookFunc) (int *p1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setusers_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_setusers_post[hIndex].func; + postHookFunc(&p1); + } + } + return; +} +int HP_map_getusers(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_getusers_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getusers_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_getusers_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.getusers(); + } + if( HPMHooks.count.HP_map_getusers_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getusers_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_getusers_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_map_usercount(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_usercount_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_usercount_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_usercount_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.usercount(); + } + if( HPMHooks.count.HP_map_usercount_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_usercount_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_usercount_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_map_freeblock(struct block_list *bl) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_freeblock_pre ) { + int (*preHookFunc) (struct block_list *bl); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_freeblock_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.freeblock(bl); + } + if( HPMHooks.count.HP_map_freeblock_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_freeblock_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_map_freeblock_lock(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_freeblock_lock_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_lock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_freeblock_lock_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.freeblock_lock(); + } + if( HPMHooks.count.HP_map_freeblock_lock_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_lock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_freeblock_lock_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_map_freeblock_unlock(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_freeblock_unlock_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_unlock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_freeblock_unlock_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.freeblock_unlock(); + } + if( HPMHooks.count.HP_map_freeblock_unlock_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_unlock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_freeblock_unlock_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_map_addblock(struct block_list *bl) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_addblock_pre ) { + int (*preHookFunc) (struct block_list *bl); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addblock_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.addblock(bl); + } + if( HPMHooks.count.HP_map_addblock_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addblock_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_map_delblock(struct block_list *bl) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_delblock_pre ) { + int (*preHookFunc) (struct block_list *bl); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_delblock_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.delblock(bl); + } + if( HPMHooks.count.HP_map_delblock_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_delblock_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_moveblock_pre ) { + int (*preHookFunc) (struct block_list *bl, int *x1, int *y1, int64 *tick); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_moveblock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_moveblock_pre[hIndex].func; + retVal___ = preHookFunc(bl, &x1, &y1, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.moveblock(bl, x1, y1, tick); + } + if( HPMHooks.count.HP_map_moveblock_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *x1, int *y1, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_moveblock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_moveblock_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &x1, &y1, &tick); + } + } + return retVal___; +} +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 *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, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + 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 *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, &flag); + } + } + return retVal___; +} +struct skill_unit* HP_map_find_skill_unit_oncell(struct block_list *target, int16 x, int16 y, uint16 skill_id, struct skill_unit *out_unit, int flag) { + int hIndex = 0; + struct skill_unit* retVal___ = NULL; + if( HPMHooks.count.HP_map_find_skill_unit_oncell_pre ) { + struct skill_unit* (*preHookFunc) (struct block_list *target, int16 *x, int16 *y, uint16 *skill_id, struct skill_unit *out_unit, int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_find_skill_unit_oncell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_find_skill_unit_oncell_pre[hIndex].func; + retVal___ = preHookFunc(target, &x, &y, &skill_id, out_unit, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.find_skill_unit_oncell(target, x, y, skill_id, out_unit, flag); + } + if( HPMHooks.count.HP_map_find_skill_unit_oncell_post ) { + struct skill_unit* (*postHookFunc) (struct skill_unit* retVal___, struct block_list *target, int16 *x, int16 *y, uint16 *skill_id, struct skill_unit *out_unit, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_find_skill_unit_oncell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_find_skill_unit_oncell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, target, &x, &y, &skill_id, out_unit, &flag); + } + } + return retVal___; +} +int HP_map_get_new_object_id(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_get_new_object_id_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_object_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_get_new_object_id_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.get_new_object_id(); + } + if( HPMHooks.count.HP_map_get_new_object_id_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_object_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_get_new_object_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_map_search_freecell(struct block_list *src, int16 m, int16 *x, int16 *y, int16 rx, int16 ry, int flag) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_search_freecell_pre ) { + int (*preHookFunc) (struct block_list *src, int16 *m, int16 *x, int16 *y, int16 *rx, int16 *ry, int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_search_freecell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_search_freecell_pre[hIndex].func; + retVal___ = preHookFunc(src, &m, x, y, &rx, &ry, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.search_freecell(src, m, x, y, rx, ry, flag); + } + if( HPMHooks.count.HP_map_search_freecell_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, int16 *m, int16 *x, int16 *y, int16 *rx, int16 *ry, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_search_freecell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_search_freecell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &m, x, y, &rx, &ry, &flag); + } + } + 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; + if( HPMHooks.count.HP_map_quit_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_quit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_quit_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.quit(sd); + } + if( HPMHooks.count.HP_map_quit_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_quit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_quit_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +bool HP_map_addnpc(int16 m, struct npc_data *nd) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_map_addnpc_pre ) { + bool (*preHookFunc) (int16 *m, struct npc_data *nd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addnpc_pre[hIndex].func; + retVal___ = preHookFunc(&m, nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.addnpc(m, nd); + } + if( HPMHooks.count.HP_map_addnpc_post ) { + bool (*postHookFunc) (bool retVal___, int16 *m, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addnpc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, nd); + } + } + return retVal___; +} +int HP_map_clearflooritem_timer(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_clearflooritem_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_clearflooritem_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.clearflooritem_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_map_clearflooritem_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_clearflooritem_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_map_removemobs_timer(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_removemobs_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_removemobs_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.removemobs_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_map_removemobs_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_removemobs_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_map_clearflooritem(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_map_clearflooritem_pre ) { + void (*preHookFunc) (struct block_list *bl); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_clearflooritem_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.clearflooritem(bl); + } + if( HPMHooks.count.HP_map_clearflooritem_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_clearflooritem_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +int HP_map_addflooritem(struct item *item_data, int amount, int16 m, int16 x, int16 y, int first_charid, int second_charid, int third_charid, int flags) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_addflooritem_pre ) { + int (*preHookFunc) (struct item *item_data, int *amount, int16 *m, int16 *x, int16 *y, int *first_charid, int *second_charid, int *third_charid, int *flags); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addflooritem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addflooritem_pre[hIndex].func; + retVal___ = preHookFunc(item_data, &amount, &m, &x, &y, &first_charid, &second_charid, &third_charid, &flags); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.addflooritem(item_data, amount, m, x, y, first_charid, second_charid, third_charid, flags); + } + if( HPMHooks.count.HP_map_addflooritem_post ) { + int (*postHookFunc) (int retVal___, struct item *item_data, int *amount, int16 *m, int16 *x, int16 *y, int *first_charid, int *second_charid, int *third_charid, int *flags); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addflooritem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addflooritem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, item_data, &amount, &m, &x, &y, &first_charid, &second_charid, &third_charid, &flags); + } + } + return retVal___; +} +void HP_map_addnickdb(int charid, const char *nick) { + int hIndex = 0; + if( HPMHooks.count.HP_map_addnickdb_pre ) { + void (*preHookFunc) (int *charid, const char *nick); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnickdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addnickdb_pre[hIndex].func; + preHookFunc(&charid, nick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.addnickdb(charid, nick); + } + if( HPMHooks.count.HP_map_addnickdb_post ) { + void (*postHookFunc) (int *charid, const char *nick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnickdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addnickdb_post[hIndex].func; + postHookFunc(&charid, nick); + } + } + return; +} +void HP_map_delnickdb(int charid, const char *nick) { + int hIndex = 0; + if( HPMHooks.count.HP_map_delnickdb_pre ) { + void (*preHookFunc) (int *charid, const char *nick); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delnickdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_delnickdb_pre[hIndex].func; + preHookFunc(&charid, nick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.delnickdb(charid, nick); + } + if( HPMHooks.count.HP_map_delnickdb_post ) { + void (*postHookFunc) (int *charid, const char *nick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delnickdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_delnickdb_post[hIndex].func; + postHookFunc(&charid, nick); + } + } + return; +} +void HP_map_reqnickdb(struct map_session_data *sd, int charid) { + int hIndex = 0; + if( HPMHooks.count.HP_map_reqnickdb_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *charid); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reqnickdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_reqnickdb_pre[hIndex].func; + preHookFunc(sd, &charid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.reqnickdb(sd, charid); + } + if( HPMHooks.count.HP_map_reqnickdb_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *charid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reqnickdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_reqnickdb_post[hIndex].func; + postHookFunc(sd, &charid); + } + } + return; +} +const char* HP_map_charid2nick(int charid) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_map_charid2nick_pre ) { + const char* (*preHookFunc) (int *charid); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2nick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_charid2nick_pre[hIndex].func; + retVal___ = preHookFunc(&charid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.charid2nick(charid); + } + if( HPMHooks.count.HP_map_charid2nick_post ) { + const char* (*postHookFunc) (const char* retVal___, int *charid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2nick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_charid2nick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &charid); + } + } + return retVal___; +} +struct map_session_data* HP_map_charid2sd(int charid) { + int hIndex = 0; + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_charid2sd_pre ) { + struct map_session_data* (*preHookFunc) (int *charid); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2sd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_charid2sd_pre[hIndex].func; + retVal___ = preHookFunc(&charid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.charid2sd(charid); + } + if( HPMHooks.count.HP_map_charid2sd_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, int *charid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2sd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_charid2sd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &charid); + } + } + return retVal___; +} +void HP_map_vforeachpc(int ( *func ) (struct map_session_data *sd, va_list args), va_list args) { + int hIndex = 0; + if( HPMHooks.count.HP_map_vforeachpc_pre ) { + void (*preHookFunc) (int ( *func ) (struct map_session_data *sd, va_list args), va_list args); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachpc_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_vforeachpc_pre[hIndex].func; + preHookFunc(func, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + va_list args___copy; va_copy(args___copy, args); + HPMHooks.source.map.vforeachpc(func, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_vforeachpc_post ) { + void (*postHookFunc) (int ( *func ) (struct map_session_data *sd, va_list args), va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachpc_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_vforeachpc_post[hIndex].func; + postHookFunc(func, args___copy); + va_end(args___copy); + } + } + return; +} +void HP_map_vforeachmob(int ( *func ) (struct mob_data *md, va_list args), va_list args) { + int hIndex = 0; + if( HPMHooks.count.HP_map_vforeachmob_pre ) { + void (*preHookFunc) (int ( *func ) (struct mob_data *md, va_list args), va_list args); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachmob_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_vforeachmob_pre[hIndex].func; + preHookFunc(func, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + va_list args___copy; va_copy(args___copy, args); + HPMHooks.source.map.vforeachmob(func, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_vforeachmob_post ) { + void (*postHookFunc) (int ( *func ) (struct mob_data *md, va_list args), va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachmob_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_vforeachmob_post[hIndex].func; + postHookFunc(func, args___copy); + va_end(args___copy); + } + } + return; +} +void HP_map_vforeachnpc(int ( *func ) (struct npc_data *nd, va_list args), va_list args) { + int hIndex = 0; + if( HPMHooks.count.HP_map_vforeachnpc_pre ) { + void (*preHookFunc) (int ( *func ) (struct npc_data *nd, va_list args), va_list args); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachnpc_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_vforeachnpc_pre[hIndex].func; + preHookFunc(func, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + va_list args___copy; va_copy(args___copy, args); + HPMHooks.source.map.vforeachnpc(func, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_vforeachnpc_post ) { + void (*postHookFunc) (int ( *func ) (struct npc_data *nd, va_list args), va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachnpc_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_vforeachnpc_post[hIndex].func; + postHookFunc(func, args___copy); + va_end(args___copy); + } + } + return; +} +void HP_map_vforeachregen(int ( *func ) (struct block_list *bl, va_list args), va_list args) { + int hIndex = 0; + if( HPMHooks.count.HP_map_vforeachregen_pre ) { + void (*preHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachregen_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_vforeachregen_pre[hIndex].func; + preHookFunc(func, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + va_list args___copy; va_copy(args___copy, args); + HPMHooks.source.map.vforeachregen(func, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_vforeachregen_post ) { + void (*postHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachregen_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_vforeachregen_post[hIndex].func; + postHookFunc(func, args___copy); + va_end(args___copy); + } + } + return; +} +void HP_map_vforeachiddb(int ( *func ) (struct block_list *bl, va_list args), va_list args) { + int hIndex = 0; + if( HPMHooks.count.HP_map_vforeachiddb_pre ) { + void (*preHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachiddb_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_vforeachiddb_pre[hIndex].func; + preHookFunc(func, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + va_list args___copy; va_copy(args___copy, args); + HPMHooks.source.map.vforeachiddb(func, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_vforeachiddb_post ) { + void (*postHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachiddb_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_vforeachiddb_post[hIndex].func; + postHookFunc(func, args___copy); + va_end(args___copy); + } + } + return; +} +int HP_map_vforeachinrange(int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int type, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_vforeachinrange_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinrange_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforeachinrange_pre[hIndex].func; + retVal___ = preHookFunc(func, center, &range, &type, 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.map.vforeachinrange(func, center, range, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforeachinrange_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinrange_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforeachinrange_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, center, &range, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_vforeachinshootrange(int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int type, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_vforeachinshootrange_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinshootrange_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforeachinshootrange_pre[hIndex].func; + retVal___ = preHookFunc(func, center, &range, &type, 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.map.vforeachinshootrange(func, center, range, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforeachinshootrange_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinshootrange_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforeachinshootrange_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, center, &range, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_vforeachinarea(int ( *func ) (struct block_list *, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int type, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_vforeachinarea_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *type, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinarea_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforeachinarea_pre[hIndex].func; + retVal___ = preHookFunc(func, &m, &x0, &y0, &x1, &y1, &type, 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.map.vforeachinarea(func, m, x0, y0, x1, y1, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforeachinarea_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinarea_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforeachinarea_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, &m, &x0, &y0, &x1, &y1, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_vforcountinrange(int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int count, int type, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_vforcountinrange_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *count, int *type, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinrange_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforcountinrange_pre[hIndex].func; + retVal___ = preHookFunc(func, center, &range, &count, &type, 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.map.vforcountinrange(func, center, range, count, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforcountinrange_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *count, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinrange_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforcountinrange_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, center, &range, &count, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_vforcountinarea(int ( *func ) (struct block_list *, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int count, int type, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_vforcountinarea_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *count, int *type, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinarea_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforcountinarea_pre[hIndex].func; + retVal___ = preHookFunc(func, &m, &x0, &y0, &x1, &y1, &count, &type, 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.map.vforcountinarea(func, m, x0, y0, x1, y1, count, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforcountinarea_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *count, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinarea_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforcountinarea_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, &m, &x0, &y0, &x1, &y1, &count, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_vforeachinmovearea(int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int16 dx, int16 dy, int type, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_vforeachinmovearea_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int16 *dx, int16 *dy, int *type, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmovearea_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforeachinmovearea_pre[hIndex].func; + retVal___ = preHookFunc(func, center, &range, &dx, &dy, &type, 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.map.vforeachinmovearea(func, center, range, dx, dy, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforeachinmovearea_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int16 *dx, int16 *dy, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmovearea_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforeachinmovearea_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, center, &range, &dx, &dy, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_vforeachincell(int ( *func ) (struct block_list *, va_list), int16 m, int16 x, int16 y, int type, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_vforeachincell_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x, int16 *y, int *type, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachincell_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforeachincell_pre[hIndex].func; + retVal___ = preHookFunc(func, &m, &x, &y, &type, 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.map.vforeachincell(func, m, x, y, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforeachincell_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x, int16 *y, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachincell_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforeachincell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, &m, &x, &y, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_vforeachinpath(int ( *func ) (struct block_list *, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int16 range, int length, int type, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_vforeachinpath_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int16 *range, int *length, int *type, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinpath_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforeachinpath_pre[hIndex].func; + retVal___ = preHookFunc(func, &m, &x0, &y0, &x1, &y1, &range, &length, &type, 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.map.vforeachinpath(func, m, x0, y0, x1, y1, range, length, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforeachinpath_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int16 *range, int *length, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinpath_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforeachinpath_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, &m, &x0, &y0, &x1, &y1, &range, &length, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_vforeachinmap(int ( *func ) (struct block_list *, va_list), int16 m, int type, va_list args) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_vforeachinmap_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int *type, va_list args); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmap_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_vforeachinmap_pre[hIndex].func; + retVal___ = preHookFunc(func, &m, &type, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.map.vforeachinmap(func, m, type, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_vforeachinmap_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int *type, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmap_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_vforeachinmap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, &m, &type, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_map_vforeachininstance(int ( *func ) (struct block_list *, va_list), int16 instance_id, int type, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_vforeachininstance_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *instance_id, int *type, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachininstance_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforeachininstance_pre[hIndex].func; + retVal___ = preHookFunc(func, &instance_id, &type, 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.map.vforeachininstance(func, instance_id, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforeachininstance_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *instance_id, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachininstance_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforeachininstance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, &instance_id, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +struct map_session_data* HP_map_id2sd(int id) { + int hIndex = 0; + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_id2sd_pre ) { + struct map_session_data* (*preHookFunc) (int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2sd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_id2sd_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.id2sd(id); + } + if( HPMHooks.count.HP_map_id2sd_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2sd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_id2sd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +struct mob_data* HP_map_id2md(int id) { + int hIndex = 0; + struct mob_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_id2md_pre ) { + struct mob_data* (*preHookFunc) (int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2md_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_id2md_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.id2md(id); + } + if( HPMHooks.count.HP_map_id2md_post ) { + struct mob_data* (*postHookFunc) (struct mob_data* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2md_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_id2md_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +struct npc_data* HP_map_id2nd(int id) { + int hIndex = 0; + struct npc_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_id2nd_pre ) { + struct npc_data* (*preHookFunc) (int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2nd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_id2nd_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.id2nd(id); + } + if( HPMHooks.count.HP_map_id2nd_post ) { + struct npc_data* (*postHookFunc) (struct npc_data* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2nd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_id2nd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +struct homun_data* HP_map_id2hd(int id) { + int hIndex = 0; + struct homun_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_id2hd_pre ) { + struct homun_data* (*preHookFunc) (int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2hd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_id2hd_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.id2hd(id); + } + if( HPMHooks.count.HP_map_id2hd_post ) { + struct homun_data* (*postHookFunc) (struct homun_data* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2hd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_id2hd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +struct mercenary_data* HP_map_id2mc(int id) { + int hIndex = 0; + struct mercenary_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_id2mc_pre ) { + struct mercenary_data* (*preHookFunc) (int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2mc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_id2mc_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.id2mc(id); + } + if( HPMHooks.count.HP_map_id2mc_post ) { + struct mercenary_data* (*postHookFunc) (struct mercenary_data* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2mc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_id2mc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +struct chat_data* HP_map_id2cd(int id) { + int hIndex = 0; + struct chat_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_id2cd_pre ) { + struct chat_data* (*preHookFunc) (int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2cd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_id2cd_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.id2cd(id); + } + if( HPMHooks.count.HP_map_id2cd_post ) { + struct chat_data* (*postHookFunc) (struct chat_data* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2cd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_id2cd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +struct block_list* HP_map_id2bl(int id) { + int hIndex = 0; + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_map_id2bl_pre ) { + struct block_list* (*preHookFunc) (int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2bl_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_id2bl_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.id2bl(id); + } + if( HPMHooks.count.HP_map_id2bl_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2bl_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_id2bl_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +bool HP_map_blid_exists(int id) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_map_blid_exists_pre ) { + bool (*preHookFunc) (int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_blid_exists_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_blid_exists_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.blid_exists(id); + } + if( HPMHooks.count.HP_map_blid_exists_post ) { + bool (*postHookFunc) (bool retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_blid_exists_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_blid_exists_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +int16 HP_map_mapindex2mapid(unsigned short map_index) { + int hIndex = 0; + int16 retVal___ = 0; + if( HPMHooks.count.HP_map_mapindex2mapid_pre ) { + int16 (*preHookFunc) (unsigned short *map_index); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_mapindex2mapid_pre[hIndex].func; + retVal___ = preHookFunc(&map_index); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.mapindex2mapid(map_index); + } + if( HPMHooks.count.HP_map_mapindex2mapid_post ) { + int16 (*postHookFunc) (int16 retVal___, unsigned short *map_index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_mapindex2mapid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &map_index); + } + } + return retVal___; +} +int16 HP_map_mapname2mapid(const char *name) { + int hIndex = 0; + int16 retVal___ = 0; + if( HPMHooks.count.HP_map_mapname2mapid_pre ) { + int16 (*preHookFunc) (const char *name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2mapid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_mapname2mapid_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.mapname2mapid(name); + } + if( HPMHooks.count.HP_map_mapname2mapid_post ) { + int16 (*postHookFunc) (int16 retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2mapid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_mapname2mapid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +int HP_map_mapname2ipport(unsigned short name, uint32 *ip, uint16 *port) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_mapname2ipport_pre ) { + int (*preHookFunc) (unsigned short *name, uint32 *ip, uint16 *port); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2ipport_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_mapname2ipport_pre[hIndex].func; + retVal___ = preHookFunc(&name, ip, port); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.mapname2ipport(name, ip, port); + } + if( HPMHooks.count.HP_map_mapname2ipport_post ) { + int (*postHookFunc) (int retVal___, unsigned short *name, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2ipport_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_mapname2ipport_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &name, ip, port); + } + } + return retVal___; +} +int HP_map_setipport(unsigned short map_index, uint32 ip, uint16 port) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_setipport_pre ) { + int (*preHookFunc) (unsigned short *map_index, uint32 *ip, uint16 *port); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_setipport_pre[hIndex].func; + retVal___ = preHookFunc(&map_index, &ip, &port); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.setipport(map_index, ip, port); + } + if( HPMHooks.count.HP_map_setipport_post ) { + int (*postHookFunc) (int retVal___, unsigned short *map_index, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_setipport_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &map_index, &ip, &port); + } + } + return retVal___; +} +int HP_map_eraseipport(unsigned short map_index, uint32 ip, uint16 port) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_eraseipport_pre ) { + int (*preHookFunc) (unsigned short *map_index, uint32 *ip, uint16 *port); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_eraseipport_pre[hIndex].func; + retVal___ = preHookFunc(&map_index, &ip, &port); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.eraseipport(map_index, ip, port); + } + if( HPMHooks.count.HP_map_eraseipport_post ) { + int (*postHookFunc) (int retVal___, unsigned short *map_index, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_eraseipport_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &map_index, &ip, &port); + } + } + return retVal___; +} +int HP_map_eraseallipport(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_eraseallipport_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_eraseallipport_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.eraseallipport(); + } + if( HPMHooks.count.HP_map_eraseallipport_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_eraseallipport_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_map_addiddb(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_map_addiddb_pre ) { + void (*preHookFunc) (struct block_list *bl); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addiddb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addiddb_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.addiddb(bl); + } + if( HPMHooks.count.HP_map_addiddb_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addiddb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addiddb_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +void HP_map_deliddb(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_map_deliddb_pre ) { + void (*preHookFunc) (struct block_list *bl); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_deliddb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_deliddb_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.deliddb(bl); + } + if( HPMHooks.count.HP_map_deliddb_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_deliddb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_deliddb_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +struct map_session_data* HP_map_nick2sd(const char *nick) { + int hIndex = 0; + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_nick2sd_pre ) { + struct map_session_data* (*preHookFunc) (const char *nick); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_nick2sd_pre[hIndex].func; + retVal___ = preHookFunc(nick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.nick2sd(nick); + } + if( HPMHooks.count.HP_map_nick2sd_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, const char *nick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_nick2sd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nick); + } + } + return retVal___; +} +struct mob_data* HP_map_getmob_boss(int16 m) { + int hIndex = 0; + struct mob_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_getmob_boss_pre ) { + struct mob_data* (*preHookFunc) (int16 *m); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getmob_boss_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_getmob_boss_pre[hIndex].func; + retVal___ = preHookFunc(&m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.getmob_boss(m); + } + if( HPMHooks.count.HP_map_getmob_boss_post ) { + struct mob_data* (*postHookFunc) (struct mob_data* retVal___, int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getmob_boss_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_getmob_boss_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m); + } + } + return retVal___; +} +struct mob_data* HP_map_id2boss(int id) { + int hIndex = 0; + struct mob_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_id2boss_pre ) { + struct mob_data* (*preHookFunc) (int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2boss_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_id2boss_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.id2boss(id); + } + if( HPMHooks.count.HP_map_id2boss_post ) { + struct mob_data* (*postHookFunc) (struct mob_data* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2boss_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_id2boss_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +void HP_map_reloadnpc(bool clear) { + int hIndex = 0; + if( HPMHooks.count.HP_map_reloadnpc_pre ) { + void (*preHookFunc) (bool *clear); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_reloadnpc_pre[hIndex].func; + preHookFunc(&clear); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.reloadnpc(clear); + } + if( HPMHooks.count.HP_map_reloadnpc_post ) { + void (*postHookFunc) (bool *clear); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_reloadnpc_post[hIndex].func; + postHookFunc(&clear); + } + } + return; +} +int HP_map_check_dir(int s_dir, int t_dir) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_check_dir_pre ) { + int (*preHookFunc) (int *s_dir, int *t_dir); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_check_dir_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_check_dir_pre[hIndex].func; + retVal___ = preHookFunc(&s_dir, &t_dir); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.check_dir(s_dir, t_dir); + } + if( HPMHooks.count.HP_map_check_dir_post ) { + int (*postHookFunc) (int retVal___, int *s_dir, int *t_dir); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_check_dir_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_check_dir_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &s_dir, &t_dir); + } + } + return retVal___; +} +uint8 HP_map_calc_dir(struct block_list *src, int16 x, int16 y) { + int hIndex = 0; + uint8 retVal___ = 0; + if( HPMHooks.count.HP_map_calc_dir_pre ) { + uint8 (*preHookFunc) (struct block_list *src, int16 *x, int16 *y); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_calc_dir_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_calc_dir_pre[hIndex].func; + retVal___ = preHookFunc(src, &x, &y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.calc_dir(src, x, y); + } + if( HPMHooks.count.HP_map_calc_dir_post ) { + uint8 (*postHookFunc) (uint8 retVal___, struct block_list *src, int16 *x, int16 *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_calc_dir_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_calc_dir_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &x, &y); + } + } + return retVal___; +} +int HP_map_random_dir(struct block_list *bl, short *x, short *y) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_random_dir_pre ) { + int (*preHookFunc) (struct block_list *bl, short *x, short *y); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_random_dir_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_random_dir_pre[hIndex].func; + retVal___ = preHookFunc(bl, x, y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.random_dir(bl, x, y); + } + if( HPMHooks.count.HP_map_random_dir_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, short *x, short *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_random_dir_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_random_dir_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, x, y); + } + } + return retVal___; +} +int HP_map_cleanup_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_cleanup_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_cleanup_sub_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.map.cleanup_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_cleanup_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_cleanup_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_delmap(char *mapname) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_delmap_pre ) { + int (*preHookFunc) (char *mapname); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_delmap_pre[hIndex].func; + retVal___ = preHookFunc(mapname); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.delmap(mapname); + } + if( HPMHooks.count.HP_map_delmap_post ) { + int (*postHookFunc) (int retVal___, char *mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_delmap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mapname); + } + } + return retVal___; +} +void HP_map_flags_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_map_flags_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_flags_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_flags_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.flags_init(); + } + if( HPMHooks.count.HP_map_flags_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_flags_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_flags_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_map_iwall_set(int16 m, int16 x, int16 y, int size, int8 dir, bool shootable, const char *wall_name) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_map_iwall_set_pre ) { + bool (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *size, int8 *dir, bool *shootable, const char *wall_name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_set_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_iwall_set_pre[hIndex].func; + retVal___ = preHookFunc(&m, &x, &y, &size, &dir, &shootable, wall_name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.iwall_set(m, x, y, size, dir, shootable, wall_name); + } + if( HPMHooks.count.HP_map_iwall_set_post ) { + bool (*postHookFunc) (bool retVal___, int16 *m, int16 *x, int16 *y, int *size, int8 *dir, bool *shootable, const char *wall_name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_set_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_iwall_set_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, &x, &y, &size, &dir, &shootable, wall_name); + } + } + return retVal___; +} +void HP_map_iwall_get(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_map_iwall_get_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_get_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_iwall_get_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.iwall_get(sd); + } + if( HPMHooks.count.HP_map_iwall_get_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_get_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_iwall_get_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_map_iwall_remove(const char *wall_name) { + int hIndex = 0; + if( HPMHooks.count.HP_map_iwall_remove_pre ) { + void (*preHookFunc) (const char *wall_name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_iwall_remove_pre[hIndex].func; + preHookFunc(wall_name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.iwall_remove(wall_name); + } + if( HPMHooks.count.HP_map_iwall_remove_post ) { + void (*postHookFunc) (const char *wall_name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_iwall_remove_post[hIndex].func; + postHookFunc(wall_name); + } + } + return; +} +int HP_map_addmobtolist(unsigned short m, struct spawn_data *spawn) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_addmobtolist_pre ) { + int (*preHookFunc) (unsigned short *m, struct spawn_data *spawn); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmobtolist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addmobtolist_pre[hIndex].func; + retVal___ = preHookFunc(&m, spawn); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.addmobtolist(m, spawn); + } + if( HPMHooks.count.HP_map_addmobtolist_post ) { + int (*postHookFunc) (int retVal___, unsigned short *m, struct spawn_data *spawn); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmobtolist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addmobtolist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, spawn); + } + } + return retVal___; +} +void HP_map_spawnmobs(int16 m) { + int hIndex = 0; + if( HPMHooks.count.HP_map_spawnmobs_pre ) { + void (*preHookFunc) (int16 *m); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_spawnmobs_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_spawnmobs_pre[hIndex].func; + preHookFunc(&m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.spawnmobs(m); + } + if( HPMHooks.count.HP_map_spawnmobs_post ) { + void (*postHookFunc) (int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_spawnmobs_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_spawnmobs_post[hIndex].func; + postHookFunc(&m); + } + } + return; +} +void HP_map_removemobs(int16 m) { + int hIndex = 0; + if( HPMHooks.count.HP_map_removemobs_pre ) { + void (*preHookFunc) (int16 *m); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_removemobs_pre[hIndex].func; + preHookFunc(&m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.removemobs(m); + } + if( HPMHooks.count.HP_map_removemobs_post ) { + void (*postHookFunc) (int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_removemobs_post[hIndex].func; + postHookFunc(&m); + } + } + return; +} +void HP_map_addmap2db(struct map_data *m) { + int hIndex = 0; + if( HPMHooks.count.HP_map_addmap2db_pre ) { + void (*preHookFunc) (struct map_data *m); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap2db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addmap2db_pre[hIndex].func; + preHookFunc(m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.addmap2db(m); + } + if( HPMHooks.count.HP_map_addmap2db_post ) { + void (*postHookFunc) (struct map_data *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap2db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addmap2db_post[hIndex].func; + postHookFunc(m); + } + } + return; +} +void HP_map_removemapdb(struct map_data *m) { + int hIndex = 0; + if( HPMHooks.count.HP_map_removemapdb_pre ) { + void (*preHookFunc) (struct map_data *m); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemapdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_removemapdb_pre[hIndex].func; + preHookFunc(m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.removemapdb(m); + } + if( HPMHooks.count.HP_map_removemapdb_post ) { + void (*postHookFunc) (struct map_data *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemapdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_removemapdb_post[hIndex].func; + postHookFunc(m); + } + } + return; +} +void HP_map_clean(int i) { + int hIndex = 0; + if( HPMHooks.count.HP_map_clean_pre ) { + void (*preHookFunc) (int *i); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clean_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_clean_pre[hIndex].func; + preHookFunc(&i); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.clean(i); + } + if( HPMHooks.count.HP_map_clean_post ) { + void (*postHookFunc) (int *i); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clean_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_clean_post[hIndex].func; + postHookFunc(&i); + } + } + return; +} +void HP_map_do_shutdown(void) { + int hIndex = 0; + if( HPMHooks.count.HP_map_do_shutdown_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_do_shutdown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_do_shutdown_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.do_shutdown(); + } + if( HPMHooks.count.HP_map_do_shutdown_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_do_shutdown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_do_shutdown_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_map_freeblock_timer(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_freeblock_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_freeblock_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.freeblock_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_map_freeblock_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_freeblock_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_map_searchrandfreecell(int16 m, int16 *x, int16 *y, int stack) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_searchrandfreecell_pre ) { + int (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *stack); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_searchrandfreecell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_searchrandfreecell_pre[hIndex].func; + retVal___ = preHookFunc(&m, x, y, &stack); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.searchrandfreecell(m, x, y, stack); + } + if( HPMHooks.count.HP_map_searchrandfreecell_post ) { + int (*postHookFunc) (int retVal___, int16 *m, int16 *x, int16 *y, int *stack); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_searchrandfreecell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_searchrandfreecell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, x, y, &stack); + } + } + return retVal___; +} +int HP_map_count_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_count_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_count_sub_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.map.count_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_count_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_count_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +DBData HP_map_create_charid2nick(DBKey key, va_list args) { + int hIndex = 0; + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_map_create_charid2nick_pre ) { + DBData (*preHookFunc) (DBKey *key, va_list args); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_charid2nick_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_create_charid2nick_pre[hIndex].func; + retVal___ = preHookFunc(&key, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.map.create_charid2nick(key, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_create_charid2nick_post ) { + DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_charid2nick_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_create_charid2nick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_map_removemobs_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_removemobs_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_removemobs_sub_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.map.removemobs_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_removemobs_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_removemobs_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +struct mapcell HP_map_gat2cell(int gat) { + int hIndex = 0; + struct mapcell retVal___; + memset(&retVal___, '\0', sizeof(struct mapcell)); + if( HPMHooks.count.HP_map_gat2cell_pre ) { + struct mapcell (*preHookFunc) (int *gat); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_gat2cell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_gat2cell_pre[hIndex].func; + retVal___ = preHookFunc(&gat); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.gat2cell(gat); + } + if( HPMHooks.count.HP_map_gat2cell_post ) { + struct mapcell (*postHookFunc) (struct mapcell retVal___, int *gat); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_gat2cell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_gat2cell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &gat); + } + } + return retVal___; +} +int HP_map_cell2gat(struct mapcell cell) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_cell2gat_pre ) { + int (*preHookFunc) (struct mapcell *cell); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cell2gat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_cell2gat_pre[hIndex].func; + retVal___ = preHookFunc(&cell); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.cell2gat(cell); + } + if( HPMHooks.count.HP_map_cell2gat_post ) { + int (*postHookFunc) (int retVal___, struct mapcell *cell); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cell2gat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_cell2gat_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &cell); + } + } + return retVal___; +} +int HP_map_getcellp(struct map_data *m, int16 x, int16 y, cell_chk cellchk) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_getcellp_pre ) { + int (*preHookFunc) (struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcellp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_getcellp_pre[hIndex].func; + retVal___ = preHookFunc(m, &x, &y, &cellchk); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.getcellp(m, x, y, cellchk); + } + if( HPMHooks.count.HP_map_getcellp_post ) { + int (*postHookFunc) (int retVal___, struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcellp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_getcellp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, m, &x, &y, &cellchk); + } + } + return retVal___; +} +void HP_map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) { + int hIndex = 0; + if( HPMHooks.count.HP_map_setcell_pre ) { + void (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setcell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_setcell_pre[hIndex].func; + preHookFunc(&m, &x, &y, &cell, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.setcell(m, x, y, cell, flag); + } + if( HPMHooks.count.HP_map_setcell_post ) { + void (*postHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setcell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_setcell_post[hIndex].func; + postHookFunc(&m, &x, &y, &cell, &flag); + } + } + return; +} +int HP_map_sub_getcellp(struct map_data *m, int16 x, int16 y, cell_chk cellchk) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_sub_getcellp_pre ) { + int (*preHookFunc) (struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_getcellp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_sub_getcellp_pre[hIndex].func; + retVal___ = preHookFunc(m, &x, &y, &cellchk); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.sub_getcellp(m, x, y, cellchk); + } + if( HPMHooks.count.HP_map_sub_getcellp_post ) { + int (*postHookFunc) (int retVal___, struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_getcellp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_sub_getcellp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, m, &x, &y, &cellchk); + } + } + return retVal___; +} +void HP_map_sub_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) { + int hIndex = 0; + if( HPMHooks.count.HP_map_sub_setcell_pre ) { + void (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_setcell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_sub_setcell_pre[hIndex].func; + preHookFunc(&m, &x, &y, &cell, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.sub_setcell(m, x, y, cell, flag); + } + if( HPMHooks.count.HP_map_sub_setcell_post ) { + void (*postHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_setcell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_sub_setcell_post[hIndex].func; + postHookFunc(&m, &x, &y, &cell, &flag); + } + } + return; +} +void HP_map_iwall_nextxy(int16 x, int16 y, int8 dir, int pos, int16 *x1, int16 *y1) { + int hIndex = 0; + if( HPMHooks.count.HP_map_iwall_nextxy_pre ) { + void (*preHookFunc) (int16 *x, int16 *y, int8 *dir, int *pos, int16 *x1, int16 *y1); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_nextxy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_iwall_nextxy_pre[hIndex].func; + preHookFunc(&x, &y, &dir, &pos, x1, y1); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.iwall_nextxy(x, y, dir, pos, x1, y1); + } + if( HPMHooks.count.HP_map_iwall_nextxy_post ) { + void (*postHookFunc) (int16 *x, int16 *y, int8 *dir, int *pos, int16 *x1, int16 *y1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_nextxy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_iwall_nextxy_post[hIndex].func; + postHookFunc(&x, &y, &dir, &pos, x1, y1); + } + } + return; +} +DBData HP_map_create_map_data_other_server(DBKey key, va_list args) { + int hIndex = 0; + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_map_create_map_data_other_server_pre ) { + DBData (*preHookFunc) (DBKey *key, va_list args); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_map_data_other_server_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_create_map_data_other_server_pre[hIndex].func; + retVal___ = preHookFunc(&key, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.map.create_map_data_other_server(key, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_create_map_data_other_server_post ) { + DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_map_data_other_server_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_create_map_data_other_server_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_map_eraseallipport_sub(DBKey key, DBData *data, va_list va) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_eraseallipport_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list va); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_sub_pre; hIndex++ ) { + va_list va___copy; va_copy(va___copy, va); + preHookFunc = HPMHooks.list.HP_map_eraseallipport_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, va___copy); + va_end(va___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list va___copy; va_copy(va___copy, va); + retVal___ = HPMHooks.source.map.eraseallipport_sub(key, data, va___copy); + va_end(va___copy); + } + if( HPMHooks.count.HP_map_eraseallipport_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list va); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_sub_post; hIndex++ ) { + va_list va___copy; va_copy(va___copy, va); + postHookFunc = HPMHooks.list.HP_map_eraseallipport_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, va___copy); + va_end(va___copy); + } + } + return retVal___; +} +char* HP_map_init_mapcache(FILE *fp) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_map_init_mapcache_pre ) { + char* (*preHookFunc) (FILE *fp); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_init_mapcache_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_init_mapcache_pre[hIndex].func; + retVal___ = preHookFunc(fp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.init_mapcache(fp); + } + if( HPMHooks.count.HP_map_init_mapcache_post ) { + char* (*postHookFunc) (char* retVal___, FILE *fp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_init_mapcache_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_init_mapcache_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fp); + } + } + return retVal___; +} +int HP_map_readfromcache(struct map_data *m, char *buffer) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_readfromcache_pre ) { + int (*preHookFunc) (struct map_data *m, char *buffer); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readfromcache_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_readfromcache_pre[hIndex].func; + retVal___ = preHookFunc(m, buffer); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.readfromcache(m, buffer); + } + if( HPMHooks.count.HP_map_readfromcache_post ) { + int (*postHookFunc) (int retVal___, struct map_data *m, char *buffer); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readfromcache_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_readfromcache_post[hIndex].func; + retVal___ = postHookFunc(retVal___, m, buffer); + } + } + return retVal___; +} +int HP_map_addmap(const char *mapname) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_addmap_pre ) { + int (*preHookFunc) (const char *mapname); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addmap_pre[hIndex].func; + retVal___ = preHookFunc(mapname); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.addmap(mapname); + } + if( HPMHooks.count.HP_map_addmap_post ) { + int (*postHookFunc) (int retVal___, const char *mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addmap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mapname); + } + } + return retVal___; +} +void HP_map_delmapid(int id) { + int hIndex = 0; + if( HPMHooks.count.HP_map_delmapid_pre ) { + void (*preHookFunc) (int *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmapid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_delmapid_pre[hIndex].func; + preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.delmapid(id); + } + if( HPMHooks.count.HP_map_delmapid_post ) { + void (*postHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmapid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_delmapid_post[hIndex].func; + postHookFunc(&id); + } + } + return; +} +void HP_map_zone_db_clear(void) { + int hIndex = 0; + if( HPMHooks.count.HP_map_zone_db_clear_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_db_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_db_clear_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.zone_db_clear(); + } + if( HPMHooks.count.HP_map_zone_db_clear_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_db_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_db_clear_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_map_list_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_map_list_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_list_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_list_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.list_final(); + } + if( HPMHooks.count.HP_map_list_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_list_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_list_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_map_waterheight(char *mapname) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_waterheight_pre ) { + int (*preHookFunc) (char *mapname); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_waterheight_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_waterheight_pre[hIndex].func; + retVal___ = preHookFunc(mapname); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.waterheight(mapname); + } + if( HPMHooks.count.HP_map_waterheight_post ) { + int (*postHookFunc) (int retVal___, char *mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_waterheight_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_waterheight_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mapname); + } + } + return retVal___; +} +int HP_map_readgat(struct map_data *m) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_readgat_pre ) { + int (*preHookFunc) (struct map_data *m); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readgat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_readgat_pre[hIndex].func; + retVal___ = preHookFunc(m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.readgat(m); + } + if( HPMHooks.count.HP_map_readgat_post ) { + int (*postHookFunc) (int retVal___, struct map_data *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readgat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_readgat_post[hIndex].func; + retVal___ = postHookFunc(retVal___, m); + } + } + return retVal___; +} +int HP_map_readallmaps(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_readallmaps_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readallmaps_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_readallmaps_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.readallmaps(); + } + if( HPMHooks.count.HP_map_readallmaps_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readallmaps_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_readallmaps_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_map_config_read(char *cfgName) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_config_read_pre ) { + int (*preHookFunc) (char *cfgName); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_config_read_pre[hIndex].func; + retVal___ = preHookFunc(cfgName); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.config_read(cfgName); + } + if( HPMHooks.count.HP_map_config_read_post ) { + int (*postHookFunc) (int retVal___, char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cfgName); + } + } + return retVal___; +} +int HP_map_config_read_sub(char *cfgName) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_config_read_sub_pre ) { + int (*preHookFunc) (char *cfgName); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_config_read_sub_pre[hIndex].func; + retVal___ = preHookFunc(cfgName); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.config_read_sub(cfgName); + } + if( HPMHooks.count.HP_map_config_read_sub_post ) { + int (*postHookFunc) (int retVal___, char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_config_read_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cfgName); + } + } + return retVal___; +} +void HP_map_reloadnpc_sub(char *cfgName) { + int hIndex = 0; + if( HPMHooks.count.HP_map_reloadnpc_sub_pre ) { + void (*preHookFunc) (char *cfgName); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_reloadnpc_sub_pre[hIndex].func; + preHookFunc(cfgName); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.reloadnpc_sub(cfgName); + } + if( HPMHooks.count.HP_map_reloadnpc_sub_post ) { + void (*postHookFunc) (char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_reloadnpc_sub_post[hIndex].func; + postHookFunc(cfgName); + } + } + return; +} +int HP_map_inter_config_read(char *cfgName) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_inter_config_read_pre ) { + int (*preHookFunc) (char *cfgName); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_inter_config_read_pre[hIndex].func; + retVal___ = preHookFunc(cfgName); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.inter_config_read(cfgName); + } + if( HPMHooks.count.HP_map_inter_config_read_post ) { + int (*postHookFunc) (int retVal___, char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_inter_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cfgName); + } + } + return retVal___; +} +int HP_map_sql_init(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_sql_init_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_sql_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.sql_init(); + } + if( HPMHooks.count.HP_map_sql_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_sql_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_map_sql_close(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_sql_close_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_sql_close_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.sql_close(); + } + if( HPMHooks.count.HP_map_sql_close_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_sql_close_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_map_zone_mf_cache(int m, char *flag, char *params) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_map_zone_mf_cache_pre ) { + bool (*preHookFunc) (int *m, char *flag, char *params); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_mf_cache_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_mf_cache_pre[hIndex].func; + retVal___ = preHookFunc(&m, flag, params); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.zone_mf_cache(m, flag, params); + } + if( HPMHooks.count.HP_map_zone_mf_cache_post ) { + bool (*postHookFunc) (bool retVal___, int *m, char *flag, char *params); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_mf_cache_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_mf_cache_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, flag, params); + } + } + return retVal___; +} +unsigned short HP_map_zone_str2itemid(const char *name) { + int hIndex = 0; + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_map_zone_str2itemid_pre ) { + unsigned short (*preHookFunc) (const char *name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2itemid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_str2itemid_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.zone_str2itemid(name); + } + if( HPMHooks.count.HP_map_zone_str2itemid_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2itemid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_str2itemid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +unsigned short HP_map_zone_str2skillid(const char *name) { + int hIndex = 0; + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_map_zone_str2skillid_pre ) { + unsigned short (*preHookFunc) (const char *name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2skillid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_str2skillid_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.zone_str2skillid(name); + } + if( HPMHooks.count.HP_map_zone_str2skillid_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2skillid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_str2skillid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +enum bl_type HP_map_zone_bl_type(const char *entry, enum map_zone_skill_subtype *subtype) { + int hIndex = 0; + enum bl_type retVal___ = BL_NUL; + if( HPMHooks.count.HP_map_zone_bl_type_pre ) { + enum bl_type (*preHookFunc) (const char *entry, enum map_zone_skill_subtype *subtype); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_bl_type_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_bl_type_pre[hIndex].func; + retVal___ = preHookFunc(entry, subtype); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.zone_bl_type(entry, subtype); + } + if( HPMHooks.count.HP_map_zone_bl_type_post ) { + enum bl_type (*postHookFunc) (enum bl_type retVal___, const char *entry, enum map_zone_skill_subtype *subtype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_bl_type_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_bl_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, entry, subtype); + } + } + return retVal___; +} +void HP_map_read_zone_db(void) { + int hIndex = 0; + if( HPMHooks.count.HP_map_read_zone_db_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_zone_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_read_zone_db_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.read_zone_db(); + } + if( HPMHooks.count.HP_map_read_zone_db_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_zone_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_read_zone_db_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_map_db_final(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_db_final_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_db_final_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_db_final_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.map.db_final(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_db_final_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_db_final_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_db_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_nick_db_final(DBKey key, DBData *data, va_list args) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_nick_db_final_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list args); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick_db_final_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_nick_db_final_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.map.nick_db_final(key, data, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_nick_db_final_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick_db_final_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_nick_db_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_map_cleanup_db_sub(DBKey key, DBData *data, va_list va) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_cleanup_db_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list va); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_db_sub_pre; hIndex++ ) { + va_list va___copy; va_copy(va___copy, va); + preHookFunc = HPMHooks.list.HP_map_cleanup_db_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, va___copy); + va_end(va___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list va___copy; va_copy(va___copy, va); + retVal___ = HPMHooks.source.map.cleanup_db_sub(key, data, va___copy); + va_end(va___copy); + } + if( HPMHooks.count.HP_map_cleanup_db_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list va); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_db_sub_post; hIndex++ ) { + va_list va___copy; va_copy(va___copy, va); + postHookFunc = HPMHooks.list.HP_map_cleanup_db_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, va___copy); + va_end(va___copy); + } + } + return retVal___; +} +int HP_map_abort_sub(struct map_session_data *sd, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_abort_sub_pre ) { + int (*preHookFunc) (struct map_session_data *sd, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_abort_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_abort_sub_pre[hIndex].func; + retVal___ = preHookFunc(sd, 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.map.abort_sub(sd, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_abort_sub_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_abort_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_abort_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_map_update_cell_bl(struct block_list *bl, bool increase) { + int hIndex = 0; + if( HPMHooks.count.HP_map_update_cell_bl_pre ) { + void (*preHookFunc) (struct block_list *bl, bool *increase); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_update_cell_bl_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_update_cell_bl_pre[hIndex].func; + preHookFunc(bl, &increase); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.update_cell_bl(bl, increase); + } + if( HPMHooks.count.HP_map_update_cell_bl_post ) { + void (*postHookFunc) (struct block_list *bl, bool *increase); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_update_cell_bl_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_update_cell_bl_post[hIndex].func; + postHookFunc(bl, &increase); + } + } + return; +} +int HP_map_get_new_bonus_id(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_map_get_new_bonus_id_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_bonus_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_get_new_bonus_id_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.get_new_bonus_id(); + } + if( HPMHooks.count.HP_map_get_new_bonus_id_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_bonus_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_get_new_bonus_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_map_add_questinfo(int m, struct questinfo *qi) { + int hIndex = 0; + if( HPMHooks.count.HP_map_add_questinfo_pre ) { + void (*preHookFunc) (int *m, struct questinfo *qi); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_add_questinfo_pre[hIndex].func; + preHookFunc(&m, qi); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.add_questinfo(m, qi); + } + if( HPMHooks.count.HP_map_add_questinfo_post ) { + void (*postHookFunc) (int *m, struct questinfo *qi); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_add_questinfo_post[hIndex].func; + postHookFunc(&m, qi); + } + } + return; +} +bool HP_map_remove_questinfo(int m, struct npc_data *nd) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_map_remove_questinfo_pre ) { + bool (*preHookFunc) (int *m, struct npc_data *nd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_remove_questinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_remove_questinfo_pre[hIndex].func; + retVal___ = preHookFunc(&m, nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.remove_questinfo(m, nd); + } + if( HPMHooks.count.HP_map_remove_questinfo_post ) { + bool (*postHookFunc) (bool retVal___, int *m, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_remove_questinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_remove_questinfo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, nd); + } + } + return retVal___; +} +struct map_zone_data* HP_map_merge_zone(struct map_zone_data *main, struct map_zone_data *other) { + int hIndex = 0; + struct map_zone_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_merge_zone_pre ) { + struct map_zone_data* (*preHookFunc) (struct map_zone_data *main, struct map_zone_data *other); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_merge_zone_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_merge_zone_pre[hIndex].func; + retVal___ = preHookFunc(main, other); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.merge_zone(main, other); + } + if( HPMHooks.count.HP_map_merge_zone_post ) { + struct map_zone_data* (*postHookFunc) (struct map_zone_data* retVal___, struct map_zone_data *main, struct map_zone_data *other); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_merge_zone_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_merge_zone_post[hIndex].func; + retVal___ = postHookFunc(retVal___, main, other); + } + } + return retVal___; +} +void HP_map_zone_clear_single(struct map_zone_data *zone) { + int hIndex = 0; + if( HPMHooks.count.HP_map_zone_clear_single_pre ) { + void (*preHookFunc) (struct map_zone_data *zone); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_clear_single_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_clear_single_pre[hIndex].func; + preHookFunc(zone); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.zone_clear_single(zone); + } + if( HPMHooks.count.HP_map_zone_clear_single_post ) { + void (*postHookFunc) (struct map_zone_data *zone); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_clear_single_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_clear_single_post[hIndex].func; + postHookFunc(zone); + } + } + return; +} +/* mapindex */ +int HP_mapindex_init(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapindex_init_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapindex.init(); + } + if( HPMHooks.count.HP_mapindex_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_mapindex_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mapindex_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapindex.final(); + } + if( HPMHooks.count.HP_mapindex_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_mapindex_addmap(int index, const char *name) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapindex_addmap_pre ) { + int (*preHookFunc) (int *index, const char *name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_addmap_pre[hIndex].func; + retVal___ = preHookFunc(&index, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapindex.addmap(index, name); + } + if( HPMHooks.count.HP_mapindex_addmap_post ) { + int (*postHookFunc) (int retVal___, int *index, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_addmap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &index, name); + } + } + return retVal___; +} +void HP_mapindex_removemap(int index) { + int hIndex = 0; + if( HPMHooks.count.HP_mapindex_removemap_pre ) { + void (*preHookFunc) (int *index); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_removemap_pre[hIndex].func; + preHookFunc(&index); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapindex.removemap(index); + } + if( HPMHooks.count.HP_mapindex_removemap_post ) { + void (*postHookFunc) (int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_removemap_post[hIndex].func; + postHookFunc(&index); + } + } + return; +} +const char* HP_mapindex_getmapname(const char *string, char *output) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_mapindex_getmapname_pre ) { + const char* (*preHookFunc) (const char *string, char *output); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_getmapname_pre[hIndex].func; + retVal___ = preHookFunc(string, output); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapindex.getmapname(string, output); + } + if( HPMHooks.count.HP_mapindex_getmapname_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *string, char *output); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_getmapname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, string, output); + } + } + return retVal___; +} +const char* HP_mapindex_getmapname_ext(const char *string, char *output) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_mapindex_getmapname_ext_pre ) { + const char* (*preHookFunc) (const char *string, char *output); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_getmapname_ext_pre[hIndex].func; + retVal___ = preHookFunc(string, output); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapindex.getmapname_ext(string, output); + } + if( HPMHooks.count.HP_mapindex_getmapname_ext_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *string, char *output); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_getmapname_ext_post[hIndex].func; + retVal___ = postHookFunc(retVal___, string, output); + } + } + return retVal___; +} +unsigned short HP_mapindex_name2id(const char *p1) { + int hIndex = 0; + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_mapindex_name2id_pre ) { + unsigned short (*preHookFunc) (const char *p1); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_name2id_pre[hIndex].func; + retVal___ = preHookFunc(p1); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapindex.name2id(p1); + } + if( HPMHooks.count.HP_mapindex_name2id_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, const char *p1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_name2id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p1); + } + } + return retVal___; +} +const char* HP_mapindex_id2name(uint16 id, const char *file, int line, const char *func) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_mapindex_id2name_pre ) { + const char* (*preHookFunc) (uint16 *id, const char *file, int *line, const char *func); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_id2name_pre[hIndex].func; + retVal___ = preHookFunc(&id, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapindex.id2name(id, file, line, func); + } + if( HPMHooks.count.HP_mapindex_id2name_post ) { + const char* (*postHookFunc) (const char* retVal___, uint16 *id, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_id2name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id, file, &line, func); + } + } + return retVal___; +} +bool HP_mapindex_check_default(void) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mapindex_check_default_pre ) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapindex_check_default_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapindex.check_default(); + } + if( HPMHooks.count.HP_mapindex_check_default_post ) { + bool (*postHookFunc) (bool retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapindex_check_default_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +/* mapit */ +struct s_mapiterator* HP_mapit_alloc(enum e_mapitflags flags, enum bl_type types) { + int hIndex = 0; + struct s_mapiterator* retVal___ = NULL; + if( HPMHooks.count.HP_mapit_alloc_pre ) { + struct s_mapiterator* (*preHookFunc) (enum e_mapitflags *flags, enum bl_type *types); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_alloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapit_alloc_pre[hIndex].func; + retVal___ = preHookFunc(&flags, &types); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapit.alloc(flags, types); + } + if( HPMHooks.count.HP_mapit_alloc_post ) { + struct s_mapiterator* (*postHookFunc) (struct s_mapiterator* retVal___, enum e_mapitflags *flags, enum bl_type *types); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_alloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapit_alloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &flags, &types); + } + } + return retVal___; +} +void HP_mapit_free(struct s_mapiterator *iter) { + int hIndex = 0; + if( HPMHooks.count.HP_mapit_free_pre ) { + void (*preHookFunc) (struct s_mapiterator *iter); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_free_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapit_free_pre[hIndex].func; + preHookFunc(iter); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapit.free(iter); + } + if( HPMHooks.count.HP_mapit_free_post ) { + void (*postHookFunc) (struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_free_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapit_free_post[hIndex].func; + postHookFunc(iter); + } + } + return; +} +struct block_list* HP_mapit_first(struct s_mapiterator *iter) { + int hIndex = 0; + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_mapit_first_pre ) { + struct block_list* (*preHookFunc) (struct s_mapiterator *iter); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_first_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapit_first_pre[hIndex].func; + retVal___ = preHookFunc(iter); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapit.first(iter); + } + if( HPMHooks.count.HP_mapit_first_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_first_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapit_first_post[hIndex].func; + retVal___ = postHookFunc(retVal___, iter); + } + } + return retVal___; +} +struct block_list* HP_mapit_last(struct s_mapiterator *iter) { + int hIndex = 0; + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_mapit_last_pre ) { + struct block_list* (*preHookFunc) (struct s_mapiterator *iter); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_last_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapit_last_pre[hIndex].func; + retVal___ = preHookFunc(iter); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapit.last(iter); + } + if( HPMHooks.count.HP_mapit_last_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_last_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapit_last_post[hIndex].func; + retVal___ = postHookFunc(retVal___, iter); + } + } + return retVal___; +} +struct block_list* HP_mapit_next(struct s_mapiterator *iter) { + int hIndex = 0; + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_mapit_next_pre ) { + struct block_list* (*preHookFunc) (struct s_mapiterator *iter); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_next_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapit_next_pre[hIndex].func; + retVal___ = preHookFunc(iter); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapit.next(iter); + } + if( HPMHooks.count.HP_mapit_next_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_next_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapit_next_post[hIndex].func; + retVal___ = postHookFunc(retVal___, iter); + } + } + return retVal___; +} +struct block_list* HP_mapit_prev(struct s_mapiterator *iter) { + int hIndex = 0; + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_mapit_prev_pre ) { + struct block_list* (*preHookFunc) (struct s_mapiterator *iter); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_prev_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapit_prev_pre[hIndex].func; + retVal___ = preHookFunc(iter); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapit.prev(iter); + } + if( HPMHooks.count.HP_mapit_prev_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_prev_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapit_prev_post[hIndex].func; + retVal___ = postHookFunc(retVal___, iter); + } + } + return retVal___; +} +bool HP_mapit_exists(struct s_mapiterator *iter) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mapit_exists_pre ) { + bool (*preHookFunc) (struct s_mapiterator *iter); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_exists_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapit_exists_pre[hIndex].func; + retVal___ = preHookFunc(iter); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapit.exists(iter); + } + if( HPMHooks.count.HP_mapit_exists_post ) { + bool (*postHookFunc) (bool retVal___, struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_exists_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapit_exists_post[hIndex].func; + retVal___ = postHookFunc(retVal___, iter); + } + } + return retVal___; +} +/* mapreg */ +void HP_mapreg_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mapreg_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapreg.init(); + } + if( HPMHooks.count.HP_mapreg_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_mapreg_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mapreg_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapreg.final(); + } + if( HPMHooks.count.HP_mapreg_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_mapreg_readreg(int64 uid) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapreg_readreg_pre ) { + int (*preHookFunc) (int64 *uid); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readreg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_readreg_pre[hIndex].func; + retVal___ = preHookFunc(&uid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapreg.readreg(uid); + } + if( HPMHooks.count.HP_mapreg_readreg_post ) { + int (*postHookFunc) (int retVal___, int64 *uid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readreg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_readreg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &uid); + } + } + return retVal___; +} +char* HP_mapreg_readregstr(int64 uid) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_mapreg_readregstr_pre ) { + char* (*preHookFunc) (int64 *uid); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readregstr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_readregstr_pre[hIndex].func; + retVal___ = preHookFunc(&uid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapreg.readregstr(uid); + } + if( HPMHooks.count.HP_mapreg_readregstr_post ) { + char* (*postHookFunc) (char* retVal___, int64 *uid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readregstr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_readregstr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &uid); + } + } + return retVal___; +} +bool HP_mapreg_setreg(int64 uid, int val) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mapreg_setreg_pre ) { + bool (*preHookFunc) (int64 *uid, int *val); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setreg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_setreg_pre[hIndex].func; + retVal___ = preHookFunc(&uid, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapreg.setreg(uid, val); + } + if( HPMHooks.count.HP_mapreg_setreg_post ) { + bool (*postHookFunc) (bool retVal___, int64 *uid, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setreg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_setreg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &uid, &val); + } + } + return retVal___; +} +bool HP_mapreg_setregstr(int64 uid, const char *str) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mapreg_setregstr_pre ) { + bool (*preHookFunc) (int64 *uid, const char *str); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setregstr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_setregstr_pre[hIndex].func; + retVal___ = preHookFunc(&uid, str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapreg.setregstr(uid, str); + } + if( HPMHooks.count.HP_mapreg_setregstr_post ) { + bool (*postHookFunc) (bool retVal___, int64 *uid, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setregstr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_setregstr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &uid, str); + } + } + return retVal___; +} +void HP_mapreg_load(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mapreg_load_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_load_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapreg.load(); + } + if( HPMHooks.count.HP_mapreg_load_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_load_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_mapreg_save(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mapreg_save_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_save_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapreg.save(); + } + if( HPMHooks.count.HP_mapreg_save_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_save_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_mapreg_save_timer(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapreg_save_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_save_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapreg.save_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_mapreg_save_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_save_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_mapreg_destroyreg(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mapreg_destroyreg_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_destroyreg_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mapreg_destroyreg_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mapreg.destroyreg(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_mapreg_destroyreg_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_destroyreg_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mapreg_destroyreg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_mapreg_reload(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mapreg_reload_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_reload_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapreg.reload(); + } + if( HPMHooks.count.HP_mapreg_reload_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_reload_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_mapreg_config_read(const char *w1, const char *w2) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mapreg_config_read_pre ) { + bool (*preHookFunc) (const char *w1, const char *w2); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_config_read_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapreg.config_read(w1, w2); + } + if( HPMHooks.count.HP_mapreg_config_read_post ) { + bool (*postHookFunc) (bool retVal___, const char *w1, const char *w2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2); + } + } + return retVal___; +} +/* mercenary */ +void HP_mercenary_init(bool minimal) { + int hIndex = 0; + if( HPMHooks.count.HP_mercenary_init_pre ) { + void (*preHookFunc) (bool *minimal); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_init_pre[hIndex].func; + preHookFunc(&minimal); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mercenary.init(minimal); + } + if( HPMHooks.count.HP_mercenary_init_post ) { + void (*postHookFunc) (bool *minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_init_post[hIndex].func; + postHookFunc(&minimal); + } + } + return; +} +bool HP_mercenary_class(int class_) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mercenary_class_pre ) { + bool (*preHookFunc) (int *class_); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_class_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_class_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.class(class_); + } + if( HPMHooks.count.HP_mercenary_class_post ) { + bool (*postHookFunc) (bool retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_class_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_class_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} +struct view_data* HP_mercenary_get_viewdata(int class_) { + int hIndex = 0; + struct view_data* retVal___ = NULL; + if( HPMHooks.count.HP_mercenary_get_viewdata_pre ) { + struct view_data* (*preHookFunc) (int *class_); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_viewdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_get_viewdata_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.get_viewdata(class_); + } + if( HPMHooks.count.HP_mercenary_get_viewdata_post ) { + struct view_data* (*postHookFunc) (struct view_data* retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_viewdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_get_viewdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} +int HP_mercenary_create(struct map_session_data *sd, int class_, unsigned int lifetime) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mercenary_create_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *class_, unsigned int *lifetime); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_create_pre[hIndex].func; + retVal___ = preHookFunc(sd, &class_, &lifetime); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.create(sd, class_, lifetime); + } + if( HPMHooks.count.HP_mercenary_create_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *class_, unsigned int *lifetime); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &class_, &lifetime); + } + } + return retVal___; +} +int HP_mercenary_data_received(struct s_mercenary *merc, bool flag) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mercenary_data_received_pre ) { + int (*preHookFunc) (struct s_mercenary *merc, bool *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_data_received_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_data_received_pre[hIndex].func; + retVal___ = preHookFunc(merc, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.data_received(merc, flag); + } + if( HPMHooks.count.HP_mercenary_data_received_post ) { + int (*postHookFunc) (int retVal___, struct s_mercenary *merc, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_data_received_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_data_received_post[hIndex].func; + retVal___ = postHookFunc(retVal___, merc, &flag); } } - return; + return retVal___; } -void HP_map_vforeachmob(int ( *func ) (struct mob_data *md, va_list args), va_list args) { +int HP_mercenary_save(struct mercenary_data *md) { int hIndex = 0; - if( HPMHooks.count.HP_map_vforeachmob_pre ) { - void (*preHookFunc) (int ( *func ) (struct mob_data *md, va_list args), va_list args); + int retVal___ = 0; + if( HPMHooks.count.HP_mercenary_save_pre ) { + int (*preHookFunc) (struct mercenary_data *md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachmob_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_map_vforeachmob_pre[hIndex].func; - preHookFunc(func, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_save_pre[hIndex].func; + retVal___ = preHookFunc(md); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - va_list args___copy; va_copy(args___copy, args); - HPMHooks.source.map.vforeachmob(func, args___copy); - va_end(args___copy); + retVal___ = HPMHooks.source.mercenary.save(md); } - if( HPMHooks.count.HP_map_vforeachmob_post ) { - void (*postHookFunc) (int ( *func ) (struct mob_data *md, va_list args), va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachmob_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_map_vforeachmob_post[hIndex].func; - postHookFunc(func, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_mercenary_save_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); } } - return; + return retVal___; } -void HP_map_vforeachnpc(int ( *func ) (struct npc_data *nd, va_list args), va_list args) { +void HP_mercenary_heal(struct mercenary_data *md, int hp, int sp) { int hIndex = 0; - if( HPMHooks.count.HP_map_vforeachnpc_pre ) { - void (*preHookFunc) (int ( *func ) (struct npc_data *nd, va_list args), va_list args); + if( HPMHooks.count.HP_mercenary_heal_pre ) { + void (*preHookFunc) (struct mercenary_data *md, int *hp, int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachnpc_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_map_vforeachnpc_pre[hIndex].func; - preHookFunc(func, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_heal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_heal_pre[hIndex].func; + preHookFunc(md, &hp, &sp); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36686,63 +42973,79 @@ void HP_map_vforeachnpc(int ( *func ) (struct npc_data *nd, va_list args), va_li } } { - va_list args___copy; va_copy(args___copy, args); - HPMHooks.source.map.vforeachnpc(func, args___copy); - va_end(args___copy); + HPMHooks.source.mercenary.heal(md, hp, sp); } - if( HPMHooks.count.HP_map_vforeachnpc_post ) { - void (*postHookFunc) (int ( *func ) (struct npc_data *nd, va_list args), va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachnpc_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_map_vforeachnpc_post[hIndex].func; - postHookFunc(func, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_mercenary_heal_post ) { + void (*postHookFunc) (struct mercenary_data *md, int *hp, int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_heal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_heal_post[hIndex].func; + postHookFunc(md, &hp, &sp); } } return; } -void HP_map_vforeachregen(int ( *func ) (struct block_list *bl, va_list args), va_list args) { +int HP_mercenary_dead(struct mercenary_data *md) { int hIndex = 0; - if( HPMHooks.count.HP_map_vforeachregen_pre ) { - void (*preHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args); + int retVal___ = 0; + if( HPMHooks.count.HP_mercenary_dead_pre ) { + int (*preHookFunc) (struct mercenary_data *md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachregen_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_map_vforeachregen_pre[hIndex].func; - preHookFunc(func, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_dead_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_dead_pre[hIndex].func; + retVal___ = preHookFunc(md); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - va_list args___copy; va_copy(args___copy, args); - HPMHooks.source.map.vforeachregen(func, args___copy); - va_end(args___copy); + retVal___ = HPMHooks.source.mercenary.dead(md); } - if( HPMHooks.count.HP_map_vforeachregen_post ) { - void (*postHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachregen_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_map_vforeachregen_post[hIndex].func; - postHookFunc(func, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_mercenary_dead_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_dead_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_dead_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); } } - return; + return retVal___; } -void HP_map_vforeachiddb(int ( *func ) (struct block_list *bl, va_list args), va_list args) { +int HP_mercenary_delete(struct mercenary_data *md, int reply) { int hIndex = 0; - if( HPMHooks.count.HP_map_vforeachiddb_pre ) { - void (*preHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args); + int retVal___ = 0; + if( HPMHooks.count.HP_mercenary_delete_pre ) { + int (*preHookFunc) (struct mercenary_data *md, int *reply); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachiddb_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_map_vforeachiddb_pre[hIndex].func; - preHookFunc(func, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_delete_pre[hIndex].func; + retVal___ = preHookFunc(md, &reply); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.delete(md, reply); + } + if( HPMHooks.count.HP_mercenary_delete_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md, int *reply); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &reply); + } + } + return retVal___; +} +void HP_mercenary_contract_stop(struct mercenary_data *md) { + int hIndex = 0; + if( HPMHooks.count.HP_mercenary_contract_stop_pre ) { + void (*preHookFunc) (struct mercenary_data *md); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_stop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_contract_stop_pre[hIndex].func; + preHookFunc(md); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36750,32 +43053,26 @@ void HP_map_vforeachiddb(int ( *func ) (struct block_list *bl, va_list args), va } } { - va_list args___copy; va_copy(args___copy, args); - HPMHooks.source.map.vforeachiddb(func, args___copy); - va_end(args___copy); + HPMHooks.source.mercenary.contract_stop(md); } - if( HPMHooks.count.HP_map_vforeachiddb_post ) { - void (*postHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachiddb_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_map_vforeachiddb_post[hIndex].func; - postHookFunc(func, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_mercenary_contract_stop_post ) { + void (*postHookFunc) (struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_stop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_contract_stop_post[hIndex].func; + postHookFunc(md); } } return; } -int HP_map_vforeachinrange(int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int type, va_list ap) { +int HP_mercenary_get_lifetime(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_vforeachinrange_pre ) { - int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap); + if( HPMHooks.count.HP_mercenary_get_lifetime_pre ) { + int (*preHookFunc) (struct mercenary_data *md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinrange_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_map_vforeachinrange_pre[hIndex].func; - retVal___ = preHookFunc(func, center, &range, &type, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_lifetime_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_get_lifetime_pre[hIndex].func; + retVal___ = preHookFunc(md); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36783,32 +43080,26 @@ int HP_map_vforeachinrange(int ( *func ) (struct block_list *, va_list), struct } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.map.vforeachinrange(func, center, range, type, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.mercenary.get_lifetime(md); } - if( HPMHooks.count.HP_map_vforeachinrange_post ) { - int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinrange_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_map_vforeachinrange_post[hIndex].func; - retVal___ = postHookFunc(retVal___, func, center, &range, &type, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_mercenary_get_lifetime_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_lifetime_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_get_lifetime_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); } } return retVal___; } -int HP_map_vforeachinshootrange(int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int type, va_list ap) { +int HP_mercenary_get_guild(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_vforeachinshootrange_pre ) { - int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap); + if( HPMHooks.count.HP_mercenary_get_guild_pre ) { + int (*preHookFunc) (struct mercenary_data *md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinshootrange_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_map_vforeachinshootrange_pre[hIndex].func; - retVal___ = preHookFunc(func, center, &range, &type, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_guild_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_get_guild_pre[hIndex].func; + retVal___ = preHookFunc(md); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36816,32 +43107,26 @@ int HP_map_vforeachinshootrange(int ( *func ) (struct block_list *, va_list), st } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.map.vforeachinshootrange(func, center, range, type, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.mercenary.get_guild(md); } - if( HPMHooks.count.HP_map_vforeachinshootrange_post ) { - int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinshootrange_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_map_vforeachinshootrange_post[hIndex].func; - retVal___ = postHookFunc(retVal___, func, center, &range, &type, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_mercenary_get_guild_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_guild_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_get_guild_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); } } return retVal___; } -int HP_map_vforeachinarea(int ( *func ) (struct block_list *, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int type, va_list ap) { +int HP_mercenary_get_faith(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_vforeachinarea_pre ) { - int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *type, va_list ap); + if( HPMHooks.count.HP_mercenary_get_faith_pre ) { + int (*preHookFunc) (struct mercenary_data *md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinarea_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_map_vforeachinarea_pre[hIndex].func; - retVal___ = preHookFunc(func, &m, &x0, &y0, &x1, &y1, &type, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_faith_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_get_faith_pre[hIndex].func; + retVal___ = preHookFunc(md); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36849,32 +43134,26 @@ int HP_map_vforeachinarea(int ( *func ) (struct block_list *, va_list), int16 m, } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.map.vforeachinarea(func, m, x0, y0, x1, y1, type, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.mercenary.get_faith(md); } - if( HPMHooks.count.HP_map_vforeachinarea_post ) { - int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *type, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinarea_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_map_vforeachinarea_post[hIndex].func; - retVal___ = postHookFunc(retVal___, func, &m, &x0, &y0, &x1, &y1, &type, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_mercenary_get_faith_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_faith_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_get_faith_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); } } return retVal___; } -int HP_map_vforcountinrange(int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int count, int type, va_list ap) { +int HP_mercenary_set_faith(struct mercenary_data *md, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_vforcountinrange_pre ) { - int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *count, int *type, va_list ap); + if( HPMHooks.count.HP_mercenary_set_faith_pre ) { + int (*preHookFunc) (struct mercenary_data *md, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinrange_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_map_vforcountinrange_pre[hIndex].func; - retVal___ = preHookFunc(func, center, &range, &count, &type, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_faith_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_set_faith_pre[hIndex].func; + retVal___ = preHookFunc(md, &value); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36882,32 +43161,26 @@ int HP_map_vforcountinrange(int ( *func ) (struct block_list *, va_list), struct } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.map.vforcountinrange(func, center, range, count, type, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.mercenary.set_faith(md, value); } - if( HPMHooks.count.HP_map_vforcountinrange_post ) { - int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *count, int *type, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinrange_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_map_vforcountinrange_post[hIndex].func; - retVal___ = postHookFunc(retVal___, func, center, &range, &count, &type, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_mercenary_set_faith_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_faith_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_set_faith_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &value); } } return retVal___; } -int HP_map_vforcountinarea(int ( *func ) (struct block_list *, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int count, int type, va_list ap) { +int HP_mercenary_get_calls(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_vforcountinarea_pre ) { - int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *count, int *type, va_list ap); + if( HPMHooks.count.HP_mercenary_get_calls_pre ) { + int (*preHookFunc) (struct mercenary_data *md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinarea_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_map_vforcountinarea_pre[hIndex].func; - retVal___ = preHookFunc(func, &m, &x0, &y0, &x1, &y1, &count, &type, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_calls_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_get_calls_pre[hIndex].func; + retVal___ = preHookFunc(md); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36915,32 +43188,215 @@ int HP_map_vforcountinarea(int ( *func ) (struct block_list *, va_list), int16 m } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.map.vforcountinarea(func, m, x0, y0, x1, y1, count, type, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.mercenary.get_calls(md); } - if( HPMHooks.count.HP_map_vforcountinarea_post ) { - int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *count, int *type, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinarea_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_map_vforcountinarea_post[hIndex].func; - retVal___ = postHookFunc(retVal___, func, &m, &x0, &y0, &x1, &y1, &count, &type, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_mercenary_get_calls_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_calls_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_get_calls_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); } } return retVal___; } -int HP_map_vforeachinmovearea(int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int16 dx, int16 dy, int type, va_list ap) { +int HP_mercenary_set_calls(struct mercenary_data *md, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_vforeachinmovearea_pre ) { - int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int16 *dx, int16 *dy, int *type, va_list ap); + if( HPMHooks.count.HP_mercenary_set_calls_pre ) { + int (*preHookFunc) (struct mercenary_data *md, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmovearea_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_map_vforeachinmovearea_pre[hIndex].func; - retVal___ = preHookFunc(func, center, &range, &dx, &dy, &type, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_calls_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_set_calls_pre[hIndex].func; + retVal___ = preHookFunc(md, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.set_calls(md, value); + } + if( HPMHooks.count.HP_mercenary_set_calls_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_calls_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_set_calls_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &value); + } + } + return retVal___; +} +int HP_mercenary_kills(struct mercenary_data *md) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mercenary_kills_pre ) { + int (*preHookFunc) (struct mercenary_data *md); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_kills_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_kills_pre[hIndex].func; + retVal___ = preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.kills(md); + } + if( HPMHooks.count.HP_mercenary_kills_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_kills_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_kills_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} +int HP_mercenary_checkskill(struct mercenary_data *md, uint16 skill_id) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mercenary_checkskill_pre ) { + int (*preHookFunc) (struct mercenary_data *md, uint16 *skill_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_checkskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_checkskill_pre[hIndex].func; + retVal___ = preHookFunc(md, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.checkskill(md, skill_id); + } + if( HPMHooks.count.HP_mercenary_checkskill_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_checkskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_checkskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &skill_id); + } + } + return retVal___; +} +int HP_mercenary_read_db(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mercenary_read_db_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_read_db_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.read_db(); + } + if( HPMHooks.count.HP_mercenary_read_db_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_read_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_mercenary_read_skilldb(void) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mercenary_read_skilldb_pre ) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skilldb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_read_skilldb_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.read_skilldb(); + } + if( HPMHooks.count.HP_mercenary_read_skilldb_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skilldb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_read_skilldb_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_mercenary_killbonus(struct mercenary_data *md) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mercenary_killbonus_pre ) { + int (*preHookFunc) (struct mercenary_data *md); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_killbonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_killbonus_pre[hIndex].func; + retVal___ = preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.killbonus(md); + } + if( HPMHooks.count.HP_mercenary_killbonus_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_killbonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_killbonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} +int HP_mercenary_search_index(int class_) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mercenary_search_index_pre ) { + int (*preHookFunc) (int *class_); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_search_index_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_search_index_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.search_index(class_); + } + if( HPMHooks.count.HP_mercenary_search_index_post ) { + int (*postHookFunc) (int retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_search_index_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_search_index_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} +int HP_mercenary_contract_end_timer(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_mercenary_contract_end_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_end_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_contract_end_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36948,32 +43404,26 @@ int HP_map_vforeachinmovearea(int ( *func ) (struct block_list *, va_list), stru } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.map.vforeachinmovearea(func, center, range, dx, dy, type, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.mercenary.contract_end_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_map_vforeachinmovearea_post ) { - int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int16 *dx, int16 *dy, int *type, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmovearea_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_map_vforeachinmovearea_post[hIndex].func; - retVal___ = postHookFunc(retVal___, func, center, &range, &dx, &dy, &type, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_mercenary_contract_end_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_end_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_contract_end_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_map_vforeachincell(int ( *func ) (struct block_list *, va_list), int16 m, int16 x, int16 y, int type, va_list ap) { +bool HP_mercenary_read_db_sub(char *str[], int columns, int current) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_vforeachincell_pre ) { - int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x, int16 *y, int *type, va_list ap); + bool retVal___ = false; + if( HPMHooks.count.HP_mercenary_read_db_sub_pre ) { + bool (*preHookFunc) (char *str[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachincell_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_map_vforeachincell_pre[hIndex].func; - retVal___ = preHookFunc(func, &m, &x, &y, &type, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_read_db_sub_pre[hIndex].func; + retVal___ = preHookFunc(str, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -36981,32 +43431,26 @@ int HP_map_vforeachincell(int ( *func ) (struct block_list *, va_list), int16 m, } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.map.vforeachincell(func, m, x, y, type, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.mercenary.read_db_sub(str, columns, current); } - if( HPMHooks.count.HP_map_vforeachincell_post ) { - int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x, int16 *y, int *type, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachincell_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_map_vforeachincell_post[hIndex].func; - retVal___ = postHookFunc(retVal___, func, &m, &x, &y, &type, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_mercenary_read_db_sub_post ) { + bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_read_db_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &columns, ¤t); } } return retVal___; } -int HP_map_vforeachinpath(int ( *func ) (struct block_list *, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int16 range, int length, int type, va_list ap) { +bool HP_mercenary_read_skill_db_sub(char *str[], int columns, int current) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_vforeachinpath_pre ) { - int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int16 *range, int *length, int *type, va_list ap); + bool retVal___ = false; + if( HPMHooks.count.HP_mercenary_read_skill_db_sub_pre ) { + bool (*preHookFunc) (char *str[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinpath_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_map_vforeachinpath_pre[hIndex].func; - retVal___ = preHookFunc(func, &m, &x0, &y0, &x1, &y1, &range, &length, &type, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skill_db_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_read_skill_db_sub_pre[hIndex].func; + retVal___ = preHookFunc(str, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37014,32 +43458,27 @@ int HP_map_vforeachinpath(int ( *func ) (struct block_list *, va_list), int16 m, } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.map.vforeachinpath(func, m, x0, y0, x1, y1, range, length, type, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.mercenary.read_skill_db_sub(str, columns, current); } - if( HPMHooks.count.HP_map_vforeachinpath_post ) { - int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int16 *range, int *length, int *type, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinpath_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_map_vforeachinpath_post[hIndex].func; - retVal___ = postHookFunc(retVal___, func, &m, &x0, &y0, &x1, &y1, &range, &length, &type, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_mercenary_read_skill_db_sub_post ) { + bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skill_db_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_read_skill_db_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &columns, ¤t); } } return retVal___; } -int HP_map_vforeachinmap(int ( *func ) (struct block_list *, va_list), int16 m, int type, va_list args) { +/* mob */ +int HP_mob_init(bool mimimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_vforeachinmap_pre ) { - int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int *type, va_list args); + if( HPMHooks.count.HP_mob_init_pre ) { + int (*preHookFunc) (bool *mimimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmap_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_map_vforeachinmap_pre[hIndex].func; - retVal___ = preHookFunc(func, &m, &type, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_init_pre[hIndex].func; + retVal___ = preHookFunc(&mimimal); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37047,32 +43486,26 @@ int HP_map_vforeachinmap(int ( *func ) (struct block_list *, va_list), int16 m, } } { - va_list args___copy; va_copy(args___copy, args); - retVal___ = HPMHooks.source.map.vforeachinmap(func, m, type, args___copy); - va_end(args___copy); + retVal___ = HPMHooks.source.mob.init(mimimal); } - if( HPMHooks.count.HP_map_vforeachinmap_post ) { - int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int *type, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmap_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_map_vforeachinmap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, func, &m, &type, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_mob_init_post ) { + int (*postHookFunc) (int retVal___, bool *mimimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &mimimal); } } return retVal___; } -int HP_map_vforeachininstance(int ( *func ) (struct block_list *, va_list), int16 instance_id, int type, va_list ap) { +int HP_mob_final(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_vforeachininstance_pre ) { - int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *instance_id, int *type, va_list ap); + if( HPMHooks.count.HP_mob_final_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachininstance_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_map_vforeachininstance_pre[hIndex].func; - retVal___ = preHookFunc(func, &instance_id, &type, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_final_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37080,57 +43513,52 @@ int HP_map_vforeachininstance(int ( *func ) (struct block_list *, va_list), int1 } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.map.vforeachininstance(func, instance_id, type, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.mob.final(); } - if( HPMHooks.count.HP_map_vforeachininstance_post ) { - int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *instance_id, int *type, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachininstance_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_map_vforeachininstance_post[hIndex].func; - retVal___ = postHookFunc(retVal___, func, &instance_id, &type, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_mob_final_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -struct map_session_data* HP_map_id2sd(int id) { +void HP_mob_reload(void) { int hIndex = 0; - struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2sd_pre ) { - struct map_session_data* (*preHookFunc) (int *id); + if( HPMHooks.count.HP_mob_reload_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2sd_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_id2sd_pre[hIndex].func; - retVal___ = preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_reload_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.map.id2sd(id); + HPMHooks.source.mob.reload(); } - if( HPMHooks.count.HP_map_id2sd_post ) { - struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2sd_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_id2sd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + if( HPMHooks.count.HP_mob_reload_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_reload_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -struct mob_data* HP_map_id2md(int id) { +struct mob_db* HP_mob_db(int index) { int hIndex = 0; - struct mob_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2md_pre ) { - struct mob_data* (*preHookFunc) (int *id); + struct mob_db* retVal___ = NULL; + if( HPMHooks.count.HP_mob_db_pre ) { + struct mob_db* (*preHookFunc) (int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2md_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_id2md_pre[hIndex].func; - retVal___ = preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_db_pre[hIndex].func; + retVal___ = preHookFunc(&index); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37138,25 +43566,25 @@ struct mob_data* HP_map_id2md(int id) { } } { - retVal___ = HPMHooks.source.map.id2md(id); + retVal___ = HPMHooks.source.mob.db(index); } - if( HPMHooks.count.HP_map_id2md_post ) { - struct mob_data* (*postHookFunc) (struct mob_data* retVal___, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2md_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_id2md_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + if( HPMHooks.count.HP_mob_db_post ) { + struct mob_db* (*postHookFunc) (struct mob_db* retVal___, int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &index); } } return retVal___; } -struct npc_data* HP_map_id2nd(int id) { +struct mob_chat* HP_mob_chat(short id) { int hIndex = 0; - struct npc_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2nd_pre ) { - struct npc_data* (*preHookFunc) (int *id); + struct mob_chat* retVal___ = NULL; + if( HPMHooks.count.HP_mob_chat_pre ) { + struct mob_chat* (*preHookFunc) (short *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2nd_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_id2nd_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_chat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_chat_pre[hIndex].func; retVal___ = preHookFunc(&id); } if( *HPMforce_return ) { @@ -37165,26 +43593,26 @@ struct npc_data* HP_map_id2nd(int id) { } } { - retVal___ = HPMHooks.source.map.id2nd(id); + retVal___ = HPMHooks.source.mob.chat(id); } - if( HPMHooks.count.HP_map_id2nd_post ) { - struct npc_data* (*postHookFunc) (struct npc_data* retVal___, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2nd_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_id2nd_post[hIndex].func; + if( HPMHooks.count.HP_mob_chat_post ) { + struct mob_chat* (*postHookFunc) (struct mob_chat* retVal___, short *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_chat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_chat_post[hIndex].func; retVal___ = postHookFunc(retVal___, &id); } } return retVal___; } -struct homun_data* HP_map_id2hd(int id) { +int HP_mob_makedummymobdb(int p1) { int hIndex = 0; - struct homun_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2hd_pre ) { - struct homun_data* (*preHookFunc) (int *id); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_makedummymobdb_pre ) { + int (*preHookFunc) (int *p1); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2hd_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_id2hd_pre[hIndex].func; - retVal___ = preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_makedummymobdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_makedummymobdb_pre[hIndex].func; + retVal___ = preHookFunc(&p1); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37192,26 +43620,26 @@ struct homun_data* HP_map_id2hd(int id) { } } { - retVal___ = HPMHooks.source.map.id2hd(id); + retVal___ = HPMHooks.source.mob.makedummymobdb(p1); } - if( HPMHooks.count.HP_map_id2hd_post ) { - struct homun_data* (*postHookFunc) (struct homun_data* retVal___, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2hd_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_id2hd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + if( HPMHooks.count.HP_mob_makedummymobdb_post ) { + int (*postHookFunc) (int retVal___, int *p1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_makedummymobdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_makedummymobdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &p1); } } return retVal___; } -struct mercenary_data* HP_map_id2mc(int id) { +int HP_mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - struct mercenary_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2mc_pre ) { - struct mercenary_data* (*preHookFunc) (int *id); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_spawn_guardian_sub_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2mc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_id2mc_pre[hIndex].func; - retVal___ = preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_spawn_guardian_sub_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37219,26 +43647,26 @@ struct mercenary_data* HP_map_id2mc(int id) { } } { - retVal___ = HPMHooks.source.map.id2mc(id); + retVal___ = HPMHooks.source.mob.spawn_guardian_sub(tid, tick, id, data); } - if( HPMHooks.count.HP_map_id2mc_post ) { - struct mercenary_data* (*postHookFunc) (struct mercenary_data* retVal___, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2mc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_id2mc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + if( HPMHooks.count.HP_mob_spawn_guardian_sub_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_spawn_guardian_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -struct chat_data* HP_map_id2cd(int id) { +int HP_mob_skill_id2skill_idx(int class_, uint16 skill_id) { int hIndex = 0; - struct chat_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2cd_pre ) { - struct chat_data* (*preHookFunc) (int *id); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_skill_id2skill_idx_pre ) { + int (*preHookFunc) (int *class_, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2cd_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_id2cd_pre[hIndex].func; - retVal___ = preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_id2skill_idx_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_skill_id2skill_idx_pre[hIndex].func; + retVal___ = preHookFunc(&class_, &skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37246,26 +43674,26 @@ struct chat_data* HP_map_id2cd(int id) { } } { - retVal___ = HPMHooks.source.map.id2cd(id); + retVal___ = HPMHooks.source.mob.skill_id2skill_idx(class_, skill_id); } - if( HPMHooks.count.HP_map_id2cd_post ) { - struct chat_data* (*postHookFunc) (struct chat_data* retVal___, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2cd_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_id2cd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + if( HPMHooks.count.HP_mob_skill_id2skill_idx_post ) { + int (*postHookFunc) (int retVal___, int *class_, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_id2skill_idx_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_skill_id2skill_idx_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_, &skill_id); } } return retVal___; } -struct block_list* HP_map_id2bl(int id) { +int HP_mob_db_searchname(const char *str) { int hIndex = 0; - struct block_list* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2bl_pre ) { - struct block_list* (*preHookFunc) (int *id); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_db_searchname_pre ) { + int (*preHookFunc) (const char *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2bl_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_id2bl_pre[hIndex].func; - retVal___ = preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_db_searchname_pre[hIndex].func; + retVal___ = preHookFunc(str); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37273,26 +43701,26 @@ struct block_list* HP_map_id2bl(int id) { } } { - retVal___ = HPMHooks.source.map.id2bl(id); + retVal___ = HPMHooks.source.mob.db_searchname(str); } - if( HPMHooks.count.HP_map_id2bl_post ) { - struct block_list* (*postHookFunc) (struct block_list* retVal___, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2bl_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_id2bl_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + if( HPMHooks.count.HP_mob_db_searchname_post ) { + int (*postHookFunc) (int retVal___, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_db_searchname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); } } return retVal___; } -bool HP_map_blid_exists(int id) { +int HP_mob_db_searchname_array_sub(struct mob_db *monster, const char *str, int flag) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_map_blid_exists_pre ) { - bool (*preHookFunc) (int *id); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_db_searchname_array_sub_pre ) { + int (*preHookFunc) (struct mob_db *monster, const char *str, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_blid_exists_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_blid_exists_pre[hIndex].func; - retVal___ = preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_db_searchname_array_sub_pre[hIndex].func; + retVal___ = preHookFunc(monster, str, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37300,80 +43728,78 @@ bool HP_map_blid_exists(int id) { } } { - retVal___ = HPMHooks.source.map.blid_exists(id); + retVal___ = HPMHooks.source.mob.db_searchname_array_sub(monster, str, flag); } - if( HPMHooks.count.HP_map_blid_exists_post ) { - bool (*postHookFunc) (bool retVal___, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_blid_exists_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_blid_exists_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + if( HPMHooks.count.HP_mob_db_searchname_array_sub_post ) { + int (*postHookFunc) (int retVal___, struct mob_db *monster, const char *str, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_db_searchname_array_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, monster, str, &flag); } } return retVal___; } -int16 HP_map_mapindex2mapid(unsigned short map_index) { +void HP_mob_mvptomb_create(struct mob_data *md, char *killer, time_t time) { int hIndex = 0; - int16 retVal___ = 0; - if( HPMHooks.count.HP_map_mapindex2mapid_pre ) { - int16 (*preHookFunc) (unsigned short *map_index); + if( HPMHooks.count.HP_mob_mvptomb_create_pre ) { + void (*preHookFunc) (struct mob_data *md, char *killer, time_t *time); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_mapindex2mapid_pre[hIndex].func; - retVal___ = preHookFunc(&map_index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_mvptomb_create_pre[hIndex].func; + preHookFunc(md, killer, &time); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.map.mapindex2mapid(map_index); + HPMHooks.source.mob.mvptomb_create(md, killer, time); } - if( HPMHooks.count.HP_map_mapindex2mapid_post ) { - int16 (*postHookFunc) (int16 retVal___, unsigned short *map_index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_mapindex2mapid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &map_index); + if( HPMHooks.count.HP_mob_mvptomb_create_post ) { + void (*postHookFunc) (struct mob_data *md, char *killer, time_t *time); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_mvptomb_create_post[hIndex].func; + postHookFunc(md, killer, &time); } } - return retVal___; + return; } -int16 HP_map_mapname2mapid(const char *name) { +void HP_mob_mvptomb_destroy(struct mob_data *md) { int hIndex = 0; - int16 retVal___ = 0; - if( HPMHooks.count.HP_map_mapname2mapid_pre ) { - int16 (*preHookFunc) (const char *name); + if( HPMHooks.count.HP_mob_mvptomb_destroy_pre ) { + void (*preHookFunc) (struct mob_data *md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2mapid_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_mapname2mapid_pre[hIndex].func; - retVal___ = preHookFunc(name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_destroy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_mvptomb_destroy_pre[hIndex].func; + preHookFunc(md); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.map.mapname2mapid(name); + HPMHooks.source.mob.mvptomb_destroy(md); } - if( HPMHooks.count.HP_map_mapname2mapid_post ) { - int16 (*postHookFunc) (int16 retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2mapid_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_mapname2mapid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name); + if( HPMHooks.count.HP_mob_mvptomb_destroy_post ) { + void (*postHookFunc) (struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_destroy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_mvptomb_destroy_post[hIndex].func; + postHookFunc(md); } } - return retVal___; + return; } -int HP_map_mapname2ipport(unsigned short name, uint32 *ip, uint16 *port) { +int HP_mob_db_searchname_array(struct mob_db **data, int size, const char *str, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_mapname2ipport_pre ) { - int (*preHookFunc) (unsigned short *name, uint32 *ip, uint16 *port); + if( HPMHooks.count.HP_mob_db_searchname_array_pre ) { + int (*preHookFunc) (struct mob_db **data, int *size, const char *str, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2ipport_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_mapname2ipport_pre[hIndex].func; - retVal___ = preHookFunc(&name, ip, port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_db_searchname_array_pre[hIndex].func; + retVal___ = preHookFunc(data, &size, str, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37381,26 +43807,26 @@ int HP_map_mapname2ipport(unsigned short name, uint32 *ip, uint16 *port) { } } { - retVal___ = HPMHooks.source.map.mapname2ipport(name, ip, port); + retVal___ = HPMHooks.source.mob.db_searchname_array(data, size, str, flag); } - if( HPMHooks.count.HP_map_mapname2ipport_post ) { - int (*postHookFunc) (int retVal___, unsigned short *name, uint32 *ip, uint16 *port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2ipport_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_mapname2ipport_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &name, ip, port); + if( HPMHooks.count.HP_mob_db_searchname_array_post ) { + int (*postHookFunc) (int retVal___, struct mob_db **data, int *size, const char *str, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_db_searchname_array_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data, &size, str, &flag); } } return retVal___; } -int HP_map_setipport(unsigned short map_index, uint32 ip, uint16 port) { +int HP_mob_db_checkid(const int id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_setipport_pre ) { - int (*preHookFunc) (unsigned short *map_index, uint32 *ip, uint16 *port); + if( HPMHooks.count.HP_mob_db_checkid_pre ) { + int (*preHookFunc) (const int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_setipport_pre[hIndex].func; - retVal___ = preHookFunc(&map_index, &ip, &port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_checkid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_db_checkid_pre[hIndex].func; + retVal___ = preHookFunc(&id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37408,26 +43834,26 @@ int HP_map_setipport(unsigned short map_index, uint32 ip, uint16 port) { } } { - retVal___ = HPMHooks.source.map.setipport(map_index, ip, port); + retVal___ = HPMHooks.source.mob.db_checkid(id); } - if( HPMHooks.count.HP_map_setipport_post ) { - int (*postHookFunc) (int retVal___, unsigned short *map_index, uint32 *ip, uint16 *port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_setipport_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &map_index, &ip, &port); + if( HPMHooks.count.HP_mob_db_checkid_post ) { + int (*postHookFunc) (int retVal___, const int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_checkid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_db_checkid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); } } return retVal___; } -int HP_map_eraseipport(unsigned short map_index, uint32 ip, uint16 port) { +struct view_data* HP_mob_get_viewdata(int class_) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_eraseipport_pre ) { - int (*preHookFunc) (unsigned short *map_index, uint32 *ip, uint16 *port); + struct view_data* retVal___ = NULL; + if( HPMHooks.count.HP_mob_get_viewdata_pre ) { + struct view_data* (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_eraseipport_pre[hIndex].func; - retVal___ = preHookFunc(&map_index, &ip, &port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_viewdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_get_viewdata_pre[hIndex].func; + retVal___ = preHookFunc(&class_); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37435,26 +43861,26 @@ int HP_map_eraseipport(unsigned short map_index, uint32 ip, uint16 port) { } } { - retVal___ = HPMHooks.source.map.eraseipport(map_index, ip, port); + retVal___ = HPMHooks.source.mob.get_viewdata(class_); } - if( HPMHooks.count.HP_map_eraseipport_post ) { - int (*postHookFunc) (int retVal___, unsigned short *map_index, uint32 *ip, uint16 *port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_eraseipport_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &map_index, &ip, &port); + if( HPMHooks.count.HP_mob_get_viewdata_post ) { + struct view_data* (*postHookFunc) (struct view_data* retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_viewdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_get_viewdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); } } return retVal___; } -int HP_map_eraseallipport(void) { +int HP_mob_parse_dataset(struct spawn_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_eraseallipport_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_mob_parse_dataset_pre ) { + int (*preHookFunc) (struct spawn_data *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_eraseallipport_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dataset_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_parse_dataset_pre[hIndex].func; + retVal___ = preHookFunc(data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37462,78 +43888,80 @@ int HP_map_eraseallipport(void) { } } { - retVal___ = HPMHooks.source.map.eraseallipport(); + retVal___ = HPMHooks.source.mob.parse_dataset(data); } - if( HPMHooks.count.HP_map_eraseallipport_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_eraseallipport_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_mob_parse_dataset_post ) { + int (*postHookFunc) (int retVal___, struct spawn_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dataset_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_parse_dataset_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); } } return retVal___; } -void HP_map_addiddb(struct block_list *bl) { +struct mob_data* HP_mob_spawn_dataset(struct spawn_data *data) { int hIndex = 0; - if( HPMHooks.count.HP_map_addiddb_pre ) { - void (*preHookFunc) (struct block_list *bl); + struct mob_data* retVal___ = NULL; + if( HPMHooks.count.HP_mob_spawn_dataset_pre ) { + struct mob_data* (*preHookFunc) (struct spawn_data *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addiddb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_addiddb_pre[hIndex].func; - preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_dataset_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_spawn_dataset_pre[hIndex].func; + retVal___ = preHookFunc(data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.addiddb(bl); + retVal___ = HPMHooks.source.mob.spawn_dataset(data); } - if( HPMHooks.count.HP_map_addiddb_post ) { - void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addiddb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_addiddb_post[hIndex].func; - postHookFunc(bl); + if( HPMHooks.count.HP_mob_spawn_dataset_post ) { + struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct spawn_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_dataset_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_spawn_dataset_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); } } - return; + return retVal___; } -void HP_map_deliddb(struct block_list *bl) { +int HP_mob_get_random_id(int type, int flag, int lv) { int hIndex = 0; - if( HPMHooks.count.HP_map_deliddb_pre ) { - void (*preHookFunc) (struct block_list *bl); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_get_random_id_pre ) { + int (*preHookFunc) (int *type, int *flag, int *lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_deliddb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_deliddb_pre[hIndex].func; - preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_random_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_get_random_id_pre[hIndex].func; + retVal___ = preHookFunc(&type, &flag, &lv); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.deliddb(bl); + retVal___ = HPMHooks.source.mob.get_random_id(type, flag, lv); } - if( HPMHooks.count.HP_map_deliddb_post ) { - void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_deliddb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_deliddb_post[hIndex].func; - postHookFunc(bl); + if( HPMHooks.count.HP_mob_get_random_id_post ) { + int (*postHookFunc) (int retVal___, int *type, int *flag, int *lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_random_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_get_random_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type, &flag, &lv); } } - return; + return retVal___; } -struct map_session_data* HP_map_nick2sd(const char *nick) { +bool HP_mob_ksprotected(struct block_list *src, struct block_list *target) { int hIndex = 0; - struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_nick2sd_pre ) { - struct map_session_data* (*preHookFunc) (const char *nick); + bool retVal___ = false; + if( HPMHooks.count.HP_mob_ksprotected_pre ) { + bool (*preHookFunc) (struct block_list *src, struct block_list *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_nick2sd_pre[hIndex].func; - retVal___ = preHookFunc(nick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ksprotected_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_ksprotected_pre[hIndex].func; + retVal___ = preHookFunc(src, target); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37541,26 +43969,26 @@ struct map_session_data* HP_map_nick2sd(const char *nick) { } } { - retVal___ = HPMHooks.source.map.nick2sd(nick); + retVal___ = HPMHooks.source.mob.ksprotected(src, target); } - if( HPMHooks.count.HP_map_nick2sd_post ) { - struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, const char *nick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_nick2sd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nick); + if( HPMHooks.count.HP_mob_ksprotected_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ksprotected_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_ksprotected_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target); } } return retVal___; } -struct mob_data* HP_map_getmob_boss(int16 m) { +struct mob_data* HP_mob_once_spawn_sub(struct block_list *bl, int16 m, int16 x, int16 y, const char *mobname, int class_, const char *event, unsigned int size, unsigned int ai) { int hIndex = 0; struct mob_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_getmob_boss_pre ) { - struct mob_data* (*preHookFunc) (int16 *m); + if( HPMHooks.count.HP_mob_once_spawn_sub_pre ) { + struct mob_data* (*preHookFunc) (struct block_list *bl, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, const char *event, unsigned int *size, unsigned int *ai); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getmob_boss_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_getmob_boss_pre[hIndex].func; - retVal___ = preHookFunc(&m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_once_spawn_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, &m, &x, &y, mobname, &class_, event, &size, &ai); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37568,26 +43996,26 @@ struct mob_data* HP_map_getmob_boss(int16 m) { } } { - retVal___ = HPMHooks.source.map.getmob_boss(m); + retVal___ = HPMHooks.source.mob.once_spawn_sub(bl, m, x, y, mobname, class_, event, size, ai); } - if( HPMHooks.count.HP_map_getmob_boss_post ) { - struct mob_data* (*postHookFunc) (struct mob_data* retVal___, int16 *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getmob_boss_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_getmob_boss_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &m); + if( HPMHooks.count.HP_mob_once_spawn_sub_post ) { + struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct block_list *bl, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, const char *event, unsigned int *size, unsigned int *ai); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_once_spawn_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &m, &x, &y, mobname, &class_, event, &size, &ai); } } return retVal___; } -struct mob_data* HP_map_id2boss(int id) { +int HP_mob_once_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, const char *mobname, int class_, int amount, const char *event, unsigned int size, unsigned int ai) { int hIndex = 0; - struct mob_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2boss_pre ) { - struct mob_data* (*preHookFunc) (int *id); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_once_spawn_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2boss_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_id2boss_pre[hIndex].func; - retVal___ = preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_once_spawn_pre[hIndex].func; + retVal___ = preHookFunc(sd, &m, &x, &y, mobname, &class_, &amount, event, &size, &ai); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37595,52 +44023,53 @@ struct mob_data* HP_map_id2boss(int id) { } } { - retVal___ = HPMHooks.source.map.id2boss(id); + retVal___ = HPMHooks.source.mob.once_spawn(sd, m, x, y, mobname, class_, amount, event, size, ai); } - if( HPMHooks.count.HP_map_id2boss_post ) { - struct mob_data* (*postHookFunc) (struct mob_data* retVal___, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2boss_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_id2boss_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + if( HPMHooks.count.HP_mob_once_spawn_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_once_spawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &m, &x, &y, mobname, &class_, &amount, event, &size, &ai); } } return retVal___; } -void HP_map_reloadnpc(bool clear) { +int HP_mob_once_spawn_area(struct map_session_data *sd, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, const char *mobname, int class_, int amount, const char *event, unsigned int size, unsigned int ai) { int hIndex = 0; - if( HPMHooks.count.HP_map_reloadnpc_pre ) { - void (*preHookFunc) (bool *clear); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_once_spawn_area_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_reloadnpc_pre[hIndex].func; - preHookFunc(&clear); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_area_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_once_spawn_area_pre[hIndex].func; + retVal___ = preHookFunc(sd, &m, &x0, &y0, &x1, &y1, mobname, &class_, &amount, event, &size, &ai); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.reloadnpc(clear); + retVal___ = HPMHooks.source.mob.once_spawn_area(sd, m, x0, y0, x1, y1, mobname, class_, amount, event, size, ai); } - if( HPMHooks.count.HP_map_reloadnpc_post ) { - void (*postHookFunc) (bool *clear); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_reloadnpc_post[hIndex].func; - postHookFunc(&clear); + if( HPMHooks.count.HP_mob_once_spawn_area_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_area_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_once_spawn_area_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &m, &x0, &y0, &x1, &y1, mobname, &class_, &amount, event, &size, &ai); } } - return; + return retVal___; } -int HP_map_check_dir(int s_dir, int t_dir) { +int HP_mob_spawn_guardian(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, int guardian, bool has_index) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_check_dir_pre ) { - int (*preHookFunc) (int *s_dir, int *t_dir); + if( HPMHooks.count.HP_mob_spawn_guardian_pre ) { + int (*preHookFunc) (const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, int *guardian, bool *has_index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_check_dir_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_check_dir_pre[hIndex].func; - retVal___ = preHookFunc(&s_dir, &t_dir); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_spawn_guardian_pre[hIndex].func; + retVal___ = preHookFunc(mapname, &x, &y, mobname, &class_, event, &guardian, &has_index); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37648,26 +44077,26 @@ int HP_map_check_dir(int s_dir, int t_dir) { } } { - retVal___ = HPMHooks.source.map.check_dir(s_dir, t_dir); + retVal___ = HPMHooks.source.mob.spawn_guardian(mapname, x, y, mobname, class_, event, guardian, has_index); } - if( HPMHooks.count.HP_map_check_dir_post ) { - int (*postHookFunc) (int retVal___, int *s_dir, int *t_dir); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_check_dir_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_check_dir_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &s_dir, &t_dir); + if( HPMHooks.count.HP_mob_spawn_guardian_post ) { + int (*postHookFunc) (int retVal___, const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, int *guardian, bool *has_index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_spawn_guardian_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mapname, &x, &y, mobname, &class_, event, &guardian, &has_index); } } return retVal___; } -uint8 HP_map_calc_dir(struct block_list *src, int16 x, int16 y) { +int HP_mob_spawn_bg(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id) { int hIndex = 0; - uint8 retVal___ = 0; - if( HPMHooks.count.HP_map_calc_dir_pre ) { - uint8 (*preHookFunc) (struct block_list *src, int16 *x, int16 *y); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_spawn_bg_pre ) { + int (*preHookFunc) (const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, unsigned int *bg_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_calc_dir_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_calc_dir_pre[hIndex].func; - retVal___ = preHookFunc(src, &x, &y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_bg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_spawn_bg_pre[hIndex].func; + retVal___ = preHookFunc(mapname, &x, &y, mobname, &class_, event, &bg_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37675,26 +44104,26 @@ uint8 HP_map_calc_dir(struct block_list *src, int16 x, int16 y) { } } { - retVal___ = HPMHooks.source.map.calc_dir(src, x, y); + retVal___ = HPMHooks.source.mob.spawn_bg(mapname, x, y, mobname, class_, event, bg_id); } - if( HPMHooks.count.HP_map_calc_dir_post ) { - uint8 (*postHookFunc) (uint8 retVal___, struct block_list *src, int16 *x, int16 *y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_calc_dir_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_calc_dir_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, &x, &y); + if( HPMHooks.count.HP_mob_spawn_bg_post ) { + int (*postHookFunc) (int retVal___, const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, unsigned int *bg_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_bg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_spawn_bg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mapname, &x, &y, mobname, &class_, event, &bg_id); } } return retVal___; } -int HP_map_random_dir(struct block_list *bl, short *x, short *y) { +int HP_mob_can_reach(struct mob_data *md, struct block_list *bl, int range, int state) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_random_dir_pre ) { - int (*preHookFunc) (struct block_list *bl, short *x, short *y); + if( HPMHooks.count.HP_mob_can_reach_pre ) { + int (*preHookFunc) (struct mob_data *md, struct block_list *bl, int *range, int *state); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_random_dir_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_random_dir_pre[hIndex].func; - retVal___ = preHookFunc(bl, x, y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_reach_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_can_reach_pre[hIndex].func; + retVal___ = preHookFunc(md, bl, &range, &state); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37702,26 +44131,26 @@ int HP_map_random_dir(struct block_list *bl, short *x, short *y) { } } { - retVal___ = HPMHooks.source.map.random_dir(bl, x, y); + retVal___ = HPMHooks.source.mob.can_reach(md, bl, range, state); } - if( HPMHooks.count.HP_map_random_dir_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, short *x, short *y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_random_dir_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_random_dir_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, x, y); + if( HPMHooks.count.HP_mob_can_reach_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *bl, int *range, int *state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_reach_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_can_reach_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, bl, &range, &state); } } return retVal___; } -int HP_map_cleanup_sub(struct block_list *bl, va_list ap) { +int HP_mob_linksearch(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_cleanup_sub_pre ) { + if( HPMHooks.count.HP_mob_linksearch_pre ) { int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_sub_pre; hIndex++ ) { + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_linksearch_pre; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_map_cleanup_sub_pre[hIndex].func; + preHookFunc = HPMHooks.list.HP_mob_linksearch_pre[hIndex].func; retVal___ = preHookFunc(bl, ap___copy); va_end(ap___copy); } @@ -37732,29 +44161,29 @@ int HP_map_cleanup_sub(struct block_list *bl, va_list ap) { } { va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.map.cleanup_sub(bl, ap___copy); + retVal___ = HPMHooks.source.mob.linksearch(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_cleanup_sub_post ) { + if( HPMHooks.count.HP_mob_linksearch_post ) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_sub_post; hIndex++ ) { + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_linksearch_post; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_map_cleanup_sub_post[hIndex].func; + postHookFunc = HPMHooks.list.HP_mob_linksearch_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, ap___copy); va_end(ap___copy); } } return retVal___; } -int HP_map_delmap(char *mapname) { +int HP_mob_delayspawn(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_delmap_pre ) { - int (*preHookFunc) (char *mapname); + if( HPMHooks.count.HP_mob_delayspawn_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_delmap_pre[hIndex].func; - retVal___ = preHookFunc(mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delayspawn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_delayspawn_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37762,52 +44191,55 @@ int HP_map_delmap(char *mapname) { } } { - retVal___ = HPMHooks.source.map.delmap(mapname); + retVal___ = HPMHooks.source.mob.delayspawn(tid, tick, id, data); } - if( HPMHooks.count.HP_map_delmap_post ) { - int (*postHookFunc) (int retVal___, char *mapname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_delmap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mapname); + if( HPMHooks.count.HP_mob_delayspawn_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delayspawn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_delayspawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -void HP_map_flags_init(void) { +int HP_mob_setdelayspawn(struct mob_data *md) { int hIndex = 0; - if( HPMHooks.count.HP_map_flags_init_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_setdelayspawn_pre ) { + int (*preHookFunc) (struct mob_data *md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_flags_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_flags_init_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdelayspawn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_setdelayspawn_pre[hIndex].func; + retVal___ = preHookFunc(md); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.flags_init(); + retVal___ = HPMHooks.source.mob.setdelayspawn(md); } - if( HPMHooks.count.HP_map_flags_init_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_flags_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_flags_init_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_mob_setdelayspawn_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdelayspawn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_setdelayspawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); } } - return; + return retVal___; } -bool HP_map_iwall_set(int16 m, int16 x, int16 y, int size, int8 dir, bool shootable, const char *wall_name) { +int HP_mob_count_sub(struct block_list *bl, va_list ap) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_map_iwall_set_pre ) { - bool (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *size, int8 *dir, bool *shootable, const char *wall_name); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_count_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_set_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_iwall_set_pre[hIndex].func; - retVal___ = preHookFunc(&m, &x, &y, &size, &dir, &shootable, wall_name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_count_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_count_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37815,78 +44247,84 @@ bool HP_map_iwall_set(int16 m, int16 x, int16 y, int size, int8 dir, bool shoota } } { - retVal___ = HPMHooks.source.map.iwall_set(m, x, y, size, dir, shootable, wall_name); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.count_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_map_iwall_set_post ) { - bool (*postHookFunc) (bool retVal___, int16 *m, int16 *x, int16 *y, int *size, int8 *dir, bool *shootable, const char *wall_name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_set_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_iwall_set_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &m, &x, &y, &size, &dir, &shootable, wall_name); + if( HPMHooks.count.HP_mob_count_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_count_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_count_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -void HP_map_iwall_get(struct map_session_data *sd) { +int HP_mob_spawn(struct mob_data *md) { int hIndex = 0; - if( HPMHooks.count.HP_map_iwall_get_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_spawn_pre ) { + int (*preHookFunc) (struct mob_data *md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_get_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_iwall_get_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_spawn_pre[hIndex].func; + retVal___ = preHookFunc(md); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.iwall_get(sd); + retVal___ = HPMHooks.source.mob.spawn(md); } - if( HPMHooks.count.HP_map_iwall_get_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_get_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_iwall_get_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_mob_spawn_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_spawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); } } - return; + return retVal___; } -void HP_map_iwall_remove(const char *wall_name) { +int HP_mob_can_changetarget(struct mob_data *md, struct block_list *target, int mode) { int hIndex = 0; - if( HPMHooks.count.HP_map_iwall_remove_pre ) { - void (*preHookFunc) (const char *wall_name); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_can_changetarget_pre ) { + int (*preHookFunc) (struct mob_data *md, struct block_list *target, int *mode); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_remove_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_iwall_remove_pre[hIndex].func; - preHookFunc(wall_name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_changetarget_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_can_changetarget_pre[hIndex].func; + retVal___ = preHookFunc(md, target, &mode); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.iwall_remove(wall_name); + retVal___ = HPMHooks.source.mob.can_changetarget(md, target, mode); } - if( HPMHooks.count.HP_map_iwall_remove_post ) { - void (*postHookFunc) (const char *wall_name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_remove_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_iwall_remove_post[hIndex].func; - postHookFunc(wall_name); + if( HPMHooks.count.HP_mob_can_changetarget_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *target, int *mode); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_changetarget_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_can_changetarget_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, target, &mode); } } - return; + return retVal___; } -int HP_map_addmobtolist(unsigned short m, struct spawn_data *spawn) { +int HP_mob_target(struct mob_data *md, struct block_list *bl, int dist) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_addmobtolist_pre ) { - int (*preHookFunc) (unsigned short *m, struct spawn_data *spawn); + if( HPMHooks.count.HP_mob_target_pre ) { + int (*preHookFunc) (struct mob_data *md, struct block_list *bl, int *dist); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmobtolist_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_addmobtolist_pre[hIndex].func; - retVal___ = preHookFunc(&m, spawn); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_target_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_target_pre[hIndex].func; + retVal___ = preHookFunc(md, bl, &dist); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -37894,182 +44332,218 @@ int HP_map_addmobtolist(unsigned short m, struct spawn_data *spawn) { } } { - retVal___ = HPMHooks.source.map.addmobtolist(m, spawn); + retVal___ = HPMHooks.source.mob.target(md, bl, dist); } - if( HPMHooks.count.HP_map_addmobtolist_post ) { - int (*postHookFunc) (int retVal___, unsigned short *m, struct spawn_data *spawn); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmobtolist_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_addmobtolist_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &m, spawn); + if( HPMHooks.count.HP_mob_target_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *bl, int *dist); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_target_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_target_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, bl, &dist); } } return retVal___; } -void HP_map_spawnmobs(int16 m) { +int HP_mob_ai_sub_hard_activesearch(struct block_list *bl, va_list ap) { int hIndex = 0; - if( HPMHooks.count.HP_map_spawnmobs_pre ) { - void (*preHookFunc) (int16 *m); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_ai_sub_hard_activesearch_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_spawnmobs_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_spawnmobs_pre[hIndex].func; - preHookFunc(&m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_activesearch_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_activesearch_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.spawnmobs(m); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.ai_sub_hard_activesearch(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_map_spawnmobs_post ) { - void (*postHookFunc) (int16 *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_spawnmobs_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_spawnmobs_post[hIndex].func; - postHookFunc(&m); + if( HPMHooks.count.HP_mob_ai_sub_hard_activesearch_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_activesearch_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_activesearch_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } - return; + return retVal___; } -void HP_map_removemobs(int16 m) { +int HP_mob_ai_sub_hard_changechase(struct block_list *bl, va_list ap) { int hIndex = 0; - if( HPMHooks.count.HP_map_removemobs_pre ) { - void (*preHookFunc) (int16 *m); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_ai_sub_hard_changechase_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_removemobs_pre[hIndex].func; - preHookFunc(&m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_changechase_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_changechase_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.removemobs(m); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.ai_sub_hard_changechase(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_map_removemobs_post ) { - void (*postHookFunc) (int16 *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_removemobs_post[hIndex].func; - postHookFunc(&m); + if( HPMHooks.count.HP_mob_ai_sub_hard_changechase_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_changechase_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_changechase_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } - return; + return retVal___; } -void HP_map_addmap2db(struct map_data *m) { +int HP_mob_ai_sub_hard_bg_ally(struct block_list *bl, va_list ap) { int hIndex = 0; - if( HPMHooks.count.HP_map_addmap2db_pre ) { - void (*preHookFunc) (struct map_data *m); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap2db_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_addmap2db_pre[hIndex].func; - preHookFunc(m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_bg_ally_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.addmap2db(m); - } - if( HPMHooks.count.HP_map_addmap2db_post ) { - void (*postHookFunc) (struct map_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap2db_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_addmap2db_post[hIndex].func; - postHookFunc(m); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.ai_sub_hard_bg_ally(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_bg_ally_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } - return; + return retVal___; } -void HP_map_removemapdb(struct map_data *m) { +int HP_mob_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { int hIndex = 0; - if( HPMHooks.count.HP_map_removemapdb_pre ) { - void (*preHookFunc) (struct map_data *m); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemapdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_removemapdb_pre[hIndex].func; - preHookFunc(m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_lootsearch_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.removemapdb(m); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.ai_sub_hard_lootsearch(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_map_removemapdb_post ) { - void (*postHookFunc) (struct map_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemapdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_removemapdb_post[hIndex].func; - postHookFunc(m); + if( HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_lootsearch_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } - return; + return retVal___; } -void HP_map_clean(int i) { +int HP_mob_warpchase_sub(struct block_list *bl, va_list ap) { int hIndex = 0; - if( HPMHooks.count.HP_map_clean_pre ) { - void (*preHookFunc) (int *i); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_warpchase_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clean_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_clean_pre[hIndex].func; - preHookFunc(&i); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_warpchase_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.clean(i); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.warpchase_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_map_clean_post ) { - void (*postHookFunc) (int *i); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clean_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_clean_post[hIndex].func; - postHookFunc(&i); + if( HPMHooks.count.HP_mob_warpchase_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_warpchase_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } - return; + return retVal___; } -void HP_map_do_shutdown(void) { +int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick) { int hIndex = 0; - if( HPMHooks.count.HP_map_do_shutdown_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre ) { + int (*preHookFunc) (struct mob_data *md, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_do_shutdown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_do_shutdown_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_slavemob_pre[hIndex].func; + retVal___ = preHookFunc(md, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.do_shutdown(); + retVal___ = HPMHooks.source.mob.ai_sub_hard_slavemob(md, tick); } - if( HPMHooks.count.HP_map_do_shutdown_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_do_shutdown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_do_shutdown_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_mob_ai_sub_hard_slavemob_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_slavemob_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_slavemob_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &tick); } } - return; + return retVal___; } -int HP_map_freeblock_timer(int tid, int64 tick, int id, intptr_t data) { +int HP_mob_unlocktarget(struct mob_data *md, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_freeblock_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_mob_unlocktarget_pre ) { + int (*preHookFunc) (struct mob_data *md, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_freeblock_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_unlocktarget_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_unlocktarget_pre[hIndex].func; + retVal___ = preHookFunc(md, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38077,26 +44551,26 @@ int HP_map_freeblock_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.map.freeblock_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.mob.unlocktarget(md, tick); } - if( HPMHooks.count.HP_map_freeblock_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_freeblock_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_mob_unlocktarget_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_unlocktarget_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_unlocktarget_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &tick); } } return retVal___; } -int HP_map_searchrandfreecell(int16 m, int16 *x, int16 *y, int stack) { +int HP_mob_randomwalk(struct mob_data *md, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_searchrandfreecell_pre ) { - int (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *stack); + if( HPMHooks.count.HP_mob_randomwalk_pre ) { + int (*preHookFunc) (struct mob_data *md, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_searchrandfreecell_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_searchrandfreecell_pre[hIndex].func; - retVal___ = preHookFunc(&m, x, y, &stack); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_randomwalk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_randomwalk_pre[hIndex].func; + retVal___ = preHookFunc(md, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38104,28 +44578,26 @@ int HP_map_searchrandfreecell(int16 m, int16 *x, int16 *y, int stack) { } } { - retVal___ = HPMHooks.source.map.searchrandfreecell(m, x, y, stack); + retVal___ = HPMHooks.source.mob.randomwalk(md, tick); } - if( HPMHooks.count.HP_map_searchrandfreecell_post ) { - int (*postHookFunc) (int retVal___, int16 *m, int16 *x, int16 *y, int *stack); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_searchrandfreecell_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_searchrandfreecell_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &m, x, y, &stack); + if( HPMHooks.count.HP_mob_randomwalk_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_randomwalk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_randomwalk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &tick); } } return retVal___; } -int HP_map_count_sub(struct block_list *bl, va_list ap) { +int HP_mob_warpchase(struct mob_data *md, struct block_list *target) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_count_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_mob_warpchase_pre ) { + int (*preHookFunc) (struct mob_data *md, struct block_list *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_map_count_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_warpchase_pre[hIndex].func; + retVal___ = preHookFunc(md, target); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38133,33 +44605,26 @@ int HP_map_count_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.map.count_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.mob.warpchase(md, target); } - if( HPMHooks.count.HP_map_count_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_map_count_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_mob_warpchase_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_warpchase_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, target); } } return retVal___; } -DBData HP_map_create_charid2nick(DBKey key, va_list args) { +bool HP_mob_ai_sub_hard(struct mob_data *md, int64 tick) { int hIndex = 0; - DBData retVal___; - memset(&retVal___, '\0', sizeof(DBData)); - if( HPMHooks.count.HP_map_create_charid2nick_pre ) { - DBData (*preHookFunc) (DBKey *key, va_list args); + bool retVal___ = false; + if( HPMHooks.count.HP_mob_ai_sub_hard_pre ) { + bool (*preHookFunc) (struct mob_data *md, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_charid2nick_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_map_create_charid2nick_pre[hIndex].func; - retVal___ = preHookFunc(&key, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_pre[hIndex].func; + retVal___ = preHookFunc(md, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38167,30 +44632,26 @@ DBData HP_map_create_charid2nick(DBKey key, va_list args) { } } { - va_list args___copy; va_copy(args___copy, args); - retVal___ = HPMHooks.source.map.create_charid2nick(key, args___copy); - va_end(args___copy); + retVal___ = HPMHooks.source.mob.ai_sub_hard(md, tick); } - if( HPMHooks.count.HP_map_create_charid2nick_post ) { - DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_charid2nick_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_map_create_charid2nick_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_mob_ai_sub_hard_post ) { + bool (*postHookFunc) (bool retVal___, struct mob_data *md, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &tick); } } return retVal___; } -int HP_map_removemobs_sub(struct block_list *bl, va_list ap) { +int HP_mob_ai_sub_hard_timer(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_removemobs_sub_pre ) { + if( HPMHooks.count.HP_mob_ai_sub_hard_timer_pre ) { int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_sub_pre; hIndex++ ) { + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_timer_pre; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_map_removemobs_sub_pre[hIndex].func; + preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_timer_pre[hIndex].func; retVal___ = preHookFunc(bl, ap___copy); va_end(ap___copy); } @@ -38201,30 +44662,31 @@ int HP_map_removemobs_sub(struct block_list *bl, va_list ap) { } { va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.map.removemobs_sub(bl, ap___copy); + retVal___ = HPMHooks.source.mob.ai_sub_hard_timer(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_removemobs_sub_post ) { + if( HPMHooks.count.HP_mob_ai_sub_hard_timer_post ) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_sub_post; hIndex++ ) { + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_timer_post; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_map_removemobs_sub_post[hIndex].func; + postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_timer_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, ap___copy); va_end(ap___copy); } } return retVal___; } -struct mapcell HP_map_gat2cell(int gat) { +int HP_mob_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { int hIndex = 0; - struct mapcell retVal___; - memset(&retVal___, '\0', sizeof(struct mapcell)); - if( HPMHooks.count.HP_map_gat2cell_pre ) { - struct mapcell (*preHookFunc) (int *gat); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_ai_sub_foreachclient_pre ) { + int (*preHookFunc) (struct map_session_data *sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_gat2cell_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_gat2cell_pre[hIndex].func; - retVal___ = preHookFunc(&gat); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_foreachclient_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_ai_sub_foreachclient_pre[hIndex].func; + retVal___ = preHookFunc(sd, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38232,26 +44694,32 @@ struct mapcell HP_map_gat2cell(int gat) { } } { - retVal___ = HPMHooks.source.map.gat2cell(gat); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.ai_sub_foreachclient(sd, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_map_gat2cell_post ) { - struct mapcell (*postHookFunc) (struct mapcell retVal___, int *gat); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_gat2cell_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_gat2cell_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &gat); + if( HPMHooks.count.HP_mob_ai_sub_foreachclient_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_foreachclient_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_ai_sub_foreachclient_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_map_cell2gat(struct mapcell cell) { +int HP_mob_ai_sub_lazy(struct mob_data *md, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_cell2gat_pre ) { - int (*preHookFunc) (struct mapcell *cell); + if( HPMHooks.count.HP_mob_ai_sub_lazy_pre ) { + int (*preHookFunc) (struct mob_data *md, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cell2gat_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_cell2gat_pre[hIndex].func; - retVal___ = preHookFunc(&cell); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_lazy_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_mob_ai_sub_lazy_pre[hIndex].func; + retVal___ = preHookFunc(md, args___copy); + va_end(args___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38259,26 +44727,30 @@ int HP_map_cell2gat(struct mapcell cell) { } } { - retVal___ = HPMHooks.source.map.cell2gat(cell); + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.mob.ai_sub_lazy(md, args___copy); + va_end(args___copy); } - if( HPMHooks.count.HP_map_cell2gat_post ) { - int (*postHookFunc) (int retVal___, struct mapcell *cell); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cell2gat_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_cell2gat_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &cell); + if( HPMHooks.count.HP_mob_ai_sub_lazy_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_lazy_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_mob_ai_sub_lazy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, args___copy); + va_end(args___copy); } } return retVal___; } -int HP_map_getcellp(struct map_data *m, int16 x, int16 y, cell_chk cellchk) { +int HP_mob_ai_lazy(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_getcellp_pre ) { - int (*preHookFunc) (struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk); + if( HPMHooks.count.HP_mob_ai_lazy_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcellp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_getcellp_pre[hIndex].func; - retVal___ = preHookFunc(m, &x, &y, &cellchk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_lazy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_ai_lazy_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38286,52 +44758,26 @@ int HP_map_getcellp(struct map_data *m, int16 x, int16 y, cell_chk cellchk) { } } { - retVal___ = HPMHooks.source.map.getcellp(m, x, y, cellchk); + retVal___ = HPMHooks.source.mob.ai_lazy(tid, tick, id, data); } - if( HPMHooks.count.HP_map_getcellp_post ) { - int (*postHookFunc) (int retVal___, struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcellp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_getcellp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, m, &x, &y, &cellchk); + if( HPMHooks.count.HP_mob_ai_lazy_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_lazy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_ai_lazy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -void HP_map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) { - int hIndex = 0; - if( HPMHooks.count.HP_map_setcell_pre ) { - void (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setcell_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_setcell_pre[hIndex].func; - preHookFunc(&m, &x, &y, &cell, &flag); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.map.setcell(m, x, y, cell, flag); - } - if( HPMHooks.count.HP_map_setcell_post ) { - void (*postHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setcell_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_setcell_post[hIndex].func; - postHookFunc(&m, &x, &y, &cell, &flag); - } - } - return; -} -int HP_map_sub_getcellp(struct map_data *m, int16 x, int16 y, cell_chk cellchk) { +int HP_mob_ai_hard(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_sub_getcellp_pre ) { - int (*preHookFunc) (struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk); + if( HPMHooks.count.HP_mob_ai_hard_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_getcellp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_sub_getcellp_pre[hIndex].func; - retVal___ = preHookFunc(m, &x, &y, &cellchk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_hard_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_ai_hard_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38339,81 +44785,80 @@ int HP_map_sub_getcellp(struct map_data *m, int16 x, int16 y, cell_chk cellchk) } } { - retVal___ = HPMHooks.source.map.sub_getcellp(m, x, y, cellchk); + retVal___ = HPMHooks.source.mob.ai_hard(tid, tick, id, data); } - if( HPMHooks.count.HP_map_sub_getcellp_post ) { - int (*postHookFunc) (int retVal___, struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_getcellp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_sub_getcellp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, m, &x, &y, &cellchk); + if( HPMHooks.count.HP_mob_ai_hard_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_hard_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_ai_hard_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -void HP_map_sub_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) { +struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data) { int hIndex = 0; - if( HPMHooks.count.HP_map_sub_setcell_pre ) { - void (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); + struct item_drop* retVal___ = NULL; + if( HPMHooks.count.HP_mob_setdropitem_pre ) { + struct item_drop* (*preHookFunc) (int *nameid, int *qty, struct item_data *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_setcell_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_sub_setcell_pre[hIndex].func; - preHookFunc(&m, &x, &y, &cell, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_setdropitem_pre[hIndex].func; + retVal___ = preHookFunc(&nameid, &qty, data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.sub_setcell(m, x, y, cell, flag); + retVal___ = HPMHooks.source.mob.setdropitem(nameid, qty, data); } - if( HPMHooks.count.HP_map_sub_setcell_post ) { - void (*postHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_setcell_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_sub_setcell_post[hIndex].func; - postHookFunc(&m, &x, &y, &cell, &flag); + if( HPMHooks.count.HP_mob_setdropitem_post ) { + struct item_drop* (*postHookFunc) (struct item_drop* retVal___, int *nameid, int *qty, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_setdropitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &nameid, &qty, data); } } - return; + return retVal___; } -void HP_map_iwall_nextxy(int16 x, int16 y, int8 dir, int pos, int16 *x1, int16 *y1) { +struct item_drop* HP_mob_setlootitem(struct item *item) { int hIndex = 0; - if( HPMHooks.count.HP_map_iwall_nextxy_pre ) { - void (*preHookFunc) (int16 *x, int16 *y, int8 *dir, int *pos, int16 *x1, int16 *y1); + struct item_drop* retVal___ = NULL; + if( HPMHooks.count.HP_mob_setlootitem_pre ) { + struct item_drop* (*preHookFunc) (struct item *item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_nextxy_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_iwall_nextxy_pre[hIndex].func; - preHookFunc(&x, &y, &dir, &pos, x1, y1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setlootitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_setlootitem_pre[hIndex].func; + retVal___ = preHookFunc(item); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.iwall_nextxy(x, y, dir, pos, x1, y1); + retVal___ = HPMHooks.source.mob.setlootitem(item); } - if( HPMHooks.count.HP_map_iwall_nextxy_post ) { - void (*postHookFunc) (int16 *x, int16 *y, int8 *dir, int *pos, int16 *x1, int16 *y1); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_nextxy_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_iwall_nextxy_post[hIndex].func; - postHookFunc(&x, &y, &dir, &pos, x1, y1); + if( HPMHooks.count.HP_mob_setlootitem_post ) { + struct item_drop* (*postHookFunc) (struct item_drop* retVal___, struct item *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setlootitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_setlootitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, item); } } - return; + return retVal___; } -DBData HP_map_create_map_data_other_server(DBKey key, va_list args) { +int HP_mob_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - DBData retVal___; - memset(&retVal___, '\0', sizeof(DBData)); - if( HPMHooks.count.HP_map_create_map_data_other_server_pre ) { - DBData (*preHookFunc) (DBKey *key, va_list args); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_delay_item_drop_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_map_data_other_server_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_map_create_map_data_other_server_pre[hIndex].func; - retVal___ = preHookFunc(&key, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delay_item_drop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_delay_item_drop_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38421,63 +44866,52 @@ DBData HP_map_create_map_data_other_server(DBKey key, va_list args) { } } { - va_list args___copy; va_copy(args___copy, args); - retVal___ = HPMHooks.source.map.create_map_data_other_server(key, args___copy); - va_end(args___copy); + retVal___ = HPMHooks.source.mob.delay_item_drop(tid, tick, id, data); } - if( HPMHooks.count.HP_map_create_map_data_other_server_post ) { - DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_map_data_other_server_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_map_create_map_data_other_server_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_mob_delay_item_drop_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delay_item_drop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_delay_item_drop_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_map_eraseallipport_sub(DBKey key, DBData *data, va_list va) { +void HP_mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int loot, int drop_rate, unsigned short flag) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_eraseallipport_sub_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list va); + if( HPMHooks.count.HP_mob_item_drop_pre ) { + void (*preHookFunc) (struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int *loot, int *drop_rate, unsigned short *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_sub_pre; hIndex++ ) { - va_list va___copy; va_copy(va___copy, va); - preHookFunc = HPMHooks.list.HP_map_eraseallipport_sub_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, va___copy); - va_end(va___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_drop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_item_drop_pre[hIndex].func; + preHookFunc(md, dlist, ditem, &loot, &drop_rate, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list va___copy; va_copy(va___copy, va); - retVal___ = HPMHooks.source.map.eraseallipport_sub(key, data, va___copy); - va_end(va___copy); + HPMHooks.source.mob.item_drop(md, dlist, ditem, loot, drop_rate, flag); } - if( HPMHooks.count.HP_map_eraseallipport_sub_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list va); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_sub_post; hIndex++ ) { - va_list va___copy; va_copy(va___copy, va); - postHookFunc = HPMHooks.list.HP_map_eraseallipport_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, va___copy); - va_end(va___copy); + if( HPMHooks.count.HP_mob_item_drop_post ) { + void (*postHookFunc) (struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int *loot, int *drop_rate, unsigned short *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_drop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_item_drop_post[hIndex].func; + postHookFunc(md, dlist, ditem, &loot, &drop_rate, &flag); } } - return retVal___; + return; } -char* HP_map_init_mapcache(FILE *fp) { +int HP_mob_timer_delete(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_map_init_mapcache_pre ) { - char* (*preHookFunc) (FILE *fp); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_timer_delete_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_init_mapcache_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_init_mapcache_pre[hIndex].func; - retVal___ = preHookFunc(fp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_timer_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_timer_delete_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38485,26 +44919,28 @@ char* HP_map_init_mapcache(FILE *fp) { } } { - retVal___ = HPMHooks.source.map.init_mapcache(fp); + retVal___ = HPMHooks.source.mob.timer_delete(tid, tick, id, data); } - if( HPMHooks.count.HP_map_init_mapcache_post ) { - char* (*postHookFunc) (char* retVal___, FILE *fp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_init_mapcache_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_init_mapcache_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fp); + if( HPMHooks.count.HP_mob_timer_delete_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_timer_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_timer_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_map_readfromcache(struct map_data *m, char *buffer) { +int HP_mob_deleteslave_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_readfromcache_pre ) { - int (*preHookFunc) (struct map_data *m, char *buffer); + if( HPMHooks.count.HP_mob_deleteslave_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readfromcache_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_readfromcache_pre[hIndex].func; - retVal___ = preHookFunc(m, buffer); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_deleteslave_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38512,26 +44948,30 @@ int HP_map_readfromcache(struct map_data *m, char *buffer) { } } { - retVal___ = HPMHooks.source.map.readfromcache(m, buffer); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.deleteslave_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_map_readfromcache_post ) { - int (*postHookFunc) (int retVal___, struct map_data *m, char *buffer); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readfromcache_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_readfromcache_post[hIndex].func; - retVal___ = postHookFunc(retVal___, m, buffer); + if( HPMHooks.count.HP_mob_deleteslave_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_deleteslave_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_map_addmap(const char *mapname) { +int HP_mob_deleteslave(struct mob_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_addmap_pre ) { - int (*preHookFunc) (const char *mapname); + if( HPMHooks.count.HP_mob_deleteslave_pre ) { + int (*preHookFunc) (struct mob_data *md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_addmap_pre[hIndex].func; - retVal___ = preHookFunc(mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_deleteslave_pre[hIndex].func; + retVal___ = preHookFunc(md); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38539,51 +44979,52 @@ int HP_map_addmap(const char *mapname) { } } { - retVal___ = HPMHooks.source.map.addmap(mapname); + retVal___ = HPMHooks.source.mob.deleteslave(md); } - if( HPMHooks.count.HP_map_addmap_post ) { - int (*postHookFunc) (int retVal___, const char *mapname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_addmap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mapname); + if( HPMHooks.count.HP_mob_deleteslave_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_deleteslave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); } } return retVal___; } -void HP_map_delmapid(int id) { +int HP_mob_respawn(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - if( HPMHooks.count.HP_map_delmapid_pre ) { - void (*preHookFunc) (int *id); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_respawn_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmapid_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_delmapid_pre[hIndex].func; - preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_respawn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_respawn_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.delmapid(id); + retVal___ = HPMHooks.source.mob.respawn(tid, tick, id, data); } - if( HPMHooks.count.HP_map_delmapid_post ) { - void (*postHookFunc) (int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmapid_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_delmapid_post[hIndex].func; - postHookFunc(&id); + if( HPMHooks.count.HP_mob_respawn_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_respawn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_respawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } - return; + return retVal___; } -void HP_map_zone_db_clear(void) { +void HP_mob_log_damage(struct mob_data *md, struct block_list *src, int damage) { int hIndex = 0; - if( HPMHooks.count.HP_map_zone_db_clear_pre ) { - void (*preHookFunc) (void); + if( HPMHooks.count.HP_mob_log_damage_pre ) { + void (*preHookFunc) (struct mob_data *md, struct block_list *src, int *damage); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_db_clear_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_zone_db_clear_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_log_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_log_damage_pre[hIndex].func; + preHookFunc(md, src, &damage); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38591,25 +45032,25 @@ void HP_map_zone_db_clear(void) { } } { - HPMHooks.source.map.zone_db_clear(); + HPMHooks.source.mob.log_damage(md, src, damage); } - if( HPMHooks.count.HP_map_zone_db_clear_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_db_clear_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_zone_db_clear_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_mob_log_damage_post ) { + void (*postHookFunc) (struct mob_data *md, struct block_list *src, int *damage); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_log_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_log_damage_post[hIndex].func; + postHookFunc(md, src, &damage); } } return; } -void HP_map_list_final(void) { +void HP_mob_damage(struct mob_data *md, struct block_list *src, int damage) { int hIndex = 0; - if( HPMHooks.count.HP_map_list_final_pre ) { - void (*preHookFunc) (void); + if( HPMHooks.count.HP_mob_damage_pre ) { + void (*preHookFunc) (struct mob_data *md, struct block_list *src, int *damage); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_list_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_list_final_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_damage_pre[hIndex].func; + preHookFunc(md, src, &damage); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38617,26 +45058,26 @@ void HP_map_list_final(void) { } } { - HPMHooks.source.map.list_final(); + HPMHooks.source.mob.damage(md, src, damage); } - if( HPMHooks.count.HP_map_list_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_list_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_list_final_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_mob_damage_post ) { + void (*postHookFunc) (struct mob_data *md, struct block_list *src, int *damage); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_damage_post[hIndex].func; + postHookFunc(md, src, &damage); } } return; } -int HP_map_waterheight(char *mapname) { +int HP_mob_dead(struct mob_data *md, struct block_list *src, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_waterheight_pre ) { - int (*preHookFunc) (char *mapname); + if( HPMHooks.count.HP_mob_dead_pre ) { + int (*preHookFunc) (struct mob_data *md, struct block_list *src, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_waterheight_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_waterheight_pre[hIndex].func; - retVal___ = preHookFunc(mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_dead_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_dead_pre[hIndex].func; + retVal___ = preHookFunc(md, src, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38644,53 +45085,52 @@ int HP_map_waterheight(char *mapname) { } } { - retVal___ = HPMHooks.source.map.waterheight(mapname); + retVal___ = HPMHooks.source.mob.dead(md, src, type); } - if( HPMHooks.count.HP_map_waterheight_post ) { - int (*postHookFunc) (int retVal___, char *mapname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_waterheight_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_waterheight_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mapname); + if( HPMHooks.count.HP_mob_dead_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *src, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_dead_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_dead_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, src, &type); } } return retVal___; } -int HP_map_readgat(struct map_data *m) { +void HP_mob_revive(struct mob_data *md, unsigned int hp) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_readgat_pre ) { - int (*preHookFunc) (struct map_data *m); + if( HPMHooks.count.HP_mob_revive_pre ) { + void (*preHookFunc) (struct mob_data *md, unsigned int *hp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readgat_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_readgat_pre[hIndex].func; - retVal___ = preHookFunc(m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_revive_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_revive_pre[hIndex].func; + preHookFunc(md, &hp); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.map.readgat(m); + HPMHooks.source.mob.revive(md, hp); } - if( HPMHooks.count.HP_map_readgat_post ) { - int (*postHookFunc) (int retVal___, struct map_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readgat_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_readgat_post[hIndex].func; - retVal___ = postHookFunc(retVal___, m); + if( HPMHooks.count.HP_mob_revive_post ) { + void (*postHookFunc) (struct mob_data *md, unsigned int *hp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_revive_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_revive_post[hIndex].func; + postHookFunc(md, &hp); } } - return retVal___; + return; } -int HP_map_readallmaps(void) { +int HP_mob_guardian_guildchange(struct mob_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_readallmaps_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_mob_guardian_guildchange_pre ) { + int (*preHookFunc) (struct mob_data *md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readallmaps_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_readallmaps_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_guardian_guildchange_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_guardian_guildchange_pre[hIndex].func; + retVal___ = preHookFunc(md); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38698,26 +45138,26 @@ int HP_map_readallmaps(void) { } } { - retVal___ = HPMHooks.source.map.readallmaps(); + retVal___ = HPMHooks.source.mob.guardian_guildchange(md); } - if( HPMHooks.count.HP_map_readallmaps_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readallmaps_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_readallmaps_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_mob_guardian_guildchange_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_guardian_guildchange_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_guardian_guildchange_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); } } return retVal___; } -int HP_map_config_read(char *cfgName) { +int HP_mob_random_class(int *value, size_t count) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_config_read_pre ) { - int (*preHookFunc) (char *cfgName); + if( HPMHooks.count.HP_mob_random_class_pre ) { + int (*preHookFunc) (int *value, size_t *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_config_read_pre[hIndex].func; - retVal___ = preHookFunc(cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_random_class_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_random_class_pre[hIndex].func; + retVal___ = preHookFunc(value, &count); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38725,26 +45165,26 @@ int HP_map_config_read(char *cfgName) { } } { - retVal___ = HPMHooks.source.map.config_read(cfgName); + retVal___ = HPMHooks.source.mob.random_class(value, count); } - if( HPMHooks.count.HP_map_config_read_post ) { - int (*postHookFunc) (int retVal___, char *cfgName); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_config_read_post[hIndex].func; - retVal___ = postHookFunc(retVal___, cfgName); + if( HPMHooks.count.HP_mob_random_class_post ) { + int (*postHookFunc) (int retVal___, int *value, size_t *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_random_class_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_random_class_post[hIndex].func; + retVal___ = postHookFunc(retVal___, value, &count); } } return retVal___; } -int HP_map_config_read_sub(char *cfgName) { +int HP_mob_class_change(struct mob_data *md, int class_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_config_read_sub_pre ) { - int (*preHookFunc) (char *cfgName); + if( HPMHooks.count.HP_mob_class_change_pre ) { + int (*preHookFunc) (struct mob_data *md, int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_config_read_sub_pre[hIndex].func; - retVal___ = preHookFunc(cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_class_change_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_class_change_pre[hIndex].func; + retVal___ = preHookFunc(md, &class_); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38752,25 +45192,25 @@ int HP_map_config_read_sub(char *cfgName) { } } { - retVal___ = HPMHooks.source.map.config_read_sub(cfgName); + retVal___ = HPMHooks.source.mob.class_change(md, class_); } - if( HPMHooks.count.HP_map_config_read_sub_post ) { - int (*postHookFunc) (int retVal___, char *cfgName); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_config_read_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, cfgName); + if( HPMHooks.count.HP_mob_class_change_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_class_change_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_class_change_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &class_); } } return retVal___; } -void HP_map_reloadnpc_sub(char *cfgName) { +void HP_mob_heal(struct mob_data *md, unsigned int heal) { int hIndex = 0; - if( HPMHooks.count.HP_map_reloadnpc_sub_pre ) { - void (*preHookFunc) (char *cfgName); + if( HPMHooks.count.HP_mob_heal_pre ) { + void (*preHookFunc) (struct mob_data *md, unsigned int *heal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_reloadnpc_sub_pre[hIndex].func; - preHookFunc(cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_heal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_heal_pre[hIndex].func; + preHookFunc(md, &heal); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38778,26 +45218,28 @@ void HP_map_reloadnpc_sub(char *cfgName) { } } { - HPMHooks.source.map.reloadnpc_sub(cfgName); + HPMHooks.source.mob.heal(md, heal); } - if( HPMHooks.count.HP_map_reloadnpc_sub_post ) { - void (*postHookFunc) (char *cfgName); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_reloadnpc_sub_post[hIndex].func; - postHookFunc(cfgName); + if( HPMHooks.count.HP_mob_heal_post ) { + void (*postHookFunc) (struct mob_data *md, unsigned int *heal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_heal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_heal_post[hIndex].func; + postHookFunc(md, &heal); } } return; } -int HP_map_inter_config_read(char *cfgName) { +int HP_mob_warpslave_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_inter_config_read_pre ) { - int (*preHookFunc) (char *cfgName); + if( HPMHooks.count.HP_mob_warpslave_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_inter_config_read_pre[hIndex].func; - retVal___ = preHookFunc(cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_warpslave_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38805,26 +45247,30 @@ int HP_map_inter_config_read(char *cfgName) { } } { - retVal___ = HPMHooks.source.map.inter_config_read(cfgName); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.warpslave_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_map_inter_config_read_post ) { - int (*postHookFunc) (int retVal___, char *cfgName); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_inter_config_read_post[hIndex].func; - retVal___ = postHookFunc(retVal___, cfgName); + if( HPMHooks.count.HP_mob_warpslave_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_warpslave_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_map_sql_init(void) { +int HP_mob_warpslave(struct block_list *bl, int range) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_sql_init_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_mob_warpslave_pre ) { + int (*preHookFunc) (struct block_list *bl, int *range); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_sql_init_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_warpslave_pre[hIndex].func; + retVal___ = preHookFunc(bl, &range); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38832,26 +45278,28 @@ int HP_map_sql_init(void) { } } { - retVal___ = HPMHooks.source.map.sql_init(); + retVal___ = HPMHooks.source.mob.warpslave(bl, range); } - if( HPMHooks.count.HP_map_sql_init_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_sql_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_mob_warpslave_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *range); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_warpslave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &range); } } return retVal___; } -int HP_map_sql_close(void) { +int HP_mob_countslave_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_sql_close_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_mob_countslave_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_close_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_sql_close_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_countslave_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38859,26 +45307,30 @@ int HP_map_sql_close(void) { } } { - retVal___ = HPMHooks.source.map.sql_close(); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.countslave_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_map_sql_close_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_close_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_sql_close_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_mob_countslave_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_countslave_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -bool HP_map_zone_mf_cache(int m, char *flag, char *params) { +int HP_mob_countslave(struct block_list *bl) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_map_zone_mf_cache_pre ) { - bool (*preHookFunc) (int *m, char *flag, char *params); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_countslave_pre ) { + int (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_mf_cache_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_zone_mf_cache_pre[hIndex].func; - retVal___ = preHookFunc(&m, flag, params); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_countslave_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38886,26 +45338,26 @@ bool HP_map_zone_mf_cache(int m, char *flag, char *params) { } } { - retVal___ = HPMHooks.source.map.zone_mf_cache(m, flag, params); + retVal___ = HPMHooks.source.mob.countslave(bl); } - if( HPMHooks.count.HP_map_zone_mf_cache_post ) { - bool (*postHookFunc) (bool retVal___, int *m, char *flag, char *params); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_mf_cache_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_zone_mf_cache_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &m, flag, params); + if( HPMHooks.count.HP_mob_countslave_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_countslave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -unsigned short HP_map_zone_str2itemid(const char *name) { +int HP_mob_summonslave(struct mob_data *md2, int *value, int amount, uint16 skill_id) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_map_zone_str2itemid_pre ) { - unsigned short (*preHookFunc) (const char *name); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_summonslave_pre ) { + int (*preHookFunc) (struct mob_data *md2, int *value, int *amount, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2itemid_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_zone_str2itemid_pre[hIndex].func; - retVal___ = preHookFunc(name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_summonslave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_summonslave_pre[hIndex].func; + retVal___ = preHookFunc(md2, value, &amount, &skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38913,26 +45365,28 @@ unsigned short HP_map_zone_str2itemid(const char *name) { } } { - retVal___ = HPMHooks.source.map.zone_str2itemid(name); + retVal___ = HPMHooks.source.mob.summonslave(md2, value, amount, skill_id); } - if( HPMHooks.count.HP_map_zone_str2itemid_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2itemid_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_zone_str2itemid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name); + if( HPMHooks.count.HP_mob_summonslave_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md2, int *value, int *amount, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_summonslave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_summonslave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md2, value, &amount, &skill_id); } } return retVal___; } -unsigned short HP_map_zone_str2skillid(const char *name) { +int HP_mob_getfriendhprate_sub(struct block_list *bl, va_list ap) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_map_zone_str2skillid_pre ) { - unsigned short (*preHookFunc) (const char *name); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_getfriendhprate_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2skillid_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_zone_str2skillid_pre[hIndex].func; - retVal___ = preHookFunc(name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_getfriendhprate_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38940,26 +45394,30 @@ unsigned short HP_map_zone_str2skillid(const char *name) { } } { - retVal___ = HPMHooks.source.map.zone_str2skillid(name); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.getfriendhprate_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_map_zone_str2skillid_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2skillid_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_zone_str2skillid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name); + if( HPMHooks.count.HP_mob_getfriendhprate_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_getfriendhprate_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -enum bl_type HP_map_zone_bl_type(const char *entry, enum map_zone_skill_subtype *subtype) { +struct block_list* HP_mob_getfriendhprate(struct mob_data *md, int min_rate, int max_rate) { int hIndex = 0; - enum bl_type retVal___ = BL_NUL; - if( HPMHooks.count.HP_map_zone_bl_type_pre ) { - enum bl_type (*preHookFunc) (const char *entry, enum map_zone_skill_subtype *subtype); + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_mob_getfriendhprate_pre ) { + struct block_list* (*preHookFunc) (struct mob_data *md, int *min_rate, int *max_rate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_bl_type_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_zone_bl_type_pre[hIndex].func; - retVal___ = preHookFunc(entry, subtype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_getfriendhprate_pre[hIndex].func; + retVal___ = preHookFunc(md, &min_rate, &max_rate); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -38967,53 +45425,54 @@ enum bl_type HP_map_zone_bl_type(const char *entry, enum map_zone_skill_subtype } } { - retVal___ = HPMHooks.source.map.zone_bl_type(entry, subtype); + retVal___ = HPMHooks.source.mob.getfriendhprate(md, min_rate, max_rate); } - if( HPMHooks.count.HP_map_zone_bl_type_post ) { - enum bl_type (*postHookFunc) (enum bl_type retVal___, const char *entry, enum map_zone_skill_subtype *subtype); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_bl_type_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_zone_bl_type_post[hIndex].func; - retVal___ = postHookFunc(retVal___, entry, subtype); + if( HPMHooks.count.HP_mob_getfriendhprate_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct mob_data *md, int *min_rate, int *max_rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_getfriendhprate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &min_rate, &max_rate); } } return retVal___; } -void HP_map_read_zone_db(void) { +struct block_list* HP_mob_getmasterhpltmaxrate(struct mob_data *md, int rate) { int hIndex = 0; - if( HPMHooks.count.HP_map_read_zone_db_pre ) { - void (*preHookFunc) (void); + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_mob_getmasterhpltmaxrate_pre ) { + struct block_list* (*preHookFunc) (struct mob_data *md, int *rate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_zone_db_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_read_zone_db_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getmasterhpltmaxrate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_getmasterhpltmaxrate_pre[hIndex].func; + retVal___ = preHookFunc(md, &rate); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.read_zone_db(); + retVal___ = HPMHooks.source.mob.getmasterhpltmaxrate(md, rate); } - if( HPMHooks.count.HP_map_read_zone_db_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_zone_db_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_read_zone_db_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_mob_getmasterhpltmaxrate_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct mob_data *md, int *rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getmasterhpltmaxrate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_getmasterhpltmaxrate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &rate); } } - return; + return retVal___; } -int HP_map_db_final(DBKey key, DBData *data, va_list ap) { +int HP_mob_getfriendstatus_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_db_final_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + if( HPMHooks.count.HP_mob_getfriendstatus_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_db_final_pre; hIndex++ ) { + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_sub_pre; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_map_db_final_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); + preHookFunc = HPMHooks.list.HP_mob_getfriendstatus_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); va_end(ap___copy); } if( *HPMforce_return ) { @@ -39023,31 +45482,29 @@ int HP_map_db_final(DBKey key, DBData *data, va_list ap) { } { va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.map.db_final(key, data, ap___copy); + retVal___ = HPMHooks.source.mob.getfriendstatus_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_db_final_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_db_final_post; hIndex++ ) { + if( HPMHooks.count.HP_mob_getfriendstatus_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_sub_post; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_map_db_final_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + postHookFunc = HPMHooks.list.HP_mob_getfriendstatus_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); va_end(ap___copy); } } return retVal___; } -int HP_map_nick_db_final(DBKey key, DBData *data, va_list args) { +struct mob_data* HP_mob_getfriendstatus(struct mob_data *md, int cond1, int cond2) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_nick_db_final_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list args); + struct mob_data* retVal___ = NULL; + if( HPMHooks.count.HP_mob_getfriendstatus_pre ) { + struct mob_data* (*preHookFunc) (struct mob_data *md, int *cond1, int *cond2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick_db_final_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_map_nick_db_final_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_getfriendstatus_pre[hIndex].func; + retVal___ = preHookFunc(md, &cond1, &cond2); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39055,32 +45512,26 @@ int HP_map_nick_db_final(DBKey key, DBData *data, va_list args) { } } { - va_list args___copy; va_copy(args___copy, args); - retVal___ = HPMHooks.source.map.nick_db_final(key, data, args___copy); - va_end(args___copy); + retVal___ = HPMHooks.source.mob.getfriendstatus(md, cond1, cond2); } - if( HPMHooks.count.HP_map_nick_db_final_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick_db_final_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_map_nick_db_final_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_mob_getfriendstatus_post ) { + struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct mob_data *md, int *cond1, int *cond2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_getfriendstatus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &cond1, &cond2); } } return retVal___; } -int HP_map_cleanup_db_sub(DBKey key, DBData *data, va_list va) { +int HP_mob_skill_use(struct mob_data *md, int64 tick, int event) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_cleanup_db_sub_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list va); + if( HPMHooks.count.HP_mob_skill_use_pre ) { + int (*preHookFunc) (struct mob_data *md, int64 *tick, int *event); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_db_sub_pre; hIndex++ ) { - va_list va___copy; va_copy(va___copy, va); - preHookFunc = HPMHooks.list.HP_map_cleanup_db_sub_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, va___copy); - va_end(va___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_use_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_skill_use_pre[hIndex].func; + retVal___ = preHookFunc(md, &tick, &event); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39088,32 +45539,26 @@ int HP_map_cleanup_db_sub(DBKey key, DBData *data, va_list va) { } } { - va_list va___copy; va_copy(va___copy, va); - retVal___ = HPMHooks.source.map.cleanup_db_sub(key, data, va___copy); - va_end(va___copy); + retVal___ = HPMHooks.source.mob.skill_use(md, tick, event); } - if( HPMHooks.count.HP_map_cleanup_db_sub_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list va); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_db_sub_post; hIndex++ ) { - va_list va___copy; va_copy(va___copy, va); - postHookFunc = HPMHooks.list.HP_map_cleanup_db_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, va___copy); - va_end(va___copy); + if( HPMHooks.count.HP_mob_skill_use_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, int64 *tick, int *event); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_use_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_skill_use_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &tick, &event); } } return retVal___; } -int HP_map_abort_sub(struct map_session_data *sd, va_list ap) { +int HP_mob_skill_event(struct mob_data *md, struct block_list *src, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_abort_sub_pre ) { - int (*preHookFunc) (struct map_session_data *sd, va_list ap); + if( HPMHooks.count.HP_mob_skill_event_pre ) { + int (*preHookFunc) (struct mob_data *md, struct block_list *src, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_abort_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_map_abort_sub_pre[hIndex].func; - retVal___ = preHookFunc(sd, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_skill_event_pre[hIndex].func; + retVal___ = preHookFunc(md, src, &tick, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39121,56 +45566,53 @@ int HP_map_abort_sub(struct map_session_data *sd, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.map.abort_sub(sd, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.mob.skill_event(md, src, tick, flag); } - if( HPMHooks.count.HP_map_abort_sub_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_abort_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_map_abort_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_mob_skill_event_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *src, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_skill_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, src, &tick, &flag); } } return retVal___; } -void HP_map_update_cell_bl(struct block_list *bl, bool increase) { +int HP_mob_is_clone(int class_) { int hIndex = 0; - if( HPMHooks.count.HP_map_update_cell_bl_pre ) { - void (*preHookFunc) (struct block_list *bl, bool *increase); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_is_clone_pre ) { + int (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_update_cell_bl_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_update_cell_bl_pre[hIndex].func; - preHookFunc(bl, &increase); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_clone_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_is_clone_pre[hIndex].func; + retVal___ = preHookFunc(&class_); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.update_cell_bl(bl, increase); + retVal___ = HPMHooks.source.mob.is_clone(class_); } - if( HPMHooks.count.HP_map_update_cell_bl_post ) { - void (*postHookFunc) (struct block_list *bl, bool *increase); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_update_cell_bl_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_update_cell_bl_post[hIndex].func; - postHookFunc(bl, &increase); + if( HPMHooks.count.HP_mob_is_clone_post ) { + int (*postHookFunc) (int retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_clone_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_is_clone_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); } } - return; + return retVal___; } -int HP_map_get_new_bonus_id(void) { +int HP_mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, const char *event, int master_id, int mode, int flag, unsigned int duration) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_get_new_bonus_id_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_mob_clone_spawn_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *event, int *master_id, int *mode, int *flag, unsigned int *duration); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_bonus_id_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_get_new_bonus_id_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_spawn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_clone_spawn_pre[hIndex].func; + retVal___ = preHookFunc(sd, &m, &x, &y, event, &master_id, &mode, &flag, &duration); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39178,52 +45620,53 @@ int HP_map_get_new_bonus_id(void) { } } { - retVal___ = HPMHooks.source.map.get_new_bonus_id(); + retVal___ = HPMHooks.source.mob.clone_spawn(sd, m, x, y, event, master_id, mode, flag, duration); } - if( HPMHooks.count.HP_map_get_new_bonus_id_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_bonus_id_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_get_new_bonus_id_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_mob_clone_spawn_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *event, int *master_id, int *mode, int *flag, unsigned int *duration); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_spawn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_clone_spawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &m, &x, &y, event, &master_id, &mode, &flag, &duration); } } return retVal___; } -void HP_map_add_questinfo(int m, struct questinfo *qi) { +int HP_mob_clone_delete(struct mob_data *md) { int hIndex = 0; - if( HPMHooks.count.HP_map_add_questinfo_pre ) { - void (*preHookFunc) (int *m, struct questinfo *qi); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_clone_delete_pre ) { + int (*preHookFunc) (struct mob_data *md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_add_questinfo_pre[hIndex].func; - preHookFunc(&m, qi); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_clone_delete_pre[hIndex].func; + retVal___ = preHookFunc(md); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.add_questinfo(m, qi); + retVal___ = HPMHooks.source.mob.clone_delete(md); } - if( HPMHooks.count.HP_map_add_questinfo_post ) { - void (*postHookFunc) (int *m, struct questinfo *qi); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_add_questinfo_post[hIndex].func; - postHookFunc(&m, qi); + if( HPMHooks.count.HP_mob_clone_delete_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_clone_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); } } - return; + return retVal___; } -bool HP_map_remove_questinfo(int m, struct npc_data *nd) { +unsigned int HP_mob_drop_adjust(int baserate, int rate_adjust, unsigned short rate_min, unsigned short rate_max) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_map_remove_questinfo_pre ) { - bool (*preHookFunc) (int *m, struct npc_data *nd); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_mob_drop_adjust_pre ) { + unsigned int (*preHookFunc) (int *baserate, int *rate_adjust, unsigned short *rate_min, unsigned short *rate_max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_remove_questinfo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_remove_questinfo_pre[hIndex].func; - retVal___ = preHookFunc(&m, nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_drop_adjust_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_drop_adjust_pre[hIndex].func; + retVal___ = preHookFunc(&baserate, &rate_adjust, &rate_min, &rate_max); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39231,80 +45674,79 @@ bool HP_map_remove_questinfo(int m, struct npc_data *nd) { } } { - retVal___ = HPMHooks.source.map.remove_questinfo(m, nd); + retVal___ = HPMHooks.source.mob.drop_adjust(baserate, rate_adjust, rate_min, rate_max); } - if( HPMHooks.count.HP_map_remove_questinfo_post ) { - bool (*postHookFunc) (bool retVal___, int *m, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_remove_questinfo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_remove_questinfo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &m, nd); + if( HPMHooks.count.HP_mob_drop_adjust_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, int *baserate, int *rate_adjust, unsigned short *rate_min, unsigned short *rate_max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_drop_adjust_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_drop_adjust_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &baserate, &rate_adjust, &rate_min, &rate_max); } } return retVal___; } -struct map_zone_data* HP_map_merge_zone(struct map_zone_data *main, struct map_zone_data *other) { +void HP_mob_item_dropratio_adjust(int nameid, int mob_id, int *rate_adjust) { int hIndex = 0; - struct map_zone_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_merge_zone_pre ) { - struct map_zone_data* (*preHookFunc) (struct map_zone_data *main, struct map_zone_data *other); + if( HPMHooks.count.HP_mob_item_dropratio_adjust_pre ) { + void (*preHookFunc) (int *nameid, int *mob_id, int *rate_adjust); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_merge_zone_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_merge_zone_pre[hIndex].func; - retVal___ = preHookFunc(main, other); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_dropratio_adjust_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_item_dropratio_adjust_pre[hIndex].func; + preHookFunc(&nameid, &mob_id, rate_adjust); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.map.merge_zone(main, other); + HPMHooks.source.mob.item_dropratio_adjust(nameid, mob_id, rate_adjust); } - if( HPMHooks.count.HP_map_merge_zone_post ) { - struct map_zone_data* (*postHookFunc) (struct map_zone_data* retVal___, struct map_zone_data *main, struct map_zone_data *other); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_merge_zone_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_merge_zone_post[hIndex].func; - retVal___ = postHookFunc(retVal___, main, other); + if( HPMHooks.count.HP_mob_item_dropratio_adjust_post ) { + void (*postHookFunc) (int *nameid, int *mob_id, int *rate_adjust); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_dropratio_adjust_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_item_dropratio_adjust_post[hIndex].func; + postHookFunc(&nameid, &mob_id, rate_adjust); } } - return retVal___; + return; } -void HP_map_zone_clear_single(struct map_zone_data *zone) { +bool HP_mob_parse_dbrow(char **str) { int hIndex = 0; - if( HPMHooks.count.HP_map_zone_clear_single_pre ) { - void (*preHookFunc) (struct map_zone_data *zone); + bool retVal___ = false; + if( HPMHooks.count.HP_mob_parse_dbrow_pre ) { + bool (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_clear_single_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_zone_clear_single_pre[hIndex].func; - preHookFunc(zone); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dbrow_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_parse_dbrow_pre[hIndex].func; + retVal___ = preHookFunc(str); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.zone_clear_single(zone); + retVal___ = HPMHooks.source.mob.parse_dbrow(str); } - if( HPMHooks.count.HP_map_zone_clear_single_post ) { - void (*postHookFunc) (struct map_zone_data *zone); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_clear_single_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_map_zone_clear_single_post[hIndex].func; - postHookFunc(zone); + if( HPMHooks.count.HP_mob_parse_dbrow_post ) { + bool (*postHookFunc) (bool retVal___, char **str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dbrow_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_parse_dbrow_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); } } - return; + return retVal___; } -/* mapit */ -struct s_mapiterator* HP_mapit_alloc(enum e_mapitflags flags, enum bl_type types) { +bool HP_mob_readdb_sub(char *fields[], int columns, int current) { int hIndex = 0; - struct s_mapiterator* retVal___ = NULL; - if( HPMHooks.count.HP_mapit_alloc_pre ) { - struct s_mapiterator* (*preHookFunc) (enum e_mapitflags *flags, enum bl_type *types); + bool retVal___ = false; + if( HPMHooks.count.HP_mob_readdb_sub_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_alloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapit_alloc_pre[hIndex].func; - retVal___ = preHookFunc(&flags, &types); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_readdb_sub_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39312,25 +45754,25 @@ struct s_mapiterator* HP_mapit_alloc(enum e_mapitflags flags, enum bl_type types } } { - retVal___ = HPMHooks.source.mapit.alloc(flags, types); + retVal___ = HPMHooks.source.mob.readdb_sub(fields, columns, current); } - if( HPMHooks.count.HP_mapit_alloc_post ) { - struct s_mapiterator* (*postHookFunc) (struct s_mapiterator* retVal___, enum e_mapitflags *flags, enum bl_type *types); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_alloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapit_alloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &flags, &types); + if( HPMHooks.count.HP_mob_readdb_sub_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_readdb_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); } } return retVal___; } -void HP_mapit_free(struct s_mapiterator *iter) { +void HP_mob_readdb(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapit_free_pre ) { - void (*preHookFunc) (struct s_mapiterator *iter); + if( HPMHooks.count.HP_mob_readdb_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_free_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapit_free_pre[hIndex].func; - preHookFunc(iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_readdb_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39338,26 +45780,26 @@ void HP_mapit_free(struct s_mapiterator *iter) { } } { - HPMHooks.source.mapit.free(iter); + HPMHooks.source.mob.readdb(); } - if( HPMHooks.count.HP_mapit_free_post ) { - void (*postHookFunc) (struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_free_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapit_free_post[hIndex].func; - postHookFunc(iter); + if( HPMHooks.count.HP_mob_readdb_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_readdb_post[hIndex].func; + postHookFunc(); } } return; } -struct block_list* HP_mapit_first(struct s_mapiterator *iter) { +int HP_mob_read_sqldb(void) { int hIndex = 0; - struct block_list* retVal___ = NULL; - if( HPMHooks.count.HP_mapit_first_pre ) { - struct block_list* (*preHookFunc) (struct s_mapiterator *iter); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_read_sqldb_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_first_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapit_first_pre[hIndex].func; - retVal___ = preHookFunc(iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqldb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_read_sqldb_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39365,53 +45807,52 @@ struct block_list* HP_mapit_first(struct s_mapiterator *iter) { } } { - retVal___ = HPMHooks.source.mapit.first(iter); + retVal___ = HPMHooks.source.mob.read_sqldb(); } - if( HPMHooks.count.HP_mapit_first_post ) { - struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_first_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapit_first_post[hIndex].func; - retVal___ = postHookFunc(retVal___, iter); + if( HPMHooks.count.HP_mob_read_sqldb_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqldb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_read_sqldb_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -struct block_list* HP_mapit_last(struct s_mapiterator *iter) { +void HP_mob_name_constants(void) { int hIndex = 0; - struct block_list* retVal___ = NULL; - if( HPMHooks.count.HP_mapit_last_pre ) { - struct block_list* (*preHookFunc) (struct s_mapiterator *iter); + if( HPMHooks.count.HP_mob_name_constants_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_last_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapit_last_pre[hIndex].func; - retVal___ = preHookFunc(iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_name_constants_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_name_constants_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapit.last(iter); + HPMHooks.source.mob.name_constants(); } - if( HPMHooks.count.HP_mapit_last_post ) { - struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_last_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapit_last_post[hIndex].func; - retVal___ = postHookFunc(retVal___, iter); + if( HPMHooks.count.HP_mob_name_constants_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_name_constants_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_name_constants_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -struct block_list* HP_mapit_next(struct s_mapiterator *iter) { +bool HP_mob_readdb_mobavail(char *str[], int columns, int current) { int hIndex = 0; - struct block_list* retVal___ = NULL; - if( HPMHooks.count.HP_mapit_next_pre ) { - struct block_list* (*preHookFunc) (struct s_mapiterator *iter); + bool retVal___ = false; + if( HPMHooks.count.HP_mob_readdb_mobavail_pre ) { + bool (*preHookFunc) (char *str[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_next_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapit_next_pre[hIndex].func; - retVal___ = preHookFunc(iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_mobavail_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_readdb_mobavail_pre[hIndex].func; + retVal___ = preHookFunc(str, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39419,26 +45860,26 @@ struct block_list* HP_mapit_next(struct s_mapiterator *iter) { } } { - retVal___ = HPMHooks.source.mapit.next(iter); + retVal___ = HPMHooks.source.mob.readdb_mobavail(str, columns, current); } - if( HPMHooks.count.HP_mapit_next_post ) { - struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_next_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapit_next_post[hIndex].func; - retVal___ = postHookFunc(retVal___, iter); + if( HPMHooks.count.HP_mob_readdb_mobavail_post ) { + bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_mobavail_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_readdb_mobavail_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &columns, ¤t); } } return retVal___; } -struct block_list* HP_mapit_prev(struct s_mapiterator *iter) { +int HP_mob_read_randommonster(void) { int hIndex = 0; - struct block_list* retVal___ = NULL; - if( HPMHooks.count.HP_mapit_prev_pre ) { - struct block_list* (*preHookFunc) (struct s_mapiterator *iter); + int retVal___ = 0; + if( HPMHooks.count.HP_mob_read_randommonster_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_prev_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapit_prev_pre[hIndex].func; - retVal___ = preHookFunc(iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_randommonster_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_read_randommonster_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39446,26 +45887,26 @@ struct block_list* HP_mapit_prev(struct s_mapiterator *iter) { } } { - retVal___ = HPMHooks.source.mapit.prev(iter); + retVal___ = HPMHooks.source.mob.read_randommonster(); } - if( HPMHooks.count.HP_mapit_prev_post ) { - struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_prev_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapit_prev_post[hIndex].func; - retVal___ = postHookFunc(retVal___, iter); + if( HPMHooks.count.HP_mob_read_randommonster_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_randommonster_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_read_randommonster_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -bool HP_mapit_exists(struct s_mapiterator *iter) { +bool HP_mob_parse_row_chatdb(char **str, const char *source, int line, int *last_msg_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapit_exists_pre ) { - bool (*preHookFunc) (struct s_mapiterator *iter); + if( HPMHooks.count.HP_mob_parse_row_chatdb_pre ) { + bool (*preHookFunc) (char **str, const char *source, int *line, int *last_msg_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_exists_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapit_exists_pre[hIndex].func; - retVal___ = preHookFunc(iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_chatdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_parse_row_chatdb_pre[hIndex].func; + retVal___ = preHookFunc(str, source, &line, last_msg_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39473,25 +45914,24 @@ bool HP_mapit_exists(struct s_mapiterator *iter) { } } { - retVal___ = HPMHooks.source.mapit.exists(iter); + retVal___ = HPMHooks.source.mob.parse_row_chatdb(str, source, line, last_msg_id); } - if( HPMHooks.count.HP_mapit_exists_post ) { - bool (*postHookFunc) (bool retVal___, struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_exists_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapit_exists_post[hIndex].func; - retVal___ = postHookFunc(retVal___, iter); + if( HPMHooks.count.HP_mob_parse_row_chatdb_post ) { + bool (*postHookFunc) (bool retVal___, char **str, const char *source, int *line, int *last_msg_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_chatdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_parse_row_chatdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, source, &line, last_msg_id); } } return retVal___; } -/* mapreg */ -void HP_mapreg_init(void) { +void HP_mob_readchatdb(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapreg_init_pre ) { + if( HPMHooks.count.HP_mob_readchatdb_pre ) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapreg_init_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readchatdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_readchatdb_pre[hIndex].func; preHookFunc(); } if( *HPMforce_return ) { @@ -39500,24 +45940,51 @@ void HP_mapreg_init(void) { } } { - HPMHooks.source.mapreg.init(); + HPMHooks.source.mob.readchatdb(); } - if( HPMHooks.count.HP_mapreg_init_post ) { + if( HPMHooks.count.HP_mob_readchatdb_post ) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapreg_init_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readchatdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_readchatdb_post[hIndex].func; postHookFunc(); } } - return; + return; +} +bool HP_mob_parse_row_mobskilldb(char **str, int columns, int current) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_mob_parse_row_mobskilldb_pre ) { + bool (*preHookFunc) (char **str, int *columns, int *current); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_mobskilldb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_parse_row_mobskilldb_pre[hIndex].func; + retVal___ = preHookFunc(str, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.parse_row_mobskilldb(str, columns, current); + } + if( HPMHooks.count.HP_mob_parse_row_mobskilldb_post ) { + bool (*postHookFunc) (bool retVal___, char **str, int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_mobskilldb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_parse_row_mobskilldb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &columns, ¤t); + } + } + return retVal___; } -void HP_mapreg_final(void) { +void HP_mob_readskilldb(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapreg_final_pre ) { + if( HPMHooks.count.HP_mob_readskilldb_pre ) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapreg_final_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_readskilldb_pre[hIndex].func; preHookFunc(); } if( *HPMforce_return ) { @@ -39526,26 +45993,26 @@ void HP_mapreg_final(void) { } } { - HPMHooks.source.mapreg.final(); + HPMHooks.source.mob.readskilldb(); } - if( HPMHooks.count.HP_mapreg_final_post ) { + if( HPMHooks.count.HP_mob_readskilldb_post ) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapreg_final_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_readskilldb_post[hIndex].func; postHookFunc(); } } return; } -int HP_mapreg_readreg(int64 uid) { +int HP_mob_read_sqlskilldb(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapreg_readreg_pre ) { - int (*preHookFunc) (int64 *uid); + if( HPMHooks.count.HP_mob_read_sqlskilldb_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readreg_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapreg_readreg_pre[hIndex].func; - retVal___ = preHookFunc(&uid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqlskilldb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_read_sqlskilldb_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39553,26 +46020,26 @@ int HP_mapreg_readreg(int64 uid) { } } { - retVal___ = HPMHooks.source.mapreg.readreg(uid); + retVal___ = HPMHooks.source.mob.read_sqlskilldb(); } - if( HPMHooks.count.HP_mapreg_readreg_post ) { - int (*postHookFunc) (int retVal___, int64 *uid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readreg_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapreg_readreg_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &uid); + if( HPMHooks.count.HP_mob_read_sqlskilldb_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqlskilldb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_read_sqlskilldb_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -char* HP_mapreg_readregstr(int64 uid) { +bool HP_mob_readdb_race2(char *fields[], int columns, int current) { int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_mapreg_readregstr_pre ) { - char* (*preHookFunc) (int64 *uid); + bool retVal___ = false; + if( HPMHooks.count.HP_mob_readdb_race2_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readregstr_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapreg_readregstr_pre[hIndex].func; - retVal___ = preHookFunc(&uid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_race2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_readdb_race2_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39580,26 +46047,26 @@ char* HP_mapreg_readregstr(int64 uid) { } } { - retVal___ = HPMHooks.source.mapreg.readregstr(uid); + retVal___ = HPMHooks.source.mob.readdb_race2(fields, columns, current); } - if( HPMHooks.count.HP_mapreg_readregstr_post ) { - char* (*postHookFunc) (char* retVal___, int64 *uid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readregstr_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapreg_readregstr_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &uid); + if( HPMHooks.count.HP_mob_readdb_race2_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_race2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_readdb_race2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); } } return retVal___; } -bool HP_mapreg_setreg(int64 uid, int val) { +bool HP_mob_readdb_itemratio(char *str[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapreg_setreg_pre ) { - bool (*preHookFunc) (int64 *uid, int *val); + if( HPMHooks.count.HP_mob_readdb_itemratio_pre ) { + bool (*preHookFunc) (char *str[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setreg_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapreg_setreg_pre[hIndex].func; - retVal___ = preHookFunc(&uid, &val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_itemratio_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_readdb_itemratio_pre[hIndex].func; + retVal___ = preHookFunc(str, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39607,51 +46074,50 @@ bool HP_mapreg_setreg(int64 uid, int val) { } } { - retVal___ = HPMHooks.source.mapreg.setreg(uid, val); + retVal___ = HPMHooks.source.mob.readdb_itemratio(str, columns, current); } - if( HPMHooks.count.HP_mapreg_setreg_post ) { - bool (*postHookFunc) (bool retVal___, int64 *uid, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setreg_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapreg_setreg_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &uid, &val); + if( HPMHooks.count.HP_mob_readdb_itemratio_post ) { + bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_itemratio_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_readdb_itemratio_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &columns, ¤t); } } return retVal___; } -bool HP_mapreg_setregstr(int64 uid, const char *str) { +void HP_mob_load(bool minimal) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapreg_setregstr_pre ) { - bool (*preHookFunc) (int64 *uid, const char *str); + if( HPMHooks.count.HP_mob_load_pre ) { + void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setregstr_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapreg_setregstr_pre[hIndex].func; - retVal___ = preHookFunc(&uid, str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_load_pre[hIndex].func; + preHookFunc(&minimal); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapreg.setregstr(uid, str); + HPMHooks.source.mob.load(minimal); } - if( HPMHooks.count.HP_mapreg_setregstr_post ) { - bool (*postHookFunc) (bool retVal___, int64 *uid, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setregstr_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapreg_setregstr_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &uid, str); + if( HPMHooks.count.HP_mob_load_post ) { + void (*postHookFunc) (bool *minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_load_post[hIndex].func; + postHookFunc(&minimal); } } - return retVal___; + return; } -void HP_mapreg_load(void) { +void HP_mob_clear_spawninfo(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapreg_load_pre ) { + if( HPMHooks.count.HP_mob_clear_spawninfo_pre ) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapreg_load_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clear_spawninfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_clear_spawninfo_pre[hIndex].func; preHookFunc(); } if( *HPMforce_return ) { @@ -39660,25 +46126,25 @@ void HP_mapreg_load(void) { } } { - HPMHooks.source.mapreg.load(); + HPMHooks.source.mob.clear_spawninfo(); } - if( HPMHooks.count.HP_mapreg_load_post ) { + if( HPMHooks.count.HP_mob_clear_spawninfo_post ) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapreg_load_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clear_spawninfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_clear_spawninfo_post[hIndex].func; postHookFunc(); } } return; } -void HP_mapreg_save(void) { +void HP_mob_destroy_mob_db(int index) { int hIndex = 0; - if( HPMHooks.count.HP_mapreg_save_pre ) { - void (*preHookFunc) (void); + if( HPMHooks.count.HP_mob_destroy_mob_db_pre ) { + void (*preHookFunc) (int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapreg_save_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_mob_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_destroy_mob_db_pre[hIndex].func; + preHookFunc(&index); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39686,26 +46152,27 @@ void HP_mapreg_save(void) { } } { - HPMHooks.source.mapreg.save(); + HPMHooks.source.mob.destroy_mob_db(index); } - if( HPMHooks.count.HP_mapreg_save_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapreg_save_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_mob_destroy_mob_db_post ) { + void (*postHookFunc) (int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_mob_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_destroy_mob_db_post[hIndex].func; + postHookFunc(&index); } } return; } -int HP_mapreg_save_timer(int tid, int64 tick, int id, intptr_t data) { +/* npc */ +int HP_npc_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapreg_save_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_npc_init_pre ) { + int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapreg_save_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_init_pre[hIndex].func; + retVal___ = preHookFunc(&minimal); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39713,28 +46180,26 @@ int HP_mapreg_save_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.mapreg.save_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.npc.init(minimal); } - if( HPMHooks.count.HP_mapreg_save_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapreg_save_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_npc_init_post ) { + int (*postHookFunc) (int retVal___, bool *minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &minimal); } } return retVal___; } -int HP_mapreg_destroyreg(DBKey key, DBData *data, va_list ap) { +int HP_npc_final(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapreg_destroyreg_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + if( HPMHooks.count.HP_npc_final_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_destroyreg_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_mapreg_destroyreg_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_final_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39742,56 +46207,53 @@ int HP_mapreg_destroyreg(DBKey key, DBData *data, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.mapreg.destroyreg(key, data, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.npc.final(); } - if( HPMHooks.count.HP_mapreg_destroyreg_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_destroyreg_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_mapreg_destroyreg_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_npc_final_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -void HP_mapreg_reload(void) { +int HP_npc_get_new_npc_id(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapreg_reload_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_npc_get_new_npc_id_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_reload_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapreg_reload_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_new_npc_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_get_new_npc_id_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapreg.reload(); + retVal___ = HPMHooks.source.npc.get_new_npc_id(); } - if( HPMHooks.count.HP_mapreg_reload_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_reload_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapreg_reload_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_npc_get_new_npc_id_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_new_npc_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_get_new_npc_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -bool HP_mapreg_config_read(const char *w1, const char *w2) { +struct view_data* HP_npc_get_viewdata(int class_) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapreg_config_read_pre ) { - bool (*preHookFunc) (const char *w1, const char *w2); + struct view_data* retVal___ = NULL; + if( HPMHooks.count.HP_npc_get_viewdata_pre ) { + struct view_data* (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapreg_config_read_pre[hIndex].func; - retVal___ = preHookFunc(w1, w2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_viewdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_get_viewdata_pre[hIndex].func; + retVal___ = preHookFunc(&class_); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39799,53 +46261,59 @@ bool HP_mapreg_config_read(const char *w1, const char *w2) { } } { - retVal___ = HPMHooks.source.mapreg.config_read(w1, w2); + retVal___ = HPMHooks.source.npc.get_viewdata(class_); } - if( HPMHooks.count.HP_mapreg_config_read_post ) { - bool (*postHookFunc) (bool retVal___, const char *w1, const char *w2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapreg_config_read_post[hIndex].func; - retVal___ = postHookFunc(retVal___, w1, w2); + if( HPMHooks.count.HP_npc_get_viewdata_post ) { + struct view_data* (*postHookFunc) (struct view_data* retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_viewdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_get_viewdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); } } return retVal___; } -/* mercenary */ -void HP_mercenary_init(bool minimal) { +int HP_npc_isnear_sub(struct block_list *bl, va_list args) { int hIndex = 0; - if( HPMHooks.count.HP_mercenary_init_pre ) { - void (*preHookFunc) (bool *minimal); + int retVal___ = 0; + if( HPMHooks.count.HP_npc_isnear_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_init_pre[hIndex].func; - preHookFunc(&minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_sub_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_npc_isnear_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, args___copy); + va_end(args___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mercenary.init(minimal); + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.npc.isnear_sub(bl, args___copy); + va_end(args___copy); } - if( HPMHooks.count.HP_mercenary_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_init_post[hIndex].func; - postHookFunc(&minimal); + if( HPMHooks.count.HP_npc_isnear_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_sub_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_npc_isnear_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, args___copy); + va_end(args___copy); } } - return; + return retVal___; } -bool HP_mercenary_class(int class_) { +bool HP_npc_isnear(struct block_list *bl) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mercenary_class_pre ) { - bool (*preHookFunc) (int *class_); + if( HPMHooks.count.HP_npc_isnear_pre ) { + bool (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_class_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_class_pre[hIndex].func; - retVal___ = preHookFunc(&class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_isnear_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39853,26 +46321,26 @@ bool HP_mercenary_class(int class_) { } } { - retVal___ = HPMHooks.source.mercenary.class(class_); + retVal___ = HPMHooks.source.npc.isnear(bl); } - if( HPMHooks.count.HP_mercenary_class_post ) { - bool (*postHookFunc) (bool retVal___, int *class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_class_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_class_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &class_); + if( HPMHooks.count.HP_npc_isnear_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_isnear_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -struct view_data* HP_mercenary_get_viewdata(int class_) { +int HP_npc_ontouch_event(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; - struct view_data* retVal___ = NULL; - if( HPMHooks.count.HP_mercenary_get_viewdata_pre ) { - struct view_data* (*preHookFunc) (int *class_); + int retVal___ = 0; + if( HPMHooks.count.HP_npc_ontouch_event_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_viewdata_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_get_viewdata_pre[hIndex].func; - retVal___ = preHookFunc(&class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_ontouch_event_pre[hIndex].func; + retVal___ = preHookFunc(sd, nd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39880,26 +46348,26 @@ struct view_data* HP_mercenary_get_viewdata(int class_) { } } { - retVal___ = HPMHooks.source.mercenary.get_viewdata(class_); + retVal___ = HPMHooks.source.npc.ontouch_event(sd, nd); } - if( HPMHooks.count.HP_mercenary_get_viewdata_post ) { - struct view_data* (*postHookFunc) (struct view_data* retVal___, int *class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_viewdata_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_get_viewdata_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &class_); + if( HPMHooks.count.HP_npc_ontouch_event_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_ontouch_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, nd); } } return retVal___; } -int HP_mercenary_create(struct map_session_data *sd, int class_, unsigned int lifetime) { +int HP_npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_create_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *class_, unsigned int *lifetime); + if( HPMHooks.count.HP_npc_ontouch2_event_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_create_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_create_pre[hIndex].func; - retVal___ = preHookFunc(sd, &class_, &lifetime); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch2_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_ontouch2_event_pre[hIndex].func; + retVal___ = preHookFunc(sd, nd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39907,26 +46375,26 @@ int HP_mercenary_create(struct map_session_data *sd, int class_, unsigned int li } } { - retVal___ = HPMHooks.source.mercenary.create(sd, class_, lifetime); + retVal___ = HPMHooks.source.npc.ontouch2_event(sd, nd); } - if( HPMHooks.count.HP_mercenary_create_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *class_, unsigned int *lifetime); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_create_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_create_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &class_, &lifetime); + if( HPMHooks.count.HP_npc_ontouch2_event_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch2_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_ontouch2_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, nd); } } return retVal___; } -int HP_mercenary_data_received(struct s_mercenary *merc, bool flag) { +int HP_npc_onuntouch_event(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_data_received_pre ) { - int (*preHookFunc) (struct s_mercenary *merc, bool *flag); + if( HPMHooks.count.HP_npc_onuntouch_event_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_data_received_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_data_received_pre[hIndex].func; - retVal___ = preHookFunc(merc, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_onuntouch_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_onuntouch_event_pre[hIndex].func; + retVal___ = preHookFunc(sd, nd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39934,26 +46402,28 @@ int HP_mercenary_data_received(struct s_mercenary *merc, bool flag) { } } { - retVal___ = HPMHooks.source.mercenary.data_received(merc, flag); + retVal___ = HPMHooks.source.npc.onuntouch_event(sd, nd); } - if( HPMHooks.count.HP_mercenary_data_received_post ) { - int (*postHookFunc) (int retVal___, struct s_mercenary *merc, bool *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_data_received_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_data_received_post[hIndex].func; - retVal___ = postHookFunc(retVal___, merc, &flag); + if( HPMHooks.count.HP_npc_onuntouch_event_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_onuntouch_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_onuntouch_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, nd); } } return retVal___; } -int HP_mercenary_save(struct mercenary_data *md) { +int HP_npc_enable_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_save_pre ) { - int (*preHookFunc) (struct mercenary_data *md); + if( HPMHooks.count.HP_npc_enable_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_save_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_save_pre[hIndex].func; - retVal___ = preHookFunc(md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_npc_enable_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -39961,52 +46431,57 @@ int HP_mercenary_save(struct mercenary_data *md) { } } { - retVal___ = HPMHooks.source.mercenary.save(md); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.npc.enable_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_mercenary_save_post ) { - int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_save_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_save_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md); + if( HPMHooks.count.HP_npc_enable_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_npc_enable_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -void HP_mercenary_heal(struct mercenary_data *md, int hp, int sp) { +int HP_npc_enable(const char *name, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_mercenary_heal_pre ) { - void (*preHookFunc) (struct mercenary_data *md, int *hp, int *sp); + int retVal___ = 0; + if( HPMHooks.count.HP_npc_enable_pre ) { + int (*preHookFunc) (const char *name, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_heal_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_heal_pre[hIndex].func; - preHookFunc(md, &hp, &sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_enable_pre[hIndex].func; + retVal___ = preHookFunc(name, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mercenary.heal(md, hp, sp); + retVal___ = HPMHooks.source.npc.enable(name, flag); } - if( HPMHooks.count.HP_mercenary_heal_post ) { - void (*postHookFunc) (struct mercenary_data *md, int *hp, int *sp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_heal_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_heal_post[hIndex].func; - postHookFunc(md, &hp, &sp); + if( HPMHooks.count.HP_npc_enable_post ) { + int (*postHookFunc) (int retVal___, const char *name, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_enable_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, &flag); } } - return; + return retVal___; } -int HP_mercenary_dead(struct mercenary_data *md) { +struct npc_data* HP_npc_name2id(const char *name) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_dead_pre ) { - int (*preHookFunc) (struct mercenary_data *md); + struct npc_data* retVal___ = NULL; + if( HPMHooks.count.HP_npc_name2id_pre ) { + struct npc_data* (*preHookFunc) (const char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_dead_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_dead_pre[hIndex].func; - retVal___ = preHookFunc(md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_name2id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_name2id_pre[hIndex].func; + retVal___ = preHookFunc(name); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40014,79 +46489,87 @@ int HP_mercenary_dead(struct mercenary_data *md) { } } { - retVal___ = HPMHooks.source.mercenary.dead(md); + retVal___ = HPMHooks.source.npc.name2id(name); } - if( HPMHooks.count.HP_mercenary_dead_post ) { - int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_dead_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_dead_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md); + if( HPMHooks.count.HP_npc_name2id_post ) { + struct npc_data* (*postHookFunc) (struct npc_data* retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_name2id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_name2id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); } } return retVal___; } -int HP_mercenary_delete(struct mercenary_data *md, int reply) { +int HP_npc_event_dequeue(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_delete_pre ) { - int (*preHookFunc) (struct mercenary_data *md, int *reply); + if( HPMHooks.count.HP_npc_event_dequeue_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_delete_pre[hIndex].func; - retVal___ = preHookFunc(md, &reply); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_dequeue_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_dequeue_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; return retVal___; } - } - { - retVal___ = HPMHooks.source.mercenary.delete(md, reply); - } - if( HPMHooks.count.HP_mercenary_delete_post ) { - int (*postHookFunc) (int retVal___, struct mercenary_data *md, int *reply); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &reply); + } + { + retVal___ = HPMHooks.source.npc.event_dequeue(sd); + } + if( HPMHooks.count.HP_npc_event_dequeue_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_dequeue_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_dequeue_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -void HP_mercenary_contract_stop(struct mercenary_data *md) { +DBData HP_npc_event_export_create(DBKey key, va_list args) { int hIndex = 0; - if( HPMHooks.count.HP_mercenary_contract_stop_pre ) { - void (*preHookFunc) (struct mercenary_data *md); + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_npc_event_export_create_pre ) { + DBData (*preHookFunc) (DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_stop_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_contract_stop_pre[hIndex].func; - preHookFunc(md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_create_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_npc_event_export_create_pre[hIndex].func; + retVal___ = preHookFunc(&key, args___copy); + va_end(args___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mercenary.contract_stop(md); + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.npc.event_export_create(key, args___copy); + va_end(args___copy); } - if( HPMHooks.count.HP_mercenary_contract_stop_post ) { - void (*postHookFunc) (struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_stop_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_contract_stop_post[hIndex].func; - postHookFunc(md); + if( HPMHooks.count.HP_npc_event_export_create_post ) { + DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_create_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_npc_event_export_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, args___copy); + va_end(args___copy); } } - return; + return retVal___; } -int HP_mercenary_get_lifetime(struct mercenary_data *md) { +int HP_npc_event_export(struct npc_data *nd, int i) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_get_lifetime_pre ) { - int (*preHookFunc) (struct mercenary_data *md); + if( HPMHooks.count.HP_npc_event_export_pre ) { + int (*preHookFunc) (struct npc_data *nd, int *i); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_lifetime_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_get_lifetime_pre[hIndex].func; - retVal___ = preHookFunc(md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_export_pre[hIndex].func; + retVal___ = preHookFunc(nd, &i); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40094,26 +46577,26 @@ int HP_mercenary_get_lifetime(struct mercenary_data *md) { } } { - retVal___ = HPMHooks.source.mercenary.get_lifetime(md); + retVal___ = HPMHooks.source.npc.event_export(nd, i); } - if( HPMHooks.count.HP_mercenary_get_lifetime_post ) { - int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_lifetime_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_get_lifetime_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md); + if( HPMHooks.count.HP_npc_event_export_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, int *i); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_export_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, &i); } } return retVal___; } -int HP_mercenary_get_guild(struct mercenary_data *md) { +int HP_npc_event_sub(struct map_session_data *sd, struct event_data *ev, const char *eventname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_get_guild_pre ) { - int (*preHookFunc) (struct mercenary_data *md); + if( HPMHooks.count.HP_npc_event_sub_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct event_data *ev, const char *eventname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_guild_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_get_guild_pre[hIndex].func; - retVal___ = preHookFunc(md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_sub_pre[hIndex].func; + retVal___ = preHookFunc(sd, ev, eventname); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40121,53 +46604,58 @@ int HP_mercenary_get_guild(struct mercenary_data *md) { } } { - retVal___ = HPMHooks.source.mercenary.get_guild(md); + retVal___ = HPMHooks.source.npc.event_sub(sd, ev, eventname); } - if( HPMHooks.count.HP_mercenary_get_guild_post ) { - int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_guild_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_get_guild_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md); + if( HPMHooks.count.HP_npc_event_sub_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct event_data *ev, const char *eventname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ev, eventname); } } return retVal___; } -int HP_mercenary_get_faith(struct mercenary_data *md) { +void HP_npc_event_doall_sub(void *key, void *data, va_list ap) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_get_faith_pre ) { - int (*preHookFunc) (struct mercenary_data *md); + if( HPMHooks.count.HP_npc_event_doall_sub_pre ) { + void (*preHookFunc) (void *key, void *data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_faith_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_get_faith_pre[hIndex].func; - retVal___ = preHookFunc(md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_npc_event_doall_sub_pre[hIndex].func; + preHookFunc(key, data, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mercenary.get_faith(md); + va_list ap___copy; va_copy(ap___copy, ap); + HPMHooks.source.npc.event_doall_sub(key, data, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_mercenary_get_faith_post ) { - int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_faith_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_get_faith_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md); + if( HPMHooks.count.HP_npc_event_doall_sub_post ) { + void (*postHookFunc) (void *key, void *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_npc_event_doall_sub_post[hIndex].func; + postHookFunc(key, data, ap___copy); + va_end(ap___copy); } } - return retVal___; + return; } -int HP_mercenary_set_faith(struct mercenary_data *md, int value) { +int HP_npc_event_do(const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_set_faith_pre ) { - int (*preHookFunc) (struct mercenary_data *md, int *value); + if( HPMHooks.count.HP_npc_event_do_pre ) { + int (*preHookFunc) (const char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_faith_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_set_faith_pre[hIndex].func; - retVal___ = preHookFunc(md, &value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_do_pre[hIndex].func; + retVal___ = preHookFunc(name); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40175,26 +46663,26 @@ int HP_mercenary_set_faith(struct mercenary_data *md, int value) { } } { - retVal___ = HPMHooks.source.mercenary.set_faith(md, value); + retVal___ = HPMHooks.source.npc.event_do(name); } - if( HPMHooks.count.HP_mercenary_set_faith_post ) { - int (*postHookFunc) (int retVal___, struct mercenary_data *md, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_faith_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_set_faith_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &value); + if( HPMHooks.count.HP_npc_event_do_post ) { + int (*postHookFunc) (int retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_do_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); } } return retVal___; } -int HP_mercenary_get_calls(struct mercenary_data *md) { +int HP_npc_event_doall_id(const char *name, int rid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_get_calls_pre ) { - int (*preHookFunc) (struct mercenary_data *md); + if( HPMHooks.count.HP_npc_event_doall_id_pre ) { + int (*preHookFunc) (const char *name, int *rid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_calls_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_get_calls_pre[hIndex].func; - retVal___ = preHookFunc(md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_doall_id_pre[hIndex].func; + retVal___ = preHookFunc(name, &rid); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40202,26 +46690,26 @@ int HP_mercenary_get_calls(struct mercenary_data *md) { } } { - retVal___ = HPMHooks.source.mercenary.get_calls(md); + retVal___ = HPMHooks.source.npc.event_doall_id(name, rid); } - if( HPMHooks.count.HP_mercenary_get_calls_post ) { - int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_calls_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_get_calls_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md); + if( HPMHooks.count.HP_npc_event_doall_id_post ) { + int (*postHookFunc) (int retVal___, const char *name, int *rid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_doall_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, &rid); } } return retVal___; } -int HP_mercenary_set_calls(struct mercenary_data *md, int value) { +int HP_npc_event_doall(const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_set_calls_pre ) { - int (*preHookFunc) (struct mercenary_data *md, int *value); + if( HPMHooks.count.HP_npc_event_doall_pre ) { + int (*preHookFunc) (const char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_calls_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_set_calls_pre[hIndex].func; - retVal___ = preHookFunc(md, &value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_doall_pre[hIndex].func; + retVal___ = preHookFunc(name); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40229,26 +46717,26 @@ int HP_mercenary_set_calls(struct mercenary_data *md, int value) { } } { - retVal___ = HPMHooks.source.mercenary.set_calls(md, value); + retVal___ = HPMHooks.source.npc.event_doall(name); } - if( HPMHooks.count.HP_mercenary_set_calls_post ) { - int (*postHookFunc) (int retVal___, struct mercenary_data *md, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_calls_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_set_calls_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &value); + if( HPMHooks.count.HP_npc_event_doall_post ) { + int (*postHookFunc) (int retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_doall_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); } } return retVal___; } -int HP_mercenary_kills(struct mercenary_data *md) { +int HP_npc_event_do_clock(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_kills_pre ) { - int (*preHookFunc) (struct mercenary_data *md); + if( HPMHooks.count.HP_npc_event_do_clock_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_kills_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_kills_pre[hIndex].func; - retVal___ = preHookFunc(md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_clock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_do_clock_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40256,53 +46744,52 @@ int HP_mercenary_kills(struct mercenary_data *md) { } } { - retVal___ = HPMHooks.source.mercenary.kills(md); + retVal___ = HPMHooks.source.npc.event_do_clock(tid, tick, id, data); } - if( HPMHooks.count.HP_mercenary_kills_post ) { - int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_kills_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_kills_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md); + if( HPMHooks.count.HP_npc_event_do_clock_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_clock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_do_clock_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_mercenary_checkskill(struct mercenary_data *md, uint16 skill_id) { +void HP_npc_event_do_oninit(bool reload) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_checkskill_pre ) { - int (*preHookFunc) (struct mercenary_data *md, uint16 *skill_id); + if( HPMHooks.count.HP_npc_event_do_oninit_pre ) { + void (*preHookFunc) (bool *reload); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_checkskill_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_checkskill_pre[hIndex].func; - retVal___ = preHookFunc(md, &skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_oninit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_do_oninit_pre[hIndex].func; + preHookFunc(&reload); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mercenary.checkskill(md, skill_id); + HPMHooks.source.npc.event_do_oninit(reload); } - if( HPMHooks.count.HP_mercenary_checkskill_post ) { - int (*postHookFunc) (int retVal___, struct mercenary_data *md, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_checkskill_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_checkskill_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &skill_id); + if( HPMHooks.count.HP_npc_event_do_oninit_post ) { + void (*postHookFunc) (bool *reload); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_oninit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_do_oninit_post[hIndex].func; + postHookFunc(&reload); } } - return retVal___; + return; } -int HP_mercenary_read_db(void) { +int HP_npc_timerevent_export(struct npc_data *nd, int i) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_read_db_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_npc_timerevent_export_pre ) { + int (*preHookFunc) (struct npc_data *nd, int *i); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_read_db_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_export_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_timerevent_export_pre[hIndex].func; + retVal___ = preHookFunc(nd, &i); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40310,26 +46797,26 @@ int HP_mercenary_read_db(void) { } } { - retVal___ = HPMHooks.source.mercenary.read_db(); + retVal___ = HPMHooks.source.npc.timerevent_export(nd, i); } - if( HPMHooks.count.HP_mercenary_read_db_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_read_db_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_npc_timerevent_export_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, int *i); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_export_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_timerevent_export_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, &i); } } return retVal___; } -int HP_mercenary_read_skilldb(void) { +int HP_npc_timerevent(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_read_skilldb_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_npc_timerevent_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skilldb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_read_skilldb_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_timerevent_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40337,26 +46824,26 @@ int HP_mercenary_read_skilldb(void) { } } { - retVal___ = HPMHooks.source.mercenary.read_skilldb(); + retVal___ = HPMHooks.source.npc.timerevent(tid, tick, id, data); } - if( HPMHooks.count.HP_mercenary_read_skilldb_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skilldb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_read_skilldb_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_npc_timerevent_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_timerevent_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_mercenary_killbonus(struct mercenary_data *md) { +int HP_npc_timerevent_start(struct npc_data *nd, int rid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_killbonus_pre ) { - int (*preHookFunc) (struct mercenary_data *md); + if( HPMHooks.count.HP_npc_timerevent_start_pre ) { + int (*preHookFunc) (struct npc_data *nd, int *rid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_killbonus_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_killbonus_pre[hIndex].func; - retVal___ = preHookFunc(md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_start_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_timerevent_start_pre[hIndex].func; + retVal___ = preHookFunc(nd, &rid); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40364,26 +46851,26 @@ int HP_mercenary_killbonus(struct mercenary_data *md) { } } { - retVal___ = HPMHooks.source.mercenary.killbonus(md); + retVal___ = HPMHooks.source.npc.timerevent_start(nd, rid); } - if( HPMHooks.count.HP_mercenary_killbonus_post ) { - int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_killbonus_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_killbonus_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md); + if( HPMHooks.count.HP_npc_timerevent_start_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, int *rid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_start_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_timerevent_start_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, &rid); } } return retVal___; } -int HP_mercenary_search_index(int class_) { +int HP_npc_timerevent_stop(struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_search_index_pre ) { - int (*preHookFunc) (int *class_); + if( HPMHooks.count.HP_npc_timerevent_stop_pre ) { + int (*preHookFunc) (struct npc_data *nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_search_index_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_search_index_pre[hIndex].func; - retVal___ = preHookFunc(&class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_stop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_timerevent_stop_pre[hIndex].func; + retVal___ = preHookFunc(nd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40391,53 +46878,52 @@ int HP_mercenary_search_index(int class_) { } } { - retVal___ = HPMHooks.source.mercenary.search_index(class_); + retVal___ = HPMHooks.source.npc.timerevent_stop(nd); } - if( HPMHooks.count.HP_mercenary_search_index_post ) { - int (*postHookFunc) (int retVal___, int *class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_search_index_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_search_index_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &class_); + if( HPMHooks.count.HP_npc_timerevent_stop_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_stop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_timerevent_stop_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd); } } return retVal___; } -int HP_mercenary_contract_end_timer(int tid, int64 tick, int id, intptr_t data) { +void HP_npc_timerevent_quit(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_contract_end_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_npc_timerevent_quit_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_end_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_contract_end_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_quit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_timerevent_quit_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mercenary.contract_end_timer(tid, tick, id, data); + HPMHooks.source.npc.timerevent_quit(sd); } - if( HPMHooks.count.HP_mercenary_contract_end_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_end_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_contract_end_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_npc_timerevent_quit_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_quit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_timerevent_quit_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -bool HP_mercenary_read_db_sub(char *str[], int columns, int current) { +int64 HP_npc_gettimerevent_tick(struct npc_data *nd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mercenary_read_db_sub_pre ) { - bool (*preHookFunc) (char *str[], int *columns, int *current); + int64 retVal___ = 0; + if( HPMHooks.count.HP_npc_gettimerevent_tick_pre ) { + int64 (*preHookFunc) (struct npc_data *nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_read_db_sub_pre[hIndex].func; - retVal___ = preHookFunc(str, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_gettimerevent_tick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_gettimerevent_tick_pre[hIndex].func; + retVal___ = preHookFunc(nd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40445,26 +46931,26 @@ bool HP_mercenary_read_db_sub(char *str[], int columns, int current) { } } { - retVal___ = HPMHooks.source.mercenary.read_db_sub(str, columns, current); + retVal___ = HPMHooks.source.npc.gettimerevent_tick(nd); } - if( HPMHooks.count.HP_mercenary_read_db_sub_post ) { - bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_read_db_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, &columns, ¤t); + if( HPMHooks.count.HP_npc_gettimerevent_tick_post ) { + int64 (*postHookFunc) (int64 retVal___, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_gettimerevent_tick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_gettimerevent_tick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd); } } return retVal___; } -bool HP_mercenary_read_skill_db_sub(char *str[], int columns, int current) { +int HP_npc_settimerevent_tick(struct npc_data *nd, int newtimer) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mercenary_read_skill_db_sub_pre ) { - bool (*preHookFunc) (char *str[], int *columns, int *current); + int retVal___ = 0; + if( HPMHooks.count.HP_npc_settimerevent_tick_pre ) { + int (*preHookFunc) (struct npc_data *nd, int *newtimer); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skill_db_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mercenary_read_skill_db_sub_pre[hIndex].func; - retVal___ = preHookFunc(str, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_settimerevent_tick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_settimerevent_tick_pre[hIndex].func; + retVal___ = preHookFunc(nd, &newtimer); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40472,27 +46958,26 @@ bool HP_mercenary_read_skill_db_sub(char *str[], int columns, int current) { } } { - retVal___ = HPMHooks.source.mercenary.read_skill_db_sub(str, columns, current); + retVal___ = HPMHooks.source.npc.settimerevent_tick(nd, newtimer); } - if( HPMHooks.count.HP_mercenary_read_skill_db_sub_post ) { - bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skill_db_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mercenary_read_skill_db_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, &columns, ¤t); + if( HPMHooks.count.HP_npc_settimerevent_tick_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, int *newtimer); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_settimerevent_tick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_settimerevent_tick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, &newtimer); } } return retVal___; } -/* mob */ -int HP_mob_init(bool mimimal) { +int HP_npc_event(struct map_session_data *sd, const char *eventname, int ontouch) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_init_pre ) { - int (*preHookFunc) (bool *mimimal); + if( HPMHooks.count.HP_npc_event_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *eventname, int *ontouch); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_init_pre[hIndex].func; - retVal___ = preHookFunc(&mimimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_pre[hIndex].func; + retVal___ = preHookFunc(sd, eventname, &ontouch); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40500,26 +46985,28 @@ int HP_mob_init(bool mimimal) { } } { - retVal___ = HPMHooks.source.mob.init(mimimal); + retVal___ = HPMHooks.source.npc.event(sd, eventname, ontouch); } - if( HPMHooks.count.HP_mob_init_post ) { - int (*postHookFunc) (int retVal___, bool *mimimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &mimimal); + if( HPMHooks.count.HP_npc_event_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *eventname, int *ontouch); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, eventname, &ontouch); } } return retVal___; } -int HP_mob_final(void) { +int HP_npc_touch_areanpc_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_final_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_npc_touch_areanpc_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_final_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_npc_touch_areanpc_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40527,52 +47014,57 @@ int HP_mob_final(void) { } } { - retVal___ = HPMHooks.source.mob.final(); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.npc.touch_areanpc_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_mob_final_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_final_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_npc_touch_areanpc_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_npc_touch_areanpc_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -void HP_mob_reload(void) { +int HP_npc_touchnext_areanpc(struct map_session_data *sd, bool leavemap) { int hIndex = 0; - if( HPMHooks.count.HP_mob_reload_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_npc_touchnext_areanpc_pre ) { + int (*preHookFunc) (struct map_session_data *sd, bool *leavemap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_reload_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touchnext_areanpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_touchnext_areanpc_pre[hIndex].func; + retVal___ = preHookFunc(sd, &leavemap); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mob.reload(); + retVal___ = HPMHooks.source.npc.touchnext_areanpc(sd, leavemap); } - if( HPMHooks.count.HP_mob_reload_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_reload_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_npc_touchnext_areanpc_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, bool *leavemap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touchnext_areanpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_touchnext_areanpc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &leavemap); } } - return; + return retVal___; } -struct mob_db* HP_mob_db(int index) { +int HP_npc_touch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) { int hIndex = 0; - struct mob_db* retVal___ = NULL; - if( HPMHooks.count.HP_mob_db_pre ) { - struct mob_db* (*preHookFunc) (int *index); + int retVal___ = 0; + if( HPMHooks.count.HP_npc_touch_areanpc_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_db_pre[hIndex].func; - retVal___ = preHookFunc(&index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_touch_areanpc_pre[hIndex].func; + retVal___ = preHookFunc(sd, &m, &x, &y); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40580,26 +47072,26 @@ struct mob_db* HP_mob_db(int index) { } } { - retVal___ = HPMHooks.source.mob.db(index); + retVal___ = HPMHooks.source.npc.touch_areanpc(sd, m, x, y); } - if( HPMHooks.count.HP_mob_db_post ) { - struct mob_db* (*postHookFunc) (struct mob_db* retVal___, int *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_db_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &index); + if( HPMHooks.count.HP_npc_touch_areanpc_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x, int16 *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_touch_areanpc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &m, &x, &y); } } return retVal___; } -struct mob_chat* HP_mob_chat(short id) { +int HP_npc_untouch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) { int hIndex = 0; - struct mob_chat* retVal___ = NULL; - if( HPMHooks.count.HP_mob_chat_pre ) { - struct mob_chat* (*preHookFunc) (short *id); + int retVal___ = 0; + if( HPMHooks.count.HP_npc_untouch_areanpc_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_chat_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_chat_pre[hIndex].func; - retVal___ = preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_untouch_areanpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_untouch_areanpc_pre[hIndex].func; + retVal___ = preHookFunc(sd, &m, &x, &y); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40607,26 +47099,26 @@ struct mob_chat* HP_mob_chat(short id) { } } { - retVal___ = HPMHooks.source.mob.chat(id); + retVal___ = HPMHooks.source.npc.untouch_areanpc(sd, m, x, y); } - if( HPMHooks.count.HP_mob_chat_post ) { - struct mob_chat* (*postHookFunc) (struct mob_chat* retVal___, short *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_chat_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_chat_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + if( HPMHooks.count.HP_npc_untouch_areanpc_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x, int16 *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_untouch_areanpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_untouch_areanpc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &m, &x, &y); } } return retVal___; } -int HP_mob_makedummymobdb(int p1) { +int HP_npc_touch_areanpc2(struct mob_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_makedummymobdb_pre ) { - int (*preHookFunc) (int *p1); + if( HPMHooks.count.HP_npc_touch_areanpc2_pre ) { + int (*preHookFunc) (struct mob_data *md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_makedummymobdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_makedummymobdb_pre[hIndex].func; - retVal___ = preHookFunc(&p1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_touch_areanpc2_pre[hIndex].func; + retVal___ = preHookFunc(md); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40634,26 +47126,26 @@ int HP_mob_makedummymobdb(int p1) { } } { - retVal___ = HPMHooks.source.mob.makedummymobdb(p1); + retVal___ = HPMHooks.source.npc.touch_areanpc2(md); } - if( HPMHooks.count.HP_mob_makedummymobdb_post ) { - int (*postHookFunc) (int retVal___, int *p1); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_makedummymobdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_makedummymobdb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &p1); + if( HPMHooks.count.HP_npc_touch_areanpc2_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_touch_areanpc2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); } } return retVal___; } -int HP_mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) { +int HP_npc_check_areanpc(int flag, int16 m, int16 x, int16 y, int16 range) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_spawn_guardian_sub_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_npc_check_areanpc_pre ) { + int (*preHookFunc) (int *flag, int16 *m, int16 *x, int16 *y, int16 *range); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_spawn_guardian_sub_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_check_areanpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_check_areanpc_pre[hIndex].func; + retVal___ = preHookFunc(&flag, &m, &x, &y, &range); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40661,26 +47153,26 @@ int HP_mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.mob.spawn_guardian_sub(tid, tick, id, data); + retVal___ = HPMHooks.source.npc.check_areanpc(flag, m, x, y, range); } - if( HPMHooks.count.HP_mob_spawn_guardian_sub_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_spawn_guardian_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_npc_check_areanpc_post ) { + int (*postHookFunc) (int retVal___, int *flag, int16 *m, int16 *x, int16 *y, int16 *range); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_check_areanpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_check_areanpc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &flag, &m, &x, &y, &range); } } return retVal___; } -int HP_mob_skill_id2skill_idx(int class_, uint16 skill_id) { +struct npc_data* HP_npc_checknear(struct map_session_data *sd, struct block_list *bl) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_skill_id2skill_idx_pre ) { - int (*preHookFunc) (int *class_, uint16 *skill_id); + struct npc_data* retVal___ = NULL; + if( HPMHooks.count.HP_npc_checknear_pre ) { + struct npc_data* (*preHookFunc) (struct map_session_data *sd, struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_id2skill_idx_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_skill_id2skill_idx_pre[hIndex].func; - retVal___ = preHookFunc(&class_, &skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_checknear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_checknear_pre[hIndex].func; + retVal___ = preHookFunc(sd, bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40688,26 +47180,26 @@ int HP_mob_skill_id2skill_idx(int class_, uint16 skill_id) { } } { - retVal___ = HPMHooks.source.mob.skill_id2skill_idx(class_, skill_id); + retVal___ = HPMHooks.source.npc.checknear(sd, bl); } - if( HPMHooks.count.HP_mob_skill_id2skill_idx_post ) { - int (*postHookFunc) (int retVal___, int *class_, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_id2skill_idx_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_skill_id2skill_idx_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &class_, &skill_id); + if( HPMHooks.count.HP_npc_checknear_post ) { + struct npc_data* (*postHookFunc) (struct npc_data* retVal___, struct map_session_data *sd, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_checknear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_checknear_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, bl); } } return retVal___; } -int HP_mob_db_searchname(const char *str) { +int HP_npc_globalmessage(const char *name, const char *mes) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_db_searchname_pre ) { - int (*preHookFunc) (const char *str); + if( HPMHooks.count.HP_npc_globalmessage_pre ) { + int (*preHookFunc) (const char *name, const char *mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_db_searchname_pre[hIndex].func; - retVal___ = preHookFunc(str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_globalmessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_globalmessage_pre[hIndex].func; + retVal___ = preHookFunc(name, mes); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40715,105 +47207,106 @@ int HP_mob_db_searchname(const char *str) { } } { - retVal___ = HPMHooks.source.mob.db_searchname(str); + retVal___ = HPMHooks.source.npc.globalmessage(name, mes); } - if( HPMHooks.count.HP_mob_db_searchname_post ) { - int (*postHookFunc) (int retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_db_searchname_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str); + if( HPMHooks.count.HP_npc_globalmessage_post ) { + int (*postHookFunc) (int retVal___, const char *name, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_globalmessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_globalmessage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, mes); } } return retVal___; } -int HP_mob_db_searchname_array_sub(struct mob_db *monster, const char *str, int flag) { +void HP_npc_run_tomb(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_db_searchname_array_sub_pre ) { - int (*preHookFunc) (struct mob_db *monster, const char *str, int *flag); + if( HPMHooks.count.HP_npc_run_tomb_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_db_searchname_array_sub_pre[hIndex].func; - retVal___ = preHookFunc(monster, str, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_run_tomb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_run_tomb_pre[hIndex].func; + preHookFunc(sd, nd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mob.db_searchname_array_sub(monster, str, flag); + HPMHooks.source.npc.run_tomb(sd, nd); } - if( HPMHooks.count.HP_mob_db_searchname_array_sub_post ) { - int (*postHookFunc) (int retVal___, struct mob_db *monster, const char *str, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_db_searchname_array_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, monster, str, &flag); + if( HPMHooks.count.HP_npc_run_tomb_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_run_tomb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_run_tomb_post[hIndex].func; + postHookFunc(sd, nd); } } - return retVal___; + return; } -void HP_mob_mvptomb_create(struct mob_data *md, char *killer, time_t time) { +int HP_npc_click(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_mob_mvptomb_create_pre ) { - void (*preHookFunc) (struct mob_data *md, char *killer, time_t *time); + int retVal___ = 0; + if( HPMHooks.count.HP_npc_click_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_create_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_mvptomb_create_pre[hIndex].func; - preHookFunc(md, killer, &time); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_click_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_click_pre[hIndex].func; + retVal___ = preHookFunc(sd, nd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mob.mvptomb_create(md, killer, time); + retVal___ = HPMHooks.source.npc.click(sd, nd); } - if( HPMHooks.count.HP_mob_mvptomb_create_post ) { - void (*postHookFunc) (struct mob_data *md, char *killer, time_t *time); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_create_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_mvptomb_create_post[hIndex].func; - postHookFunc(md, killer, &time); + if( HPMHooks.count.HP_npc_click_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_click_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_click_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, nd); } } - return; + return retVal___; } -void HP_mob_mvptomb_destroy(struct mob_data *md) { +int HP_npc_scriptcont(struct map_session_data *sd, int id, bool closing) { int hIndex = 0; - if( HPMHooks.count.HP_mob_mvptomb_destroy_pre ) { - void (*preHookFunc) (struct mob_data *md); + int retVal___ = 0; + if( HPMHooks.count.HP_npc_scriptcont_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *id, bool *closing); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_destroy_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_mvptomb_destroy_pre[hIndex].func; - preHookFunc(md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_scriptcont_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_scriptcont_pre[hIndex].func; + retVal___ = preHookFunc(sd, &id, &closing); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mob.mvptomb_destroy(md); + retVal___ = HPMHooks.source.npc.scriptcont(sd, id, closing); } - if( HPMHooks.count.HP_mob_mvptomb_destroy_post ) { - void (*postHookFunc) (struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_destroy_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_mvptomb_destroy_post[hIndex].func; - postHookFunc(md); + if( HPMHooks.count.HP_npc_scriptcont_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *id, bool *closing); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_scriptcont_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_scriptcont_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &id, &closing); } } - return; + return retVal___; } -int HP_mob_db_searchname_array(struct mob_db **data, int size, const char *str, int flag) { +int HP_npc_buysellsel(struct map_session_data *sd, int id, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_db_searchname_array_pre ) { - int (*preHookFunc) (struct mob_db **data, int *size, const char *str, int *flag); + if( HPMHooks.count.HP_npc_buysellsel_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *id, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_db_searchname_array_pre[hIndex].func; - retVal___ = preHookFunc(data, &size, str, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buysellsel_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_buysellsel_pre[hIndex].func; + retVal___ = preHookFunc(sd, &id, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40821,26 +47314,26 @@ int HP_mob_db_searchname_array(struct mob_db **data, int size, const char *str, } } { - retVal___ = HPMHooks.source.mob.db_searchname_array(data, size, str, flag); + retVal___ = HPMHooks.source.npc.buysellsel(sd, id, type); } - if( HPMHooks.count.HP_mob_db_searchname_array_post ) { - int (*postHookFunc) (int retVal___, struct mob_db **data, int *size, const char *str, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_db_searchname_array_post[hIndex].func; - retVal___ = postHookFunc(retVal___, data, &size, str, &flag); + if( HPMHooks.count.HP_npc_buysellsel_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *id, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buysellsel_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_buysellsel_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &id, &type); } } return retVal___; } -int HP_mob_db_checkid(const int id) { +int HP_npc_cashshop_buylist(struct map_session_data *sd, int points, int count, unsigned short *item_list) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_db_checkid_pre ) { - int (*preHookFunc) (const int *id); + if( HPMHooks.count.HP_npc_cashshop_buylist_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *points, int *count, unsigned short *item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_checkid_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_db_checkid_pre[hIndex].func; - retVal___ = preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buylist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_cashshop_buylist_pre[hIndex].func; + retVal___ = preHookFunc(sd, &points, &count, item_list); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40848,26 +47341,26 @@ int HP_mob_db_checkid(const int id) { } } { - retVal___ = HPMHooks.source.mob.db_checkid(id); + retVal___ = HPMHooks.source.npc.cashshop_buylist(sd, points, count, item_list); } - if( HPMHooks.count.HP_mob_db_checkid_post ) { - int (*postHookFunc) (int retVal___, const int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_checkid_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_db_checkid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + if( HPMHooks.count.HP_npc_cashshop_buylist_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *points, int *count, unsigned short *item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buylist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_cashshop_buylist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &points, &count, item_list); } } return retVal___; } -struct view_data* HP_mob_get_viewdata(int class_) { +int HP_npc_buylist_sub(struct map_session_data *sd, int n, unsigned short *item_list, struct npc_data *nd) { int hIndex = 0; - struct view_data* retVal___ = NULL; - if( HPMHooks.count.HP_mob_get_viewdata_pre ) { - struct view_data* (*preHookFunc) (int *class_); + int retVal___ = 0; + if( HPMHooks.count.HP_npc_buylist_sub_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_viewdata_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_get_viewdata_pre[hIndex].func; - retVal___ = preHookFunc(&class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_buylist_sub_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, item_list, nd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40875,26 +47368,26 @@ struct view_data* HP_mob_get_viewdata(int class_) { } } { - retVal___ = HPMHooks.source.mob.get_viewdata(class_); + retVal___ = HPMHooks.source.npc.buylist_sub(sd, n, item_list, nd); } - if( HPMHooks.count.HP_mob_get_viewdata_post ) { - struct view_data* (*postHookFunc) (struct view_data* retVal___, int *class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_viewdata_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_get_viewdata_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &class_); + if( HPMHooks.count.HP_npc_buylist_sub_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_buylist_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, item_list, nd); } } return retVal___; } -int HP_mob_parse_dataset(struct spawn_data *data) { +int HP_npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int points) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_parse_dataset_pre ) { - int (*preHookFunc) (struct spawn_data *data); + if( HPMHooks.count.HP_npc_cashshop_buy_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *amount, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dataset_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_parse_dataset_pre[hIndex].func; - retVal___ = preHookFunc(data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_cashshop_buy_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid, &amount, &points); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40902,26 +47395,26 @@ int HP_mob_parse_dataset(struct spawn_data *data) { } } { - retVal___ = HPMHooks.source.mob.parse_dataset(data); + retVal___ = HPMHooks.source.npc.cashshop_buy(sd, nameid, amount, points); } - if( HPMHooks.count.HP_mob_parse_dataset_post ) { - int (*postHookFunc) (int retVal___, struct spawn_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dataset_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_parse_dataset_post[hIndex].func; - retVal___ = postHookFunc(retVal___, data); + if( HPMHooks.count.HP_npc_cashshop_buy_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid, int *amount, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_cashshop_buy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid, &amount, &points); } } return retVal___; } -struct mob_data* HP_mob_spawn_dataset(struct spawn_data *data) { +int HP_npc_buylist(struct map_session_data *sd, int n, unsigned short *item_list) { int hIndex = 0; - struct mob_data* retVal___ = NULL; - if( HPMHooks.count.HP_mob_spawn_dataset_pre ) { - struct mob_data* (*preHookFunc) (struct spawn_data *data); + int retVal___ = 0; + if( HPMHooks.count.HP_npc_buylist_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_dataset_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_spawn_dataset_pre[hIndex].func; - retVal___ = preHookFunc(data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_buylist_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, item_list); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40929,26 +47422,26 @@ struct mob_data* HP_mob_spawn_dataset(struct spawn_data *data) { } } { - retVal___ = HPMHooks.source.mob.spawn_dataset(data); + retVal___ = HPMHooks.source.npc.buylist(sd, n, item_list); } - if( HPMHooks.count.HP_mob_spawn_dataset_post ) { - struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct spawn_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_dataset_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_spawn_dataset_post[hIndex].func; - retVal___ = postHookFunc(retVal___, data); + if( HPMHooks.count.HP_npc_buylist_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_buylist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, item_list); } } return retVal___; } -int HP_mob_get_random_id(int type, int flag, int lv) { +int HP_npc_selllist_sub(struct map_session_data *sd, int n, unsigned short *item_list, struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_get_random_id_pre ) { - int (*preHookFunc) (int *type, int *flag, int *lv); + if( HPMHooks.count.HP_npc_selllist_sub_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_random_id_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_get_random_id_pre[hIndex].func; - retVal___ = preHookFunc(&type, &flag, &lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_selllist_sub_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, item_list, nd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40956,26 +47449,26 @@ int HP_mob_get_random_id(int type, int flag, int lv) { } } { - retVal___ = HPMHooks.source.mob.get_random_id(type, flag, lv); + retVal___ = HPMHooks.source.npc.selllist_sub(sd, n, item_list, nd); } - if( HPMHooks.count.HP_mob_get_random_id_post ) { - int (*postHookFunc) (int retVal___, int *type, int *flag, int *lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_random_id_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_get_random_id_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type, &flag, &lv); + if( HPMHooks.count.HP_npc_selllist_sub_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_selllist_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, item_list, nd); } } return retVal___; } -bool HP_mob_ksprotected(struct block_list *src, struct block_list *target) { +int HP_npc_selllist(struct map_session_data *sd, int n, unsigned short *item_list) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mob_ksprotected_pre ) { - bool (*preHookFunc) (struct block_list *src, struct block_list *target); + int retVal___ = 0; + if( HPMHooks.count.HP_npc_selllist_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ksprotected_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_ksprotected_pre[hIndex].func; - retVal___ = preHookFunc(src, target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_selllist_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, item_list); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -40983,26 +47476,26 @@ bool HP_mob_ksprotected(struct block_list *src, struct block_list *target) { } } { - retVal___ = HPMHooks.source.mob.ksprotected(src, target); + retVal___ = HPMHooks.source.npc.selllist(sd, n, item_list); } - if( HPMHooks.count.HP_mob_ksprotected_post ) { - bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ksprotected_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_ksprotected_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, target); + if( HPMHooks.count.HP_npc_selllist_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_selllist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, item_list); } } return retVal___; } -struct mob_data* HP_mob_once_spawn_sub(struct block_list *bl, int16 m, int16 x, int16 y, const char *mobname, int class_, const char *event, unsigned int size, unsigned int ai) { +int HP_npc_remove_map(struct npc_data *nd) { int hIndex = 0; - struct mob_data* retVal___ = NULL; - if( HPMHooks.count.HP_mob_once_spawn_sub_pre ) { - struct mob_data* (*preHookFunc) (struct block_list *bl, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, const char *event, unsigned int *size, unsigned int *ai); + int retVal___ = 0; + if( HPMHooks.count.HP_npc_remove_map_pre ) { + int (*preHookFunc) (struct npc_data *nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_once_spawn_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, &m, &x, &y, mobname, &class_, event, &size, &ai); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_remove_map_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_remove_map_pre[hIndex].func; + retVal___ = preHookFunc(nd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41010,26 +47503,28 @@ struct mob_data* HP_mob_once_spawn_sub(struct block_list *bl, int16 m, int16 x, } } { - retVal___ = HPMHooks.source.mob.once_spawn_sub(bl, m, x, y, mobname, class_, event, size, ai); + retVal___ = HPMHooks.source.npc.remove_map(nd); } - if( HPMHooks.count.HP_mob_once_spawn_sub_post ) { - struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct block_list *bl, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, const char *event, unsigned int *size, unsigned int *ai); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_once_spawn_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &m, &x, &y, mobname, &class_, event, &size, &ai); + if( HPMHooks.count.HP_npc_remove_map_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_remove_map_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_remove_map_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd); } } return retVal___; } -int HP_mob_once_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, const char *mobname, int class_, int amount, const char *event, unsigned int size, unsigned int ai) { +int HP_npc_unload_ev(DBKey key, DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_once_spawn_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai); + if( HPMHooks.count.HP_npc_unload_ev_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_once_spawn_pre[hIndex].func; - retVal___ = preHookFunc(sd, &m, &x, &y, mobname, &class_, &amount, event, &size, &ai); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_npc_unload_ev_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41037,26 +47532,32 @@ int HP_mob_once_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, co } } { - retVal___ = HPMHooks.source.mob.once_spawn(sd, m, x, y, mobname, class_, amount, event, size, ai); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.npc.unload_ev(key, data, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_mob_once_spawn_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_once_spawn_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &m, &x, &y, mobname, &class_, &amount, event, &size, &ai); + if( HPMHooks.count.HP_npc_unload_ev_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_npc_unload_ev_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_mob_once_spawn_area(struct map_session_data *sd, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, const char *mobname, int class_, int amount, const char *event, unsigned int size, unsigned int ai) { +int HP_npc_unload_ev_label(DBKey key, DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_once_spawn_area_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai); + if( HPMHooks.count.HP_npc_unload_ev_label_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_area_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_once_spawn_area_pre[hIndex].func; - retVal___ = preHookFunc(sd, &m, &x0, &y0, &x1, &y1, mobname, &class_, &amount, event, &size, &ai); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_label_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_npc_unload_ev_label_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41064,26 +47565,32 @@ int HP_mob_once_spawn_area(struct map_session_data *sd, int16 m, int16 x0, int16 } } { - retVal___ = HPMHooks.source.mob.once_spawn_area(sd, m, x0, y0, x1, y1, mobname, class_, amount, event, size, ai); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.npc.unload_ev_label(key, data, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_mob_once_spawn_area_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_area_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_once_spawn_area_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &m, &x0, &y0, &x1, &y1, mobname, &class_, &amount, event, &size, &ai); + if( HPMHooks.count.HP_npc_unload_ev_label_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_label_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_npc_unload_ev_label_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_mob_spawn_guardian(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, int guardian, bool has_index) { +int HP_npc_unload_dup_sub(struct npc_data *nd, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_spawn_guardian_pre ) { - int (*preHookFunc) (const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, int *guardian, bool *has_index); + if( HPMHooks.count.HP_npc_unload_dup_sub_pre ) { + int (*preHookFunc) (struct npc_data *nd, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_spawn_guardian_pre[hIndex].func; - retVal___ = preHookFunc(mapname, &x, &y, mobname, &class_, event, &guardian, &has_index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_dup_sub_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_npc_unload_dup_sub_pre[hIndex].func; + retVal___ = preHookFunc(nd, args___copy); + va_end(args___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41091,53 +47598,56 @@ int HP_mob_spawn_guardian(const char *mapname, short x, short y, const char *mob } } { - retVal___ = HPMHooks.source.mob.spawn_guardian(mapname, x, y, mobname, class_, event, guardian, has_index); + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.npc.unload_dup_sub(nd, args___copy); + va_end(args___copy); } - if( HPMHooks.count.HP_mob_spawn_guardian_post ) { - int (*postHookFunc) (int retVal___, const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, int *guardian, bool *has_index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_spawn_guardian_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mapname, &x, &y, mobname, &class_, event, &guardian, &has_index); + if( HPMHooks.count.HP_npc_unload_dup_sub_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_dup_sub_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_npc_unload_dup_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, args___copy); + va_end(args___copy); } } return retVal___; } -int HP_mob_spawn_bg(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id) { +void HP_npc_unload_duplicates(struct npc_data *nd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_spawn_bg_pre ) { - int (*preHookFunc) (const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, unsigned int *bg_id); + if( HPMHooks.count.HP_npc_unload_duplicates_pre ) { + void (*preHookFunc) (struct npc_data *nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_bg_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_spawn_bg_pre[hIndex].func; - retVal___ = preHookFunc(mapname, &x, &y, mobname, &class_, event, &bg_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_unload_duplicates_pre[hIndex].func; + preHookFunc(nd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mob.spawn_bg(mapname, x, y, mobname, class_, event, bg_id); + HPMHooks.source.npc.unload_duplicates(nd); } - if( HPMHooks.count.HP_mob_spawn_bg_post ) { - int (*postHookFunc) (int retVal___, const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, unsigned int *bg_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_bg_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_spawn_bg_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mapname, &x, &y, mobname, &class_, event, &bg_id); + if( HPMHooks.count.HP_npc_unload_duplicates_post ) { + void (*postHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_unload_duplicates_post[hIndex].func; + postHookFunc(nd); } } - return retVal___; + return; } -int HP_mob_can_reach(struct mob_data *md, struct block_list *bl, int range, int state) { +int HP_npc_unload(struct npc_data *nd, bool single) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_can_reach_pre ) { - int (*preHookFunc) (struct mob_data *md, struct block_list *bl, int *range, int *state); + if( HPMHooks.count.HP_npc_unload_pre ) { + int (*preHookFunc) (struct npc_data *nd, bool *single); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_reach_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_can_reach_pre[hIndex].func; - retVal___ = preHookFunc(md, bl, &range, &state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_unload_pre[hIndex].func; + retVal___ = preHookFunc(nd, &single); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41145,146 +47655,130 @@ int HP_mob_can_reach(struct mob_data *md, struct block_list *bl, int range, int } } { - retVal___ = HPMHooks.source.mob.can_reach(md, bl, range, state); + retVal___ = HPMHooks.source.npc.unload(nd, single); } - if( HPMHooks.count.HP_mob_can_reach_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *bl, int *range, int *state); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_reach_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_can_reach_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, bl, &range, &state); + if( HPMHooks.count.HP_npc_unload_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, bool *single); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_unload_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, &single); } } return retVal___; } -int HP_mob_linksearch(struct block_list *bl, va_list ap) { +void HP_npc_clearsrcfile(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_linksearch_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_npc_clearsrcfile_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_linksearch_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_mob_linksearch_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_clearsrcfile_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.mob.linksearch(bl, ap___copy); - va_end(ap___copy); + HPMHooks.source.npc.clearsrcfile(); } - if( HPMHooks.count.HP_mob_linksearch_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_linksearch_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_mob_linksearch_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_npc_clearsrcfile_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_clearsrcfile_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_mob_delayspawn(int tid, int64 tick, int id, intptr_t data) { +void HP_npc_addsrcfile(const char *name) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_delayspawn_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_npc_addsrcfile_pre ) { + void (*preHookFunc) (const char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delayspawn_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_delayspawn_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_addsrcfile_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_addsrcfile_pre[hIndex].func; + preHookFunc(name); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mob.delayspawn(tid, tick, id, data); + HPMHooks.source.npc.addsrcfile(name); } - if( HPMHooks.count.HP_mob_delayspawn_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delayspawn_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_delayspawn_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_npc_addsrcfile_post ) { + void (*postHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_addsrcfile_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_addsrcfile_post[hIndex].func; + postHookFunc(name); } } - return retVal___; + return; } -int HP_mob_setdelayspawn(struct mob_data *md) { +void HP_npc_delsrcfile(const char *name) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_setdelayspawn_pre ) { - int (*preHookFunc) (struct mob_data *md); + if( HPMHooks.count.HP_npc_delsrcfile_pre ) { + void (*preHookFunc) (const char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdelayspawn_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_setdelayspawn_pre[hIndex].func; - retVal___ = preHookFunc(md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_delsrcfile_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_delsrcfile_pre[hIndex].func; + preHookFunc(name); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mob.setdelayspawn(md); + HPMHooks.source.npc.delsrcfile(name); } - if( HPMHooks.count.HP_mob_setdelayspawn_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdelayspawn_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_setdelayspawn_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md); + if( HPMHooks.count.HP_npc_delsrcfile_post ) { + void (*postHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_delsrcfile_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_delsrcfile_post[hIndex].func; + postHookFunc(name); } } - return retVal___; + return; } -int HP_mob_count_sub(struct block_list *bl, va_list ap) { +void HP_npc_parsename(struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_count_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_npc_parsename_pre ) { + void (*preHookFunc) (struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_count_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_mob_count_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsename_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parsename_pre[hIndex].func; + preHookFunc(nd, name, start, buffer, filepath); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.mob.count_sub(bl, ap___copy); - va_end(ap___copy); + HPMHooks.source.npc.parsename(nd, name, start, buffer, filepath); } - if( HPMHooks.count.HP_mob_count_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_count_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_mob_count_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_npc_parsename_post ) { + void (*postHookFunc) (struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsename_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parsename_post[hIndex].func; + postHookFunc(nd, name, start, buffer, filepath); } } - return retVal___; + return; } -int HP_mob_spawn(struct mob_data *md) { +int HP_npc_parseview(const char *w4, const char *start, const char *buffer, const char *filepath) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_spawn_pre ) { - int (*preHookFunc) (struct mob_data *md); + if( HPMHooks.count.HP_npc_parseview_pre ) { + int (*preHookFunc) (const char *w4, const char *start, const char *buffer, const char *filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_spawn_pre[hIndex].func; - retVal___ = preHookFunc(md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parseview_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parseview_pre[hIndex].func; + retVal___ = preHookFunc(w4, start, buffer, filepath); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41292,26 +47786,26 @@ int HP_mob_spawn(struct mob_data *md) { } } { - retVal___ = HPMHooks.source.mob.spawn(md); + retVal___ = HPMHooks.source.npc.parseview(w4, start, buffer, filepath); } - if( HPMHooks.count.HP_mob_spawn_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_spawn_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md); + if( HPMHooks.count.HP_npc_parseview_post ) { + int (*postHookFunc) (int retVal___, const char *w4, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parseview_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parseview_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w4, start, buffer, filepath); } } return retVal___; } -int HP_mob_can_changetarget(struct mob_data *md, struct block_list *target, int mode) { +bool HP_npc_viewisid(const char *viewid) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_can_changetarget_pre ) { - int (*preHookFunc) (struct mob_data *md, struct block_list *target, int *mode); + bool retVal___ = false; + if( HPMHooks.count.HP_npc_viewisid_pre ) { + bool (*preHookFunc) (const char *viewid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_changetarget_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_can_changetarget_pre[hIndex].func; - retVal___ = preHookFunc(md, target, &mode); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_viewisid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_viewisid_pre[hIndex].func; + retVal___ = preHookFunc(viewid); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41319,26 +47813,26 @@ int HP_mob_can_changetarget(struct mob_data *md, struct block_list *target, int } } { - retVal___ = HPMHooks.source.mob.can_changetarget(md, target, mode); + retVal___ = HPMHooks.source.npc.viewisid(viewid); } - if( HPMHooks.count.HP_mob_can_changetarget_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *target, int *mode); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_changetarget_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_can_changetarget_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, target, &mode); + if( HPMHooks.count.HP_npc_viewisid_post ) { + bool (*postHookFunc) (bool retVal___, const char *viewid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_viewisid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_viewisid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, viewid); } } return retVal___; } -int HP_mob_target(struct mob_data *md, struct block_list *bl, int dist) { +struct npc_data* HP_npc_create_npc(int m, int x, int y) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_target_pre ) { - int (*preHookFunc) (struct mob_data *md, struct block_list *bl, int *dist); + struct npc_data* retVal___ = NULL; + if( HPMHooks.count.HP_npc_create_npc_pre ) { + struct npc_data* (*preHookFunc) (int *m, int *x, int *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_target_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_target_pre[hIndex].func; - retVal___ = preHookFunc(md, bl, &dist); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_create_npc_pre[hIndex].func; + retVal___ = preHookFunc(&m, &x, &y); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41346,28 +47840,26 @@ int HP_mob_target(struct mob_data *md, struct block_list *bl, int dist) { } } { - retVal___ = HPMHooks.source.mob.target(md, bl, dist); + retVal___ = HPMHooks.source.npc.create_npc(m, x, y); } - if( HPMHooks.count.HP_mob_target_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *bl, int *dist); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_target_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_target_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, bl, &dist); + if( HPMHooks.count.HP_npc_create_npc_post ) { + struct npc_data* (*postHookFunc) (struct npc_data* retVal___, int *m, int *x, int *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_create_npc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, &x, &y); } } return retVal___; } -int HP_mob_ai_sub_hard_activesearch(struct block_list *bl, va_list ap) { +struct npc_data* HP_npc_add_warp(char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_activesearch_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + struct npc_data* retVal___ = NULL; + if( HPMHooks.count.HP_npc_add_warp_pre ) { + struct npc_data* (*preHookFunc) (char *name, short *from_mapid, short *from_x, short *from_y, short *xs, short *ys, unsigned short *to_mapindex, short *to_x, short *to_y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_activesearch_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_activesearch_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_warp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_add_warp_pre[hIndex].func; + retVal___ = preHookFunc(name, &from_mapid, &from_x, &from_y, &xs, &ys, &to_mapindex, &to_x, &to_y); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41375,32 +47867,26 @@ int HP_mob_ai_sub_hard_activesearch(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.mob.ai_sub_hard_activesearch(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.npc.add_warp(name, from_mapid, from_x, from_y, xs, ys, to_mapindex, to_x, to_y); } - if( HPMHooks.count.HP_mob_ai_sub_hard_activesearch_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_activesearch_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_activesearch_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_npc_add_warp_post ) { + struct npc_data* (*postHookFunc) (struct npc_data* retVal___, char *name, short *from_mapid, short *from_x, short *from_y, short *xs, short *ys, unsigned short *to_mapindex, short *to_x, short *to_y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_warp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_add_warp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, &from_mapid, &from_x, &from_y, &xs, &ys, &to_mapindex, &to_x, &to_y); } } return retVal___; } -int HP_mob_ai_sub_hard_changechase(struct block_list *bl, va_list ap) { +const char* HP_npc_parse_warp(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_changechase_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_parse_warp_pre ) { + const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_changechase_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_changechase_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_warp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_warp_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41408,32 +47894,26 @@ int HP_mob_ai_sub_hard_changechase(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.mob.ai_sub_hard_changechase(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.npc.parse_warp(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_mob_ai_sub_hard_changechase_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_changechase_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_changechase_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_npc_parse_warp_post ) { + const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_warp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_warp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval); } } return retVal___; } -int HP_mob_ai_sub_hard_bg_ally(struct block_list *bl, va_list ap) { +const char* HP_npc_parse_shop(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_parse_shop_pre ) { + const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_bg_ally_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_shop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_shop_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41441,32 +47921,26 @@ int HP_mob_ai_sub_hard_bg_ally(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.mob.ai_sub_hard_bg_ally(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.npc.parse_shop(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_bg_ally_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_npc_parse_shop_post ) { + const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_shop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_shop_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval); } } return retVal___; } -int HP_mob_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { +const char* HP_npc_parse_unknown_object(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_parse_unknown_object_pre ) { + const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_lootsearch_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_object_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_unknown_object_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41474,63 +47948,52 @@ int HP_mob_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.mob.ai_sub_hard_lootsearch(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.npc.parse_unknown_object(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_lootsearch_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_npc_parse_unknown_object_post ) { + const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_object_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_unknown_object_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval); } } return retVal___; } -int HP_mob_warpchase_sub(struct block_list *bl, va_list ap) { +void HP_npc_convertlabel_db(struct npc_label_list *label_list, const char *filepath) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_warpchase_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_npc_convertlabel_db_pre ) { + void (*preHookFunc) (struct npc_label_list *label_list, const char *filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_mob_warpchase_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_convertlabel_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_convertlabel_db_pre[hIndex].func; + preHookFunc(label_list, filepath); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.mob.warpchase_sub(bl, ap___copy); - va_end(ap___copy); + HPMHooks.source.npc.convertlabel_db(label_list, filepath); } - if( HPMHooks.count.HP_mob_warpchase_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_mob_warpchase_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_npc_convertlabel_db_post ) { + void (*postHookFunc) (struct npc_label_list *label_list, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_convertlabel_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_convertlabel_db_post[hIndex].func; + postHookFunc(label_list, filepath); } } - return retVal___; + return; } -int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick) { +const char* HP_npc_skip_script(const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre ) { - int (*preHookFunc) (struct mob_data *md, int64 *tick); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_skip_script_pre ) { + const char* (*preHookFunc) (const char *start, const char *buffer, const char *filepath, int *retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_slavemob_pre[hIndex].func; - retVal___ = preHookFunc(md, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_skip_script_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_skip_script_pre[hIndex].func; + retVal___ = preHookFunc(start, buffer, filepath, retval); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41538,26 +48001,26 @@ int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick) { } } { - retVal___ = HPMHooks.source.mob.ai_sub_hard_slavemob(md, tick); + retVal___ = HPMHooks.source.npc.skip_script(start, buffer, filepath, retval); } - if( HPMHooks.count.HP_mob_ai_sub_hard_slavemob_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_slavemob_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_slavemob_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &tick); + if( HPMHooks.count.HP_npc_skip_script_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *start, const char *buffer, const char *filepath, int *retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_skip_script_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_skip_script_post[hIndex].func; + retVal___ = postHookFunc(retVal___, start, buffer, filepath, retval); } } return retVal___; } -int HP_mob_unlocktarget(struct mob_data *md, int64 tick) { +const char* HP_npc_parse_script(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_unlocktarget_pre ) { - int (*preHookFunc) (struct mob_data *md, int64 *tick); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_parse_script_pre ) { + const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_unlocktarget_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_unlocktarget_pre[hIndex].func; - retVal___ = preHookFunc(md, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_script_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_script_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, &options, retval); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41565,26 +48028,26 @@ int HP_mob_unlocktarget(struct mob_data *md, int64 tick) { } } { - retVal___ = HPMHooks.source.mob.unlocktarget(md, tick); + retVal___ = HPMHooks.source.npc.parse_script(w1, w2, w3, w4, start, buffer, filepath, options, retval); } - if( HPMHooks.count.HP_mob_unlocktarget_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_unlocktarget_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_unlocktarget_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &tick); + if( HPMHooks.count.HP_npc_parse_script_post ) { + const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_script_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_script_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, &options, retval); } } return retVal___; } -int HP_mob_randomwalk(struct mob_data *md, int64 tick) { +const char* HP_npc_parse_duplicate(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_randomwalk_pre ) { - int (*preHookFunc) (struct mob_data *md, int64 *tick); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_parse_duplicate_pre ) { + const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_randomwalk_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_randomwalk_pre[hIndex].func; - retVal___ = preHookFunc(md, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_duplicate_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, &options, retval); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41592,26 +48055,26 @@ int HP_mob_randomwalk(struct mob_data *md, int64 tick) { } } { - retVal___ = HPMHooks.source.mob.randomwalk(md, tick); + retVal___ = HPMHooks.source.npc.parse_duplicate(w1, w2, w3, w4, start, buffer, filepath, options, retval); } - if( HPMHooks.count.HP_mob_randomwalk_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_randomwalk_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_randomwalk_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &tick); + if( HPMHooks.count.HP_npc_parse_duplicate_post ) { + const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_duplicate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, &options, retval); } } return retVal___; } -int HP_mob_warpchase(struct mob_data *md, struct block_list *target) { +int HP_npc_duplicate4instance(struct npc_data *snd, int16 m) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_warpchase_pre ) { - int (*preHookFunc) (struct mob_data *md, struct block_list *target); + if( HPMHooks.count.HP_npc_duplicate4instance_pre ) { + int (*preHookFunc) (struct npc_data *snd, int16 *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_warpchase_pre[hIndex].func; - retVal___ = preHookFunc(md, target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate4instance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_duplicate4instance_pre[hIndex].func; + retVal___ = preHookFunc(snd, &m); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41619,53 +48082,52 @@ int HP_mob_warpchase(struct mob_data *md, struct block_list *target) { } } { - retVal___ = HPMHooks.source.mob.warpchase(md, target); + retVal___ = HPMHooks.source.npc.duplicate4instance(snd, m); } - if( HPMHooks.count.HP_mob_warpchase_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_warpchase_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, target); + if( HPMHooks.count.HP_npc_duplicate4instance_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *snd, int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate4instance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_duplicate4instance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, snd, &m); } } return retVal___; } -bool HP_mob_ai_sub_hard(struct mob_data *md, int64 tick) { +void HP_npc_setcells(struct npc_data *nd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mob_ai_sub_hard_pre ) { - bool (*preHookFunc) (struct mob_data *md, int64 *tick); + if( HPMHooks.count.HP_npc_setcells_pre ) { + void (*preHookFunc) (struct npc_data *nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_pre[hIndex].func; - retVal___ = preHookFunc(md, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setcells_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_setcells_pre[hIndex].func; + preHookFunc(nd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mob.ai_sub_hard(md, tick); + HPMHooks.source.npc.setcells(nd); } - if( HPMHooks.count.HP_mob_ai_sub_hard_post ) { - bool (*postHookFunc) (bool retVal___, struct mob_data *md, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &tick); + if( HPMHooks.count.HP_npc_setcells_post ) { + void (*postHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setcells_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_setcells_post[hIndex].func; + postHookFunc(nd); } } - return retVal___; + return; } -int HP_mob_ai_sub_hard_timer(struct block_list *bl, va_list ap) { +int HP_npc_unsetcells_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_timer_pre ) { + if( HPMHooks.count.HP_npc_unsetcells_sub_pre ) { int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_timer_pre; hIndex++ ) { + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_sub_pre; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_timer_pre[hIndex].func; + preHookFunc = HPMHooks.list.HP_npc_unsetcells_sub_pre[hIndex].func; retVal___ = preHookFunc(bl, ap___copy); va_end(ap___copy); } @@ -41676,122 +48138,133 @@ int HP_mob_ai_sub_hard_timer(struct block_list *bl, va_list ap) { } { va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.mob.ai_sub_hard_timer(bl, ap___copy); + retVal___ = HPMHooks.source.npc.unsetcells_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_ai_sub_hard_timer_post ) { + if( HPMHooks.count.HP_npc_unsetcells_sub_post ) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_timer_post; hIndex++ ) { + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_sub_post; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_timer_post[hIndex].func; + postHookFunc = HPMHooks.list.HP_npc_unsetcells_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, ap___copy); va_end(ap___copy); } } return retVal___; } -int HP_mob_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { +void HP_npc_unsetcells(struct npc_data *nd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_foreachclient_pre ) { - int (*preHookFunc) (struct map_session_data *sd, va_list ap); + if( HPMHooks.count.HP_npc_unsetcells_pre ) { + void (*preHookFunc) (struct npc_data *nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_foreachclient_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_mob_ai_sub_foreachclient_pre[hIndex].func; - retVal___ = preHookFunc(sd, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_unsetcells_pre[hIndex].func; + preHookFunc(nd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.mob.ai_sub_foreachclient(sd, ap___copy); - va_end(ap___copy); + HPMHooks.source.npc.unsetcells(nd); } - if( HPMHooks.count.HP_mob_ai_sub_foreachclient_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_foreachclient_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_mob_ai_sub_foreachclient_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_npc_unsetcells_post ) { + void (*postHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_unsetcells_post[hIndex].func; + postHookFunc(nd); } } - return retVal___; + return; } -int HP_mob_ai_sub_lazy(struct mob_data *md, va_list args) { +void HP_npc_movenpc(struct npc_data *nd, int16 x, int16 y) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_lazy_pre ) { - int (*preHookFunc) (struct mob_data *md, va_list args); + if( HPMHooks.count.HP_npc_movenpc_pre ) { + void (*preHookFunc) (struct npc_data *nd, int16 *x, int16 *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_lazy_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_mob_ai_sub_lazy_pre[hIndex].func; - retVal___ = preHookFunc(md, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_movenpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_movenpc_pre[hIndex].func; + preHookFunc(nd, &x, &y); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list args___copy; va_copy(args___copy, args); - retVal___ = HPMHooks.source.mob.ai_sub_lazy(md, args___copy); - va_end(args___copy); + HPMHooks.source.npc.movenpc(nd, x, y); } - if( HPMHooks.count.HP_mob_ai_sub_lazy_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_lazy_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_mob_ai_sub_lazy_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_npc_movenpc_post ) { + void (*postHookFunc) (struct npc_data *nd, int16 *x, int16 *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_movenpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_movenpc_post[hIndex].func; + postHookFunc(nd, &x, &y); } } - return retVal___; + return; } -int HP_mob_ai_lazy(int tid, int64 tick, int id, intptr_t data) { +void HP_npc_setdisplayname(struct npc_data *nd, const char *newname) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_lazy_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_npc_setdisplayname_pre ) { + void (*preHookFunc) (struct npc_data *nd, const char *newname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_lazy_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_ai_lazy_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setdisplayname_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_setdisplayname_pre[hIndex].func; + preHookFunc(nd, newname); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mob.ai_lazy(tid, tick, id, data); + HPMHooks.source.npc.setdisplayname(nd, newname); } - if( HPMHooks.count.HP_mob_ai_lazy_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_lazy_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_ai_lazy_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_npc_setdisplayname_post ) { + void (*postHookFunc) (struct npc_data *nd, const char *newname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setdisplayname_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_setdisplayname_post[hIndex].func; + postHookFunc(nd, newname); } } - return retVal___; + return; } -int HP_mob_ai_hard(int tid, int64 tick, int id, intptr_t data) { +void HP_npc_setclass(struct npc_data *nd, short class_) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_setclass_pre ) { + void (*preHookFunc) (struct npc_data *nd, short *class_); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_setclass_pre[hIndex].func; + preHookFunc(nd, &class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.setclass(nd, class_); + } + if( HPMHooks.count.HP_npc_setclass_post ) { + void (*postHookFunc) (struct npc_data *nd, short *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_setclass_post[hIndex].func; + postHookFunc(nd, &class_); + } + } + return; +} +int HP_npc_do_atcmd_event(struct map_session_data *sd, const char *command, const char *message, const char *eventname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_hard_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_npc_do_atcmd_event_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *command, const char *message, const char *eventname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_hard_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_ai_hard_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_atcmd_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_do_atcmd_event_pre[hIndex].func; + retVal___ = preHookFunc(sd, command, message, eventname); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41799,26 +48272,26 @@ int HP_mob_ai_hard(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.mob.ai_hard(tid, tick, id, data); + retVal___ = HPMHooks.source.npc.do_atcmd_event(sd, command, message, eventname); } - if( HPMHooks.count.HP_mob_ai_hard_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_hard_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_ai_hard_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_npc_do_atcmd_event_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *command, const char *message, const char *eventname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_atcmd_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_do_atcmd_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, command, message, eventname); } } return retVal___; } -struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data) { +const char* HP_npc_parse_function(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; - struct item_drop* retVal___ = NULL; - if( HPMHooks.count.HP_mob_setdropitem_pre ) { - struct item_drop* (*preHookFunc) (int *nameid, int *qty, struct item_data *data); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_parse_function_pre ) { + const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_setdropitem_pre[hIndex].func; - retVal___ = preHookFunc(&nameid, &qty, data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_function_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_function_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41826,26 +48299,52 @@ struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data } } { - retVal___ = HPMHooks.source.mob.setdropitem(nameid, qty, data); + retVal___ = HPMHooks.source.npc.parse_function(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_mob_setdropitem_post ) { - struct item_drop* (*postHookFunc) (struct item_drop* retVal___, int *nameid, int *qty, struct item_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_setdropitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &nameid, &qty, data); + if( HPMHooks.count.HP_npc_parse_function_post ) { + const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_function_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_function_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval); } } return retVal___; } -struct item_drop* HP_mob_setlootitem(struct item *item) { +void HP_npc_parse_mob2(struct spawn_data *mobspawn) { int hIndex = 0; - struct item_drop* retVal___ = NULL; - if( HPMHooks.count.HP_mob_setlootitem_pre ) { - struct item_drop* (*preHookFunc) (struct item *item); + if( HPMHooks.count.HP_npc_parse_mob2_pre ) { + void (*preHookFunc) (struct spawn_data *mobspawn); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setlootitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_setlootitem_pre[hIndex].func; - retVal___ = preHookFunc(item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_mob2_pre[hIndex].func; + preHookFunc(mobspawn); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.parse_mob2(mobspawn); + } + if( HPMHooks.count.HP_npc_parse_mob2_post ) { + void (*postHookFunc) (struct spawn_data *mobspawn); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_mob2_post[hIndex].func; + postHookFunc(mobspawn); + } + } + return; +} +const char* HP_npc_parse_mob(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_parse_mob_pre ) { + const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_mob_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41853,26 +48352,26 @@ struct item_drop* HP_mob_setlootitem(struct item *item) { } } { - retVal___ = HPMHooks.source.mob.setlootitem(item); + retVal___ = HPMHooks.source.npc.parse_mob(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_mob_setlootitem_post ) { - struct item_drop* (*postHookFunc) (struct item_drop* retVal___, struct item *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setlootitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_setlootitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, item); + if( HPMHooks.count.HP_npc_parse_mob_post ) { + const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_mob_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval); } } return retVal___; } -int HP_mob_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { +const char* HP_npc_parse_mapflag(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_delay_item_drop_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_parse_mapflag_pre ) { + const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delay_item_drop_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_delay_item_drop_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mapflag_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_mapflag_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41880,25 +48379,25 @@ int HP_mob_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.mob.delay_item_drop(tid, tick, id, data); + retVal___ = HPMHooks.source.npc.parse_mapflag(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_mob_delay_item_drop_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delay_item_drop_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_delay_item_drop_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_npc_parse_mapflag_post ) { + const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mapflag_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_mapflag_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval); } } return retVal___; } -void HP_mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int loot, int drop_rate, unsigned short flag) { +void HP_npc_parse_unknown_mapflag(const char *name, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; - if( HPMHooks.count.HP_mob_item_drop_pre ) { - void (*preHookFunc) (struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int *loot, int *drop_rate, unsigned short *flag); + if( HPMHooks.count.HP_npc_parse_unknown_mapflag_pre ) { + void (*preHookFunc) (const char *name, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_drop_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_item_drop_pre[hIndex].func; - preHookFunc(md, dlist, ditem, &loot, &drop_rate, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_mapflag_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_unknown_mapflag_pre[hIndex].func; + preHookFunc(name, w3, w4, start, buffer, filepath, retval); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41906,26 +48405,26 @@ void HP_mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct } } { - HPMHooks.source.mob.item_drop(md, dlist, ditem, loot, drop_rate, flag); + HPMHooks.source.npc.parse_unknown_mapflag(name, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_mob_item_drop_post ) { - void (*postHookFunc) (struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int *loot, int *drop_rate, unsigned short *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_drop_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_item_drop_post[hIndex].func; - postHookFunc(md, dlist, ditem, &loot, &drop_rate, &flag); + if( HPMHooks.count.HP_npc_parse_unknown_mapflag_post ) { + void (*postHookFunc) (const char *name, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_mapflag_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_unknown_mapflag_post[hIndex].func; + postHookFunc(name, w3, w4, start, buffer, filepath, retval); } } return; } -int HP_mob_timer_delete(int tid, int64 tick, int id, intptr_t data) { +int HP_npc_parsesrcfile(const char *filepath, bool runOnInit) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_timer_delete_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_npc_parsesrcfile_pre ) { + int (*preHookFunc) (const char *filepath, bool *runOnInit); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_timer_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_timer_delete_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsesrcfile_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parsesrcfile_pre[hIndex].func; + retVal___ = preHookFunc(filepath, &runOnInit); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41933,28 +48432,26 @@ int HP_mob_timer_delete(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.mob.timer_delete(tid, tick, id, data); + retVal___ = HPMHooks.source.npc.parsesrcfile(filepath, runOnInit); } - if( HPMHooks.count.HP_mob_timer_delete_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_timer_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_timer_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_npc_parsesrcfile_post ) { + int (*postHookFunc) (int retVal___, const char *filepath, bool *runOnInit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsesrcfile_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parsesrcfile_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filepath, &runOnInit); } } return retVal___; } -int HP_mob_deleteslave_sub(struct block_list *bl, va_list ap) { +int HP_npc_script_event(struct map_session_data *sd, enum npce_event type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_deleteslave_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_npc_script_event_pre ) { + int (*preHookFunc) (struct map_session_data *sd, enum npce_event *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_mob_deleteslave_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_script_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_script_event_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41962,30 +48459,54 @@ int HP_mob_deleteslave_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.mob.deleteslave_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.npc.script_event(sd, type); } - if( HPMHooks.count.HP_mob_deleteslave_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_mob_deleteslave_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_npc_script_event_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum npce_event *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_script_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_script_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); } } return retVal___; } -int HP_mob_deleteslave(struct mob_data *md) { +void HP_npc_read_event_script(void) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_read_event_script_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_read_event_script_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_read_event_script_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.read_event_script(); + } + if( HPMHooks.count.HP_npc_read_event_script_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_read_event_script_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_read_event_script_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_npc_path_db_clear_sub(DBKey key, DBData *data, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_deleteslave_pre ) { - int (*preHookFunc) (struct mob_data *md); + if( HPMHooks.count.HP_npc_path_db_clear_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_deleteslave_pre[hIndex].func; - retVal___ = preHookFunc(md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_path_db_clear_sub_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_npc_path_db_clear_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, args___copy); + va_end(args___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -41993,26 +48514,32 @@ int HP_mob_deleteslave(struct mob_data *md) { } } { - retVal___ = HPMHooks.source.mob.deleteslave(md); + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.npc.path_db_clear_sub(key, data, args___copy); + va_end(args___copy); } - if( HPMHooks.count.HP_mob_deleteslave_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_deleteslave_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md); + if( HPMHooks.count.HP_npc_path_db_clear_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_path_db_clear_sub_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_npc_path_db_clear_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, args___copy); + va_end(args___copy); } } return retVal___; } -int HP_mob_respawn(int tid, int64 tick, int id, intptr_t data) { +int HP_npc_ev_label_db_clear_sub(DBKey key, DBData *data, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_respawn_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_npc_ev_label_db_clear_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_respawn_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_respawn_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ev_label_db_clear_sub_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_npc_ev_label_db_clear_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, args___copy); + va_end(args___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42020,104 +48547,109 @@ int HP_mob_respawn(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.mob.respawn(tid, tick, id, data); + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.npc.ev_label_db_clear_sub(key, data, args___copy); + va_end(args___copy); } - if( HPMHooks.count.HP_mob_respawn_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_respawn_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_respawn_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_npc_ev_label_db_clear_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ev_label_db_clear_sub_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_npc_ev_label_db_clear_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, args___copy); + va_end(args___copy); } } return retVal___; } -void HP_mob_log_damage(struct mob_data *md, struct block_list *src, int damage) { +int HP_npc_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_mob_log_damage_pre ) { - void (*preHookFunc) (struct mob_data *md, struct block_list *src, int *damage); + int retVal___ = 0; + if( HPMHooks.count.HP_npc_reload_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_log_damage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_log_damage_pre[hIndex].func; - preHookFunc(md, src, &damage); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_reload_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } - { - HPMHooks.source.mob.log_damage(md, src, damage); - } - if( HPMHooks.count.HP_mob_log_damage_post ) { - void (*postHookFunc) (struct mob_data *md, struct block_list *src, int *damage); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_log_damage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_log_damage_post[hIndex].func; - postHookFunc(md, src, &damage); + { + retVal___ = HPMHooks.source.npc.reload(); + } + if( HPMHooks.count.HP_npc_reload_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_reload_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -void HP_mob_damage(struct mob_data *md, struct block_list *src, int damage) { +bool HP_npc_unloadfile(const char *filepath) { int hIndex = 0; - if( HPMHooks.count.HP_mob_damage_pre ) { - void (*preHookFunc) (struct mob_data *md, struct block_list *src, int *damage); + bool retVal___ = false; + if( HPMHooks.count.HP_npc_unloadfile_pre ) { + bool (*preHookFunc) (const char *filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_damage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_damage_pre[hIndex].func; - preHookFunc(md, src, &damage); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_unloadfile_pre[hIndex].func; + retVal___ = preHookFunc(filepath); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mob.damage(md, src, damage); + retVal___ = HPMHooks.source.npc.unloadfile(filepath); } - if( HPMHooks.count.HP_mob_damage_post ) { - void (*postHookFunc) (struct mob_data *md, struct block_list *src, int *damage); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_damage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_damage_post[hIndex].func; - postHookFunc(md, src, &damage); + if( HPMHooks.count.HP_npc_unloadfile_post ) { + bool (*postHookFunc) (bool retVal___, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_unloadfile_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filepath); } } - return; + return retVal___; } -int HP_mob_dead(struct mob_data *md, struct block_list *src, int type) { +void HP_npc_do_clear_npc(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_dead_pre ) { - int (*preHookFunc) (struct mob_data *md, struct block_list *src, int *type); + if( HPMHooks.count.HP_npc_do_clear_npc_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_dead_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_dead_pre[hIndex].func; - retVal___ = preHookFunc(md, src, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_clear_npc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_do_clear_npc_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mob.dead(md, src, type); + HPMHooks.source.npc.do_clear_npc(); } - if( HPMHooks.count.HP_mob_dead_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *src, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_dead_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_dead_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, src, &type); + if( HPMHooks.count.HP_npc_do_clear_npc_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_clear_npc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_do_clear_npc_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -void HP_mob_revive(struct mob_data *md, unsigned int hp) { +void HP_npc_debug_warps_sub(struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_mob_revive_pre ) { - void (*preHookFunc) (struct mob_data *md, unsigned int *hp); + if( HPMHooks.count.HP_npc_debug_warps_sub_pre ) { + void (*preHookFunc) (struct npc_data *nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_revive_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_revive_pre[hIndex].func; - preHookFunc(md, &hp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_debug_warps_sub_pre[hIndex].func; + preHookFunc(nd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42125,80 +48657,78 @@ void HP_mob_revive(struct mob_data *md, unsigned int hp) { } } { - HPMHooks.source.mob.revive(md, hp); + HPMHooks.source.npc.debug_warps_sub(nd); } - if( HPMHooks.count.HP_mob_revive_post ) { - void (*postHookFunc) (struct mob_data *md, unsigned int *hp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_revive_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_revive_post[hIndex].func; - postHookFunc(md, &hp); + if( HPMHooks.count.HP_npc_debug_warps_sub_post ) { + void (*postHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_debug_warps_sub_post[hIndex].func; + postHookFunc(nd); } } return; } -int HP_mob_guardian_guildchange(struct mob_data *md) { +void HP_npc_debug_warps(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_guardian_guildchange_pre ) { - int (*preHookFunc) (struct mob_data *md); + if( HPMHooks.count.HP_npc_debug_warps_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_guardian_guildchange_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_guardian_guildchange_pre[hIndex].func; - retVal___ = preHookFunc(md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_debug_warps_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mob.guardian_guildchange(md); + HPMHooks.source.npc.debug_warps(); } - if( HPMHooks.count.HP_mob_guardian_guildchange_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_guardian_guildchange_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_guardian_guildchange_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md); + if( HPMHooks.count.HP_npc_debug_warps_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_debug_warps_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_mob_random_class(int *value, size_t count) { +void HP_npc_trader_count_funds(struct npc_data *nd, struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_random_class_pre ) { - int (*preHookFunc) (int *value, size_t *count); + if( HPMHooks.count.HP_npc_trader_count_funds_pre ) { + void (*preHookFunc) (struct npc_data *nd, struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_random_class_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_random_class_pre[hIndex].func; - retVal___ = preHookFunc(value, &count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_count_funds_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_trader_count_funds_pre[hIndex].func; + preHookFunc(nd, sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mob.random_class(value, count); + HPMHooks.source.npc.trader_count_funds(nd, sd); } - if( HPMHooks.count.HP_mob_random_class_post ) { - int (*postHookFunc) (int retVal___, int *value, size_t *count); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_random_class_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_random_class_post[hIndex].func; - retVal___ = postHookFunc(retVal___, value, &count); + if( HPMHooks.count.HP_npc_trader_count_funds_post ) { + void (*postHookFunc) (struct npc_data *nd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_count_funds_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_trader_count_funds_post[hIndex].func; + postHookFunc(nd, sd); } } - return retVal___; + return; } -int HP_mob_class_change(struct mob_data *md, int class_) { +bool HP_npc_trader_pay(struct npc_data *nd, struct map_session_data *sd, int price, int points) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_class_change_pre ) { - int (*preHookFunc) (struct mob_data *md, int *class_); + bool retVal___ = false; + if( HPMHooks.count.HP_npc_trader_pay_pre ) { + bool (*preHookFunc) (struct npc_data *nd, struct map_session_data *sd, int *price, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_class_change_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_class_change_pre[hIndex].func; - retVal___ = preHookFunc(md, &class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_pay_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_trader_pay_pre[hIndex].func; + retVal___ = preHookFunc(nd, sd, &price, &points); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42206,25 +48736,25 @@ int HP_mob_class_change(struct mob_data *md, int class_) { } } { - retVal___ = HPMHooks.source.mob.class_change(md, class_); + retVal___ = HPMHooks.source.npc.trader_pay(nd, sd, price, points); } - if( HPMHooks.count.HP_mob_class_change_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md, int *class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_class_change_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_class_change_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &class_); + if( HPMHooks.count.HP_npc_trader_pay_post ) { + bool (*postHookFunc) (bool retVal___, struct npc_data *nd, struct map_session_data *sd, int *price, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_pay_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_trader_pay_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, sd, &price, &points); } } return retVal___; } -void HP_mob_heal(struct mob_data *md, unsigned int heal) { +void HP_npc_trader_update(int master) { int hIndex = 0; - if( HPMHooks.count.HP_mob_heal_pre ) { - void (*preHookFunc) (struct mob_data *md, unsigned int *heal); + if( HPMHooks.count.HP_npc_trader_update_pre ) { + void (*preHookFunc) (int *master); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_heal_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_heal_pre[hIndex].func; - preHookFunc(md, &heal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_update_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_trader_update_pre[hIndex].func; + preHookFunc(&master); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42232,28 +48762,26 @@ void HP_mob_heal(struct mob_data *md, unsigned int heal) { } } { - HPMHooks.source.mob.heal(md, heal); + HPMHooks.source.npc.trader_update(master); } - if( HPMHooks.count.HP_mob_heal_post ) { - void (*postHookFunc) (struct mob_data *md, unsigned int *heal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_heal_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_heal_post[hIndex].func; - postHookFunc(md, &heal); + if( HPMHooks.count.HP_npc_trader_update_post ) { + void (*postHookFunc) (int *master); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_update_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_trader_update_post[hIndex].func; + postHookFunc(&master); } } return; } -int HP_mob_warpslave_sub(struct block_list *bl, va_list ap) { +int HP_npc_market_buylist(struct map_session_data *sd, unsigned short list_size, struct packet_npc_market_purchase *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_warpslave_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_npc_market_buylist_pre ) { + int (*preHookFunc) (struct map_session_data *sd, unsigned short *list_size, struct packet_npc_market_purchase *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_mob_warpslave_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_market_buylist_pre[hIndex].func; + retVal___ = preHookFunc(sd, &list_size, p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42261,30 +48789,26 @@ int HP_mob_warpslave_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.mob.warpslave_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.npc.market_buylist(sd, list_size, p); } - if( HPMHooks.count.HP_mob_warpslave_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_mob_warpslave_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_npc_market_buylist_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short *list_size, struct packet_npc_market_purchase *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_market_buylist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &list_size, p); } } return retVal___; } -int HP_mob_warpslave(struct block_list *bl, int range) { +bool HP_npc_trader_open(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_warpslave_pre ) { - int (*preHookFunc) (struct block_list *bl, int *range); + bool retVal___ = false; + if( HPMHooks.count.HP_npc_trader_open_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_warpslave_pre[hIndex].func; - retVal___ = preHookFunc(bl, &range); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_open_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_trader_open_pre[hIndex].func; + retVal___ = preHookFunc(sd, nd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42292,146 +48816,130 @@ int HP_mob_warpslave(struct block_list *bl, int range) { } } { - retVal___ = HPMHooks.source.mob.warpslave(bl, range); + retVal___ = HPMHooks.source.npc.trader_open(sd, nd); } - if( HPMHooks.count.HP_mob_warpslave_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int *range); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_warpslave_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &range); + if( HPMHooks.count.HP_npc_trader_open_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_open_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_trader_open_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, nd); } } return retVal___; } -int HP_mob_countslave_sub(struct block_list *bl, va_list ap) { +void HP_npc_market_fromsql(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_countslave_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_npc_market_fromsql_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_mob_countslave_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_fromsql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_market_fromsql_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.mob.countslave_sub(bl, ap___copy); - va_end(ap___copy); + HPMHooks.source.npc.market_fromsql(); } - if( HPMHooks.count.HP_mob_countslave_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_mob_countslave_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_npc_market_fromsql_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_fromsql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_market_fromsql_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_mob_countslave(struct block_list *bl) { +void HP_npc_market_tosql(struct npc_data *nd, unsigned short index) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_countslave_pre ) { - int (*preHookFunc) (struct block_list *bl); + if( HPMHooks.count.HP_npc_market_tosql_pre ) { + void (*preHookFunc) (struct npc_data *nd, unsigned short *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_countslave_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_market_tosql_pre[hIndex].func; + preHookFunc(nd, &index); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mob.countslave(bl); + HPMHooks.source.npc.market_tosql(nd, index); } - if( HPMHooks.count.HP_mob_countslave_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_countslave_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_npc_market_tosql_post ) { + void (*postHookFunc) (struct npc_data *nd, unsigned short *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_market_tosql_post[hIndex].func; + postHookFunc(nd, &index); } } - return retVal___; + return; } -int HP_mob_summonslave(struct mob_data *md2, int *value, int amount, uint16 skill_id) { +void HP_npc_market_delfromsql(struct npc_data *nd, unsigned short index) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_summonslave_pre ) { - int (*preHookFunc) (struct mob_data *md2, int *value, int *amount, uint16 *skill_id); + if( HPMHooks.count.HP_npc_market_delfromsql_pre ) { + void (*preHookFunc) (struct npc_data *nd, unsigned short *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_summonslave_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_summonslave_pre[hIndex].func; - retVal___ = preHookFunc(md2, value, &amount, &skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_market_delfromsql_pre[hIndex].func; + preHookFunc(nd, &index); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mob.summonslave(md2, value, amount, skill_id); + HPMHooks.source.npc.market_delfromsql(nd, index); } - if( HPMHooks.count.HP_mob_summonslave_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md2, int *value, int *amount, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_summonslave_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_summonslave_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md2, value, &amount, &skill_id); + if( HPMHooks.count.HP_npc_market_delfromsql_post ) { + void (*postHookFunc) (struct npc_data *nd, unsigned short *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_market_delfromsql_post[hIndex].func; + postHookFunc(nd, &index); } } - return retVal___; + return; } -int HP_mob_getfriendhprate_sub(struct block_list *bl, va_list ap) { +void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_getfriendhprate_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_npc_market_delfromsql_sub_pre ) { + void (*preHookFunc) (const char *npcname, unsigned short *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_mob_getfriendhprate_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_pre[hIndex].func; + preHookFunc(npcname, &index); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.mob.getfriendhprate_sub(bl, ap___copy); - va_end(ap___copy); + HPMHooks.source.npc.market_delfromsql_sub(npcname, index); } - if( HPMHooks.count.HP_mob_getfriendhprate_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_mob_getfriendhprate_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_npc_market_delfromsql_sub_post ) { + void (*postHookFunc) (const char *npcname, unsigned short *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_post[hIndex].func; + postHookFunc(npcname, &index); } } - return retVal___; + return; } -struct block_list* HP_mob_getfriendhprate(struct mob_data *md, int min_rate, int max_rate) { +bool HP_npc_db_checkid(const int id) { int hIndex = 0; - struct block_list* retVal___ = NULL; - if( HPMHooks.count.HP_mob_getfriendhprate_pre ) { - struct block_list* (*preHookFunc) (struct mob_data *md, int *min_rate, int *max_rate); + bool retVal___ = false; + if( HPMHooks.count.HP_npc_db_checkid_pre ) { + bool (*preHookFunc) (const int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_getfriendhprate_pre[hIndex].func; - retVal___ = preHookFunc(md, &min_rate, &max_rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_db_checkid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_db_checkid_pre[hIndex].func; + retVal___ = preHookFunc(&id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42439,26 +48947,26 @@ struct block_list* HP_mob_getfriendhprate(struct mob_data *md, int min_rate, int } } { - retVal___ = HPMHooks.source.mob.getfriendhprate(md, min_rate, max_rate); + retVal___ = HPMHooks.source.npc.db_checkid(id); } - if( HPMHooks.count.HP_mob_getfriendhprate_post ) { - struct block_list* (*postHookFunc) (struct block_list* retVal___, struct mob_data *md, int *min_rate, int *max_rate); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_getfriendhprate_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &min_rate, &max_rate); + if( HPMHooks.count.HP_npc_db_checkid_post ) { + bool (*postHookFunc) (bool retVal___, const int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_db_checkid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_db_checkid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); } } return retVal___; } -struct block_list* HP_mob_getmasterhpltmaxrate(struct mob_data *md, int rate) { +int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - struct block_list* retVal___ = NULL; - if( HPMHooks.count.HP_mob_getmasterhpltmaxrate_pre ) { - struct block_list* (*preHookFunc) (struct mob_data *md, int *rate); + int retVal___ = 0; + if( HPMHooks.count.HP_npc_secure_timeout_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getmasterhpltmaxrate_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_getmasterhpltmaxrate_pre[hIndex].func; - retVal___ = preHookFunc(md, &rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_secure_timeout_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_secure_timeout_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42466,113 +48974,106 @@ struct block_list* HP_mob_getmasterhpltmaxrate(struct mob_data *md, int rate) { } } { - retVal___ = HPMHooks.source.mob.getmasterhpltmaxrate(md, rate); + retVal___ = HPMHooks.source.npc.secure_timeout_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_mob_getmasterhpltmaxrate_post ) { - struct block_list* (*postHookFunc) (struct block_list* retVal___, struct mob_data *md, int *rate); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getmasterhpltmaxrate_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_getmasterhpltmaxrate_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &rate); + if( HPMHooks.count.HP_npc_secure_timeout_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_secure_timeout_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_secure_timeout_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_mob_getfriendstatus_sub(struct block_list *bl, va_list ap) { +/* nullpo */ +void HP_nullpo_assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_getfriendstatus_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_nullpo_assert_report_pre ) { + void (*preHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_mob_getfriendstatus_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_nullpo_assert_report_pre[hIndex].func; + preHookFunc(file, &line, func, targetname, title); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.mob.getfriendstatus_sub(bl, ap___copy); - va_end(ap___copy); + HPMHooks.source.nullpo.assert_report(file, line, func, targetname, title); } - if( HPMHooks.count.HP_mob_getfriendstatus_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_mob_getfriendstatus_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_nullpo_assert_report_post ) { + void (*postHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title); + for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_nullpo_assert_report_post[hIndex].func; + postHookFunc(file, &line, func, targetname, title); } } - return retVal___; + return; } -struct mob_data* HP_mob_getfriendstatus(struct mob_data *md, int cond1, int cond2) { +/* party */ +void HP_party_init(bool minimal) { int hIndex = 0; - struct mob_data* retVal___ = NULL; - if( HPMHooks.count.HP_mob_getfriendstatus_pre ) { - struct mob_data* (*preHookFunc) (struct mob_data *md, int *cond1, int *cond2); + if( HPMHooks.count.HP_party_init_pre ) { + void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_getfriendstatus_pre[hIndex].func; - retVal___ = preHookFunc(md, &cond1, &cond2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_init_pre[hIndex].func; + preHookFunc(&minimal); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mob.getfriendstatus(md, cond1, cond2); + HPMHooks.source.party.init(minimal); } - if( HPMHooks.count.HP_mob_getfriendstatus_post ) { - struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct mob_data *md, int *cond1, int *cond2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_getfriendstatus_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &cond1, &cond2); + if( HPMHooks.count.HP_party_init_post ) { + void (*postHookFunc) (bool *minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_init_post[hIndex].func; + postHookFunc(&minimal); } } - return retVal___; + return; } -int HP_mob_skill_use(struct mob_data *md, int64 tick, int event) { +void HP_party_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_skill_use_pre ) { - int (*preHookFunc) (struct mob_data *md, int64 *tick, int *event); + if( HPMHooks.count.HP_party_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_use_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_skill_use_pre[hIndex].func; - retVal___ = preHookFunc(md, &tick, &event); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mob.skill_use(md, tick, event); - } - if( HPMHooks.count.HP_mob_skill_use_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md, int64 *tick, int *event); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_use_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_skill_use_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &tick, &event); + HPMHooks.source.party.final(); + } + if( HPMHooks.count.HP_party_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_mob_skill_event(struct mob_data *md, struct block_list *src, int64 tick, int flag) { +struct party_data* HP_party_search(int party_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_skill_event_pre ) { - int (*preHookFunc) (struct mob_data *md, struct block_list *src, int64 *tick, int *flag); + struct party_data* retVal___ = NULL; + if( HPMHooks.count.HP_party_search_pre ) { + struct party_data* (*preHookFunc) (int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_event_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_skill_event_pre[hIndex].func; - retVal___ = preHookFunc(md, src, &tick, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_search_pre[hIndex].func; + retVal___ = preHookFunc(&party_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42580,26 +49081,26 @@ int HP_mob_skill_event(struct mob_data *md, struct block_list *src, int64 tick, } } { - retVal___ = HPMHooks.source.mob.skill_event(md, src, tick, flag); + retVal___ = HPMHooks.source.party.search(party_id); } - if( HPMHooks.count.HP_mob_skill_event_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *src, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_event_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_skill_event_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, src, &tick, &flag); + if( HPMHooks.count.HP_party_search_post ) { + struct party_data* (*postHookFunc) (struct party_data* retVal___, int *party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id); } } return retVal___; } -int HP_mob_is_clone(int class_) { +struct party_data* HP_party_searchname(const char *str) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_is_clone_pre ) { - int (*preHookFunc) (int *class_); + struct party_data* retVal___ = NULL; + if( HPMHooks.count.HP_party_searchname_pre ) { + struct party_data* (*preHookFunc) (const char *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_clone_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_is_clone_pre[hIndex].func; - retVal___ = preHookFunc(&class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_searchname_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_searchname_pre[hIndex].func; + retVal___ = preHookFunc(str); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42607,26 +49108,26 @@ int HP_mob_is_clone(int class_) { } } { - retVal___ = HPMHooks.source.mob.is_clone(class_); + retVal___ = HPMHooks.source.party.searchname(str); } - if( HPMHooks.count.HP_mob_is_clone_post ) { - int (*postHookFunc) (int retVal___, int *class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_clone_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_is_clone_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &class_); + if( HPMHooks.count.HP_party_searchname_post ) { + struct party_data* (*postHookFunc) (struct party_data* retVal___, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_searchname_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_searchname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); } } return retVal___; } -int HP_mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, const char *event, int master_id, int mode, int flag, unsigned int duration) { +int HP_party_getmemberid(struct party_data *p, struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_clone_spawn_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *event, int *master_id, int *mode, int *flag, unsigned int *duration); + if( HPMHooks.count.HP_party_getmemberid_pre ) { + int (*preHookFunc) (struct party_data *p, struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_spawn_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_clone_spawn_pre[hIndex].func; - retVal___ = preHookFunc(sd, &m, &x, &y, event, &master_id, &mode, &flag, &duration); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getmemberid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_getmemberid_pre[hIndex].func; + retVal___ = preHookFunc(p, sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42634,26 +49135,26 @@ int HP_mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, c } } { - retVal___ = HPMHooks.source.mob.clone_spawn(sd, m, x, y, event, master_id, mode, flag, duration); + retVal___ = HPMHooks.source.party.getmemberid(p, sd); } - if( HPMHooks.count.HP_mob_clone_spawn_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *event, int *master_id, int *mode, int *flag, unsigned int *duration); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_spawn_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_clone_spawn_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &m, &x, &y, event, &master_id, &mode, &flag, &duration); + if( HPMHooks.count.HP_party_getmemberid_post ) { + int (*postHookFunc) (int retVal___, struct party_data *p, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getmemberid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_getmemberid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, sd); } } return retVal___; } -int HP_mob_clone_delete(struct mob_data *md) { +struct map_session_data* HP_party_getavailablesd(struct party_data *p) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mob_clone_delete_pre ) { - int (*preHookFunc) (struct mob_data *md); + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_party_getavailablesd_pre ) { + struct map_session_data* (*preHookFunc) (struct party_data *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_clone_delete_pre[hIndex].func; - retVal___ = preHookFunc(md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getavailablesd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_getavailablesd_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42661,26 +49162,26 @@ int HP_mob_clone_delete(struct mob_data *md) { } } { - retVal___ = HPMHooks.source.mob.clone_delete(md); + retVal___ = HPMHooks.source.party.getavailablesd(p); } - if( HPMHooks.count.HP_mob_clone_delete_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_clone_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md); + if( HPMHooks.count.HP_party_getavailablesd_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct party_data *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getavailablesd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_getavailablesd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } return retVal___; } -unsigned int HP_mob_drop_adjust(int baserate, int rate_adjust, unsigned short rate_min, unsigned short rate_max) { +int HP_party_create(struct map_session_data *sd, char *name, int item, int item2) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_mob_drop_adjust_pre ) { - unsigned int (*preHookFunc) (int *baserate, int *rate_adjust, unsigned short *rate_min, unsigned short *rate_max); + int retVal___ = 0; + if( HPMHooks.count.HP_party_create_pre ) { + int (*preHookFunc) (struct map_session_data *sd, char *name, int *item, int *item2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_drop_adjust_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_drop_adjust_pre[hIndex].func; - retVal___ = preHookFunc(&baserate, &rate_adjust, &rate_min, &rate_max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_create_pre[hIndex].func; + retVal___ = preHookFunc(sd, name, &item, &item2); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42688,25 +49189,25 @@ unsigned int HP_mob_drop_adjust(int baserate, int rate_adjust, unsigned short ra } } { - retVal___ = HPMHooks.source.mob.drop_adjust(baserate, rate_adjust, rate_min, rate_max); + retVal___ = HPMHooks.source.party.create(sd, name, item, item2); } - if( HPMHooks.count.HP_mob_drop_adjust_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, int *baserate, int *rate_adjust, unsigned short *rate_min, unsigned short *rate_max); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_drop_adjust_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_drop_adjust_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &baserate, &rate_adjust, &rate_min, &rate_max); + if( HPMHooks.count.HP_party_create_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name, int *item, int *item2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name, &item, &item2); } } return retVal___; } -void HP_mob_item_dropratio_adjust(int nameid, int mob_id, int *rate_adjust) { +void HP_party_created(int account_id, int char_id, int fail, int party_id, char *name) { int hIndex = 0; - if( HPMHooks.count.HP_mob_item_dropratio_adjust_pre ) { - void (*preHookFunc) (int *nameid, int *mob_id, int *rate_adjust); + if( HPMHooks.count.HP_party_created_pre ) { + void (*preHookFunc) (int *account_id, int *char_id, int *fail, int *party_id, char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_dropratio_adjust_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_item_dropratio_adjust_pre[hIndex].func; - preHookFunc(&nameid, &mob_id, rate_adjust); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_created_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_created_pre[hIndex].func; + preHookFunc(&account_id, &char_id, &fail, &party_id, name); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42714,26 +49215,26 @@ void HP_mob_item_dropratio_adjust(int nameid, int mob_id, int *rate_adjust) { } } { - HPMHooks.source.mob.item_dropratio_adjust(nameid, mob_id, rate_adjust); + HPMHooks.source.party.created(account_id, char_id, fail, party_id, name); } - if( HPMHooks.count.HP_mob_item_dropratio_adjust_post ) { - void (*postHookFunc) (int *nameid, int *mob_id, int *rate_adjust); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_dropratio_adjust_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_item_dropratio_adjust_post[hIndex].func; - postHookFunc(&nameid, &mob_id, rate_adjust); + if( HPMHooks.count.HP_party_created_post ) { + void (*postHookFunc) (int *account_id, int *char_id, int *fail, int *party_id, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_created_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_created_post[hIndex].func; + postHookFunc(&account_id, &char_id, &fail, &party_id, name); } } return; } -bool HP_mob_parse_dbrow(char **str) { +int HP_party_request_info(int party_id, int char_id) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mob_parse_dbrow_pre ) { - bool (*preHookFunc) (char **str); + int retVal___ = 0; + if( HPMHooks.count.HP_party_request_info_pre ) { + int (*preHookFunc) (int *party_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dbrow_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_parse_dbrow_pre[hIndex].func; - retVal___ = preHookFunc(str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_request_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_request_info_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &char_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42741,26 +49242,26 @@ bool HP_mob_parse_dbrow(char **str) { } } { - retVal___ = HPMHooks.source.mob.parse_dbrow(str); + retVal___ = HPMHooks.source.party.request_info(party_id, char_id); } - if( HPMHooks.count.HP_mob_parse_dbrow_post ) { - bool (*postHookFunc) (bool retVal___, char **str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dbrow_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_parse_dbrow_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str); + if( HPMHooks.count.HP_party_request_info_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_request_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_request_info_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &char_id); } } return retVal___; } -bool HP_mob_readdb_sub(char *fields[], int columns, int current) { +int HP_party_invite(struct map_session_data *sd, struct map_session_data *tsd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mob_readdb_sub_pre ) { - bool (*preHookFunc) (char *fields[], int *columns, int *current); + int retVal___ = 0; + if( HPMHooks.count.HP_party_invite_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_readdb_sub_pre[hIndex].func; - retVal___ = preHookFunc(fields, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_invite_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_invite_pre[hIndex].func; + retVal___ = preHookFunc(sd, tsd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42768,25 +49269,25 @@ bool HP_mob_readdb_sub(char *fields[], int columns, int current) { } } { - retVal___ = HPMHooks.source.mob.readdb_sub(fields, columns, current); + retVal___ = HPMHooks.source.party.invite(sd, tsd); } - if( HPMHooks.count.HP_mob_readdb_sub_post ) { - bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_readdb_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + if( HPMHooks.count.HP_party_invite_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_invite_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_invite_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, tsd); } } return retVal___; } -void HP_mob_readdb(void) { +void HP_party_member_joined(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_mob_readdb_pre ) { - void (*preHookFunc) (void); + if( HPMHooks.count.HP_party_member_joined_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_readdb_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_joined_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_member_joined_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42794,26 +49295,26 @@ void HP_mob_readdb(void) { } } { - HPMHooks.source.mob.readdb(); + HPMHooks.source.party.member_joined(sd); } - if( HPMHooks.count.HP_mob_readdb_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_readdb_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_party_member_joined_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_joined_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_member_joined_post[hIndex].func; + postHookFunc(sd); } } return; } -int HP_mob_read_sqldb(void) { +int HP_party_member_added(int party_id, int account_id, int char_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_read_sqldb_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_party_member_added_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, int *char_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqldb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_read_sqldb_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_added_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_member_added_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &char_id, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42821,52 +49322,26 @@ int HP_mob_read_sqldb(void) { } } { - retVal___ = HPMHooks.source.mob.read_sqldb(); + retVal___ = HPMHooks.source.party.member_added(party_id, account_id, char_id, flag); } - if( HPMHooks.count.HP_mob_read_sqldb_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqldb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_read_sqldb_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_party_member_added_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_added_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_member_added_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id, &flag); } } return retVal___; } -void HP_mob_name_constants(void) { - int hIndex = 0; - if( HPMHooks.count.HP_mob_name_constants_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_name_constants_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_name_constants_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.mob.name_constants(); - } - if( HPMHooks.count.HP_mob_name_constants_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_name_constants_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_name_constants_post[hIndex].func; - postHookFunc(); - } - } - return; -} -bool HP_mob_readdb_mobavail(char *str[], int columns, int current) { +int HP_party_leave(struct map_session_data *sd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mob_readdb_mobavail_pre ) { - bool (*preHookFunc) (char *str[], int *columns, int *current); + int retVal___ = 0; + if( HPMHooks.count.HP_party_leave_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_mobavail_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_readdb_mobavail_pre[hIndex].func; - retVal___ = preHookFunc(str, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_leave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_leave_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42874,26 +49349,26 @@ bool HP_mob_readdb_mobavail(char *str[], int columns, int current) { } } { - retVal___ = HPMHooks.source.mob.readdb_mobavail(str, columns, current); + retVal___ = HPMHooks.source.party.leave(sd); } - if( HPMHooks.count.HP_mob_readdb_mobavail_post ) { - bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_mobavail_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_readdb_mobavail_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, &columns, ¤t); + if( HPMHooks.count.HP_party_leave_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_leave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_leave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_mob_read_randommonster(void) { +int HP_party_removemember(struct map_session_data *sd, int account_id, char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_read_randommonster_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_party_removemember_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *account_id, char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_randommonster_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_read_randommonster_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_removemember_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_removemember_pre[hIndex].func; + retVal___ = preHookFunc(sd, &account_id, name); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42901,26 +49376,26 @@ int HP_mob_read_randommonster(void) { } } { - retVal___ = HPMHooks.source.mob.read_randommonster(); + retVal___ = HPMHooks.source.party.removemember(sd, account_id, name); } - if( HPMHooks.count.HP_mob_read_randommonster_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_randommonster_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_read_randommonster_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_party_removemember_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *account_id, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_removemember_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_removemember_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &account_id, name); } } return retVal___; } -bool HP_mob_parse_row_chatdb(char **str, const char *source, int line, int *last_msg_id) { +int HP_party_member_withdraw(int party_id, int account_id, int char_id) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mob_parse_row_chatdb_pre ) { - bool (*preHookFunc) (char **str, const char *source, int *line, int *last_msg_id); + int retVal___ = 0; + if( HPMHooks.count.HP_party_member_withdraw_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_chatdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_parse_row_chatdb_pre[hIndex].func; - retVal___ = preHookFunc(str, source, &line, last_msg_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_withdraw_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_member_withdraw_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &char_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42928,25 +49403,25 @@ bool HP_mob_parse_row_chatdb(char **str, const char *source, int line, int *last } } { - retVal___ = HPMHooks.source.mob.parse_row_chatdb(str, source, line, last_msg_id); + retVal___ = HPMHooks.source.party.member_withdraw(party_id, account_id, char_id); } - if( HPMHooks.count.HP_mob_parse_row_chatdb_post ) { - bool (*postHookFunc) (bool retVal___, char **str, const char *source, int *line, int *last_msg_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_chatdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_parse_row_chatdb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, source, &line, last_msg_id); + if( HPMHooks.count.HP_party_member_withdraw_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_withdraw_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_member_withdraw_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id); } } return retVal___; } -void HP_mob_readchatdb(void) { +void HP_party_reply_invite(struct map_session_data *sd, int party_id, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_mob_readchatdb_pre ) { - void (*preHookFunc) (void); + if( HPMHooks.count.HP_party_reply_invite_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *party_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readchatdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_readchatdb_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_reply_invite_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_reply_invite_pre[hIndex].func; + preHookFunc(sd, &party_id, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42954,26 +49429,26 @@ void HP_mob_readchatdb(void) { } } { - HPMHooks.source.mob.readchatdb(); + HPMHooks.source.party.reply_invite(sd, party_id, flag); } - if( HPMHooks.count.HP_mob_readchatdb_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readchatdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_readchatdb_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_party_reply_invite_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *party_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_reply_invite_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_reply_invite_post[hIndex].func; + postHookFunc(sd, &party_id, &flag); } } return; } -bool HP_mob_parse_row_mobskilldb(char **str, int columns, int current) { +int HP_party_recv_noinfo(int party_id, int char_id) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mob_parse_row_mobskilldb_pre ) { - bool (*preHookFunc) (char **str, int *columns, int *current); + int retVal___ = 0; + if( HPMHooks.count.HP_party_recv_noinfo_pre ) { + int (*preHookFunc) (int *party_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_mobskilldb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_parse_row_mobskilldb_pre[hIndex].func; - retVal___ = preHookFunc(str, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_noinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_recv_noinfo_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &char_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -42981,52 +49456,53 @@ bool HP_mob_parse_row_mobskilldb(char **str, int columns, int current) { } } { - retVal___ = HPMHooks.source.mob.parse_row_mobskilldb(str, columns, current); + retVal___ = HPMHooks.source.party.recv_noinfo(party_id, char_id); } - if( HPMHooks.count.HP_mob_parse_row_mobskilldb_post ) { - bool (*postHookFunc) (bool retVal___, char **str, int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_mobskilldb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_parse_row_mobskilldb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, &columns, ¤t); + if( HPMHooks.count.HP_party_recv_noinfo_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_noinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_recv_noinfo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &char_id); } } return retVal___; } -void HP_mob_readskilldb(void) { +int HP_party_recv_info(struct party *sp, int char_id) { int hIndex = 0; - if( HPMHooks.count.HP_mob_readskilldb_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_party_recv_info_pre ) { + int (*preHookFunc) (struct party *sp, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_readskilldb_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_recv_info_pre[hIndex].func; + retVal___ = preHookFunc(sp, &char_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mob.readskilldb(); + retVal___ = HPMHooks.source.party.recv_info(sp, char_id); } - if( HPMHooks.count.HP_mob_readskilldb_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_readskilldb_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_party_recv_info_post ) { + int (*postHookFunc) (int retVal___, struct party *sp, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_recv_info_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sp, &char_id); } } - return; + return retVal___; } -int HP_mob_read_sqlskilldb(void) { +int HP_party_recv_movemap(int party_id, int account_id, int char_id, unsigned short mapid, int online, int lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_read_sqlskilldb_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_party_recv_movemap_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, int *char_id, unsigned short *mapid, int *online, int *lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqlskilldb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_read_sqlskilldb_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_movemap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_recv_movemap_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &char_id, &mapid, &online, &lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43034,26 +49510,26 @@ int HP_mob_read_sqlskilldb(void) { } } { - retVal___ = HPMHooks.source.mob.read_sqlskilldb(); + retVal___ = HPMHooks.source.party.recv_movemap(party_id, account_id, char_id, mapid, online, lv); } - if( HPMHooks.count.HP_mob_read_sqlskilldb_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqlskilldb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_read_sqlskilldb_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_party_recv_movemap_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id, unsigned short *mapid, int *online, int *lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_movemap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_recv_movemap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id, &mapid, &online, &lv); } } return retVal___; } -bool HP_mob_readdb_race2(char *fields[], int columns, int current) { +int HP_party_broken(int party_id) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mob_readdb_race2_pre ) { - bool (*preHookFunc) (char *fields[], int *columns, int *current); + int retVal___ = 0; + if( HPMHooks.count.HP_party_broken_pre ) { + int (*preHookFunc) (int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_race2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_readdb_race2_pre[hIndex].func; - retVal___ = preHookFunc(fields, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_broken_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_broken_pre[hIndex].func; + retVal___ = preHookFunc(&party_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43061,26 +49537,26 @@ bool HP_mob_readdb_race2(char *fields[], int columns, int current) { } } { - retVal___ = HPMHooks.source.mob.readdb_race2(fields, columns, current); + retVal___ = HPMHooks.source.party.broken(party_id); } - if( HPMHooks.count.HP_mob_readdb_race2_post ) { - bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_race2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_readdb_race2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + if( HPMHooks.count.HP_party_broken_post ) { + int (*postHookFunc) (int retVal___, int *party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_broken_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_broken_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id); } } return retVal___; } -bool HP_mob_readdb_itemratio(char *str[], int columns, int current) { +int HP_party_optionchanged(int party_id, int account_id, int exp, int item, int flag) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mob_readdb_itemratio_pre ) { - bool (*preHookFunc) (char *str[], int *columns, int *current); + int retVal___ = 0; + if( HPMHooks.count.HP_party_optionchanged_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, int *exp, int *item, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_itemratio_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_readdb_itemratio_pre[hIndex].func; - retVal___ = preHookFunc(str, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_optionchanged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_optionchanged_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &exp, &item, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43088,77 +49564,79 @@ bool HP_mob_readdb_itemratio(char *str[], int columns, int current) { } } { - retVal___ = HPMHooks.source.mob.readdb_itemratio(str, columns, current); + retVal___ = HPMHooks.source.party.optionchanged(party_id, account_id, exp, item, flag); } - if( HPMHooks.count.HP_mob_readdb_itemratio_post ) { - bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_itemratio_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_readdb_itemratio_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, &columns, ¤t); + if( HPMHooks.count.HP_party_optionchanged_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *exp, int *item, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_optionchanged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_optionchanged_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, &exp, &item, &flag); } } return retVal___; } -void HP_mob_load(bool minimal) { +int HP_party_changeoption(struct map_session_data *sd, int exp, int item) { int hIndex = 0; - if( HPMHooks.count.HP_mob_load_pre ) { - void (*preHookFunc) (bool *minimal); + int retVal___ = 0; + if( HPMHooks.count.HP_party_changeoption_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *exp, int *item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_load_pre[hIndex].func; - preHookFunc(&minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeoption_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_changeoption_pre[hIndex].func; + retVal___ = preHookFunc(sd, &exp, &item); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mob.load(minimal); + retVal___ = HPMHooks.source.party.changeoption(sd, exp, item); } - if( HPMHooks.count.HP_mob_load_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_load_post[hIndex].func; - postHookFunc(&minimal); + if( HPMHooks.count.HP_party_changeoption_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *exp, int *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeoption_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_changeoption_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &exp, &item); } } - return; + return retVal___; } -void HP_mob_clear_spawninfo(void) { +bool HP_party_changeleader(struct map_session_data *sd, struct map_session_data *t_sd) { int hIndex = 0; - if( HPMHooks.count.HP_mob_clear_spawninfo_pre ) { - void (*preHookFunc) (void); + bool retVal___ = false; + if( HPMHooks.count.HP_party_changeleader_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, struct map_session_data *t_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clear_spawninfo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_clear_spawninfo_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeleader_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_changeleader_pre[hIndex].func; + retVal___ = preHookFunc(sd, t_sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mob.clear_spawninfo(); + retVal___ = HPMHooks.source.party.changeleader(sd, t_sd); } - if( HPMHooks.count.HP_mob_clear_spawninfo_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clear_spawninfo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_clear_spawninfo_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_party_changeleader_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct map_session_data *t_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeleader_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_changeleader_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, t_sd); } } - return; + return retVal___; } -void HP_mob_destroy_mob_db(int index) { +void HP_party_send_movemap(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_mob_destroy_mob_db_pre ) { - void (*preHookFunc) (int *index); + if( HPMHooks.count.HP_party_send_movemap_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_mob_db_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mob_destroy_mob_db_pre[hIndex].func; - preHookFunc(&index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_movemap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_send_movemap_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43166,54 +49644,52 @@ void HP_mob_destroy_mob_db(int index) { } } { - HPMHooks.source.mob.destroy_mob_db(index); + HPMHooks.source.party.send_movemap(sd); } - if( HPMHooks.count.HP_mob_destroy_mob_db_post ) { - void (*postHookFunc) (int *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_mob_db_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mob_destroy_mob_db_post[hIndex].func; - postHookFunc(&index); + if( HPMHooks.count.HP_party_send_movemap_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_movemap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_send_movemap_post[hIndex].func; + postHookFunc(sd); } } return; } -/* npc */ -int HP_npc_init(bool minimal) { +void HP_party_send_levelup(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_init_pre ) { - int (*preHookFunc) (bool *minimal); + if( HPMHooks.count.HP_party_send_levelup_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_init_pre[hIndex].func; - retVal___ = preHookFunc(&minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_levelup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_send_levelup_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.npc.init(minimal); + HPMHooks.source.party.send_levelup(sd); } - if( HPMHooks.count.HP_npc_init_post ) { - int (*postHookFunc) (int retVal___, bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &minimal); + if( HPMHooks.count.HP_party_send_levelup_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_levelup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_send_levelup_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -int HP_npc_final(void) { +int HP_party_send_logout(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_final_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_party_send_logout_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_final_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_logout_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_send_logout_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43221,26 +49697,26 @@ int HP_npc_final(void) { } } { - retVal___ = HPMHooks.source.npc.final(); + retVal___ = HPMHooks.source.party.send_logout(sd); } - if( HPMHooks.count.HP_npc_final_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_final_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_party_send_logout_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_logout_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_send_logout_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_npc_get_new_npc_id(void) { +int HP_party_send_message(struct map_session_data *sd, const char *mes, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_get_new_npc_id_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_party_send_message_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *mes, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_new_npc_id_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_get_new_npc_id_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_send_message_pre[hIndex].func; + retVal___ = preHookFunc(sd, mes, &len); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43248,26 +49724,26 @@ int HP_npc_get_new_npc_id(void) { } } { - retVal___ = HPMHooks.source.npc.get_new_npc_id(); + retVal___ = HPMHooks.source.party.send_message(sd, mes, len); } - if( HPMHooks.count.HP_npc_get_new_npc_id_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_new_npc_id_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_get_new_npc_id_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_party_send_message_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_send_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, mes, &len); } } return retVal___; } -struct view_data* HP_npc_get_viewdata(int class_) { +int HP_party_recv_message(int party_id, int account_id, const char *mes, int len) { int hIndex = 0; - struct view_data* retVal___ = NULL; - if( HPMHooks.count.HP_npc_get_viewdata_pre ) { - struct view_data* (*preHookFunc) (int *class_); + int retVal___ = 0; + if( HPMHooks.count.HP_party_recv_message_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, const char *mes, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_viewdata_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_get_viewdata_pre[hIndex].func; - retVal___ = preHookFunc(&class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_recv_message_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, mes, &len); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43275,28 +49751,26 @@ struct view_data* HP_npc_get_viewdata(int class_) { } } { - retVal___ = HPMHooks.source.npc.get_viewdata(class_); + retVal___ = HPMHooks.source.party.recv_message(party_id, account_id, mes, len); } - if( HPMHooks.count.HP_npc_get_viewdata_post ) { - struct view_data* (*postHookFunc) (struct view_data* retVal___, int *class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_viewdata_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_get_viewdata_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &class_); + if( HPMHooks.count.HP_party_recv_message_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_recv_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, mes, &len); } } return retVal___; } -int HP_npc_isnear_sub(struct block_list *bl, va_list args) { +int HP_party_skill_check(struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_isnear_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list args); + if( HPMHooks.count.HP_party_skill_check_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *party_id, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_sub_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_npc_isnear_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_skill_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_skill_check_pre[hIndex].func; + retVal___ = preHookFunc(sd, &party_id, &skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43304,30 +49778,26 @@ int HP_npc_isnear_sub(struct block_list *bl, va_list args) { } } { - va_list args___copy; va_copy(args___copy, args); - retVal___ = HPMHooks.source.npc.isnear_sub(bl, args___copy); - va_end(args___copy); + retVal___ = HPMHooks.source.party.skill_check(sd, party_id, skill_id, skill_lv); } - if( HPMHooks.count.HP_npc_isnear_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_sub_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_npc_isnear_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_party_skill_check_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *party_id, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_skill_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_skill_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &party_id, &skill_id, &skill_lv); } } return retVal___; } -bool HP_npc_isnear(struct block_list *bl) { +int HP_party_send_xy_clear(struct party_data *p) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_npc_isnear_pre ) { - bool (*preHookFunc) (struct block_list *bl); + int retVal___ = 0; + if( HPMHooks.count.HP_party_send_xy_clear_pre ) { + int (*preHookFunc) (struct party_data *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_isnear_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_send_xy_clear_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43335,26 +49805,26 @@ bool HP_npc_isnear(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.npc.isnear(bl); + retVal___ = HPMHooks.source.party.send_xy_clear(p); } - if( HPMHooks.count.HP_npc_isnear_post ) { - bool (*postHookFunc) (bool retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_isnear_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_party_send_xy_clear_post ) { + int (*postHookFunc) (int retVal___, struct party_data *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_send_xy_clear_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } return retVal___; } -int HP_npc_ontouch_event(struct map_session_data *sd, struct npc_data *nd) { +int HP_party_exp_share(struct party_data *p, struct block_list *src, unsigned int base_exp, unsigned int job_exp, int zeny) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_ontouch_event_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + if( HPMHooks.count.HP_party_exp_share_pre ) { + int (*preHookFunc) (struct party_data *p, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, int *zeny); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch_event_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_ontouch_event_pre[hIndex].func; - retVal___ = preHookFunc(sd, nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_exp_share_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_exp_share_pre[hIndex].func; + retVal___ = preHookFunc(p, src, &base_exp, &job_exp, &zeny); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43362,26 +49832,26 @@ int HP_npc_ontouch_event(struct map_session_data *sd, struct npc_data *nd) { } } { - retVal___ = HPMHooks.source.npc.ontouch_event(sd, nd); + retVal___ = HPMHooks.source.party.exp_share(p, src, base_exp, job_exp, zeny); } - if( HPMHooks.count.HP_npc_ontouch_event_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch_event_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_ontouch_event_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, nd); + if( HPMHooks.count.HP_party_exp_share_post ) { + int (*postHookFunc) (int retVal___, struct party_data *p, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, int *zeny); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_exp_share_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_exp_share_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, src, &base_exp, &job_exp, &zeny); } } return retVal___; } -int HP_npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd) { +int HP_party_share_loot(struct party_data *p, struct map_session_data *sd, struct item *item_data, int first_charid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_ontouch2_event_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + if( HPMHooks.count.HP_party_share_loot_pre ) { + int (*preHookFunc) (struct party_data *p, struct map_session_data *sd, struct item *item_data, int *first_charid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch2_event_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_ontouch2_event_pre[hIndex].func; - retVal___ = preHookFunc(sd, nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_share_loot_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_share_loot_pre[hIndex].func; + retVal___ = preHookFunc(p, sd, item_data, &first_charid); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43389,26 +49859,26 @@ int HP_npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd) { } } { - retVal___ = HPMHooks.source.npc.ontouch2_event(sd, nd); + retVal___ = HPMHooks.source.party.share_loot(p, sd, item_data, first_charid); } - if( HPMHooks.count.HP_npc_ontouch2_event_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch2_event_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_ontouch2_event_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, nd); + if( HPMHooks.count.HP_party_share_loot_post ) { + int (*postHookFunc) (int retVal___, struct party_data *p, struct map_session_data *sd, struct item *item_data, int *first_charid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_share_loot_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_share_loot_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, sd, item_data, &first_charid); } } return retVal___; } -int HP_npc_onuntouch_event(struct map_session_data *sd, struct npc_data *nd) { +int HP_party_send_dot_remove(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_onuntouch_event_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + if( HPMHooks.count.HP_party_send_dot_remove_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_onuntouch_event_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_onuntouch_event_pre[hIndex].func; - retVal___ = preHookFunc(sd, nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_dot_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_send_dot_remove_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43416,26 +49886,26 @@ int HP_npc_onuntouch_event(struct map_session_data *sd, struct npc_data *nd) { } } { - retVal___ = HPMHooks.source.npc.onuntouch_event(sd, nd); + retVal___ = HPMHooks.source.party.send_dot_remove(sd); } - if( HPMHooks.count.HP_npc_onuntouch_event_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_onuntouch_event_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_onuntouch_event_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, nd); + if( HPMHooks.count.HP_party_send_dot_remove_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_dot_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_send_dot_remove_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_npc_enable_sub(struct block_list *bl, va_list ap) { +int HP_party_sub_count(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_enable_sub_pre ) { + if( HPMHooks.count.HP_party_sub_count_pre ) { int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_sub_pre; hIndex++ ) { + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_pre; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_npc_enable_sub_pre[hIndex].func; + preHookFunc = HPMHooks.list.HP_party_sub_count_pre[hIndex].func; retVal___ = preHookFunc(bl, ap___copy); va_end(ap___copy); } @@ -43446,56 +49916,31 @@ int HP_npc_enable_sub(struct block_list *bl, va_list ap) { } { va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.npc.enable_sub(bl, ap___copy); + retVal___ = HPMHooks.source.party.sub_count(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_npc_enable_sub_post ) { + if( HPMHooks.count.HP_party_sub_count_post ) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_sub_post; hIndex++ ) { + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_post; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_npc_enable_sub_post[hIndex].func; + postHookFunc = HPMHooks.list.HP_party_sub_count_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, ap___copy); va_end(ap___copy); } } return retVal___; } -int HP_npc_enable(const char *name, int flag) { +int HP_party_sub_count_chorus(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_enable_pre ) { - int (*preHookFunc) (const char *name, int *flag); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_enable_pre[hIndex].func; - retVal___ = preHookFunc(name, &flag); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.npc.enable(name, flag); - } - if( HPMHooks.count.HP_npc_enable_post ) { - int (*postHookFunc) (int retVal___, const char *name, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_enable_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name, &flag); - } - } - return retVal___; -} -struct npc_data* HP_npc_name2id(const char *name) { - int hIndex = 0; - struct npc_data* retVal___ = NULL; - if( HPMHooks.count.HP_npc_name2id_pre ) { - struct npc_data* (*preHookFunc) (const char *name); + if( HPMHooks.count.HP_party_sub_count_chorus_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_name2id_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_name2id_pre[hIndex].func; - retVal___ = preHookFunc(name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_chorus_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_party_sub_count_chorus_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43503,142 +49948,133 @@ struct npc_data* HP_npc_name2id(const char *name) { } } { - retVal___ = HPMHooks.source.npc.name2id(name); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.party.sub_count_chorus(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_npc_name2id_post ) { - struct npc_data* (*postHookFunc) (struct npc_data* retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_name2id_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_name2id_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name); + if( HPMHooks.count.HP_party_sub_count_chorus_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_chorus_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_party_sub_count_chorus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_npc_event_dequeue(struct map_session_data *sd) { +void HP_party_booking_register(struct map_session_data *sd, short level, short mapid, short *job) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_dequeue_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_party_booking_register_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_dequeue_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_event_dequeue_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_register_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_booking_register_pre[hIndex].func; + preHookFunc(sd, &level, &mapid, job); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.npc.event_dequeue(sd); + HPMHooks.source.party.booking_register(sd, level, mapid, job); } - if( HPMHooks.count.HP_npc_event_dequeue_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_dequeue_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_event_dequeue_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_party_booking_register_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_register_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_booking_register_post[hIndex].func; + postHookFunc(sd, &level, &mapid, job); } } - return retVal___; + return; } -DBData HP_npc_event_export_create(DBKey key, va_list args) { +void HP_party_booking_update(struct map_session_data *sd, short *job) { int hIndex = 0; - DBData retVal___; - memset(&retVal___, '\0', sizeof(DBData)); - if( HPMHooks.count.HP_npc_event_export_create_pre ) { - DBData (*preHookFunc) (DBKey *key, va_list args); + if( HPMHooks.count.HP_party_booking_update_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *job); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_create_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_npc_event_export_create_pre[hIndex].func; - retVal___ = preHookFunc(&key, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_booking_update_pre[hIndex].func; + preHookFunc(sd, job); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list args___copy; va_copy(args___copy, args); - retVal___ = HPMHooks.source.npc.event_export_create(key, args___copy); - va_end(args___copy); + HPMHooks.source.party.booking_update(sd, job); } - if( HPMHooks.count.HP_npc_event_export_create_post ) { - DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_create_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_npc_event_export_create_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_party_booking_update_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *job); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_booking_update_post[hIndex].func; + postHookFunc(sd, job); } } - return retVal___; + return; } -int HP_npc_event_export(struct npc_data *nd, int i) { +void HP_party_booking_search(struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_export_pre ) { - int (*preHookFunc) (struct npc_data *nd, int *i); + if( HPMHooks.count.HP_party_booking_search_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job, unsigned long *lastindex, short *resultcount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_event_export_pre[hIndex].func; - retVal___ = preHookFunc(nd, &i); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_booking_search_pre[hIndex].func; + preHookFunc(sd, &level, &mapid, &job, &lastindex, &resultcount); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.npc.event_export(nd, i); + HPMHooks.source.party.booking_search(sd, level, mapid, job, lastindex, resultcount); } - if( HPMHooks.count.HP_npc_event_export_post ) { - int (*postHookFunc) (int retVal___, struct npc_data *nd, int *i); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_event_export_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd, &i); + if( HPMHooks.count.HP_party_booking_search_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job, unsigned long *lastindex, short *resultcount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_booking_search_post[hIndex].func; + postHookFunc(sd, &level, &mapid, &job, &lastindex, &resultcount); } } - return retVal___; + return; } -int HP_npc_event_sub(struct map_session_data *sd, struct event_data *ev, const char *eventname) { +void HP_party_recruit_register(struct map_session_data *sd, short level, const char *notice) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_sub_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct event_data *ev, const char *eventname); + if( HPMHooks.count.HP_party_recruit_register_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *level, const char *notice); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_event_sub_pre[hIndex].func; - retVal___ = preHookFunc(sd, ev, eventname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_register_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_recruit_register_pre[hIndex].func; + preHookFunc(sd, &level, notice); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.npc.event_sub(sd, ev, eventname); + HPMHooks.source.party.recruit_register(sd, level, notice); } - if( HPMHooks.count.HP_npc_event_sub_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct event_data *ev, const char *eventname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_event_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, ev, eventname); + if( HPMHooks.count.HP_party_recruit_register_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *level, const char *notice); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_register_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_recruit_register_post[hIndex].func; + postHookFunc(sd, &level, notice); } } - return retVal___; + return; } -void HP_npc_event_doall_sub(void *key, void *data, va_list ap) { +void HP_party_recruit_update(struct map_session_data *sd, const char *notice) { int hIndex = 0; - if( HPMHooks.count.HP_npc_event_doall_sub_pre ) { - void (*preHookFunc) (void *key, void *data, va_list ap); + if( HPMHooks.count.HP_party_recruit_update_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *notice); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_npc_event_doall_sub_pre[hIndex].func; - preHookFunc(key, data, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_update_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_recruit_update_pre[hIndex].func; + preHookFunc(sd, notice); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43646,57 +50082,52 @@ void HP_npc_event_doall_sub(void *key, void *data, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - HPMHooks.source.npc.event_doall_sub(key, data, ap___copy); - va_end(ap___copy); + HPMHooks.source.party.recruit_update(sd, notice); } - if( HPMHooks.count.HP_npc_event_doall_sub_post ) { - void (*postHookFunc) (void *key, void *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_npc_event_doall_sub_post[hIndex].func; - postHookFunc(key, data, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_party_recruit_update_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *notice); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_update_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_recruit_update_post[hIndex].func; + postHookFunc(sd, notice); } } return; } -int HP_npc_event_do(const char *name) { +void HP_party_recruit_search(struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_do_pre ) { - int (*preHookFunc) (const char *name); + if( HPMHooks.count.HP_party_recruit_search_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_event_do_pre[hIndex].func; - retVal___ = preHookFunc(name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_recruit_search_pre[hIndex].func; + preHookFunc(sd, &level, &mapid, &lastindex, &resultcount); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.npc.event_do(name); + HPMHooks.source.party.recruit_search(sd, level, mapid, lastindex, resultcount); } - if( HPMHooks.count.HP_npc_event_do_post ) { - int (*postHookFunc) (int retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_event_do_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name); + if( HPMHooks.count.HP_party_recruit_search_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_recruit_search_post[hIndex].func; + postHookFunc(sd, &level, &mapid, &lastindex, &resultcount); } } - return retVal___; + return; } -int HP_npc_event_doall_id(const char *name, int rid) { +bool HP_party_booking_delete(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_doall_id_pre ) { - int (*preHookFunc) (const char *name, int *rid); + bool retVal___ = false; + if( HPMHooks.count.HP_party_booking_delete_pre ) { + bool (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_id_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_event_doall_id_pre[hIndex].func; - retVal___ = preHookFunc(name, &rid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_booking_delete_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43704,26 +50135,28 @@ int HP_npc_event_doall_id(const char *name, int rid) { } } { - retVal___ = HPMHooks.source.npc.event_doall_id(name, rid); + retVal___ = HPMHooks.source.party.booking_delete(sd); } - if( HPMHooks.count.HP_npc_event_doall_id_post ) { - int (*postHookFunc) (int retVal___, const char *name, int *rid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_id_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_event_doall_id_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name, &rid); + if( HPMHooks.count.HP_party_booking_delete_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_booking_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_npc_event_doall(const char *name) { +int HP_party_vforeachsamemap(int ( *func ) (struct block_list *, va_list), struct map_session_data *sd, int range, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_doall_pre ) { - int (*preHookFunc) (const char *name); + if( HPMHooks.count.HP_party_vforeachsamemap_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct map_session_data *sd, int *range, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_event_doall_pre[hIndex].func; - retVal___ = preHookFunc(name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_vforeachsamemap_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_party_vforeachsamemap_pre[hIndex].func; + retVal___ = preHookFunc(func, sd, &range, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43731,25 +50164,29 @@ int HP_npc_event_doall(const char *name) { } } { - retVal___ = HPMHooks.source.npc.event_doall(name); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.party.vforeachsamemap(func, sd, range, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_npc_event_doall_post ) { - int (*postHookFunc) (int retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_event_doall_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name); + if( HPMHooks.count.HP_party_vforeachsamemap_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct map_session_data *sd, int *range, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_vforeachsamemap_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_party_vforeachsamemap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, sd, &range, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_npc_event_do_clock(int tid, int64 tick, int id, intptr_t data) { +int HP_party_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_do_clock_pre ) { + if( HPMHooks.count.HP_party_send_xy_timer_pre ) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_clock_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_event_do_clock_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_send_xy_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { @@ -43758,25 +50195,25 @@ int HP_npc_event_do_clock(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.npc.event_do_clock(tid, tick, id, data); + retVal___ = HPMHooks.source.party.send_xy_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_npc_event_do_clock_post ) { + if( HPMHooks.count.HP_party_send_xy_timer_post ) { int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_clock_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_event_do_clock_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_send_xy_timer_post[hIndex].func; retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -void HP_npc_event_do_oninit(bool reload) { +void HP_party_fill_member(struct party_member *member, struct map_session_data *sd, unsigned int leader) { int hIndex = 0; - if( HPMHooks.count.HP_npc_event_do_oninit_pre ) { - void (*preHookFunc) (bool *reload); + if( HPMHooks.count.HP_party_fill_member_pre ) { + void (*preHookFunc) (struct party_member *member, struct map_session_data *sd, unsigned int *leader); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_oninit_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_event_do_oninit_pre[hIndex].func; - preHookFunc(&reload); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_fill_member_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_fill_member_pre[hIndex].func; + preHookFunc(member, sd, &leader); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43784,26 +50221,26 @@ void HP_npc_event_do_oninit(bool reload) { } } { - HPMHooks.source.npc.event_do_oninit(reload); + HPMHooks.source.party.fill_member(member, sd, leader); } - if( HPMHooks.count.HP_npc_event_do_oninit_post ) { - void (*postHookFunc) (bool *reload); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_oninit_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_event_do_oninit_post[hIndex].func; - postHookFunc(&reload); + if( HPMHooks.count.HP_party_fill_member_post ) { + void (*postHookFunc) (struct party_member *member, struct map_session_data *sd, unsigned int *leader); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_fill_member_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_fill_member_post[hIndex].func; + postHookFunc(member, sd, &leader); } } return; } -int HP_npc_timerevent_export(struct npc_data *nd, int i) { +TBL_PC* HP_party_sd_check(int party_id, int account_id, int char_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_timerevent_export_pre ) { - int (*preHookFunc) (struct npc_data *nd, int *i); + TBL_PC* retVal___ = NULL; + if( HPMHooks.count.HP_party_sd_check_pre ) { + TBL_PC* (*preHookFunc) (int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_export_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_timerevent_export_pre[hIndex].func; - retVal___ = preHookFunc(nd, &i); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sd_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_sd_check_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &char_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43811,53 +50248,52 @@ int HP_npc_timerevent_export(struct npc_data *nd, int i) { } } { - retVal___ = HPMHooks.source.npc.timerevent_export(nd, i); + retVal___ = HPMHooks.source.party.sd_check(party_id, account_id, char_id); } - if( HPMHooks.count.HP_npc_timerevent_export_post ) { - int (*postHookFunc) (int retVal___, struct npc_data *nd, int *i); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_export_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_timerevent_export_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd, &i); + if( HPMHooks.count.HP_party_sd_check_post ) { + TBL_PC* (*postHookFunc) (TBL_PC* retVal___, int *party_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sd_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_sd_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id); } } return retVal___; } -int HP_npc_timerevent(int tid, int64 tick, int id, intptr_t data) { +void HP_party_check_state(struct party_data *p) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_timerevent_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_party_check_state_pre ) { + void (*preHookFunc) (struct party_data *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_timerevent_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_check_state_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_check_state_pre[hIndex].func; + preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.npc.timerevent(tid, tick, id, data); + HPMHooks.source.party.check_state(p); } - if( HPMHooks.count.HP_npc_timerevent_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_timerevent_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_party_check_state_post ) { + void (*postHookFunc) (struct party_data *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_check_state_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_check_state_post[hIndex].func; + postHookFunc(p); } } - return retVal___; + return; } -int HP_npc_timerevent_start(struct npc_data *nd, int rid) { +struct party_booking_ad_info* HP_party_create_booking_data(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_timerevent_start_pre ) { - int (*preHookFunc) (struct npc_data *nd, int *rid); + struct party_booking_ad_info* retVal___ = NULL; + if( HPMHooks.count.HP_party_create_booking_data_pre ) { + struct party_booking_ad_info* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_start_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_timerevent_start_pre[hIndex].func; - retVal___ = preHookFunc(nd, &rid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_booking_data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_create_booking_data_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43865,26 +50301,28 @@ int HP_npc_timerevent_start(struct npc_data *nd, int rid) { } } { - retVal___ = HPMHooks.source.npc.timerevent_start(nd, rid); + retVal___ = HPMHooks.source.party.create_booking_data(); } - if( HPMHooks.count.HP_npc_timerevent_start_post ) { - int (*postHookFunc) (int retVal___, struct npc_data *nd, int *rid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_start_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_timerevent_start_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd, &rid); + if( HPMHooks.count.HP_party_create_booking_data_post ) { + struct party_booking_ad_info* (*postHookFunc) (struct party_booking_ad_info* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_booking_data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_create_booking_data_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_npc_timerevent_stop(struct npc_data *nd) { +int HP_party_db_final(DBKey key, DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_timerevent_stop_pre ) { - int (*preHookFunc) (struct npc_data *nd); + if( HPMHooks.count.HP_party_db_final_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_stop_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_timerevent_stop_pre[hIndex].func; - retVal___ = preHookFunc(nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_db_final_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_party_db_final_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43892,52 +50330,58 @@ int HP_npc_timerevent_stop(struct npc_data *nd) { } } { - retVal___ = HPMHooks.source.npc.timerevent_stop(nd); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.party.db_final(key, data, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_npc_timerevent_stop_post ) { - int (*postHookFunc) (int retVal___, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_stop_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_timerevent_stop_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd); + if( HPMHooks.count.HP_party_db_final_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_db_final_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_party_db_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); } } return retVal___; } -void HP_npc_timerevent_quit(struct map_session_data *sd) { +/* path */ +int HP_path_blownpos(int16 m, int16 x0, int16 y0, int16 dx, int16 dy, int count) { int hIndex = 0; - if( HPMHooks.count.HP_npc_timerevent_quit_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_path_blownpos_pre ) { + int (*preHookFunc) (int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_quit_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_timerevent_quit_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_path_blownpos_pre[hIndex].func; + retVal___ = preHookFunc(&m, &x0, &y0, &dx, &dy, &count); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.timerevent_quit(sd); + retVal___ = HPMHooks.source.path.blownpos(m, x0, y0, dx, dy, count); } - if( HPMHooks.count.HP_npc_timerevent_quit_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_quit_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_timerevent_quit_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_path_blownpos_post ) { + int (*postHookFunc) (int retVal___, int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_path_blownpos_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, &x0, &y0, &dx, &dy, &count); } } - return; + return retVal___; } -int64 HP_npc_gettimerevent_tick(struct npc_data *nd) { +bool HP_path_search(struct walkpath_data *wpd, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int flag, cell_chk cell) { int hIndex = 0; - int64 retVal___ = 0; - if( HPMHooks.count.HP_npc_gettimerevent_tick_pre ) { - int64 (*preHookFunc) (struct npc_data *nd); + bool retVal___ = false; + if( HPMHooks.count.HP_path_search_pre ) { + bool (*preHookFunc) (struct walkpath_data *wpd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_gettimerevent_tick_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_gettimerevent_tick_pre[hIndex].func; - retVal___ = preHookFunc(nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_path_search_pre[hIndex].func; + retVal___ = preHookFunc(wpd, &m, &x0, &y0, &x1, &y1, &flag, &cell); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43945,26 +50389,26 @@ int64 HP_npc_gettimerevent_tick(struct npc_data *nd) { } } { - retVal___ = HPMHooks.source.npc.gettimerevent_tick(nd); + retVal___ = HPMHooks.source.path.search(wpd, m, x0, y0, x1, y1, flag, cell); } - if( HPMHooks.count.HP_npc_gettimerevent_tick_post ) { - int64 (*postHookFunc) (int64 retVal___, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_gettimerevent_tick_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_gettimerevent_tick_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd); + if( HPMHooks.count.HP_path_search_post ) { + bool (*postHookFunc) (bool retVal___, struct walkpath_data *wpd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_path_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, wpd, &m, &x0, &y0, &x1, &y1, &flag, &cell); } } return retVal___; } -int HP_npc_settimerevent_tick(struct npc_data *nd, int newtimer) { +bool HP_path_search_long(struct shootpath_data *spd, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, cell_chk cell) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_settimerevent_tick_pre ) { - int (*preHookFunc) (struct npc_data *nd, int *newtimer); + bool retVal___ = false; + if( HPMHooks.count.HP_path_search_long_pre ) { + bool (*preHookFunc) (struct shootpath_data *spd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_settimerevent_tick_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_settimerevent_tick_pre[hIndex].func; - retVal___ = preHookFunc(nd, &newtimer); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_long_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_path_search_long_pre[hIndex].func; + retVal___ = preHookFunc(spd, &m, &x0, &y0, &x1, &y1, &cell); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43972,26 +50416,26 @@ int HP_npc_settimerevent_tick(struct npc_data *nd, int newtimer) { } } { - retVal___ = HPMHooks.source.npc.settimerevent_tick(nd, newtimer); + retVal___ = HPMHooks.source.path.search_long(spd, m, x0, y0, x1, y1, cell); } - if( HPMHooks.count.HP_npc_settimerevent_tick_post ) { - int (*postHookFunc) (int retVal___, struct npc_data *nd, int *newtimer); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_settimerevent_tick_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_settimerevent_tick_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd, &newtimer); + if( HPMHooks.count.HP_path_search_long_post ) { + bool (*postHookFunc) (bool retVal___, struct shootpath_data *spd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_long_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_path_search_long_post[hIndex].func; + retVal___ = postHookFunc(retVal___, spd, &m, &x0, &y0, &x1, &y1, &cell); } } return retVal___; } -int HP_npc_event(struct map_session_data *sd, const char *eventname, int ontouch) { +bool HP_path_check_distance(int dx, int dy, int distance) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *eventname, int *ontouch); + bool retVal___ = false; + if( HPMHooks.count.HP_path_check_distance_pre ) { + bool (*preHookFunc) (int *dx, int *dy, int *distance); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_event_pre[hIndex].func; - retVal___ = preHookFunc(sd, eventname, &ontouch); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_path_check_distance_pre[hIndex].func; + retVal___ = preHookFunc(&dx, &dy, &distance); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -43999,28 +50443,26 @@ int HP_npc_event(struct map_session_data *sd, const char *eventname, int ontouch } } { - retVal___ = HPMHooks.source.npc.event(sd, eventname, ontouch); + retVal___ = HPMHooks.source.path.check_distance(dx, dy, distance); } - if( HPMHooks.count.HP_npc_event_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *eventname, int *ontouch); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_event_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, eventname, &ontouch); + if( HPMHooks.count.HP_path_check_distance_post ) { + 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); } } return retVal___; } -int HP_npc_touch_areanpc_sub(struct block_list *bl, va_list ap) { +unsigned int HP_path_distance(int dx, int dy) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_touch_areanpc_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_path_distance_pre ) { + unsigned int (*preHookFunc) (int *dx, int *dy); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_npc_touch_areanpc_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_path_distance_pre[hIndex].func; + retVal___ = preHookFunc(&dx, &dy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44028,30 +50470,26 @@ int HP_npc_touch_areanpc_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.npc.touch_areanpc_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.path.distance(dx, dy); } - if( HPMHooks.count.HP_npc_touch_areanpc_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_npc_touch_areanpc_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_path_distance_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, int *dx, int *dy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_path_distance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &dx, &dy); } } return retVal___; } -int HP_npc_touchnext_areanpc(struct map_session_data *sd, bool leavemap) { +bool HP_path_check_distance_client(int dx, int dy, int distance) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_touchnext_areanpc_pre ) { - int (*preHookFunc) (struct map_session_data *sd, bool *leavemap); + 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_npc_touchnext_areanpc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_touchnext_areanpc_pre[hIndex].func; - retVal___ = preHookFunc(sd, &leavemap); + 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; @@ -44059,26 +50497,26 @@ int HP_npc_touchnext_areanpc(struct map_session_data *sd, bool leavemap) { } } { - retVal___ = HPMHooks.source.npc.touchnext_areanpc(sd, leavemap); + retVal___ = HPMHooks.source.path.check_distance_client(dx, dy, distance); } - if( HPMHooks.count.HP_npc_touchnext_areanpc_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, bool *leavemap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touchnext_areanpc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_touchnext_areanpc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &leavemap); + 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_npc_touch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) { +int HP_path_distance_client(int dx, int dy) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_touch_areanpc_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y); + if( HPMHooks.count.HP_path_distance_client_pre ) { + int (*preHookFunc) (int *dx, int *dy); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_touch_areanpc_pre[hIndex].func; - retVal___ = preHookFunc(sd, &m, &x, &y); + 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; @@ -44086,107 +50524,105 @@ int HP_npc_touch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) } } { - retVal___ = HPMHooks.source.npc.touch_areanpc(sd, m, x, y); + retVal___ = HPMHooks.source.path.distance_client(dx, dy); } - if( HPMHooks.count.HP_npc_touch_areanpc_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x, int16 *y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_touch_areanpc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &m, &x, &y); + 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___; } -int HP_npc_untouch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) { +/* pcg */ +void HP_pcg_init(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_untouch_areanpc_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y); + if( HPMHooks.count.HP_pcg_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_untouch_areanpc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_untouch_areanpc_pre[hIndex].func; - retVal___ = preHookFunc(sd, &m, &x, &y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pcg_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.npc.untouch_areanpc(sd, m, x, y); + HPMHooks.source.pcg.init(); } - if( HPMHooks.count.HP_npc_untouch_areanpc_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x, int16 *y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_untouch_areanpc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_untouch_areanpc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &m, &x, &y); + if( HPMHooks.count.HP_pcg_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pcg_init_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_npc_touch_areanpc2(struct mob_data *md) { +void HP_pcg_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_touch_areanpc2_pre ) { - int (*preHookFunc) (struct mob_data *md); + if( HPMHooks.count.HP_pcg_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_touch_areanpc2_pre[hIndex].func; - retVal___ = preHookFunc(md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pcg_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.npc.touch_areanpc2(md); + HPMHooks.source.pcg.final(); } - if( HPMHooks.count.HP_npc_touch_areanpc2_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_touch_areanpc2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md); + if( HPMHooks.count.HP_pcg_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pcg_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_npc_check_areanpc(int flag, int16 m, int16 x, int16 y, int16 range) { +void HP_pcg_reload(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_check_areanpc_pre ) { - int (*preHookFunc) (int *flag, int16 *m, int16 *x, int16 *y, int16 *range); + if( HPMHooks.count.HP_pcg_reload_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_check_areanpc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_check_areanpc_pre[hIndex].func; - retVal___ = preHookFunc(&flag, &m, &x, &y, &range); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pcg_reload_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.npc.check_areanpc(flag, m, x, y, range); + HPMHooks.source.pcg.reload(); } - if( HPMHooks.count.HP_npc_check_areanpc_post ) { - int (*postHookFunc) (int retVal___, int *flag, int16 *m, int16 *x, int16 *y, int16 *range); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_check_areanpc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_check_areanpc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &flag, &m, &x, &y, &range); + if( HPMHooks.count.HP_pcg_reload_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pcg_reload_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -struct npc_data* HP_npc_checknear(struct map_session_data *sd, struct block_list *bl) { +GroupSettings* HP_pcg_get_dummy_group(void) { int hIndex = 0; - struct npc_data* retVal___ = NULL; - if( HPMHooks.count.HP_npc_checknear_pre ) { - struct npc_data* (*preHookFunc) (struct map_session_data *sd, struct block_list *bl); + GroupSettings* retVal___ = NULL; + if( HPMHooks.count.HP_pcg_get_dummy_group_pre ) { + GroupSettings* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_checknear_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_checknear_pre[hIndex].func; - retVal___ = preHookFunc(sd, bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_dummy_group_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pcg_get_dummy_group_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44194,26 +50630,26 @@ struct npc_data* HP_npc_checknear(struct map_session_data *sd, struct block_list } } { - retVal___ = HPMHooks.source.npc.checknear(sd, bl); + retVal___ = HPMHooks.source.pcg.get_dummy_group(); } - if( HPMHooks.count.HP_npc_checknear_post ) { - struct npc_data* (*postHookFunc) (struct npc_data* retVal___, struct map_session_data *sd, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_checknear_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_checknear_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, bl); + if( HPMHooks.count.HP_pcg_get_dummy_group_post ) { + GroupSettings* (*postHookFunc) (GroupSettings* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_dummy_group_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pcg_get_dummy_group_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_npc_globalmessage(const char *name, const char *mes) { +bool HP_pcg_exists(int group_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_globalmessage_pre ) { - int (*preHookFunc) (const char *name, const char *mes); + bool retVal___ = false; + if( HPMHooks.count.HP_pcg_exists_pre ) { + bool (*preHookFunc) (int *group_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_globalmessage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_globalmessage_pre[hIndex].func; - retVal___ = preHookFunc(name, mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_exists_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pcg_exists_pre[hIndex].func; + retVal___ = preHookFunc(&group_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44221,52 +50657,53 @@ int HP_npc_globalmessage(const char *name, const char *mes) { } } { - retVal___ = HPMHooks.source.npc.globalmessage(name, mes); + retVal___ = HPMHooks.source.pcg.exists(group_id); } - if( HPMHooks.count.HP_npc_globalmessage_post ) { - int (*postHookFunc) (int retVal___, const char *name, const char *mes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_globalmessage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_globalmessage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name, mes); + if( HPMHooks.count.HP_pcg_exists_post ) { + bool (*postHookFunc) (bool retVal___, int *group_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_exists_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pcg_exists_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &group_id); } } return retVal___; } -void HP_npc_run_tomb(struct map_session_data *sd, struct npc_data *nd) { +GroupSettings* HP_pcg_id2group(int group_id) { int hIndex = 0; - if( HPMHooks.count.HP_npc_run_tomb_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + GroupSettings* retVal___ = NULL; + if( HPMHooks.count.HP_pcg_id2group_pre ) { + GroupSettings* (*preHookFunc) (int *group_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_run_tomb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_run_tomb_pre[hIndex].func; - preHookFunc(sd, nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_id2group_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pcg_id2group_pre[hIndex].func; + retVal___ = preHookFunc(&group_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.run_tomb(sd, nd); + retVal___ = HPMHooks.source.pcg.id2group(group_id); } - if( HPMHooks.count.HP_npc_run_tomb_post ) { - void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_run_tomb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_run_tomb_post[hIndex].func; - postHookFunc(sd, nd); + if( HPMHooks.count.HP_pcg_id2group_post ) { + GroupSettings* (*postHookFunc) (GroupSettings* retVal___, int *group_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_id2group_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pcg_id2group_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &group_id); } } - return; + return retVal___; } -int HP_npc_click(struct map_session_data *sd, struct npc_data *nd) { +bool HP_pcg_has_permission(GroupSettings *group, unsigned int permission) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_click_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + bool retVal___ = false; + if( HPMHooks.count.HP_pcg_has_permission_pre ) { + bool (*preHookFunc) (GroupSettings *group, unsigned int *permission); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_click_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_click_pre[hIndex].func; - retVal___ = preHookFunc(sd, nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_has_permission_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pcg_has_permission_pre[hIndex].func; + retVal___ = preHookFunc(group, &permission); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44274,26 +50711,26 @@ int HP_npc_click(struct map_session_data *sd, struct npc_data *nd) { } } { - retVal___ = HPMHooks.source.npc.click(sd, nd); + retVal___ = HPMHooks.source.pcg.has_permission(group, permission); } - if( HPMHooks.count.HP_npc_click_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_click_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_click_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, nd); + if( HPMHooks.count.HP_pcg_has_permission_post ) { + bool (*postHookFunc) (bool retVal___, GroupSettings *group, unsigned int *permission); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_has_permission_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pcg_has_permission_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group, &permission); } } return retVal___; } -int HP_npc_scriptcont(struct map_session_data *sd, int id, bool closing) { +bool HP_pcg_should_log_commands(GroupSettings *group) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_scriptcont_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *id, bool *closing); + bool retVal___ = false; + if( HPMHooks.count.HP_pcg_should_log_commands_pre ) { + bool (*preHookFunc) (GroupSettings *group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_scriptcont_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_scriptcont_pre[hIndex].func; - retVal___ = preHookFunc(sd, &id, &closing); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_should_log_commands_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pcg_should_log_commands_pre[hIndex].func; + retVal___ = preHookFunc(group); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44301,26 +50738,26 @@ int HP_npc_scriptcont(struct map_session_data *sd, int id, bool closing) { } } { - retVal___ = HPMHooks.source.npc.scriptcont(sd, id, closing); + retVal___ = HPMHooks.source.pcg.should_log_commands(group); } - if( HPMHooks.count.HP_npc_scriptcont_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *id, bool *closing); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_scriptcont_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_scriptcont_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &id, &closing); + if( HPMHooks.count.HP_pcg_should_log_commands_post ) { + bool (*postHookFunc) (bool retVal___, GroupSettings *group); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_should_log_commands_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pcg_should_log_commands_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group); } } return retVal___; } -int HP_npc_buysellsel(struct map_session_data *sd, int id, int type) { +const char* HP_pcg_get_name(GroupSettings *group) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_buysellsel_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *id, int *type); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_pcg_get_name_pre ) { + const char* (*preHookFunc) (GroupSettings *group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buysellsel_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_buysellsel_pre[hIndex].func; - retVal___ = preHookFunc(sd, &id, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pcg_get_name_pre[hIndex].func; + retVal___ = preHookFunc(group); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44328,26 +50765,26 @@ int HP_npc_buysellsel(struct map_session_data *sd, int id, int type) { } } { - retVal___ = HPMHooks.source.npc.buysellsel(sd, id, type); + retVal___ = HPMHooks.source.pcg.get_name(group); } - if( HPMHooks.count.HP_npc_buysellsel_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *id, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buysellsel_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_buysellsel_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &id, &type); + if( HPMHooks.count.HP_pcg_get_name_post ) { + const char* (*postHookFunc) (const char* retVal___, GroupSettings *group); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pcg_get_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group); } } return retVal___; } -int HP_npc_cashshop_buylist(struct map_session_data *sd, int points, int count, unsigned short *item_list) { +int HP_pcg_get_level(GroupSettings *group) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_cashshop_buylist_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *points, int *count, unsigned short *item_list); + if( HPMHooks.count.HP_pcg_get_level_pre ) { + int (*preHookFunc) (GroupSettings *group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buylist_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_cashshop_buylist_pre[hIndex].func; - retVal___ = preHookFunc(sd, &points, &count, item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_level_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pcg_get_level_pre[hIndex].func; + retVal___ = preHookFunc(group); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44355,26 +50792,26 @@ int HP_npc_cashshop_buylist(struct map_session_data *sd, int points, int count, } } { - retVal___ = HPMHooks.source.npc.cashshop_buylist(sd, points, count, item_list); + retVal___ = HPMHooks.source.pcg.get_level(group); } - if( HPMHooks.count.HP_npc_cashshop_buylist_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *points, int *count, unsigned short *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buylist_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_cashshop_buylist_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &points, &count, item_list); + if( HPMHooks.count.HP_pcg_get_level_post ) { + int (*postHookFunc) (int retVal___, GroupSettings *group); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_level_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pcg_get_level_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group); } } return retVal___; } -int HP_npc_buylist_sub(struct map_session_data *sd, int n, unsigned short *item_list, struct npc_data *nd) { +int HP_pcg_get_idx(GroupSettings *group) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_buylist_sub_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd); + if( HPMHooks.count.HP_pcg_get_idx_pre ) { + int (*preHookFunc) (GroupSettings *group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_buylist_sub_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n, item_list, nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_idx_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pcg_get_idx_pre[hIndex].func; + retVal___ = preHookFunc(group); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44382,80 +50819,79 @@ int HP_npc_buylist_sub(struct map_session_data *sd, int n, unsigned short *item_ } } { - retVal___ = HPMHooks.source.npc.buylist_sub(sd, n, item_list, nd); + retVal___ = HPMHooks.source.pcg.get_idx(group); } - if( HPMHooks.count.HP_npc_buylist_sub_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_buylist_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &n, item_list, nd); + if( HPMHooks.count.HP_pcg_get_idx_post ) { + int (*postHookFunc) (int retVal___, GroupSettings *group); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_idx_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pcg_get_idx_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group); } } return retVal___; } -int HP_npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int points) { +/* pc */ +void HP_pc_init(bool minimal) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_cashshop_buy_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *amount, int *points); + if( HPMHooks.count.HP_pc_init_pre ) { + void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buy_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_cashshop_buy_pre[hIndex].func; - retVal___ = preHookFunc(sd, &nameid, &amount, &points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_init_pre[hIndex].func; + preHookFunc(&minimal); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.npc.cashshop_buy(sd, nameid, amount, points); + HPMHooks.source.pc.init(minimal); } - if( HPMHooks.count.HP_npc_cashshop_buy_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid, int *amount, int *points); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buy_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_cashshop_buy_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &nameid, &amount, &points); + if( HPMHooks.count.HP_pc_init_post ) { + void (*postHookFunc) (bool *minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_init_post[hIndex].func; + postHookFunc(&minimal); } } - return retVal___; + return; } -int HP_npc_buylist(struct map_session_data *sd, int n, unsigned short *item_list) { +void HP_pc_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_buylist_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list); + if( HPMHooks.count.HP_pc_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_buylist_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n, item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.npc.buylist(sd, n, item_list); + HPMHooks.source.pc.final(); } - if( HPMHooks.count.HP_npc_buylist_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_buylist_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &n, item_list); + if( HPMHooks.count.HP_pc_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_npc_selllist_sub(struct map_session_data *sd, int n, unsigned short *item_list, struct npc_data *nd) { +struct map_session_data* HP_pc_get_dummy_sd(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_selllist_sub_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd); + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_pc_get_dummy_sd_pre ) { + struct map_session_data* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_selllist_sub_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n, item_list, nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_dummy_sd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_get_dummy_sd_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44463,26 +50899,26 @@ int HP_npc_selllist_sub(struct map_session_data *sd, int n, unsigned short *item } } { - retVal___ = HPMHooks.source.npc.selllist_sub(sd, n, item_list, nd); + retVal___ = HPMHooks.source.pc.get_dummy_sd(); } - if( HPMHooks.count.HP_npc_selllist_sub_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_selllist_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &n, item_list, nd); + if( HPMHooks.count.HP_pc_get_dummy_sd_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_dummy_sd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_get_dummy_sd_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_npc_selllist(struct map_session_data *sd, int n, unsigned short *item_list) { +int HP_pc_class2idx(int class_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_selllist_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list); + if( HPMHooks.count.HP_pc_class2idx_pre ) { + int (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_selllist_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n, item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_class2idx_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_class2idx_pre[hIndex].func; + retVal___ = preHookFunc(&class_); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44490,26 +50926,26 @@ int HP_npc_selllist(struct map_session_data *sd, int n, unsigned short *item_lis } } { - retVal___ = HPMHooks.source.npc.selllist(sd, n, item_list); + retVal___ = HPMHooks.source.pc.class2idx(class_); } - if( HPMHooks.count.HP_npc_selllist_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_selllist_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &n, item_list); + if( HPMHooks.count.HP_pc_class2idx_post ) { + 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_); } } return retVal___; } -int HP_npc_remove_map(struct npc_data *nd) { +bool HP_pc_can_talk(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_remove_map_pre ) { - int (*preHookFunc) (struct npc_data *nd); + bool retVal___ = false; + if( HPMHooks.count.HP_pc_can_talk_pre ) { + bool (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_remove_map_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_remove_map_pre[hIndex].func; - retVal___ = preHookFunc(nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_talk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_can_talk_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44517,28 +50953,26 @@ int HP_npc_remove_map(struct npc_data *nd) { } } { - retVal___ = HPMHooks.source.npc.remove_map(nd); + retVal___ = HPMHooks.source.pc.can_talk(sd); } - if( HPMHooks.count.HP_npc_remove_map_post ) { - int (*postHookFunc) (int retVal___, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_remove_map_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_remove_map_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd); + if( HPMHooks.count.HP_pc_can_talk_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_talk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_can_talk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_npc_unload_ev(DBKey key, DBData *data, va_list ap) { +bool HP_pc_can_attack(struct map_session_data *sd, int target_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_unload_ev_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + bool retVal___ = false; + if( HPMHooks.count.HP_pc_can_attack_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_npc_unload_ev_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_attack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_can_attack_pre[hIndex].func; + retVal___ = preHookFunc(sd, &target_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44546,32 +50980,26 @@ int HP_npc_unload_ev(DBKey key, DBData *data, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.npc.unload_ev(key, data, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.pc.can_attack(sd, target_id); } - if( HPMHooks.count.HP_npc_unload_ev_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_npc_unload_ev_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_pc_can_attack_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_attack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_can_attack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &target_id); } } return retVal___; } -int HP_npc_unload_ev_label(DBKey key, DBData *data, va_list ap) { +bool HP_pc_can_use_command(struct map_session_data *sd, const char *command) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_unload_ev_label_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + bool retVal___ = false; + if( HPMHooks.count.HP_pc_can_use_command_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, const char *command); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_label_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_npc_unload_ev_label_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_use_command_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_can_use_command_pre[hIndex].func; + retVal___ = preHookFunc(sd, command); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44579,32 +51007,26 @@ int HP_npc_unload_ev_label(DBKey key, DBData *data, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.npc.unload_ev_label(key, data, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.pc.can_use_command(sd, command); } - if( HPMHooks.count.HP_npc_unload_ev_label_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_label_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_npc_unload_ev_label_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_pc_can_use_command_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *command); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_use_command_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_can_use_command_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, command); } } return retVal___; } -int HP_npc_unload_dup_sub(struct npc_data *nd, va_list args) { +int HP_pc_set_group(struct map_session_data *sd, int group_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_unload_dup_sub_pre ) { - int (*preHookFunc) (struct npc_data *nd, va_list args); + if( HPMHooks.count.HP_pc_set_group_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *group_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_dup_sub_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_npc_unload_dup_sub_pre[hIndex].func; - retVal___ = preHookFunc(nd, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_group_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_set_group_pre[hIndex].func; + retVal___ = preHookFunc(sd, &group_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44612,56 +51034,53 @@ int HP_npc_unload_dup_sub(struct npc_data *nd, va_list args) { } } { - va_list args___copy; va_copy(args___copy, args); - retVal___ = HPMHooks.source.npc.unload_dup_sub(nd, args___copy); - va_end(args___copy); + retVal___ = HPMHooks.source.pc.set_group(sd, group_id); } - if( HPMHooks.count.HP_npc_unload_dup_sub_post ) { - int (*postHookFunc) (int retVal___, struct npc_data *nd, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_dup_sub_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_npc_unload_dup_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_pc_set_group_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *group_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_group_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_set_group_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &group_id); } } return retVal___; } -void HP_npc_unload_duplicates(struct npc_data *nd) { +bool HP_pc_should_log_commands(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_unload_duplicates_pre ) { - void (*preHookFunc) (struct npc_data *nd); + bool retVal___ = false; + if( HPMHooks.count.HP_pc_should_log_commands_pre ) { + bool (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_unload_duplicates_pre[hIndex].func; - preHookFunc(nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_should_log_commands_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_should_log_commands_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.unload_duplicates(nd); + retVal___ = HPMHooks.source.pc.should_log_commands(sd); } - if( HPMHooks.count.HP_npc_unload_duplicates_post ) { - void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_unload_duplicates_post[hIndex].func; - postHookFunc(nd); + if( HPMHooks.count.HP_pc_should_log_commands_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_should_log_commands_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_should_log_commands_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } - return; + return retVal___; } -int HP_npc_unload(struct npc_data *nd, bool single) { +int HP_pc_setrestartvalue(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_unload_pre ) { - int (*preHookFunc) (struct npc_data *nd, bool *single); + if( HPMHooks.count.HP_pc_setrestartvalue_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_unload_pre[hIndex].func; - retVal___ = preHookFunc(nd, &single); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setrestartvalue_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setrestartvalue_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44669,51 +51088,52 @@ int HP_npc_unload(struct npc_data *nd, bool single) { } } { - retVal___ = HPMHooks.source.npc.unload(nd, single); + retVal___ = HPMHooks.source.pc.setrestartvalue(sd, type); } - if( HPMHooks.count.HP_npc_unload_post ) { - int (*postHookFunc) (int retVal___, struct npc_data *nd, bool *single); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_unload_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd, &single); + if( HPMHooks.count.HP_pc_setrestartvalue_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setrestartvalue_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setrestartvalue_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); } } return retVal___; } -void HP_npc_clearsrcfile(void) { +int HP_pc_makesavestatus(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_clearsrcfile_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_makesavestatus_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_clearsrcfile_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_makesavestatus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_makesavestatus_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.clearsrcfile(); + retVal___ = HPMHooks.source.pc.makesavestatus(sd); } - if( HPMHooks.count.HP_npc_clearsrcfile_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_clearsrcfile_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_pc_makesavestatus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_makesavestatus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_makesavestatus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } - return; + return retVal___; } -void HP_npc_addsrcfile(const char *name) { +void HP_pc_respawn(struct map_session_data *sd, clr_type clrtype) { int hIndex = 0; - if( HPMHooks.count.HP_npc_addsrcfile_pre ) { - void (*preHookFunc) (const char *name); + if( HPMHooks.count.HP_pc_respawn_pre ) { + void (*preHookFunc) (struct map_session_data *sd, clr_type *clrtype); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_addsrcfile_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_addsrcfile_pre[hIndex].func; - preHookFunc(name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_respawn_pre[hIndex].func; + preHookFunc(sd, &clrtype); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44721,105 +51141,106 @@ void HP_npc_addsrcfile(const char *name) { } } { - HPMHooks.source.npc.addsrcfile(name); + HPMHooks.source.pc.respawn(sd, clrtype); } - if( HPMHooks.count.HP_npc_addsrcfile_post ) { - void (*postHookFunc) (const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_addsrcfile_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_addsrcfile_post[hIndex].func; - postHookFunc(name); + if( HPMHooks.count.HP_pc_respawn_post ) { + void (*postHookFunc) (struct map_session_data *sd, clr_type *clrtype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_respawn_post[hIndex].func; + postHookFunc(sd, &clrtype); } } return; } -void HP_npc_delsrcfile(const char *name) { +int HP_pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int login_id1, unsigned int client_tick, int sex, int fd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_delsrcfile_pre ) { - void (*preHookFunc) (const char *name); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_setnewpc_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *account_id, int *char_id, int *login_id1, unsigned int *client_tick, int *sex, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_delsrcfile_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_delsrcfile_pre[hIndex].func; - preHookFunc(name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setnewpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setnewpc_pre[hIndex].func; + retVal___ = preHookFunc(sd, &account_id, &char_id, &login_id1, &client_tick, &sex, &fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.delsrcfile(name); + retVal___ = HPMHooks.source.pc.setnewpc(sd, account_id, char_id, login_id1, client_tick, sex, fd); } - if( HPMHooks.count.HP_npc_delsrcfile_post ) { - void (*postHookFunc) (const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_delsrcfile_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_delsrcfile_post[hIndex].func; - postHookFunc(name); + if( HPMHooks.count.HP_pc_setnewpc_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *account_id, int *char_id, int *login_id1, unsigned int *client_tick, int *sex, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setnewpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setnewpc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &account_id, &char_id, &login_id1, &client_tick, &sex, &fd); } } - return; + return retVal___; } -void HP_npc_parsename(struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath) { +bool HP_pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers) { int hIndex = 0; - if( HPMHooks.count.HP_npc_parsename_pre ) { - void (*preHookFunc) (struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath); + bool retVal___ = false; + if( HPMHooks.count.HP_pc_authok_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *login_id2, time_t *expiration_time, int *group_id, struct mmo_charstatus *st, bool *changing_mapservers); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsename_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_parsename_pre[hIndex].func; - preHookFunc(nd, name, start, buffer, filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authok_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_authok_pre[hIndex].func; + retVal___ = preHookFunc(sd, &login_id2, &expiration_time, &group_id, st, &changing_mapservers); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.parsename(nd, name, start, buffer, filepath); + retVal___ = HPMHooks.source.pc.authok(sd, login_id2, expiration_time, group_id, st, changing_mapservers); } - if( HPMHooks.count.HP_npc_parsename_post ) { - void (*postHookFunc) (struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsename_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_parsename_post[hIndex].func; - postHookFunc(nd, name, start, buffer, filepath); + if( HPMHooks.count.HP_pc_authok_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *login_id2, time_t *expiration_time, int *group_id, struct mmo_charstatus *st, bool *changing_mapservers); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authok_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_authok_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &login_id2, &expiration_time, &group_id, st, &changing_mapservers); } } - return; + return retVal___; } -int HP_npc_parseview(const char *w4, const char *start, const char *buffer, const char *filepath) { +void HP_pc_authfail(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_parseview_pre ) { - int (*preHookFunc) (const char *w4, const char *start, const char *buffer, const char *filepath); + if( HPMHooks.count.HP_pc_authfail_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parseview_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_parseview_pre[hIndex].func; - retVal___ = preHookFunc(w4, start, buffer, filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authfail_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_authfail_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.npc.parseview(w4, start, buffer, filepath); + HPMHooks.source.pc.authfail(sd); } - if( HPMHooks.count.HP_npc_parseview_post ) { - int (*postHookFunc) (int retVal___, const char *w4, const char *start, const char *buffer, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parseview_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_parseview_post[hIndex].func; - retVal___ = postHookFunc(retVal___, w4, start, buffer, filepath); + if( HPMHooks.count.HP_pc_authfail_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authfail_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_authfail_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -bool HP_npc_viewisid(const char *viewid) { +int HP_pc_reg_received(struct map_session_data *sd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_npc_viewisid_pre ) { - bool (*preHookFunc) (const char *viewid); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_reg_received_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_viewisid_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_viewisid_pre[hIndex].func; - retVal___ = preHookFunc(viewid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_reg_received_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_reg_received_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44827,26 +51248,26 @@ bool HP_npc_viewisid(const char *viewid) { } } { - retVal___ = HPMHooks.source.npc.viewisid(viewid); + retVal___ = HPMHooks.source.pc.reg_received(sd); } - if( HPMHooks.count.HP_npc_viewisid_post ) { - bool (*postHookFunc) (bool retVal___, const char *viewid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_viewisid_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_viewisid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, viewid); + if( HPMHooks.count.HP_pc_reg_received_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_reg_received_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_reg_received_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -struct npc_data* HP_npc_create_npc(int m, int x, int y) { +int HP_pc_isequip(struct map_session_data *sd, int n) { int hIndex = 0; - struct npc_data* retVal___ = NULL; - if( HPMHooks.count.HP_npc_create_npc_pre ) { - struct npc_data* (*preHookFunc) (int *m, int *x, int *y); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_isequip_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_create_npc_pre[hIndex].func; - retVal___ = preHookFunc(&m, &x, &y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_isequip_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44854,26 +51275,26 @@ struct npc_data* HP_npc_create_npc(int m, int x, int y) { } } { - retVal___ = HPMHooks.source.npc.create_npc(m, x, y); + retVal___ = HPMHooks.source.pc.isequip(sd, n); } - if( HPMHooks.count.HP_npc_create_npc_post ) { - struct npc_data* (*postHookFunc) (struct npc_data* retVal___, int *m, int *x, int *y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_create_npc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &m, &x, &y); + if( HPMHooks.count.HP_pc_isequip_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_isequip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n); } } return retVal___; } -struct npc_data* HP_npc_add_warp(char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y) { +int HP_pc_equippoint(struct map_session_data *sd, int n) { int hIndex = 0; - struct npc_data* retVal___ = NULL; - if( HPMHooks.count.HP_npc_add_warp_pre ) { - struct npc_data* (*preHookFunc) (char *name, short *from_mapid, short *from_x, short *from_y, short *xs, short *ys, unsigned short *to_mapindex, short *to_x, short *to_y); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_equippoint_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_warp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_add_warp_pre[hIndex].func; - retVal___ = preHookFunc(name, &from_mapid, &from_x, &from_y, &xs, &ys, &to_mapindex, &to_x, &to_y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equippoint_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_equippoint_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44881,26 +51302,26 @@ struct npc_data* HP_npc_add_warp(char *name, short from_mapid, short from_x, sho } } { - retVal___ = HPMHooks.source.npc.add_warp(name, from_mapid, from_x, from_y, xs, ys, to_mapindex, to_x, to_y); + retVal___ = HPMHooks.source.pc.equippoint(sd, n); } - if( HPMHooks.count.HP_npc_add_warp_post ) { - struct npc_data* (*postHookFunc) (struct npc_data* retVal___, char *name, short *from_mapid, short *from_x, short *from_y, short *xs, short *ys, unsigned short *to_mapindex, short *to_x, short *to_y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_warp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_add_warp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name, &from_mapid, &from_x, &from_y, &xs, &ys, &to_mapindex, &to_x, &to_y); + if( HPMHooks.count.HP_pc_equippoint_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equippoint_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_equippoint_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n); } } return retVal___; } -const char* HP_npc_parse_warp(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { +int HP_pc_setinventorydata(struct map_session_data *sd) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_warp_pre ) { - const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_setinventorydata_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_warp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_parse_warp_pre[hIndex].func; - retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinventorydata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setinventorydata_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44908,26 +51329,26 @@ const char* HP_npc_parse_warp(char *w1, char *w2, char *w3, char *w4, const char } } { - retVal___ = HPMHooks.source.npc.parse_warp(w1, w2, w3, w4, start, buffer, filepath, retval); + retVal___ = HPMHooks.source.pc.setinventorydata(sd); } - if( HPMHooks.count.HP_npc_parse_warp_post ) { - const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_warp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_parse_warp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval); + if( HPMHooks.count.HP_pc_setinventorydata_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinventorydata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setinventorydata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -const char* HP_npc_parse_shop(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { +int HP_pc_checkskill(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_shop_pre ) { - const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_checkskill_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_shop_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_parse_shop_pre[hIndex].func; - retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkskill_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44935,26 +51356,26 @@ const char* HP_npc_parse_shop(char *w1, char *w2, char *w3, char *w4, const char } } { - retVal___ = HPMHooks.source.npc.parse_shop(w1, w2, w3, w4, start, buffer, filepath, retval); + retVal___ = HPMHooks.source.pc.checkskill(sd, skill_id); } - if( HPMHooks.count.HP_npc_parse_shop_post ) { - const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_shop_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_parse_shop_post[hIndex].func; - retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval); + if( HPMHooks.count.HP_pc_checkskill_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id); } } return retVal___; } -const char* HP_npc_parse_unknown_object(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { +int HP_pc_checkskill2(struct map_session_data *sd, uint16 index) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_unknown_object_pre ) { - const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_checkskill2_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_object_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_parse_unknown_object_pre[hIndex].func; - retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkskill2_pre[hIndex].func; + retVal___ = preHookFunc(sd, &index); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -44962,52 +51383,53 @@ const char* HP_npc_parse_unknown_object(char *w1, char *w2, char *w3, char *w4, } } { - retVal___ = HPMHooks.source.npc.parse_unknown_object(w1, w2, w3, w4, start, buffer, filepath, retval); + retVal___ = HPMHooks.source.pc.checkskill2(sd, index); } - if( HPMHooks.count.HP_npc_parse_unknown_object_post ) { - const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_object_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_parse_unknown_object_post[hIndex].func; - retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval); + if( HPMHooks.count.HP_pc_checkskill2_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkskill2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &index); } } return retVal___; } -void HP_npc_convertlabel_db(struct npc_label_list *label_list, const char *filepath) { +int HP_pc_checkallowskill(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_convertlabel_db_pre ) { - void (*preHookFunc) (struct npc_label_list *label_list, const char *filepath); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_checkallowskill_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_convertlabel_db_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_convertlabel_db_pre[hIndex].func; - preHookFunc(label_list, filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkallowskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkallowskill_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.convertlabel_db(label_list, filepath); + retVal___ = HPMHooks.source.pc.checkallowskill(sd); } - if( HPMHooks.count.HP_npc_convertlabel_db_post ) { - void (*postHookFunc) (struct npc_label_list *label_list, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_convertlabel_db_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_convertlabel_db_post[hIndex].func; - postHookFunc(label_list, filepath); + if( HPMHooks.count.HP_pc_checkallowskill_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkallowskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkallowskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } - return; + return retVal___; } -const char* HP_npc_skip_script(const char *start, const char *buffer, const char *filepath, int *retval) { +int HP_pc_checkequip(struct map_session_data *sd, int pos) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_skip_script_pre ) { - const char* (*preHookFunc) (const char *start, const char *buffer, const char *filepath, int *retval); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_checkequip_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_skip_script_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_skip_script_pre[hIndex].func; - retVal___ = preHookFunc(start, buffer, filepath, retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkequip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkequip_pre[hIndex].func; + retVal___ = preHookFunc(sd, &pos); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45015,26 +51437,26 @@ const char* HP_npc_skip_script(const char *start, const char *buffer, const char } } { - retVal___ = HPMHooks.source.npc.skip_script(start, buffer, filepath, retval); + retVal___ = HPMHooks.source.pc.checkequip(sd, pos); } - if( HPMHooks.count.HP_npc_skip_script_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_skip_script_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_skip_script_post[hIndex].func; - retVal___ = postHookFunc(retVal___, start, buffer, filepath, retval); + if( HPMHooks.count.HP_pc_checkequip_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkequip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkequip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &pos); } } return retVal___; } -const char* HP_npc_parse_script(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval) { +int HP_pc_calc_skilltree(struct map_session_data *sd) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_script_pre ) { - const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_calc_skilltree_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_script_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_parse_script_pre[hIndex].func; - retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, &options, retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_calc_skilltree_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45042,26 +51464,26 @@ const char* HP_npc_parse_script(char *w1, char *w2, char *w3, char *w4, const ch } } { - retVal___ = HPMHooks.source.npc.parse_script(w1, w2, w3, w4, start, buffer, filepath, options, retval); + retVal___ = HPMHooks.source.pc.calc_skilltree(sd); } - if( HPMHooks.count.HP_npc_parse_script_post ) { - const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_script_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_parse_script_post[hIndex].func; - retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, &options, retval); + if( HPMHooks.count.HP_pc_calc_skilltree_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_calc_skilltree_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -const char* HP_npc_parse_duplicate(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval) { +int HP_pc_calc_skilltree_normalize_job(struct map_session_data *sd) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_duplicate_pre ) { - const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_calc_skilltree_normalize_job_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_parse_duplicate_pre[hIndex].func; - retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, &options, retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_normalize_job_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_calc_skilltree_normalize_job_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45069,26 +51491,26 @@ const char* HP_npc_parse_duplicate(char *w1, char *w2, char *w3, char *w4, const } } { - retVal___ = HPMHooks.source.npc.parse_duplicate(w1, w2, w3, w4, start, buffer, filepath, options, retval); + retVal___ = HPMHooks.source.pc.calc_skilltree_normalize_job(sd); } - if( HPMHooks.count.HP_npc_parse_duplicate_post ) { - const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_parse_duplicate_post[hIndex].func; - retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, &options, retval); + if( HPMHooks.count.HP_pc_calc_skilltree_normalize_job_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_normalize_job_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_calc_skilltree_normalize_job_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_npc_duplicate4instance(struct npc_data *snd, int16 m) { +int HP_pc_clean_skilltree(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_duplicate4instance_pre ) { - int (*preHookFunc) (struct npc_data *snd, int16 *m); + if( HPMHooks.count.HP_pc_clean_skilltree_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate4instance_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_duplicate4instance_pre[hIndex].func; - retVal___ = preHookFunc(snd, &m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clean_skilltree_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_clean_skilltree_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45096,54 +51518,53 @@ int HP_npc_duplicate4instance(struct npc_data *snd, int16 m) { } } { - retVal___ = HPMHooks.source.npc.duplicate4instance(snd, m); + retVal___ = HPMHooks.source.pc.clean_skilltree(sd); } - if( HPMHooks.count.HP_npc_duplicate4instance_post ) { - int (*postHookFunc) (int retVal___, struct npc_data *snd, int16 *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate4instance_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_duplicate4instance_post[hIndex].func; - retVal___ = postHookFunc(retVal___, snd, &m); + if( HPMHooks.count.HP_pc_clean_skilltree_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clean_skilltree_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_clean_skilltree_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -void HP_npc_setcells(struct npc_data *nd) { +int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, int y, clr_type clrtype) { int hIndex = 0; - if( HPMHooks.count.HP_npc_setcells_pre ) { - void (*preHookFunc) (struct npc_data *nd); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_setpos_pre ) { + int (*preHookFunc) (struct map_session_data *sd, unsigned short *map_index, int *x, int *y, clr_type *clrtype); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setcells_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_setcells_pre[hIndex].func; - preHookFunc(nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setpos_pre[hIndex].func; + retVal___ = preHookFunc(sd, &map_index, &x, &y, &clrtype); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.setcells(nd); + retVal___ = HPMHooks.source.pc.setpos(sd, map_index, x, y, clrtype); } - if( HPMHooks.count.HP_npc_setcells_post ) { - void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setcells_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_setcells_post[hIndex].func; - postHookFunc(nd); + if( HPMHooks.count.HP_pc_setpos_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short *map_index, int *x, int *y, clr_type *clrtype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setpos_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &map_index, &x, &y, &clrtype); } } - return; + return retVal___; } -int HP_npc_unsetcells_sub(struct block_list *bl, va_list ap) { +int HP_pc_setsavepoint(struct map_session_data *sd, short map_index, int x, int y) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_unsetcells_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_pc_setsavepoint_pre ) { + int (*preHookFunc) (struct map_session_data *sd, short *map_index, int *x, int *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_npc_unsetcells_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setsavepoint_pre[hIndex].func; + retVal___ = preHookFunc(sd, &map_index, &x, &y); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45151,134 +51572,134 @@ int HP_npc_unsetcells_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.npc.unsetcells_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.pc.setsavepoint(sd, map_index, x, y); } - if( HPMHooks.count.HP_npc_unsetcells_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_npc_unsetcells_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_pc_setsavepoint_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *map_index, int *x, int *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setsavepoint_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &map_index, &x, &y); } } return retVal___; } -void HP_npc_unsetcells(struct npc_data *nd) { +int HP_pc_randomwarp(struct map_session_data *sd, clr_type type) { int hIndex = 0; - if( HPMHooks.count.HP_npc_unsetcells_pre ) { - void (*preHookFunc) (struct npc_data *nd); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_randomwarp_pre ) { + int (*preHookFunc) (struct map_session_data *sd, clr_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_unsetcells_pre[hIndex].func; - preHookFunc(nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_randomwarp_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.unsetcells(nd); + retVal___ = HPMHooks.source.pc.randomwarp(sd, type); } - if( HPMHooks.count.HP_npc_unsetcells_post ) { - void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_unsetcells_post[hIndex].func; - postHookFunc(nd); + if( HPMHooks.count.HP_pc_randomwarp_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, clr_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_randomwarp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); } } - return; + return retVal___; } -void HP_npc_movenpc(struct npc_data *nd, int16 x, int16 y) { +int HP_pc_memo(struct map_session_data *sd, int pos) { int hIndex = 0; - if( HPMHooks.count.HP_npc_movenpc_pre ) { - void (*preHookFunc) (struct npc_data *nd, int16 *x, int16 *y); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_memo_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_movenpc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_movenpc_pre[hIndex].func; - preHookFunc(nd, &x, &y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_memo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_memo_pre[hIndex].func; + retVal___ = preHookFunc(sd, &pos); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.movenpc(nd, x, y); + retVal___ = HPMHooks.source.pc.memo(sd, pos); } - if( HPMHooks.count.HP_npc_movenpc_post ) { - void (*postHookFunc) (struct npc_data *nd, int16 *x, int16 *y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_movenpc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_movenpc_post[hIndex].func; - postHookFunc(nd, &x, &y); + if( HPMHooks.count.HP_pc_memo_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_memo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_memo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &pos); } } - return; + return retVal___; } -void HP_npc_setdisplayname(struct npc_data *nd, const char *newname) { +int HP_pc_checkadditem(struct map_session_data *sd, int nameid, int amount) { int hIndex = 0; - if( HPMHooks.count.HP_npc_setdisplayname_pre ) { - void (*preHookFunc) (struct npc_data *nd, const char *newname); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_checkadditem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setdisplayname_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_setdisplayname_pre[hIndex].func; - preHookFunc(nd, newname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkadditem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkadditem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid, &amount); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.setdisplayname(nd, newname); + retVal___ = HPMHooks.source.pc.checkadditem(sd, nameid, amount); } - if( HPMHooks.count.HP_npc_setdisplayname_post ) { - void (*postHookFunc) (struct npc_data *nd, const char *newname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setdisplayname_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_setdisplayname_post[hIndex].func; - postHookFunc(nd, newname); + if( HPMHooks.count.HP_pc_checkadditem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkadditem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkadditem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid, &amount); } } - return; + return retVal___; } -void HP_npc_setclass(struct npc_data *nd, short class_) { +int HP_pc_inventoryblank(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_setclass_pre ) { - void (*preHookFunc) (struct npc_data *nd, short *class_); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_inventoryblank_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_setclass_pre[hIndex].func; - preHookFunc(nd, &class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventoryblank_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_inventoryblank_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.setclass(nd, class_); + retVal___ = HPMHooks.source.pc.inventoryblank(sd); } - if( HPMHooks.count.HP_npc_setclass_post ) { - void (*postHookFunc) (struct npc_data *nd, short *class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_setclass_post[hIndex].func; - postHookFunc(nd, &class_); + if( HPMHooks.count.HP_pc_inventoryblank_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventoryblank_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_inventoryblank_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } - return; + return retVal___; } -int HP_npc_do_atcmd_event(struct map_session_data *sd, const char *command, const char *message, const char *eventname) { +int HP_pc_search_inventory(struct map_session_data *sd, int item_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_do_atcmd_event_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *command, const char *message, const char *eventname); + if( HPMHooks.count.HP_pc_search_inventory_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *item_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_atcmd_event_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_do_atcmd_event_pre[hIndex].func; - retVal___ = preHookFunc(sd, command, message, eventname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_search_inventory_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_search_inventory_pre[hIndex].func; + retVal___ = preHookFunc(sd, &item_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45286,26 +51707,26 @@ int HP_npc_do_atcmd_event(struct map_session_data *sd, const char *command, cons } } { - retVal___ = HPMHooks.source.npc.do_atcmd_event(sd, command, message, eventname); + retVal___ = HPMHooks.source.pc.search_inventory(sd, item_id); } - if( HPMHooks.count.HP_npc_do_atcmd_event_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *command, const char *message, const char *eventname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_atcmd_event_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_do_atcmd_event_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, command, message, eventname); + if( HPMHooks.count.HP_pc_search_inventory_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *item_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_search_inventory_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_search_inventory_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &item_id); } } return retVal___; } -const char* HP_npc_parse_function(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { +int HP_pc_payzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type type, struct map_session_data *tsd) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_function_pre ) { - const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_payzeny_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_function_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_parse_function_pre[hIndex].func; - retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_payzeny_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_payzeny_pre[hIndex].func; + retVal___ = preHookFunc(sd, &zeny, &type, tsd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45313,52 +51734,53 @@ const char* HP_npc_parse_function(char *w1, char *w2, char *w3, char *w4, const } } { - retVal___ = HPMHooks.source.npc.parse_function(w1, w2, w3, w4, start, buffer, filepath, retval); + retVal___ = HPMHooks.source.pc.payzeny(sd, zeny, type, tsd); } - if( HPMHooks.count.HP_npc_parse_function_post ) { - const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_function_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_parse_function_post[hIndex].func; - retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval); + if( HPMHooks.count.HP_pc_payzeny_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_payzeny_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_payzeny_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &zeny, &type, tsd); } } return retVal___; } -void HP_npc_parse_mob2(struct spawn_data *mobspawn) { +int HP_pc_additem(struct map_session_data *sd, struct item *item_data, int amount, e_log_pick_type log_type) { int hIndex = 0; - if( HPMHooks.count.HP_npc_parse_mob2_pre ) { - void (*preHookFunc) (struct spawn_data *mobspawn); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_additem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_parse_mob2_pre[hIndex].func; - preHookFunc(mobspawn); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_additem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_additem_pre[hIndex].func; + retVal___ = preHookFunc(sd, item_data, &amount, &log_type); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.parse_mob2(mobspawn); + retVal___ = HPMHooks.source.pc.additem(sd, item_data, amount, log_type); } - if( HPMHooks.count.HP_npc_parse_mob2_post ) { - void (*postHookFunc) (struct spawn_data *mobspawn); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_parse_mob2_post[hIndex].func; - postHookFunc(mobspawn); + if( HPMHooks.count.HP_pc_additem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_additem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_additem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item_data, &amount, &log_type); } } - return; + return retVal___; } -const char* HP_npc_parse_mob(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { +int HP_pc_getzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type type, struct map_session_data *tsd) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_mob_pre ) { - const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_getzeny_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_parse_mob_pre[hIndex].func; - retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getzeny_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_getzeny_pre[hIndex].func; + retVal___ = preHookFunc(sd, &zeny, &type, tsd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45366,26 +51788,26 @@ const char* HP_npc_parse_mob(char *w1, char *w2, char *w3, char *w4, const char } } { - retVal___ = HPMHooks.source.npc.parse_mob(w1, w2, w3, w4, start, buffer, filepath, retval); + retVal___ = HPMHooks.source.pc.getzeny(sd, zeny, type, tsd); } - if( HPMHooks.count.HP_npc_parse_mob_post ) { - const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_parse_mob_post[hIndex].func; - retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval); + if( HPMHooks.count.HP_pc_getzeny_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getzeny_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_getzeny_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &zeny, &type, tsd); } } return retVal___; } -const char* HP_npc_parse_mapflag(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { +int HP_pc_delitem(struct map_session_data *sd, int n, int amount, int type, short reason, e_log_pick_type log_type) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_mapflag_pre ) { - const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_delitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, int *type, short *reason, e_log_pick_type *log_type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mapflag_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_parse_mapflag_pre[hIndex].func; - retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_delitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, &amount, &type, &reason, &log_type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45393,52 +51815,53 @@ const char* HP_npc_parse_mapflag(char *w1, char *w2, char *w3, char *w4, const c } } { - retVal___ = HPMHooks.source.npc.parse_mapflag(w1, w2, w3, w4, start, buffer, filepath, retval); + retVal___ = HPMHooks.source.pc.delitem(sd, n, amount, type, reason, log_type); } - if( HPMHooks.count.HP_npc_parse_mapflag_post ) { - const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mapflag_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_parse_mapflag_post[hIndex].func; - retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval); + if( HPMHooks.count.HP_pc_delitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *amount, int *type, short *reason, e_log_pick_type *log_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_delitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, &amount, &type, &reason, &log_type); } } return retVal___; } -void HP_npc_parse_unknown_mapflag(const char *name, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { +int HP_pc_paycash(struct map_session_data *sd, int price, int points) { int hIndex = 0; - if( HPMHooks.count.HP_npc_parse_unknown_mapflag_pre ) { - void (*preHookFunc) (const char *name, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_paycash_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *price, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_mapflag_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_parse_unknown_mapflag_pre[hIndex].func; - preHookFunc(name, w3, w4, start, buffer, filepath, retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_paycash_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_paycash_pre[hIndex].func; + retVal___ = preHookFunc(sd, &price, &points); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.parse_unknown_mapflag(name, w3, w4, start, buffer, filepath, retval); + retVal___ = HPMHooks.source.pc.paycash(sd, price, points); } - if( HPMHooks.count.HP_npc_parse_unknown_mapflag_post ) { - void (*postHookFunc) (const char *name, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_mapflag_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_parse_unknown_mapflag_post[hIndex].func; - postHookFunc(name, w3, w4, start, buffer, filepath, retval); + if( HPMHooks.count.HP_pc_paycash_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *price, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_paycash_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_paycash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &price, &points); } } - return; + return retVal___; } -int HP_npc_parsesrcfile(const char *filepath, bool runOnInit) { +int HP_pc_getcash(struct map_session_data *sd, int cash, int points) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_parsesrcfile_pre ) { - int (*preHookFunc) (const char *filepath, bool *runOnInit); + if( HPMHooks.count.HP_pc_getcash_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *cash, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsesrcfile_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_parsesrcfile_pre[hIndex].func; - retVal___ = preHookFunc(filepath, &runOnInit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getcash_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_getcash_pre[hIndex].func; + retVal___ = preHookFunc(sd, &cash, &points); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45446,26 +51869,26 @@ int HP_npc_parsesrcfile(const char *filepath, bool runOnInit) { } } { - retVal___ = HPMHooks.source.npc.parsesrcfile(filepath, runOnInit); + retVal___ = HPMHooks.source.pc.getcash(sd, cash, points); } - if( HPMHooks.count.HP_npc_parsesrcfile_post ) { - int (*postHookFunc) (int retVal___, const char *filepath, bool *runOnInit); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsesrcfile_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_parsesrcfile_post[hIndex].func; - retVal___ = postHookFunc(retVal___, filepath, &runOnInit); + if( HPMHooks.count.HP_pc_getcash_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *cash, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getcash_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_getcash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &cash, &points); } } return retVal___; } -int HP_npc_script_event(struct map_session_data *sd, enum npce_event type) { +int HP_pc_cart_additem(struct map_session_data *sd, struct item *item_data, int amount, e_log_pick_type log_type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_script_event_pre ) { - int (*preHookFunc) (struct map_session_data *sd, enum npce_event *type); + if( HPMHooks.count.HP_pc_cart_additem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_script_event_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_script_event_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_additem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_cart_additem_pre[hIndex].func; + retVal___ = preHookFunc(sd, item_data, &amount, &log_type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45473,54 +51896,53 @@ int HP_npc_script_event(struct map_session_data *sd, enum npce_event type) { } } { - retVal___ = HPMHooks.source.npc.script_event(sd, type); + retVal___ = HPMHooks.source.pc.cart_additem(sd, item_data, amount, log_type); } - if( HPMHooks.count.HP_npc_script_event_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum npce_event *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_script_event_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_script_event_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type); + if( HPMHooks.count.HP_pc_cart_additem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_additem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_cart_additem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item_data, &amount, &log_type); } } return retVal___; } -void HP_npc_read_event_script(void) { +int HP_pc_cart_delitem(struct map_session_data *sd, int n, int amount, int type, e_log_pick_type log_type) { int hIndex = 0; - if( HPMHooks.count.HP_npc_read_event_script_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_cart_delitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, int *type, e_log_pick_type *log_type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_read_event_script_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_read_event_script_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_delitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_cart_delitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, &amount, &type, &log_type); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.read_event_script(); + retVal___ = HPMHooks.source.pc.cart_delitem(sd, n, amount, type, log_type); } - if( HPMHooks.count.HP_npc_read_event_script_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_read_event_script_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_read_event_script_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_pc_cart_delitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *amount, int *type, e_log_pick_type *log_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_delitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_cart_delitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, &amount, &type, &log_type); } } - return; + return retVal___; } -int HP_npc_path_db_clear_sub(DBKey key, DBData *data, va_list args) { +int HP_pc_putitemtocart(struct map_session_data *sd, int idx, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_path_db_clear_sub_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list args); + if( HPMHooks.count.HP_pc_putitemtocart_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_path_db_clear_sub_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_npc_path_db_clear_sub_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_putitemtocart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_putitemtocart_pre[hIndex].func; + retVal___ = preHookFunc(sd, &idx, &amount); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45528,32 +51950,26 @@ int HP_npc_path_db_clear_sub(DBKey key, DBData *data, va_list args) { } } { - va_list args___copy; va_copy(args___copy, args); - retVal___ = HPMHooks.source.npc.path_db_clear_sub(key, data, args___copy); - va_end(args___copy); + retVal___ = HPMHooks.source.pc.putitemtocart(sd, idx, amount); } - if( HPMHooks.count.HP_npc_path_db_clear_sub_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_path_db_clear_sub_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_npc_path_db_clear_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_pc_putitemtocart_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *idx, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_putitemtocart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_putitemtocart_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &idx, &amount); } } return retVal___; } -int HP_npc_ev_label_db_clear_sub(DBKey key, DBData *data, va_list args) { +int HP_pc_getitemfromcart(struct map_session_data *sd, int idx, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_ev_label_db_clear_sub_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list args); + if( HPMHooks.count.HP_pc_getitemfromcart_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ev_label_db_clear_sub_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_npc_ev_label_db_clear_sub_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getitemfromcart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_getitemfromcart_pre[hIndex].func; + retVal___ = preHookFunc(sd, &idx, &amount); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45561,30 +51977,26 @@ int HP_npc_ev_label_db_clear_sub(DBKey key, DBData *data, va_list args) { } } { - va_list args___copy; va_copy(args___copy, args); - retVal___ = HPMHooks.source.npc.ev_label_db_clear_sub(key, data, args___copy); - va_end(args___copy); + retVal___ = HPMHooks.source.pc.getitemfromcart(sd, idx, amount); } - if( HPMHooks.count.HP_npc_ev_label_db_clear_sub_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ev_label_db_clear_sub_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_npc_ev_label_db_clear_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_pc_getitemfromcart_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *idx, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getitemfromcart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_getitemfromcart_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &idx, &amount); } } return retVal___; } -int HP_npc_reload(void) { +int HP_pc_cartitem_amount(struct map_session_data *sd, int idx, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_reload_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_pc_cartitem_amount_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_reload_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_reload_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cartitem_amount_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_cartitem_amount_pre[hIndex].func; + retVal___ = preHookFunc(sd, &idx, &amount); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45592,26 +52004,26 @@ int HP_npc_reload(void) { } } { - retVal___ = HPMHooks.source.npc.reload(); + retVal___ = HPMHooks.source.pc.cartitem_amount(sd, idx, amount); } - if( HPMHooks.count.HP_npc_reload_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_reload_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_reload_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_pc_cartitem_amount_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *idx, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cartitem_amount_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_cartitem_amount_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &idx, &amount); } } return retVal___; } -bool HP_npc_unloadfile(const char *filepath) { +int HP_pc_takeitem(struct map_session_data *sd, struct flooritem_data *fitem) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_npc_unloadfile_pre ) { - bool (*preHookFunc) (const char *filepath); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_takeitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct flooritem_data *fitem); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_unloadfile_pre[hIndex].func; - retVal___ = preHookFunc(filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_takeitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_takeitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, fitem); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45619,130 +52031,134 @@ bool HP_npc_unloadfile(const char *filepath) { } } { - retVal___ = HPMHooks.source.npc.unloadfile(filepath); + retVal___ = HPMHooks.source.pc.takeitem(sd, fitem); } - if( HPMHooks.count.HP_npc_unloadfile_post ) { - bool (*postHookFunc) (bool retVal___, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_unloadfile_post[hIndex].func; - retVal___ = postHookFunc(retVal___, filepath); + if( HPMHooks.count.HP_pc_takeitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct flooritem_data *fitem); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_takeitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_takeitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, fitem); } } return retVal___; } -void HP_npc_do_clear_npc(void) { +int HP_pc_dropitem(struct map_session_data *sd, int n, int amount) { int hIndex = 0; - if( HPMHooks.count.HP_npc_do_clear_npc_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_dropitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_clear_npc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_do_clear_npc_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dropitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_dropitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, &amount); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.do_clear_npc(); + retVal___ = HPMHooks.source.pc.dropitem(sd, n, amount); } - if( HPMHooks.count.HP_npc_do_clear_npc_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_clear_npc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_do_clear_npc_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_pc_dropitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dropitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_dropitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, &amount); } } - return; + return retVal___; } -void HP_npc_debug_warps_sub(struct npc_data *nd) { +bool HP_pc_isequipped(struct map_session_data *sd, int nameid) { int hIndex = 0; - if( HPMHooks.count.HP_npc_debug_warps_sub_pre ) { - void (*preHookFunc) (struct npc_data *nd); + bool retVal___ = false; + if( HPMHooks.count.HP_pc_isequipped_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_debug_warps_sub_pre[hIndex].func; - preHookFunc(nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequipped_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_isequipped_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.debug_warps_sub(nd); + retVal___ = HPMHooks.source.pc.isequipped(sd, nameid); } - if( HPMHooks.count.HP_npc_debug_warps_sub_post ) { - void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_debug_warps_sub_post[hIndex].func; - postHookFunc(nd); + if( HPMHooks.count.HP_pc_isequipped_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequipped_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_isequipped_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid); } } - return; + return retVal___; } -void HP_npc_debug_warps(void) { - int hIndex = 0; - if( HPMHooks.count.HP_npc_debug_warps_pre ) { - void (*preHookFunc) (void); +bool HP_pc_can_Adopt(struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_pc_can_Adopt_pre ) { + bool (*preHookFunc) (struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_debug_warps_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_Adopt_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_can_Adopt_pre[hIndex].func; + retVal___ = preHookFunc(p1_sd, p2_sd, b_sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.debug_warps(); + retVal___ = HPMHooks.source.pc.can_Adopt(p1_sd, p2_sd, b_sd); } - if( HPMHooks.count.HP_npc_debug_warps_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_debug_warps_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_pc_can_Adopt_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_Adopt_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_can_Adopt_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p1_sd, p2_sd, b_sd); } } - return; + return retVal___; } -void HP_npc_trader_count_funds(struct npc_data *nd, struct map_session_data *sd) { +bool HP_pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_trader_count_funds_pre ) { - void (*preHookFunc) (struct npc_data *nd, struct map_session_data *sd); + bool retVal___ = false; + if( HPMHooks.count.HP_pc_adoption_pre ) { + bool (*preHookFunc) (struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_count_funds_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_trader_count_funds_pre[hIndex].func; - preHookFunc(nd, sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_adoption_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_adoption_pre[hIndex].func; + retVal___ = preHookFunc(p1_sd, p2_sd, b_sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.trader_count_funds(nd, sd); + retVal___ = HPMHooks.source.pc.adoption(p1_sd, p2_sd, b_sd); } - if( HPMHooks.count.HP_npc_trader_count_funds_post ) { - void (*postHookFunc) (struct npc_data *nd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_count_funds_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_trader_count_funds_post[hIndex].func; - postHookFunc(nd, sd); + if( HPMHooks.count.HP_pc_adoption_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_adoption_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_adoption_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p1_sd, p2_sd, b_sd); } } - return; + return retVal___; } -bool HP_npc_trader_pay(struct npc_data *nd, struct map_session_data *sd, int price, int points) { +int HP_pc_updateweightstatus(struct map_session_data *sd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_npc_trader_pay_pre ) { - bool (*preHookFunc) (struct npc_data *nd, struct map_session_data *sd, int *price, int *points); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_updateweightstatus_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_pay_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_trader_pay_pre[hIndex].func; - retVal___ = preHookFunc(nd, sd, &price, &points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_updateweightstatus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_updateweightstatus_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45750,52 +52166,53 @@ bool HP_npc_trader_pay(struct npc_data *nd, struct map_session_data *sd, int pri } } { - retVal___ = HPMHooks.source.npc.trader_pay(nd, sd, price, points); + retVal___ = HPMHooks.source.pc.updateweightstatus(sd); } - if( HPMHooks.count.HP_npc_trader_pay_post ) { - bool (*postHookFunc) (bool retVal___, struct npc_data *nd, struct map_session_data *sd, int *price, int *points); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_pay_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_trader_pay_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd, sd, &price, &points); + if( HPMHooks.count.HP_pc_updateweightstatus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_updateweightstatus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_updateweightstatus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -void HP_npc_trader_update(int master) { +int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned short pos, bool onskill) { int hIndex = 0; - if( HPMHooks.count.HP_npc_trader_update_pre ) { - void (*preHookFunc) (int *master); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_addautobonus_pre ) { + int (*preHookFunc) (struct s_autobonus *bonus, char *max, const char *bonus_script, short *rate, unsigned int *dur, short *atk_type, const char *o_script, unsigned short *pos, bool *onskill); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_update_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_trader_update_pre[hIndex].func; - preHookFunc(&master); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_addautobonus_pre[hIndex].func; + retVal___ = preHookFunc(bonus, &max, bonus_script, &rate, &dur, &atk_type, o_script, &pos, &onskill); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.trader_update(master); + retVal___ = HPMHooks.source.pc.addautobonus(bonus, max, bonus_script, rate, dur, atk_type, o_script, pos, onskill); } - if( HPMHooks.count.HP_npc_trader_update_post ) { - void (*postHookFunc) (int *master); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_update_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_trader_update_post[hIndex].func; - postHookFunc(&master); + if( HPMHooks.count.HP_pc_addautobonus_post ) { + int (*postHookFunc) (int retVal___, struct s_autobonus *bonus, char *max, const char *bonus_script, short *rate, unsigned int *dur, short *atk_type, const char *o_script, unsigned short *pos, bool *onskill); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_addautobonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bonus, &max, bonus_script, &rate, &dur, &atk_type, o_script, &pos, &onskill); } } - return; + return retVal___; } -int HP_npc_market_buylist(struct map_session_data *sd, unsigned short list_size, struct packet_npc_market_purchase *p) { +int HP_pc_exeautobonus(struct map_session_data *sd, struct s_autobonus *bonus) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_market_buylist_pre ) { - int (*preHookFunc) (struct map_session_data *sd, unsigned short *list_size, struct packet_npc_market_purchase *p); + if( HPMHooks.count.HP_pc_exeautobonus_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct s_autobonus *bonus); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_market_buylist_pre[hIndex].func; - retVal___ = preHookFunc(sd, &list_size, p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_exeautobonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_exeautobonus_pre[hIndex].func; + retVal___ = preHookFunc(sd, bonus); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45803,26 +52220,26 @@ int HP_npc_market_buylist(struct map_session_data *sd, unsigned short list_size, } } { - retVal___ = HPMHooks.source.npc.market_buylist(sd, list_size, p); + retVal___ = HPMHooks.source.pc.exeautobonus(sd, bonus); } - if( HPMHooks.count.HP_npc_market_buylist_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short *list_size, struct packet_npc_market_purchase *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_market_buylist_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &list_size, p); + if( HPMHooks.count.HP_pc_exeautobonus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_autobonus *bonus); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_exeautobonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_exeautobonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, bonus); } } return retVal___; } -bool HP_npc_trader_open(struct map_session_data *sd, struct npc_data *nd) { +int HP_pc_endautobonus(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_npc_trader_open_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_endautobonus_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_open_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_trader_open_pre[hIndex].func; - retVal___ = preHookFunc(sd, nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_endautobonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_endautobonus_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45830,130 +52247,134 @@ bool HP_npc_trader_open(struct map_session_data *sd, struct npc_data *nd) { } } { - retVal___ = HPMHooks.source.npc.trader_open(sd, nd); + retVal___ = HPMHooks.source.pc.endautobonus(tid, tick, id, data); } - if( HPMHooks.count.HP_npc_trader_open_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_open_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_trader_open_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, nd); + if( HPMHooks.count.HP_pc_endautobonus_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_endautobonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_endautobonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -void HP_npc_market_fromsql(void) { +int HP_pc_delautobonus(struct map_session_data *sd, struct s_autobonus *bonus, char max, bool restore) { int hIndex = 0; - if( HPMHooks.count.HP_npc_market_fromsql_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_delautobonus_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct s_autobonus *bonus, char *max, bool *restore); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_fromsql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_market_fromsql_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delautobonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_delautobonus_pre[hIndex].func; + retVal___ = preHookFunc(sd, bonus, &max, &restore); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.market_fromsql(); + retVal___ = HPMHooks.source.pc.delautobonus(sd, bonus, max, restore); } - if( HPMHooks.count.HP_npc_market_fromsql_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_fromsql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_market_fromsql_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_pc_delautobonus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_autobonus *bonus, char *max, bool *restore); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delautobonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_delautobonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, bonus, &max, &restore); } } - return; + return retVal___; } -void HP_npc_market_tosql(struct npc_data *nd, unsigned short index) { +int HP_pc_bonus(struct map_session_data *sd, int type, int val) { int hIndex = 0; - if( HPMHooks.count.HP_npc_market_tosql_pre ) { - void (*preHookFunc) (struct npc_data *nd, unsigned short *index); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_bonus_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_market_tosql_pre[hIndex].func; - preHookFunc(nd, &index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &val); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.market_tosql(nd, index); + retVal___ = HPMHooks.source.pc.bonus(sd, type, val); } - if( HPMHooks.count.HP_npc_market_tosql_post ) { - void (*postHookFunc) (struct npc_data *nd, unsigned short *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_market_tosql_post[hIndex].func; - postHookFunc(nd, &index); + if( HPMHooks.count.HP_pc_bonus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &val); } } - return; + return retVal___; } -void HP_npc_market_delfromsql(struct npc_data *nd, unsigned short index) { +int HP_pc_bonus2(struct map_session_data *sd, int type, int type2, int val) { int hIndex = 0; - if( HPMHooks.count.HP_npc_market_delfromsql_pre ) { - void (*preHookFunc) (struct npc_data *nd, unsigned short *index); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_bonus2_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_market_delfromsql_pre[hIndex].func; - preHookFunc(nd, &index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus2_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &type2, &val); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.market_delfromsql(nd, index); + retVal___ = HPMHooks.source.pc.bonus2(sd, type, type2, val); } - if( HPMHooks.count.HP_npc_market_delfromsql_post ) { - void (*postHookFunc) (struct npc_data *nd, unsigned short *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_market_delfromsql_post[hIndex].func; - postHookFunc(nd, &index); + if( HPMHooks.count.HP_pc_bonus2_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *type2, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &type2, &val); } } - return; + return retVal___; } -void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) { +int HP_pc_bonus3(struct map_session_data *sd, int type, int type2, int type3, int val) { int hIndex = 0; - if( HPMHooks.count.HP_npc_market_delfromsql_sub_pre ) { - void (*preHookFunc) (const char *npcname, unsigned short *index); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_bonus3_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_pre[hIndex].func; - preHookFunc(npcname, &index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus3_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus3_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &type2, &type3, &val); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.npc.market_delfromsql_sub(npcname, index); + retVal___ = HPMHooks.source.pc.bonus3(sd, type, type2, type3, val); } - if( HPMHooks.count.HP_npc_market_delfromsql_sub_post ) { - void (*postHookFunc) (const char *npcname, unsigned short *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_post[hIndex].func; - postHookFunc(npcname, &index); + if( HPMHooks.count.HP_pc_bonus3_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *type2, int *type3, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus3_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus3_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &type2, &type3, &val); } } - return; + return retVal___; } -bool HP_npc_db_checkid(const int id) { +int HP_pc_bonus4(struct map_session_data *sd, int type, int type2, int type3, int type4, int val) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_npc_db_checkid_pre ) { - bool (*preHookFunc) (const int *id); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_bonus4_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_db_checkid_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_db_checkid_pre[hIndex].func; - retVal___ = preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus4_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus4_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &type2, &type3, &type4, &val); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45961,26 +52382,26 @@ bool HP_npc_db_checkid(const int id) { } } { - retVal___ = HPMHooks.source.npc.db_checkid(id); + retVal___ = HPMHooks.source.pc.bonus4(sd, type, type2, type3, type4, val); } - if( HPMHooks.count.HP_npc_db_checkid_post ) { - bool (*postHookFunc) (bool retVal___, const int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_db_checkid_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_db_checkid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + if( HPMHooks.count.HP_pc_bonus4_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus4_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus4_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &type2, &type3, &type4, &val); } } return retVal___; } -int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) { +int HP_pc_bonus5(struct map_session_data *sd, int type, int type2, int type3, int type4, int type5, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_secure_timeout_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_pc_bonus5_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *type5, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_secure_timeout_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_npc_secure_timeout_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus5_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus5_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &type2, &type3, &type4, &type5, &val); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -45988,79 +52409,80 @@ int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.npc.secure_timeout_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.pc.bonus5(sd, type, type2, type3, type4, type5, val); } - if( HPMHooks.count.HP_npc_secure_timeout_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_secure_timeout_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_npc_secure_timeout_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_pc_bonus5_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *type5, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus5_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus5_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &type2, &type3, &type4, &type5, &val); } } return retVal___; } -/* party */ -void HP_party_init(bool minimal) { +int HP_pc_skill(struct map_session_data *sd, int id, int level, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_party_init_pre ) { - void (*preHookFunc) (bool *minimal); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_skill_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *id, int *level, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_init_pre[hIndex].func; - preHookFunc(&minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_skill_pre[hIndex].func; + retVal___ = preHookFunc(sd, &id, &level, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.party.init(minimal); + retVal___ = HPMHooks.source.pc.skill(sd, id, level, flag); } - if( HPMHooks.count.HP_party_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_init_post[hIndex].func; - postHookFunc(&minimal); + if( HPMHooks.count.HP_pc_skill_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *id, int *level, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_skill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &id, &level, &flag); } } - return; + return retVal___; } -void HP_party_final(void) { +int HP_pc_insert_card(struct map_session_data *sd, int idx_card, int idx_equip) { int hIndex = 0; - if( HPMHooks.count.HP_party_final_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_insert_card_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *idx_card, int *idx_equip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_final_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_insert_card_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_insert_card_pre[hIndex].func; + retVal___ = preHookFunc(sd, &idx_card, &idx_equip); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.party.final(); + retVal___ = HPMHooks.source.pc.insert_card(sd, idx_card, idx_equip); } - if( HPMHooks.count.HP_party_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_final_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_pc_insert_card_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *idx_card, int *idx_equip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_insert_card_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_insert_card_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &idx_card, &idx_equip); } } - return; + return retVal___; } -struct party_data* HP_party_search(int party_id) { +bool HP_pc_can_insert_card(struct map_session_data *sd, int idx_card) { int hIndex = 0; - struct party_data* retVal___ = NULL; - if( HPMHooks.count.HP_party_search_pre ) { - struct party_data* (*preHookFunc) (int *party_id); + bool retVal___ = false; + if( HPMHooks.count.HP_pc_can_insert_card_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *idx_card); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_search_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_search_pre[hIndex].func; - retVal___ = preHookFunc(&party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_can_insert_card_pre[hIndex].func; + retVal___ = preHookFunc(sd, &idx_card); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46068,26 +52490,26 @@ struct party_data* HP_party_search(int party_id) { } } { - retVal___ = HPMHooks.source.party.search(party_id); + retVal___ = HPMHooks.source.pc.can_insert_card(sd, idx_card); } - if( HPMHooks.count.HP_party_search_post ) { - struct party_data* (*postHookFunc) (struct party_data* retVal___, int *party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_search_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_search_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id); + if( HPMHooks.count.HP_pc_can_insert_card_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *idx_card); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_can_insert_card_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &idx_card); } } return retVal___; } -struct party_data* HP_party_searchname(const char *str) { +bool HP_pc_can_insert_card_into(struct map_session_data *sd, int idx_card, int idx_equip) { int hIndex = 0; - struct party_data* retVal___ = NULL; - if( HPMHooks.count.HP_party_searchname_pre ) { - struct party_data* (*preHookFunc) (const char *str); + bool retVal___ = false; + if( HPMHooks.count.HP_pc_can_insert_card_into_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *idx_card, int *idx_equip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_searchname_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_searchname_pre[hIndex].func; - retVal___ = preHookFunc(str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_into_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_can_insert_card_into_pre[hIndex].func; + retVal___ = preHookFunc(sd, &idx_card, &idx_equip); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46095,26 +52517,26 @@ struct party_data* HP_party_searchname(const char *str) { } } { - retVal___ = HPMHooks.source.party.searchname(str); + retVal___ = HPMHooks.source.pc.can_insert_card_into(sd, idx_card, idx_equip); } - if( HPMHooks.count.HP_party_searchname_post ) { - struct party_data* (*postHookFunc) (struct party_data* retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_searchname_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_searchname_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str); + if( HPMHooks.count.HP_pc_can_insert_card_into_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *idx_card, int *idx_equip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_into_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_can_insert_card_into_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &idx_card, &idx_equip); } } return retVal___; } -int HP_party_getmemberid(struct party_data *p, struct map_session_data *sd) { +int HP_pc_steal_item(struct map_session_data *sd, struct block_list *bl, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_getmemberid_pre ) { - int (*preHookFunc) (struct party_data *p, struct map_session_data *sd); + if( HPMHooks.count.HP_pc_steal_item_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getmemberid_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_getmemberid_pre[hIndex].func; - retVal___ = preHookFunc(p, sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_item_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_steal_item_pre[hIndex].func; + retVal___ = preHookFunc(sd, bl, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46122,26 +52544,26 @@ int HP_party_getmemberid(struct party_data *p, struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.party.getmemberid(p, sd); + retVal___ = HPMHooks.source.pc.steal_item(sd, bl, skill_lv); } - if( HPMHooks.count.HP_party_getmemberid_post ) { - int (*postHookFunc) (int retVal___, struct party_data *p, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getmemberid_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_getmemberid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, sd); + if( HPMHooks.count.HP_pc_steal_item_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_item_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_steal_item_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, bl, &skill_lv); } } return retVal___; } -struct map_session_data* HP_party_getavailablesd(struct party_data *p) { +int HP_pc_steal_coin(struct map_session_data *sd, struct block_list *bl) { int hIndex = 0; - struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_party_getavailablesd_pre ) { - struct map_session_data* (*preHookFunc) (struct party_data *p); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_steal_coin_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getavailablesd_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_getavailablesd_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_coin_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_steal_coin_pre[hIndex].func; + retVal___ = preHookFunc(sd, bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46149,26 +52571,26 @@ struct map_session_data* HP_party_getavailablesd(struct party_data *p) { } } { - retVal___ = HPMHooks.source.party.getavailablesd(p); + retVal___ = HPMHooks.source.pc.steal_coin(sd, bl); } - if( HPMHooks.count.HP_party_getavailablesd_post ) { - struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getavailablesd_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_getavailablesd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_pc_steal_coin_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_coin_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_steal_coin_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, bl); } } return retVal___; } -int HP_party_create(struct map_session_data *sd, char *name, int item, int item2) { +int HP_pc_modifybuyvalue(struct map_session_data *sd, int orig_value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_create_pre ) { - int (*preHookFunc) (struct map_session_data *sd, char *name, int *item, int *item2); + if( HPMHooks.count.HP_pc_modifybuyvalue_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *orig_value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_create_pre[hIndex].func; - retVal___ = preHookFunc(sd, name, &item, &item2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifybuyvalue_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_modifybuyvalue_pre[hIndex].func; + retVal___ = preHookFunc(sd, &orig_value); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46176,52 +52598,53 @@ int HP_party_create(struct map_session_data *sd, char *name, int item, int item2 } } { - retVal___ = HPMHooks.source.party.create(sd, name, item, item2); + retVal___ = HPMHooks.source.pc.modifybuyvalue(sd, orig_value); } - if( HPMHooks.count.HP_party_create_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name, int *item, int *item2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_create_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, name, &item, &item2); + if( HPMHooks.count.HP_pc_modifybuyvalue_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *orig_value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifybuyvalue_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_modifybuyvalue_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &orig_value); } } return retVal___; } -void HP_party_created(int account_id, int char_id, int fail, int party_id, char *name) { +int HP_pc_modifysellvalue(struct map_session_data *sd, int orig_value) { int hIndex = 0; - if( HPMHooks.count.HP_party_created_pre ) { - void (*preHookFunc) (int *account_id, int *char_id, int *fail, int *party_id, char *name); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_modifysellvalue_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *orig_value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_created_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_created_pre[hIndex].func; - preHookFunc(&account_id, &char_id, &fail, &party_id, name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifysellvalue_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_modifysellvalue_pre[hIndex].func; + retVal___ = preHookFunc(sd, &orig_value); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.party.created(account_id, char_id, fail, party_id, name); + retVal___ = HPMHooks.source.pc.modifysellvalue(sd, orig_value); } - if( HPMHooks.count.HP_party_created_post ) { - void (*postHookFunc) (int *account_id, int *char_id, int *fail, int *party_id, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_created_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_created_post[hIndex].func; - postHookFunc(&account_id, &char_id, &fail, &party_id, name); + if( HPMHooks.count.HP_pc_modifysellvalue_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *orig_value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifysellvalue_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_modifysellvalue_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &orig_value); } } - return; + return retVal___; } -int HP_party_request_info(int party_id, int char_id) { +int HP_pc_follow(struct map_session_data *sd, int target_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_request_info_pre ) { - int (*preHookFunc) (int *party_id, int *char_id); + if( HPMHooks.count.HP_pc_follow_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_request_info_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_request_info_pre[hIndex].func; - retVal___ = preHookFunc(&party_id, &char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_follow_pre[hIndex].func; + retVal___ = preHookFunc(sd, &target_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46229,26 +52652,26 @@ int HP_party_request_info(int party_id, int char_id) { } } { - retVal___ = HPMHooks.source.party.request_info(party_id, char_id); + retVal___ = HPMHooks.source.pc.follow(sd, target_id); } - if( HPMHooks.count.HP_party_request_info_post ) { - int (*postHookFunc) (int retVal___, int *party_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_request_info_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_request_info_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id, &char_id); + if( HPMHooks.count.HP_pc_follow_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_follow_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &target_id); } } return retVal___; } -int HP_party_invite(struct map_session_data *sd, struct map_session_data *tsd) { +int HP_pc_stop_following(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_invite_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + if( HPMHooks.count.HP_pc_stop_following_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_invite_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_invite_pre[hIndex].func; - retVal___ = preHookFunc(sd, tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_stop_following_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_stop_following_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46256,52 +52679,53 @@ int HP_party_invite(struct map_session_data *sd, struct map_session_data *tsd) { } } { - retVal___ = HPMHooks.source.party.invite(sd, tsd); + retVal___ = HPMHooks.source.pc.stop_following(sd); } - if( HPMHooks.count.HP_party_invite_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_invite_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_invite_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, tsd); + if( HPMHooks.count.HP_pc_stop_following_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_stop_following_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_stop_following_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -void HP_party_member_joined(struct map_session_data *sd) { +unsigned int HP_pc_maxbaselv(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_party_member_joined_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_pc_maxbaselv_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_joined_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_member_joined_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxbaselv_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_maxbaselv_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.party.member_joined(sd); + retVal___ = HPMHooks.source.pc.maxbaselv(sd); } - if( HPMHooks.count.HP_party_member_joined_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_joined_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_member_joined_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_pc_maxbaselv_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxbaselv_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_maxbaselv_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } - return; + return retVal___; } -int HP_party_member_added(int party_id, int account_id, int char_id, int flag) { +unsigned int HP_pc_maxjoblv(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_party_member_added_pre ) { - int (*preHookFunc) (int *party_id, int *account_id, int *char_id, int *flag); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_pc_maxjoblv_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_added_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_member_added_pre[hIndex].func; - retVal___ = preHookFunc(&party_id, &account_id, &char_id, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxjoblv_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_maxjoblv_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46309,25 +52733,25 @@ int HP_party_member_added(int party_id, int account_id, int char_id, int flag) { } } { - retVal___ = HPMHooks.source.party.member_added(party_id, account_id, char_id, flag); + retVal___ = HPMHooks.source.pc.maxjoblv(sd); } - if( HPMHooks.count.HP_party_member_added_post ) { - int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_added_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_member_added_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id, &flag); + if( HPMHooks.count.HP_pc_maxjoblv_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxjoblv_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_maxjoblv_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_party_leave(struct map_session_data *sd) { +int HP_pc_checkbaselevelup(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_leave_pre ) { + if( HPMHooks.count.HP_pc_checkbaselevelup_pre ) { int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_leave_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_leave_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkbaselevelup_pre[hIndex].func; retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { @@ -46336,26 +52760,26 @@ int HP_party_leave(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.party.leave(sd); + retVal___ = HPMHooks.source.pc.checkbaselevelup(sd); } - if( HPMHooks.count.HP_party_leave_post ) { + if( HPMHooks.count.HP_pc_checkbaselevelup_post ) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_leave_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_leave_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkbaselevelup_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_party_removemember(struct map_session_data *sd, int account_id, char *name) { +int HP_pc_checkjoblevelup(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_removemember_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *account_id, char *name); + if( HPMHooks.count.HP_pc_checkjoblevelup_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_removemember_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_removemember_pre[hIndex].func; - retVal___ = preHookFunc(sd, &account_id, name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkjoblevelup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkjoblevelup_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46363,26 +52787,26 @@ int HP_party_removemember(struct map_session_data *sd, int account_id, char *nam } } { - retVal___ = HPMHooks.source.party.removemember(sd, account_id, name); + retVal___ = HPMHooks.source.pc.checkjoblevelup(sd); } - if( HPMHooks.count.HP_party_removemember_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *account_id, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_removemember_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_removemember_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &account_id, name); + if( HPMHooks.count.HP_pc_checkjoblevelup_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkjoblevelup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkjoblevelup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_party_member_withdraw(int party_id, int account_id, int char_id) { +bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_party_member_withdraw_pre ) { - int (*preHookFunc) (int *party_id, int *account_id, int *char_id); + bool retVal___ = false; + if( HPMHooks.count.HP_pc_gainexp_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_withdraw_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_member_withdraw_pre[hIndex].func; - retVal___ = preHookFunc(&party_id, &account_id, &char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_gainexp_pre[hIndex].func; + retVal___ = preHookFunc(sd, src, &base_exp, &job_exp, &is_quest); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46390,52 +52814,53 @@ int HP_party_member_withdraw(int party_id, int account_id, int char_id) { } } { - retVal___ = HPMHooks.source.party.member_withdraw(party_id, account_id, char_id); + retVal___ = HPMHooks.source.pc.gainexp(sd, src, base_exp, job_exp, is_quest); } - if( HPMHooks.count.HP_party_member_withdraw_post ) { - int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_withdraw_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_member_withdraw_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id); + if( HPMHooks.count.HP_pc_gainexp_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_gainexp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, src, &base_exp, &job_exp, &is_quest); } } return retVal___; } -void HP_party_reply_invite(struct map_session_data *sd, int party_id, int flag) { +unsigned int HP_pc_nextbaseexp(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_party_reply_invite_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *party_id, int *flag); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_pc_nextbaseexp_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_reply_invite_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_reply_invite_pre[hIndex].func; - preHookFunc(sd, &party_id, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_nextbaseexp_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.party.reply_invite(sd, party_id, flag); + retVal___ = HPMHooks.source.pc.nextbaseexp(sd); } - if( HPMHooks.count.HP_party_reply_invite_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *party_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_reply_invite_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_reply_invite_post[hIndex].func; - postHookFunc(sd, &party_id, &flag); + if( HPMHooks.count.HP_pc_nextbaseexp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_nextbaseexp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } - return; + return retVal___; } -int HP_party_recv_noinfo(int party_id, int char_id) { +unsigned int HP_pc_thisbaseexp(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_party_recv_noinfo_pre ) { - int (*preHookFunc) (int *party_id, int *char_id); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_pc_thisbaseexp_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_noinfo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_recv_noinfo_pre[hIndex].func; - retVal___ = preHookFunc(&party_id, &char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_thisbaseexp_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46443,26 +52868,26 @@ int HP_party_recv_noinfo(int party_id, int char_id) { } } { - retVal___ = HPMHooks.source.party.recv_noinfo(party_id, char_id); + retVal___ = HPMHooks.source.pc.thisbaseexp(sd); } - if( HPMHooks.count.HP_party_recv_noinfo_post ) { - int (*postHookFunc) (int retVal___, int *party_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_noinfo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_recv_noinfo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id, &char_id); + if( HPMHooks.count.HP_pc_thisbaseexp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_thisbaseexp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_party_recv_info(struct party *sp, int char_id) { +unsigned int HP_pc_nextjobexp(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_party_recv_info_pre ) { - int (*preHookFunc) (struct party *sp, int *char_id); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_pc_nextjobexp_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_info_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_recv_info_pre[hIndex].func; - retVal___ = preHookFunc(sp, &char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_nextjobexp_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46470,26 +52895,26 @@ int HP_party_recv_info(struct party *sp, int char_id) { } } { - retVal___ = HPMHooks.source.party.recv_info(sp, char_id); + retVal___ = HPMHooks.source.pc.nextjobexp(sd); } - if( HPMHooks.count.HP_party_recv_info_post ) { - int (*postHookFunc) (int retVal___, struct party *sp, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_info_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_recv_info_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sp, &char_id); + if( HPMHooks.count.HP_pc_nextjobexp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_nextjobexp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_party_recv_movemap(int party_id, int account_id, int char_id, unsigned short mapid, int online, int lv) { +unsigned int HP_pc_thisjobexp(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_party_recv_movemap_pre ) { - int (*preHookFunc) (int *party_id, int *account_id, int *char_id, unsigned short *mapid, int *online, int *lv); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_pc_thisjobexp_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_movemap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_recv_movemap_pre[hIndex].func; - retVal___ = preHookFunc(&party_id, &account_id, &char_id, &mapid, &online, &lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_thisjobexp_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46497,26 +52922,26 @@ int HP_party_recv_movemap(int party_id, int account_id, int char_id, unsigned sh } } { - retVal___ = HPMHooks.source.party.recv_movemap(party_id, account_id, char_id, mapid, online, lv); + retVal___ = HPMHooks.source.pc.thisjobexp(sd); } - if( HPMHooks.count.HP_party_recv_movemap_post ) { - int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id, unsigned short *mapid, int *online, int *lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_movemap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_recv_movemap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id, &mapid, &online, &lv); + if( HPMHooks.count.HP_pc_thisjobexp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_thisjobexp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_party_broken(int party_id) { +int HP_pc_gets_status_point(int level) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_broken_pre ) { - int (*preHookFunc) (int *party_id); + if( HPMHooks.count.HP_pc_gets_status_point_pre ) { + int (*preHookFunc) (int *level); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_broken_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_broken_pre[hIndex].func; - retVal___ = preHookFunc(&party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gets_status_point_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_gets_status_point_pre[hIndex].func; + retVal___ = preHookFunc(&level); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46524,26 +52949,26 @@ int HP_party_broken(int party_id) { } } { - retVal___ = HPMHooks.source.party.broken(party_id); + retVal___ = HPMHooks.source.pc.gets_status_point(level); } - if( HPMHooks.count.HP_party_broken_post ) { - int (*postHookFunc) (int retVal___, int *party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_broken_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_broken_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id); + if( HPMHooks.count.HP_pc_gets_status_point_post ) { + int (*postHookFunc) (int retVal___, int *level); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gets_status_point_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_gets_status_point_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &level); } } return retVal___; } -int HP_party_optionchanged(int party_id, int account_id, int exp, int item, int flag) { +int HP_pc_need_status_point(struct map_session_data *sd, int type, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_optionchanged_pre ) { - int (*preHookFunc) (int *party_id, int *account_id, int *exp, int *item, int *flag); + if( HPMHooks.count.HP_pc_need_status_point_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_optionchanged_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_optionchanged_pre[hIndex].func; - retVal___ = preHookFunc(&party_id, &account_id, &exp, &item, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_need_status_point_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_need_status_point_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &val); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46551,26 +52976,26 @@ int HP_party_optionchanged(int party_id, int account_id, int exp, int item, int } } { - retVal___ = HPMHooks.source.party.optionchanged(party_id, account_id, exp, item, flag); + retVal___ = HPMHooks.source.pc.need_status_point(sd, type, val); } - if( HPMHooks.count.HP_party_optionchanged_post ) { - int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *exp, int *item, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_optionchanged_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_optionchanged_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id, &account_id, &exp, &item, &flag); + if( HPMHooks.count.HP_pc_need_status_point_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_need_status_point_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_need_status_point_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &val); } } return retVal___; } -int HP_party_changeoption(struct map_session_data *sd, int exp, int item) { +int HP_pc_maxparameterincrease(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_changeoption_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *exp, int *item); + if( HPMHooks.count.HP_pc_maxparameterincrease_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeoption_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_changeoption_pre[hIndex].func; - retVal___ = preHookFunc(sd, &exp, &item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxparameterincrease_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_maxparameterincrease_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46578,26 +53003,26 @@ int HP_party_changeoption(struct map_session_data *sd, int exp, int item) { } } { - retVal___ = HPMHooks.source.party.changeoption(sd, exp, item); + retVal___ = HPMHooks.source.pc.maxparameterincrease(sd, type); } - if( HPMHooks.count.HP_party_changeoption_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *exp, int *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeoption_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_changeoption_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &exp, &item); + if( HPMHooks.count.HP_pc_maxparameterincrease_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxparameterincrease_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_maxparameterincrease_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); } } return retVal___; } -bool HP_party_changeleader(struct map_session_data *sd, struct map_session_data *t_sd) { +bool HP_pc_statusup(struct map_session_data *sd, int type, int increase) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_party_changeleader_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, struct map_session_data *t_sd); + if( HPMHooks.count.HP_pc_statusup_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *type, int *increase); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeleader_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_changeleader_pre[hIndex].func; - retVal___ = preHookFunc(sd, t_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_statusup_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &increase); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46605,77 +53030,79 @@ bool HP_party_changeleader(struct map_session_data *sd, struct map_session_data } } { - retVal___ = HPMHooks.source.party.changeleader(sd, t_sd); + retVal___ = HPMHooks.source.pc.statusup(sd, type, increase); } - if( HPMHooks.count.HP_party_changeleader_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct map_session_data *t_sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeleader_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_changeleader_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, t_sd); + if( HPMHooks.count.HP_pc_statusup_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *type, int *increase); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_statusup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &increase); } } return retVal___; } -void HP_party_send_movemap(struct map_session_data *sd) { +int HP_pc_statusup2(struct map_session_data *sd, int type, int val) { int hIndex = 0; - if( HPMHooks.count.HP_party_send_movemap_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_statusup2_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_movemap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_send_movemap_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_statusup2_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &val); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.party.send_movemap(sd); + retVal___ = HPMHooks.source.pc.statusup2(sd, type, val); } - if( HPMHooks.count.HP_party_send_movemap_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_movemap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_send_movemap_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_pc_statusup2_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_statusup2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &val); } } - return; + return retVal___; } -void HP_party_send_levelup(struct map_session_data *sd) { +int HP_pc_skillup(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_party_send_levelup_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_skillup_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_levelup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_send_levelup_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_skillup_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.party.send_levelup(sd); + retVal___ = HPMHooks.source.pc.skillup(sd, skill_id); } - if( HPMHooks.count.HP_party_send_levelup_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_levelup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_send_levelup_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_pc_skillup_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_skillup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id); } } - return; + return retVal___; } -int HP_party_send_logout(struct map_session_data *sd) { +int HP_pc_allskillup(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_send_logout_pre ) { + if( HPMHooks.count.HP_pc_allskillup_pre ) { int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_logout_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_send_logout_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_allskillup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_allskillup_pre[hIndex].func; retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { @@ -46684,26 +53111,26 @@ int HP_party_send_logout(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.party.send_logout(sd); + retVal___ = HPMHooks.source.pc.allskillup(sd); } - if( HPMHooks.count.HP_party_send_logout_post ) { + if( HPMHooks.count.HP_pc_allskillup_post ) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_logout_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_send_logout_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_allskillup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_allskillup_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_party_send_message(struct map_session_data *sd, const char *mes, int len) { +int HP_pc_resetlvl(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_send_message_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *mes, int *len); + if( HPMHooks.count.HP_pc_resetlvl_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_message_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_send_message_pre[hIndex].func; - retVal___ = preHookFunc(sd, mes, &len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetlvl_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_resetlvl_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46711,26 +53138,26 @@ int HP_party_send_message(struct map_session_data *sd, const char *mes, int len) } } { - retVal___ = HPMHooks.source.party.send_message(sd, mes, len); + retVal___ = HPMHooks.source.pc.resetlvl(sd, type); } - if( HPMHooks.count.HP_party_send_message_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *mes, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_message_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_send_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, mes, &len); + if( HPMHooks.count.HP_pc_resetlvl_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetlvl_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_resetlvl_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); } } return retVal___; } -int HP_party_recv_message(int party_id, int account_id, const char *mes, int len) { +int HP_pc_resetstate(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_recv_message_pre ) { - int (*preHookFunc) (int *party_id, int *account_id, const char *mes, int *len); + if( HPMHooks.count.HP_pc_resetstate_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_message_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_recv_message_pre[hIndex].func; - retVal___ = preHookFunc(&party_id, &account_id, mes, &len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetstate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_resetstate_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46738,26 +53165,26 @@ int HP_party_recv_message(int party_id, int account_id, const char *mes, int len } } { - retVal___ = HPMHooks.source.party.recv_message(party_id, account_id, mes, len); + retVal___ = HPMHooks.source.pc.resetstate(sd); } - if( HPMHooks.count.HP_party_recv_message_post ) { - int (*postHookFunc) (int retVal___, int *party_id, int *account_id, const char *mes, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_message_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_recv_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id, &account_id, mes, &len); + if( HPMHooks.count.HP_pc_resetstate_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetstate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_resetstate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_party_skill_check(struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv) { +int HP_pc_resetskill(struct map_session_data *sd, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_skill_check_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *party_id, uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_pc_resetskill_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_skill_check_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_skill_check_pre[hIndex].func; - retVal___ = preHookFunc(sd, &party_id, &skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_resetskill_pre[hIndex].func; + retVal___ = preHookFunc(sd, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46765,26 +53192,26 @@ int HP_party_skill_check(struct map_session_data *sd, int party_id, uint16 skill } } { - retVal___ = HPMHooks.source.party.skill_check(sd, party_id, skill_id, skill_lv); + retVal___ = HPMHooks.source.pc.resetskill(sd, flag); } - if( HPMHooks.count.HP_party_skill_check_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *party_id, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_skill_check_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_skill_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &party_id, &skill_id, &skill_lv); + if( HPMHooks.count.HP_pc_resetskill_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_resetskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &flag); } } return retVal___; } -int HP_party_send_xy_clear(struct party_data *p) { +int HP_pc_resetfeel(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_send_xy_clear_pre ) { - int (*preHookFunc) (struct party_data *p); + if( HPMHooks.count.HP_pc_resetfeel_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_clear_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_send_xy_clear_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetfeel_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_resetfeel_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46792,26 +53219,26 @@ int HP_party_send_xy_clear(struct party_data *p) { } } { - retVal___ = HPMHooks.source.party.send_xy_clear(p); + retVal___ = HPMHooks.source.pc.resetfeel(sd); } - if( HPMHooks.count.HP_party_send_xy_clear_post ) { - int (*postHookFunc) (int retVal___, struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_clear_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_send_xy_clear_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_pc_resetfeel_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetfeel_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_resetfeel_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_party_exp_share(struct party_data *p, struct block_list *src, unsigned int base_exp, unsigned int job_exp, int zeny) { +int HP_pc_resethate(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_exp_share_pre ) { - int (*preHookFunc) (struct party_data *p, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, int *zeny); + if( HPMHooks.count.HP_pc_resethate_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_exp_share_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_exp_share_pre[hIndex].func; - retVal___ = preHookFunc(p, src, &base_exp, &job_exp, &zeny); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resethate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_resethate_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46819,26 +53246,26 @@ int HP_party_exp_share(struct party_data *p, struct block_list *src, unsigned in } } { - retVal___ = HPMHooks.source.party.exp_share(p, src, base_exp, job_exp, zeny); + retVal___ = HPMHooks.source.pc.resethate(sd); } - if( HPMHooks.count.HP_party_exp_share_post ) { - int (*postHookFunc) (int retVal___, struct party_data *p, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, int *zeny); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_exp_share_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_exp_share_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, src, &base_exp, &job_exp, &zeny); + if( HPMHooks.count.HP_pc_resethate_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resethate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_resethate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_party_share_loot(struct party_data *p, struct map_session_data *sd, struct item *item_data, int first_charid) { +int HP_pc_equipitem(struct map_session_data *sd, int n, int req_pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_share_loot_pre ) { - int (*preHookFunc) (struct party_data *p, struct map_session_data *sd, struct item *item_data, int *first_charid); + if( HPMHooks.count.HP_pc_equipitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, int *req_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_share_loot_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_share_loot_pre[hIndex].func; - retVal___ = preHookFunc(p, sd, item_data, &first_charid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_equipitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, &req_pos); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46846,55 +53273,52 @@ int HP_party_share_loot(struct party_data *p, struct map_session_data *sd, struc } } { - retVal___ = HPMHooks.source.party.share_loot(p, sd, item_data, first_charid); + retVal___ = HPMHooks.source.pc.equipitem(sd, n, req_pos); } - if( HPMHooks.count.HP_party_share_loot_post ) { - int (*postHookFunc) (int retVal___, struct party_data *p, struct map_session_data *sd, struct item *item_data, int *first_charid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_share_loot_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_share_loot_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, sd, item_data, &first_charid); + if( HPMHooks.count.HP_pc_equipitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *req_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_equipitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, &req_pos); } } return retVal___; } -int HP_party_send_dot_remove(struct map_session_data *sd) { +void HP_pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int n, int pos) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_party_send_dot_remove_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pc_equipitem_pos_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct item_data *id, int *n, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_dot_remove_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_send_dot_remove_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_equipitem_pos_pre[hIndex].func; + preHookFunc(sd, id, &n, &pos); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.party.send_dot_remove(sd); + HPMHooks.source.pc.equipitem_pos(sd, id, n, pos); } - if( HPMHooks.count.HP_party_send_dot_remove_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_dot_remove_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_send_dot_remove_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_equipitem_pos_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct item_data *id, int *n, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_equipitem_pos_post[hIndex].func; + postHookFunc(sd, id, &n, &pos); } } - return retVal___; + return; } -int HP_party_sub_count(struct block_list *bl, va_list ap) { +int HP_pc_unequipitem(struct map_session_data *sd, int n, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_sub_count_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_pc_unequipitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_party_sub_count_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_unequipitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -46902,192 +53326,186 @@ int HP_party_sub_count(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.party.sub_count(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.pc.unequipitem(sd, n, flag); } - if( HPMHooks.count.HP_party_sub_count_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_party_sub_count_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_pc_unequipitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_unequipitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, &flag); } } return retVal___; } -int HP_party_sub_count_chorus(struct block_list *bl, va_list ap) { +void HP_pc_unequipitem_pos(struct map_session_data *sd, int n, int pos) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_party_sub_count_chorus_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_pc_unequipitem_pos_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *n, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_chorus_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_party_sub_count_chorus_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_unequipitem_pos_pre[hIndex].func; + preHookFunc(sd, &n, &pos); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.party.sub_count_chorus(bl, ap___copy); - va_end(ap___copy); + HPMHooks.source.pc.unequipitem_pos(sd, n, pos); } - if( HPMHooks.count.HP_party_sub_count_chorus_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_chorus_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_party_sub_count_chorus_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_pc_unequipitem_pos_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *n, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_unequipitem_pos_post[hIndex].func; + postHookFunc(sd, &n, &pos); } } - return retVal___; + return; } -void HP_party_booking_register(struct map_session_data *sd, short level, short mapid, short *job) { +int HP_pc_checkitem(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_party_booking_register_pre ) { - void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_checkitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_register_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_booking_register_pre[hIndex].func; - preHookFunc(sd, &level, &mapid, job); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkitem_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.party.booking_register(sd, level, mapid, job); + retVal___ = HPMHooks.source.pc.checkitem(sd); } - if( HPMHooks.count.HP_party_booking_register_post ) { - void (*postHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_register_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_booking_register_post[hIndex].func; - postHookFunc(sd, &level, &mapid, job); + if( HPMHooks.count.HP_pc_checkitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } - return; + return retVal___; } -void HP_party_booking_update(struct map_session_data *sd, short *job) { +int HP_pc_useitem(struct map_session_data *sd, int n) { int hIndex = 0; - if( HPMHooks.count.HP_party_booking_update_pre ) { - void (*preHookFunc) (struct map_session_data *sd, short *job); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_useitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_booking_update_pre[hIndex].func; - preHookFunc(sd, job); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_useitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_useitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.party.booking_update(sd, job); + retVal___ = HPMHooks.source.pc.useitem(sd, n); } - if( HPMHooks.count.HP_party_booking_update_post ) { - void (*postHookFunc) (struct map_session_data *sd, short *job); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_booking_update_post[hIndex].func; - postHookFunc(sd, job); + if( HPMHooks.count.HP_pc_useitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_useitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_useitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n); } } - return; + return retVal___; } -void HP_party_booking_search(struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount) { +int HP_pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_party_booking_search_pre ) { - void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job, unsigned long *lastindex, short *resultcount); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_skillatk_bonus_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_search_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_booking_search_pre[hIndex].func; - preHookFunc(sd, &level, &mapid, &job, &lastindex, &resultcount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillatk_bonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_skillatk_bonus_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.party.booking_search(sd, level, mapid, job, lastindex, resultcount); + retVal___ = HPMHooks.source.pc.skillatk_bonus(sd, skill_id); } - if( HPMHooks.count.HP_party_booking_search_post ) { - void (*postHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job, unsigned long *lastindex, short *resultcount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_search_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_booking_search_post[hIndex].func; - postHookFunc(sd, &level, &mapid, &job, &lastindex, &resultcount); + if( HPMHooks.count.HP_pc_skillatk_bonus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillatk_bonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_skillatk_bonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id); } } - return; + return retVal___; } -void HP_party_recruit_register(struct map_session_data *sd, short level, const char *notice) { +int HP_pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_party_recruit_register_pre ) { - void (*preHookFunc) (struct map_session_data *sd, short *level, const char *notice); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_skillheal_bonus_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_register_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_recruit_register_pre[hIndex].func; - preHookFunc(sd, &level, notice); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal_bonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_skillheal_bonus_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.party.recruit_register(sd, level, notice); + retVal___ = HPMHooks.source.pc.skillheal_bonus(sd, skill_id); } - if( HPMHooks.count.HP_party_recruit_register_post ) { - void (*postHookFunc) (struct map_session_data *sd, short *level, const char *notice); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_register_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_recruit_register_post[hIndex].func; - postHookFunc(sd, &level, notice); + if( HPMHooks.count.HP_pc_skillheal_bonus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal_bonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_skillheal_bonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id); } } - return; + return retVal___; } -void HP_party_recruit_update(struct map_session_data *sd, const char *notice) { +int HP_pc_skillheal2_bonus(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_party_recruit_update_pre ) { - void (*preHookFunc) (struct map_session_data *sd, const char *notice); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_skillheal2_bonus_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_update_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_recruit_update_pre[hIndex].func; - preHookFunc(sd, notice); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal2_bonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_skillheal2_bonus_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.party.recruit_update(sd, notice); + retVal___ = HPMHooks.source.pc.skillheal2_bonus(sd, skill_id); } - if( HPMHooks.count.HP_party_recruit_update_post ) { - void (*postHookFunc) (struct map_session_data *sd, const char *notice); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_update_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_recruit_update_post[hIndex].func; - postHookFunc(sd, notice); + if( HPMHooks.count.HP_pc_skillheal2_bonus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal2_bonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_skillheal2_bonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id); } } - return; + return retVal___; } -void HP_party_recruit_search(struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount) { +void HP_pc_damage(struct map_session_data *sd, struct block_list *src, unsigned int hp, unsigned int sp) { int hIndex = 0; - if( HPMHooks.count.HP_party_recruit_search_pre ) { - void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount); + if( HPMHooks.count.HP_pc_damage_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct block_list *src, unsigned int *hp, unsigned int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_search_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_recruit_search_pre[hIndex].func; - preHookFunc(sd, &level, &mapid, &lastindex, &resultcount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_damage_pre[hIndex].func; + preHookFunc(sd, src, &hp, &sp); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47095,26 +53513,26 @@ void HP_party_recruit_search(struct map_session_data *sd, short level, short map } } { - HPMHooks.source.party.recruit_search(sd, level, mapid, lastindex, resultcount); + HPMHooks.source.pc.damage(sd, src, hp, sp); } - if( HPMHooks.count.HP_party_recruit_search_post ) { - void (*postHookFunc) (struct map_session_data *sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_search_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_recruit_search_post[hIndex].func; - postHookFunc(sd, &level, &mapid, &lastindex, &resultcount); + if( HPMHooks.count.HP_pc_damage_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct block_list *src, unsigned int *hp, unsigned int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_damage_post[hIndex].func; + postHookFunc(sd, src, &hp, &sp); } } return; } -bool HP_party_booking_delete(struct map_session_data *sd) { +int HP_pc_dead(struct map_session_data *sd, struct block_list *src) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_party_booking_delete_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_dead_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct block_list *src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_booking_delete_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dead_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_dead_pre[hIndex].func; + retVal___ = preHookFunc(sd, src); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47122,112 +53540,105 @@ bool HP_party_booking_delete(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.party.booking_delete(sd); + retVal___ = HPMHooks.source.pc.dead(sd, src); } - if( HPMHooks.count.HP_party_booking_delete_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_booking_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_dead_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dead_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_dead_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, src); } } return retVal___; } -int HP_party_vforeachsamemap(int ( *func ) (struct block_list *, va_list), struct map_session_data *sd, int range, va_list ap) { +void HP_pc_revive(struct map_session_data *sd, unsigned int hp, unsigned int sp) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_party_vforeachsamemap_pre ) { - int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct map_session_data *sd, int *range, va_list ap); + if( HPMHooks.count.HP_pc_revive_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_vforeachsamemap_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_party_vforeachsamemap_pre[hIndex].func; - retVal___ = preHookFunc(func, sd, &range, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_revive_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_revive_pre[hIndex].func; + preHookFunc(sd, &hp, &sp); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.party.vforeachsamemap(func, sd, range, ap___copy); - va_end(ap___copy); + HPMHooks.source.pc.revive(sd, hp, sp); } - if( HPMHooks.count.HP_party_vforeachsamemap_post ) { - int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct map_session_data *sd, int *range, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_vforeachsamemap_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_party_vforeachsamemap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, func, sd, &range, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_pc_revive_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_revive_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_revive_post[hIndex].func; + postHookFunc(sd, &hp, &sp); } } - return retVal___; + return; } -int HP_party_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { +void HP_pc_heal(struct map_session_data *sd, unsigned int hp, unsigned int sp, int type) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_party_send_xy_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_pc_heal_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_send_xy_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_heal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_heal_pre[hIndex].func; + preHookFunc(sd, &hp, &sp, &type); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.party.send_xy_timer(tid, tick, id, data); + HPMHooks.source.pc.heal(sd, hp, sp, type); } - if( HPMHooks.count.HP_party_send_xy_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_send_xy_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_pc_heal_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_heal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_heal_post[hIndex].func; + postHookFunc(sd, &hp, &sp, &type); } } - return retVal___; + return; } -void HP_party_fill_member(struct party_member *member, struct map_session_data *sd, unsigned int leader) { +int HP_pc_itemheal(struct map_session_data *sd, int itemid, int hp, int sp) { int hIndex = 0; - if( HPMHooks.count.HP_party_fill_member_pre ) { - void (*preHookFunc) (struct party_member *member, struct map_session_data *sd, unsigned int *leader); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_itemheal_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *itemid, int *hp, int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_fill_member_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_fill_member_pre[hIndex].func; - preHookFunc(member, sd, &leader); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemheal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_itemheal_pre[hIndex].func; + retVal___ = preHookFunc(sd, &itemid, &hp, &sp); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.party.fill_member(member, sd, leader); + retVal___ = HPMHooks.source.pc.itemheal(sd, itemid, hp, sp); } - if( HPMHooks.count.HP_party_fill_member_post ) { - void (*postHookFunc) (struct party_member *member, struct map_session_data *sd, unsigned int *leader); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_fill_member_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_fill_member_post[hIndex].func; - postHookFunc(member, sd, &leader); + if( HPMHooks.count.HP_pc_itemheal_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *itemid, int *hp, int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemheal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_itemheal_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &itemid, &hp, &sp); } } - return; + return retVal___; } -TBL_PC* HP_party_sd_check(int party_id, int account_id, int char_id) { +int HP_pc_percentheal(struct map_session_data *sd, int hp, int sp) { int hIndex = 0; - TBL_PC* retVal___ = NULL; - if( HPMHooks.count.HP_party_sd_check_pre ) { - TBL_PC* (*preHookFunc) (int *party_id, int *account_id, int *char_id); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_percentheal_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *hp, int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sd_check_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_sd_check_pre[hIndex].func; - retVal___ = preHookFunc(&party_id, &account_id, &char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_percentheal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_percentheal_pre[hIndex].func; + retVal___ = preHookFunc(sd, &hp, &sp); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47235,52 +53646,53 @@ TBL_PC* HP_party_sd_check(int party_id, int account_id, int char_id) { } } { - retVal___ = HPMHooks.source.party.sd_check(party_id, account_id, char_id); + retVal___ = HPMHooks.source.pc.percentheal(sd, hp, sp); } - if( HPMHooks.count.HP_party_sd_check_post ) { - TBL_PC* (*postHookFunc) (TBL_PC* retVal___, int *party_id, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sd_check_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_sd_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id); + if( HPMHooks.count.HP_pc_percentheal_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *hp, int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_percentheal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_percentheal_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &hp, &sp); } } return retVal___; } -void HP_party_check_state(struct party_data *p) { +int HP_pc_jobchange(struct map_session_data *sd, int job, int upper) { int hIndex = 0; - if( HPMHooks.count.HP_party_check_state_pre ) { - void (*preHookFunc) (struct party_data *p); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_jobchange_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *job, int *upper); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_check_state_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_check_state_pre[hIndex].func; - preHookFunc(p); + 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); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.party.check_state(p); + retVal___ = HPMHooks.source.pc.jobchange(sd, job, upper); } - if( HPMHooks.count.HP_party_check_state_post ) { - void (*postHookFunc) (struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_check_state_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_check_state_post[hIndex].func; - postHookFunc(p); + if( HPMHooks.count.HP_pc_jobchange_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *job, 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); } } - return; + return retVal___; } -struct party_booking_ad_info* HP_party_create_booking_data(void) { +int HP_pc_setoption(struct map_session_data *sd, int type) { int hIndex = 0; - struct party_booking_ad_info* retVal___ = NULL; - if( HPMHooks.count.HP_party_create_booking_data_pre ) { - struct party_booking_ad_info* (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_setoption_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_booking_data_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_party_create_booking_data_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setoption_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setoption_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47288,28 +53700,26 @@ struct party_booking_ad_info* HP_party_create_booking_data(void) { } } { - retVal___ = HPMHooks.source.party.create_booking_data(); + retVal___ = HPMHooks.source.pc.setoption(sd, type); } - if( HPMHooks.count.HP_party_create_booking_data_post ) { - struct party_booking_ad_info* (*postHookFunc) (struct party_booking_ad_info* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_booking_data_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_party_create_booking_data_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_pc_setoption_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setoption_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setoption_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); } } return retVal___; } -int HP_party_db_final(DBKey key, DBData *data, va_list ap) { +int HP_pc_setcart(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_db_final_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + if( HPMHooks.count.HP_pc_setcart_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_db_final_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_party_db_final_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setcart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setcart_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47317,166 +53727,156 @@ int HP_party_db_final(DBKey key, DBData *data, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.party.db_final(key, data, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.pc.setcart(sd, type); } - if( HPMHooks.count.HP_party_db_final_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_db_final_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_party_db_final_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_pc_setcart_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setcart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setcart_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); } } return retVal___; } -/* path */ -int HP_path_blownpos(int16 m, int16 x0, int16 y0, int16 dx, int16 dy, int count) { +void HP_pc_setfalcon(struct map_session_data *sd, bool flag) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_path_blownpos_pre ) { - int (*preHookFunc) (int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count); + if( HPMHooks.count.HP_pc_setfalcon_pre ) { + void (*preHookFunc) (struct map_session_data *sd, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_path_blownpos_pre[hIndex].func; - retVal___ = preHookFunc(&m, &x0, &y0, &dx, &dy, &count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setfalcon_pre[hIndex].func; + preHookFunc(sd, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.path.blownpos(m, x0, y0, dx, dy, count); + HPMHooks.source.pc.setfalcon(sd, flag); } - if( HPMHooks.count.HP_path_blownpos_post ) { - int (*postHookFunc) (int retVal___, int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count); - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_path_blownpos_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &m, &x0, &y0, &dx, &dy, &count); + if( HPMHooks.count.HP_pc_setfalcon_post ) { + 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; + postHookFunc(sd, &flag); } } - return retVal___; + return; } -bool HP_path_search(struct walkpath_data *wpd, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int flag, cell_chk cell) { +void HP_pc_setridingpeco(struct map_session_data *sd, bool flag) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_path_search_pre ) { - bool (*preHookFunc) (struct walkpath_data *wpd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell); + 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_path_search_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_path_search_pre[hIndex].func; - retVal___ = preHookFunc(wpd, &m, &x0, &y0, &x1, &y1, &flag, &cell); + 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.path.search(wpd, m, x0, y0, x1, y1, flag, cell); + HPMHooks.source.pc.setridingpeco(sd, flag); } - if( HPMHooks.count.HP_path_search_post ) { - bool (*postHookFunc) (bool retVal___, struct walkpath_data *wpd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell); - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_path_search_post[hIndex].func; - retVal___ = postHookFunc(retVal___, wpd, &m, &x0, &y0, &x1, &y1, &flag, &cell); + 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; } -bool HP_path_search_long(struct shootpath_data *spd, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, cell_chk cell) { +void HP_pc_setmadogear(struct map_session_data *sd, bool flag) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_path_search_long_pre ) { - bool (*preHookFunc) (struct shootpath_data *spd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell); + if( HPMHooks.count.HP_pc_setmadogear_pre ) { + void (*preHookFunc) (struct map_session_data *sd, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_long_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_path_search_long_pre[hIndex].func; - retVal___ = preHookFunc(spd, &m, &x0, &y0, &x1, &y1, &cell); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setmadogear_pre[hIndex].func; + preHookFunc(sd, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.path.search_long(spd, m, x0, y0, x1, y1, cell); + HPMHooks.source.pc.setmadogear(sd, flag); } - if( HPMHooks.count.HP_path_search_long_post ) { - bool (*postHookFunc) (bool retVal___, struct shootpath_data *spd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell); - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_long_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_path_search_long_post[hIndex].func; - retVal___ = postHookFunc(retVal___, spd, &m, &x0, &y0, &x1, &y1, &cell); + if( HPMHooks.count.HP_pc_setmadogear_post ) { + 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); } } - return retVal___; + return; } -bool HP_path_check_distance(int dx, int dy, int distance) { +void HP_pc_setridingdragon(struct map_session_data *sd, unsigned int type) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_path_check_distance_pre ) { - bool (*preHookFunc) (int *dx, int *dy, int *distance); + 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_path_check_distance_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_path_check_distance_pre[hIndex].func; - retVal___ = preHookFunc(&dx, &dy, &distance); + 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 retVal___; + return; } } { - retVal___ = HPMHooks.source.path.check_distance(dx, dy, distance); + HPMHooks.source.pc.setridingdragon(sd, type); } - if( HPMHooks.count.HP_path_check_distance_post ) { - 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); + 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 retVal___; + return; } -unsigned int HP_path_distance(int dx, int dy) { +void HP_pc_setridingwug(struct map_session_data *sd, bool flag) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_path_distance_pre ) { - unsigned int (*preHookFunc) (int *dx, int *dy); + 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_path_distance_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_path_distance_pre[hIndex].func; - retVal___ = preHookFunc(&dx, &dy); + 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 retVal___; + return; } } { - retVal___ = HPMHooks.source.path.distance(dx, dy); + HPMHooks.source.pc.setridingwug(sd, flag); } - if( HPMHooks.count.HP_path_distance_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, int *dx, int *dy); - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_path_distance_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &dx, &dy); + 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 retVal___; + return; } -bool HP_path_check_distance_client(int dx, int dy, int distance) { +int HP_pc_changelook(struct map_session_data *sd, int type, int val) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_path_check_distance_client_pre ) { - bool (*preHookFunc) (int *dx, int *dy, int *distance); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_changelook_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_changelook_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_changelook_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &val); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47484,26 +53884,26 @@ bool HP_path_check_distance_client(int dx, int dy, int distance) { } } { - retVal___ = HPMHooks.source.path.check_distance_client(dx, dy, distance); + retVal___ = HPMHooks.source.pc.changelook(sd, type, val); } - 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); + if( HPMHooks.count.HP_pc_changelook_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_changelook_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_changelook_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &val); } } return retVal___; } -int HP_path_distance_client(int dx, int dy) { +int HP_pc_equiplookall(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_path_distance_client_pre ) { - int (*preHookFunc) (int *dx, int *dy); + if( HPMHooks.count.HP_pc_equiplookall_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equiplookall_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_equiplookall_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47511,132 +53911,133 @@ int HP_path_distance_client(int dx, int dy) { } } { - retVal___ = HPMHooks.source.path.distance_client(dx, dy); + retVal___ = HPMHooks.source.pc.equiplookall(sd); } - 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); + if( HPMHooks.count.HP_pc_equiplookall_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equiplookall_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_equiplookall_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -/* pcg */ -void HP_pcg_init(void) { +int HP_pc_readparam(struct map_session_data *sd, int type) { int hIndex = 0; - if( HPMHooks.count.HP_pcg_init_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_readparam_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pcg_init_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readparam_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_readparam_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pcg.init(); + retVal___ = HPMHooks.source.pc.readparam(sd, type); } - if( HPMHooks.count.HP_pcg_init_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pcg_init_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_pc_readparam_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readparam_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_readparam_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); } } - return; + return retVal___; } -void HP_pcg_final(void) { +int HP_pc_setparam(struct map_session_data *sd, int type, int val) { int hIndex = 0; - if( HPMHooks.count.HP_pcg_final_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_setparam_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pcg_final_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setparam_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setparam_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &val); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pcg.final(); + retVal___ = HPMHooks.source.pc.setparam(sd, type, val); } - if( HPMHooks.count.HP_pcg_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pcg_final_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_pc_setparam_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setparam_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setparam_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &val); } } - return; + return retVal___; } -void HP_pcg_reload(void) { +int HP_pc_readreg(struct map_session_data *sd, int64 reg) { int hIndex = 0; - if( HPMHooks.count.HP_pcg_reload_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_readreg_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int64 *reg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_reload_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pcg_reload_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readreg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_readreg_pre[hIndex].func; + retVal___ = preHookFunc(sd, ®); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pcg.reload(); + retVal___ = HPMHooks.source.pc.readreg(sd, reg); } - if( HPMHooks.count.HP_pcg_reload_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_reload_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pcg_reload_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_pc_readreg_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 *reg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readreg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_readreg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ®); } } - return; + return retVal___; } -GroupSettings* HP_pcg_get_dummy_group(void) { +void HP_pc_setreg(struct map_session_data *sd, int64 reg, int val) { int hIndex = 0; - GroupSettings* retVal___ = NULL; - if( HPMHooks.count.HP_pcg_get_dummy_group_pre ) { - GroupSettings* (*preHookFunc) (void); + if( HPMHooks.count.HP_pc_setreg_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int64 *reg, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_dummy_group_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pcg_get_dummy_group_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setreg_pre[hIndex].func; + preHookFunc(sd, ®, &val); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pcg.get_dummy_group(); + HPMHooks.source.pc.setreg(sd, reg, val); } - if( HPMHooks.count.HP_pcg_get_dummy_group_post ) { - GroupSettings* (*postHookFunc) (GroupSettings* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_dummy_group_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pcg_get_dummy_group_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_pc_setreg_post ) { + void (*postHookFunc) (struct map_session_data *sd, int64 *reg, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setreg_post[hIndex].func; + postHookFunc(sd, ®, &val); } } - return retVal___; + return; } -bool HP_pcg_exists(int group_id) { +char* HP_pc_readregstr(struct map_session_data *sd, int64 reg) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pcg_exists_pre ) { - bool (*preHookFunc) (int *group_id); + char* retVal___ = NULL; + if( HPMHooks.count.HP_pc_readregstr_pre ) { + char* (*preHookFunc) (struct map_session_data *sd, int64 *reg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_exists_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pcg_exists_pre[hIndex].func; - retVal___ = preHookFunc(&group_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregstr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_readregstr_pre[hIndex].func; + retVal___ = preHookFunc(sd, ®); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47644,53 +54045,52 @@ bool HP_pcg_exists(int group_id) { } } { - retVal___ = HPMHooks.source.pcg.exists(group_id); + retVal___ = HPMHooks.source.pc.readregstr(sd, reg); } - if( HPMHooks.count.HP_pcg_exists_post ) { - bool (*postHookFunc) (bool retVal___, int *group_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_exists_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pcg_exists_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &group_id); + if( HPMHooks.count.HP_pc_readregstr_post ) { + char* (*postHookFunc) (char* retVal___, struct map_session_data *sd, int64 *reg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregstr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_readregstr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ®); } } return retVal___; } -GroupSettings* HP_pcg_id2group(int group_id) { +void HP_pc_setregstr(struct map_session_data *sd, int64 reg, const char *str) { int hIndex = 0; - GroupSettings* retVal___ = NULL; - if( HPMHooks.count.HP_pcg_id2group_pre ) { - GroupSettings* (*preHookFunc) (int *group_id); + if( HPMHooks.count.HP_pc_setregstr_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int64 *reg, const char *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_id2group_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pcg_id2group_pre[hIndex].func; - retVal___ = preHookFunc(&group_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setregstr_pre[hIndex].func; + preHookFunc(sd, ®, str); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pcg.id2group(group_id); + HPMHooks.source.pc.setregstr(sd, reg, str); } - if( HPMHooks.count.HP_pcg_id2group_post ) { - GroupSettings* (*postHookFunc) (GroupSettings* retVal___, int *group_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_id2group_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pcg_id2group_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &group_id); + if( HPMHooks.count.HP_pc_setregstr_post ) { + void (*postHookFunc) (struct map_session_data *sd, int64 *reg, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setregstr_post[hIndex].func; + postHookFunc(sd, ®, str); } } - return retVal___; + return; } -bool HP_pcg_has_permission(GroupSettings *group, unsigned int permission) { +int HP_pc_readregistry(struct map_session_data *sd, int64 reg) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pcg_has_permission_pre ) { - bool (*preHookFunc) (GroupSettings *group, unsigned int *permission); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_readregistry_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int64 *reg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_has_permission_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pcg_has_permission_pre[hIndex].func; - retVal___ = preHookFunc(group, &permission); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_readregistry_pre[hIndex].func; + retVal___ = preHookFunc(sd, ®); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47698,26 +54098,26 @@ bool HP_pcg_has_permission(GroupSettings *group, unsigned int permission) { } } { - retVal___ = HPMHooks.source.pcg.has_permission(group, permission); + retVal___ = HPMHooks.source.pc.readregistry(sd, reg); } - if( HPMHooks.count.HP_pcg_has_permission_post ) { - bool (*postHookFunc) (bool retVal___, GroupSettings *group, unsigned int *permission); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_has_permission_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pcg_has_permission_post[hIndex].func; - retVal___ = postHookFunc(retVal___, group, &permission); + if( HPMHooks.count.HP_pc_readregistry_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 *reg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_readregistry_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ®); } } return retVal___; } -bool HP_pcg_should_log_commands(GroupSettings *group) { +int HP_pc_setregistry(struct map_session_data *sd, int64 reg, int val) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pcg_should_log_commands_pre ) { - bool (*preHookFunc) (GroupSettings *group); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_setregistry_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int64 *reg, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_should_log_commands_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pcg_should_log_commands_pre[hIndex].func; - retVal___ = preHookFunc(group); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setregistry_pre[hIndex].func; + retVal___ = preHookFunc(sd, ®, &val); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47725,26 +54125,26 @@ bool HP_pcg_should_log_commands(GroupSettings *group) { } } { - retVal___ = HPMHooks.source.pcg.should_log_commands(group); + retVal___ = HPMHooks.source.pc.setregistry(sd, reg, val); } - if( HPMHooks.count.HP_pcg_should_log_commands_post ) { - bool (*postHookFunc) (bool retVal___, GroupSettings *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_should_log_commands_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pcg_should_log_commands_post[hIndex].func; - retVal___ = postHookFunc(retVal___, group); + if( HPMHooks.count.HP_pc_setregistry_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 *reg, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setregistry_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ®, &val); } } return retVal___; } -const char* HP_pcg_get_name(GroupSettings *group) { - int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_pcg_get_name_pre ) { - const char* (*preHookFunc) (GroupSettings *group); +char* HP_pc_readregistry_str(struct map_session_data *sd, int64 reg) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_pc_readregistry_str_pre ) { + char* (*preHookFunc) (struct map_session_data *sd, int64 *reg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_name_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pcg_get_name_pre[hIndex].func; - retVal___ = preHookFunc(group); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_readregistry_str_pre[hIndex].func; + retVal___ = preHookFunc(sd, ®); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47752,26 +54152,26 @@ const char* HP_pcg_get_name(GroupSettings *group) { } } { - retVal___ = HPMHooks.source.pcg.get_name(group); + retVal___ = HPMHooks.source.pc.readregistry_str(sd, reg); } - if( HPMHooks.count.HP_pcg_get_name_post ) { - const char* (*postHookFunc) (const char* retVal___, GroupSettings *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_name_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pcg_get_name_post[hIndex].func; - retVal___ = postHookFunc(retVal___, group); + if( HPMHooks.count.HP_pc_readregistry_str_post ) { + char* (*postHookFunc) (char* retVal___, struct map_session_data *sd, int64 *reg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_readregistry_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ®); } } return retVal___; } -int HP_pcg_get_level(GroupSettings *group) { +int HP_pc_setregistry_str(struct map_session_data *sd, int64 reg, const char *val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pcg_get_level_pre ) { - int (*preHookFunc) (GroupSettings *group); + if( HPMHooks.count.HP_pc_setregistry_str_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int64 *reg, const char *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_level_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pcg_get_level_pre[hIndex].func; - retVal___ = preHookFunc(group); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setregistry_str_pre[hIndex].func; + retVal___ = preHookFunc(sd, ®, val); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47779,26 +54179,26 @@ int HP_pcg_get_level(GroupSettings *group) { } } { - retVal___ = HPMHooks.source.pcg.get_level(group); + retVal___ = HPMHooks.source.pc.setregistry_str(sd, reg, val); } - if( HPMHooks.count.HP_pcg_get_level_post ) { - int (*postHookFunc) (int retVal___, GroupSettings *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_level_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pcg_get_level_post[hIndex].func; - retVal___ = postHookFunc(retVal___, group); + if( HPMHooks.count.HP_pc_setregistry_str_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 *reg, const char *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setregistry_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ®, val); } } return retVal___; } -int HP_pcg_get_idx(GroupSettings *group) { +int HP_pc_addeventtimer(struct map_session_data *sd, int tick, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pcg_get_idx_pre ) { - int (*preHookFunc) (GroupSettings *group); + if( HPMHooks.count.HP_pc_addeventtimer_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *tick, const char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_idx_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pcg_get_idx_pre[hIndex].func; - retVal___ = preHookFunc(group); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_addeventtimer_pre[hIndex].func; + retVal___ = preHookFunc(sd, &tick, name); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47806,79 +54206,80 @@ int HP_pcg_get_idx(GroupSettings *group) { } } { - retVal___ = HPMHooks.source.pcg.get_idx(group); + retVal___ = HPMHooks.source.pc.addeventtimer(sd, tick, name); } - if( HPMHooks.count.HP_pcg_get_idx_post ) { - int (*postHookFunc) (int retVal___, GroupSettings *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_idx_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pcg_get_idx_post[hIndex].func; - retVal___ = postHookFunc(retVal___, group); + if( HPMHooks.count.HP_pc_addeventtimer_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *tick, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_addeventtimer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &tick, name); } } return retVal___; } -/* pc */ -void HP_pc_init(bool minimal) { +int HP_pc_deleventtimer(struct map_session_data *sd, const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_pc_init_pre ) { - void (*preHookFunc) (bool *minimal); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_deleventtimer_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_init_pre[hIndex].func; - preHookFunc(&minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_deleventtimer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_deleventtimer_pre[hIndex].func; + retVal___ = preHookFunc(sd, name); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.init(minimal); + retVal___ = HPMHooks.source.pc.deleventtimer(sd, name); } - if( HPMHooks.count.HP_pc_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_init_post[hIndex].func; - postHookFunc(&minimal); + if( HPMHooks.count.HP_pc_deleventtimer_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_deleventtimer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_deleventtimer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name); } } - return; + return retVal___; } -void HP_pc_final(void) { +int HP_pc_cleareventtimer(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_final_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_cleareventtimer_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_final_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cleareventtimer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_cleareventtimer_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.final(); + retVal___ = HPMHooks.source.pc.cleareventtimer(sd); } - if( HPMHooks.count.HP_pc_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_final_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_pc_cleareventtimer_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cleareventtimer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_cleareventtimer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } - return; + return retVal___; } -struct map_session_data* HP_pc_get_dummy_sd(void) { +int HP_pc_addeventtimercount(struct map_session_data *sd, const char *name, int tick) { int hIndex = 0; - struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_pc_get_dummy_sd_pre ) { - struct map_session_data* (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_addeventtimercount_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *name, int *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_dummy_sd_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_get_dummy_sd_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimercount_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_addeventtimercount_pre[hIndex].func; + retVal___ = preHookFunc(sd, name, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47886,26 +54287,26 @@ struct map_session_data* HP_pc_get_dummy_sd(void) { } } { - retVal___ = HPMHooks.source.pc.get_dummy_sd(); + retVal___ = HPMHooks.source.pc.addeventtimercount(sd, name, tick); } - if( HPMHooks.count.HP_pc_get_dummy_sd_post ) { - struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_dummy_sd_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_get_dummy_sd_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_pc_addeventtimercount_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name, int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimercount_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_addeventtimercount_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name, &tick); } } return retVal___; } -int HP_pc_class2idx(int class_) { +int HP_pc_calc_pvprank(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_class2idx_pre ) { - int (*preHookFunc) (int *class_); + if( HPMHooks.count.HP_pc_calc_pvprank_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *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_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_calc_pvprank_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47913,26 +54314,26 @@ int HP_pc_class2idx(int class_) { } } { - retVal___ = HPMHooks.source.pc.class2idx(class_); + retVal___ = HPMHooks.source.pc.calc_pvprank(sd); } - if( HPMHooks.count.HP_pc_class2idx_post ) { - 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_); + if( HPMHooks.count.HP_pc_calc_pvprank_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_calc_pvprank_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -bool HP_pc_can_talk(struct map_session_data *sd) { +int HP_pc_calc_pvprank_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pc_can_talk_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_calc_pvprank_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_talk_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_can_talk_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_calc_pvprank_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47940,26 +54341,26 @@ bool HP_pc_can_talk(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.can_talk(sd); + retVal___ = HPMHooks.source.pc.calc_pvprank_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_can_talk_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_talk_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_can_talk_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_calc_pvprank_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_calc_pvprank_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -bool HP_pc_can_attack(struct map_session_data *sd, int target_id) { +int HP_pc_ismarried(struct map_session_data *sd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pc_can_attack_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *target_id); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_ismarried_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_attack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_can_attack_pre[hIndex].func; - retVal___ = preHookFunc(sd, &target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_ismarried_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_ismarried_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47967,26 +54368,26 @@ bool HP_pc_can_attack(struct map_session_data *sd, int target_id) { } } { - retVal___ = HPMHooks.source.pc.can_attack(sd, target_id); + retVal___ = HPMHooks.source.pc.ismarried(sd); } - if( HPMHooks.count.HP_pc_can_attack_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *target_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_attack_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_can_attack_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &target_id); + if( HPMHooks.count.HP_pc_ismarried_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_ismarried_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_ismarried_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -bool HP_pc_can_use_command(struct map_session_data *sd, const char *command) { +int HP_pc_marriage(struct map_session_data *sd, struct map_session_data *dstsd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pc_can_use_command_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, const char *command); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_marriage_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_use_command_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_can_use_command_pre[hIndex].func; - retVal___ = preHookFunc(sd, command); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_marriage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_marriage_pre[hIndex].func; + retVal___ = preHookFunc(sd, dstsd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47994,26 +54395,26 @@ bool HP_pc_can_use_command(struct map_session_data *sd, const char *command) { } } { - retVal___ = HPMHooks.source.pc.can_use_command(sd, command); + retVal___ = HPMHooks.source.pc.marriage(sd, dstsd); } - if( HPMHooks.count.HP_pc_can_use_command_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *command); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_use_command_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_can_use_command_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, command); + if( HPMHooks.count.HP_pc_marriage_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct map_session_data *dstsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_marriage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_marriage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, dstsd); } } return retVal___; } -int HP_pc_set_group(struct map_session_data *sd, int group_id) { +int HP_pc_divorce(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_set_group_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *group_id); + if( HPMHooks.count.HP_pc_divorce_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_group_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_set_group_pre[hIndex].func; - retVal___ = preHookFunc(sd, &group_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_divorce_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_divorce_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48021,25 +54422,25 @@ int HP_pc_set_group(struct map_session_data *sd, int group_id) { } } { - retVal___ = HPMHooks.source.pc.set_group(sd, group_id); + retVal___ = HPMHooks.source.pc.divorce(sd); } - if( HPMHooks.count.HP_pc_set_group_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *group_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_group_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_set_group_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &group_id); + if( HPMHooks.count.HP_pc_divorce_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_divorce_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_divorce_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -bool HP_pc_should_log_commands(struct map_session_data *sd) { +struct map_session_data* HP_pc_get_partner(struct map_session_data *sd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pc_should_log_commands_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_pc_get_partner_pre ) { + struct map_session_data* (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_should_log_commands_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_should_log_commands_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_partner_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_get_partner_pre[hIndex].func; retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { @@ -48048,26 +54449,26 @@ bool HP_pc_should_log_commands(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.should_log_commands(sd); + retVal___ = HPMHooks.source.pc.get_partner(sd); } - if( HPMHooks.count.HP_pc_should_log_commands_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_should_log_commands_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_should_log_commands_post[hIndex].func; + if( HPMHooks.count.HP_pc_get_partner_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_partner_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_get_partner_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_pc_setrestartvalue(struct map_session_data *sd, int type) { +struct map_session_data* HP_pc_get_father(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_setrestartvalue_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_pc_get_father_pre ) { + struct map_session_data* (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setrestartvalue_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setrestartvalue_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_father_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_get_father_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48075,25 +54476,25 @@ int HP_pc_setrestartvalue(struct map_session_data *sd, int type) { } } { - retVal___ = HPMHooks.source.pc.setrestartvalue(sd, type); + retVal___ = HPMHooks.source.pc.get_father(sd); } - if( HPMHooks.count.HP_pc_setrestartvalue_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setrestartvalue_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_setrestartvalue_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type); + if( HPMHooks.count.HP_pc_get_father_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_father_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_get_father_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_pc_makesavestatus(struct map_session_data *sd) { +struct map_session_data* HP_pc_get_mother(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_makesavestatus_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_pc_get_mother_pre ) { + struct map_session_data* (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_makesavestatus_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_makesavestatus_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_mother_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_get_mother_pre[hIndex].func; retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { @@ -48102,104 +54503,103 @@ int HP_pc_makesavestatus(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.makesavestatus(sd); + retVal___ = HPMHooks.source.pc.get_mother(sd); } - if( HPMHooks.count.HP_pc_makesavestatus_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_makesavestatus_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_makesavestatus_post[hIndex].func; + if( HPMHooks.count.HP_pc_get_mother_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_mother_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_get_mother_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -void HP_pc_respawn(struct map_session_data *sd, clr_type clrtype) { +struct map_session_data* HP_pc_get_child(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_respawn_pre ) { - void (*preHookFunc) (struct map_session_data *sd, clr_type *clrtype); + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_pc_get_child_pre ) { + struct map_session_data* (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_respawn_pre[hIndex].func; - preHookFunc(sd, &clrtype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_child_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_get_child_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.respawn(sd, clrtype); + retVal___ = HPMHooks.source.pc.get_child(sd); } - if( HPMHooks.count.HP_pc_respawn_post ) { - void (*postHookFunc) (struct map_session_data *sd, clr_type *clrtype); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_respawn_post[hIndex].func; - postHookFunc(sd, &clrtype); + if( HPMHooks.count.HP_pc_get_child_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_child_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_get_child_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } - return; + return retVal___; } -int HP_pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int login_id1, unsigned int client_tick, int sex, int fd) { +void HP_pc_bleeding(struct map_session_data *sd, unsigned int diff_tick) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_setnewpc_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *account_id, int *char_id, int *login_id1, unsigned int *client_tick, int *sex, int *fd); + if( HPMHooks.count.HP_pc_bleeding_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned int *diff_tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setnewpc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setnewpc_pre[hIndex].func; - retVal___ = preHookFunc(sd, &account_id, &char_id, &login_id1, &client_tick, &sex, &fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bleeding_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bleeding_pre[hIndex].func; + preHookFunc(sd, &diff_tick); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.setnewpc(sd, account_id, char_id, login_id1, client_tick, sex, fd); + HPMHooks.source.pc.bleeding(sd, diff_tick); } - if( HPMHooks.count.HP_pc_setnewpc_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *account_id, int *char_id, int *login_id1, unsigned int *client_tick, int *sex, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setnewpc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_setnewpc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &account_id, &char_id, &login_id1, &client_tick, &sex, &fd); + if( HPMHooks.count.HP_pc_bleeding_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int *diff_tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bleeding_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bleeding_post[hIndex].func; + postHookFunc(sd, &diff_tick); } } - return retVal___; + return; } -bool HP_pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers) { +void HP_pc_regen(struct map_session_data *sd, unsigned int diff_tick) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pc_authok_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *login_id2, time_t *expiration_time, int *group_id, struct mmo_charstatus *st, bool *changing_mapservers); + if( HPMHooks.count.HP_pc_regen_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned int *diff_tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authok_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_authok_pre[hIndex].func; - retVal___ = preHookFunc(sd, &login_id2, &expiration_time, &group_id, st, &changing_mapservers); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_regen_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_regen_pre[hIndex].func; + preHookFunc(sd, &diff_tick); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.authok(sd, login_id2, expiration_time, group_id, st, changing_mapservers); + HPMHooks.source.pc.regen(sd, diff_tick); } - if( HPMHooks.count.HP_pc_authok_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *login_id2, time_t *expiration_time, int *group_id, struct mmo_charstatus *st, bool *changing_mapservers); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authok_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_authok_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &login_id2, &expiration_time, &group_id, st, &changing_mapservers); + if( HPMHooks.count.HP_pc_regen_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int *diff_tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_regen_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_regen_post[hIndex].func; + postHookFunc(sd, &diff_tick); } } - return retVal___; + return; } -void HP_pc_authfail(struct map_session_data *sd) { +void HP_pc_setstand(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_authfail_pre ) { + if( HPMHooks.count.HP_pc_setstand_pre ) { void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authfail_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_authfail_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstand_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setstand_pre[hIndex].func; preHookFunc(sd); } if( *HPMforce_return ) { @@ -48208,26 +54608,26 @@ void HP_pc_authfail(struct map_session_data *sd) { } } { - HPMHooks.source.pc.authfail(sd); + HPMHooks.source.pc.setstand(sd); } - if( HPMHooks.count.HP_pc_authfail_post ) { + if( HPMHooks.count.HP_pc_setstand_post ) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authfail_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_authfail_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstand_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setstand_post[hIndex].func; postHookFunc(sd); } } return; } -int HP_pc_reg_received(struct map_session_data *sd) { +int HP_pc_candrop(struct map_session_data *sd, struct item *item) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_reg_received_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pc_candrop_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct item *item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_reg_received_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_reg_received_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_candrop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_candrop_pre[hIndex].func; + retVal___ = preHookFunc(sd, item); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48235,26 +54635,26 @@ int HP_pc_reg_received(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.reg_received(sd); + retVal___ = HPMHooks.source.pc.candrop(sd, item); } - if( HPMHooks.count.HP_pc_reg_received_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_reg_received_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_reg_received_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_candrop_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_candrop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_candrop_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item); } } return retVal___; } -int HP_pc_isequip(struct map_session_data *sd, int n) { +int HP_pc_jobid2mapid(unsigned short b_class) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_isequip_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n); + if( HPMHooks.count.HP_pc_jobid2mapid_pre ) { + int (*preHookFunc) (unsigned short *b_class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequip_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_isequip_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_jobid2mapid_pre[hIndex].func; + retVal___ = preHookFunc(&b_class); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48262,26 +54662,26 @@ int HP_pc_isequip(struct map_session_data *sd, int n) { } } { - retVal___ = HPMHooks.source.pc.isequip(sd, n); + retVal___ = HPMHooks.source.pc.jobid2mapid(b_class); } - if( HPMHooks.count.HP_pc_isequip_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequip_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_isequip_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &n); + if( HPMHooks.count.HP_pc_jobid2mapid_post ) { + int (*postHookFunc) (int retVal___, unsigned short *b_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); } } return retVal___; } -int HP_pc_equippoint(struct map_session_data *sd, int n) { +int HP_pc_mapid2jobid(unsigned short class_, int sex) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_equippoint_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n); + if( HPMHooks.count.HP_pc_mapid2jobid_pre ) { + int (*preHookFunc) (unsigned short *class_, int *sex); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equippoint_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_equippoint_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_mapid2jobid_pre[hIndex].func; + retVal___ = preHookFunc(&class_, &sex); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48289,26 +54689,26 @@ int HP_pc_equippoint(struct map_session_data *sd, int n) { } } { - retVal___ = HPMHooks.source.pc.equippoint(sd, n); + retVal___ = HPMHooks.source.pc.mapid2jobid(class_, sex); } - if( HPMHooks.count.HP_pc_equippoint_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equippoint_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_equippoint_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &n); + if( HPMHooks.count.HP_pc_mapid2jobid_post ) { + int (*postHookFunc) (int retVal___, unsigned short *class_, int *sex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_mapid2jobid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_, &sex); } } return retVal___; } -int HP_pc_setinventorydata(struct map_session_data *sd) { +const char* HP_pc_job_name(int class_) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_setinventorydata_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_pc_job_name_pre ) { + const char* (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinventorydata_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setinventorydata_pre[hIndex].func; - retVal___ = preHookFunc(sd); + 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_); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48316,80 +54716,78 @@ int HP_pc_setinventorydata(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.setinventorydata(sd); + retVal___ = HPMHooks.source.pc.job_name(class_); } - if( HPMHooks.count.HP_pc_setinventorydata_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinventorydata_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_setinventorydata_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_job_name_post ) { + 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_); } } return retVal___; } -int HP_pc_checkskill(struct map_session_data *sd, uint16 skill_id) { +void HP_pc_setinvincibletimer(struct map_session_data *sd, int val) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkskill_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + if( HPMHooks.count.HP_pc_setinvincibletimer_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_checkskill_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinvincibletimer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setinvincibletimer_pre[hIndex].func; + preHookFunc(sd, &val); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.checkskill(sd, skill_id); + HPMHooks.source.pc.setinvincibletimer(sd, val); } - if( HPMHooks.count.HP_pc_checkskill_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_checkskill_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_id); + if( HPMHooks.count.HP_pc_setinvincibletimer_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinvincibletimer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setinvincibletimer_post[hIndex].func; + postHookFunc(sd, &val); } } - return retVal___; + return; } -int HP_pc_checkskill2(struct map_session_data *sd, uint16 index) { +void HP_pc_delinvincibletimer(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkskill2_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *index); + if( HPMHooks.count.HP_pc_delinvincibletimer_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_checkskill2_pre[hIndex].func; - retVal___ = preHookFunc(sd, &index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delinvincibletimer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_delinvincibletimer_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.checkskill2(sd, index); + HPMHooks.source.pc.delinvincibletimer(sd); } - if( HPMHooks.count.HP_pc_checkskill2_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_checkskill2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &index); + if( HPMHooks.count.HP_pc_delinvincibletimer_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delinvincibletimer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_delinvincibletimer_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -int HP_pc_checkallowskill(struct map_session_data *sd) { +int HP_pc_addspiritball(struct map_session_data *sd, int interval, int max) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkallowskill_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pc_addspiritball_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *interval, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkallowskill_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_checkallowskill_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addspiritball_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_addspiritball_pre[hIndex].func; + retVal___ = preHookFunc(sd, &interval, &max); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48397,26 +54795,26 @@ int HP_pc_checkallowskill(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.checkallowskill(sd); + retVal___ = HPMHooks.source.pc.addspiritball(sd, interval, max); } - if( HPMHooks.count.HP_pc_checkallowskill_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkallowskill_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_checkallowskill_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_addspiritball_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *interval, int *max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addspiritball_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_addspiritball_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &interval, &max); } } return retVal___; } -int HP_pc_checkequip(struct map_session_data *sd, int pos) { +int HP_pc_delspiritball(struct map_session_data *sd, int count, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkequip_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *pos); + if( HPMHooks.count.HP_pc_delspiritball_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *count, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkequip_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_checkequip_pre[hIndex].func; - retVal___ = preHookFunc(sd, &pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delspiritball_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_delspiritball_pre[hIndex].func; + retVal___ = preHookFunc(sd, &count, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48424,26 +54822,26 @@ int HP_pc_checkequip(struct map_session_data *sd, int pos) { } } { - retVal___ = HPMHooks.source.pc.checkequip(sd, pos); + retVal___ = HPMHooks.source.pc.delspiritball(sd, count, type); } - if( HPMHooks.count.HP_pc_checkequip_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkequip_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_checkequip_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &pos); + if( HPMHooks.count.HP_pc_delspiritball_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *count, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delspiritball_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_delspiritball_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &count, &type); } } return retVal___; } -int HP_pc_calc_skilltree(struct map_session_data *sd) { +int HP_pc_getmaxspiritball(struct map_session_data *sd, int min) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_calc_skilltree_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pc_getmaxspiritball_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *min); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_calc_skilltree_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getmaxspiritball_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_getmaxspiritball_pre[hIndex].func; + retVal___ = preHookFunc(sd, &min); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48451,53 +54849,52 @@ int HP_pc_calc_skilltree(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.calc_skilltree(sd); + retVal___ = HPMHooks.source.pc.getmaxspiritball(sd, min); } - if( HPMHooks.count.HP_pc_calc_skilltree_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_calc_skilltree_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_getmaxspiritball_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *min); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getmaxspiritball_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_getmaxspiritball_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &min); } } return retVal___; } -int HP_pc_calc_skilltree_normalize_job(struct map_session_data *sd) { +void HP_pc_addfame(struct map_session_data *sd, int count) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_calc_skilltree_normalize_job_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pc_addfame_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_normalize_job_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_calc_skilltree_normalize_job_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addfame_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_addfame_pre[hIndex].func; + preHookFunc(sd, &count); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.calc_skilltree_normalize_job(sd); + HPMHooks.source.pc.addfame(sd, count); } - if( HPMHooks.count.HP_pc_calc_skilltree_normalize_job_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_normalize_job_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_calc_skilltree_normalize_job_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_addfame_post ) { + void (*postHookFunc) (struct map_session_data *sd, 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); } } - return retVal___; + return; } -int HP_pc_clean_skilltree(struct map_session_data *sd) { +unsigned char HP_pc_famerank(int char_id, int job) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_clean_skilltree_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + unsigned char retVal___ = 0; + if( HPMHooks.count.HP_pc_famerank_pre ) { + unsigned char (*preHookFunc) (int *char_id, int *job); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clean_skilltree_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_clean_skilltree_pre[hIndex].func; - retVal___ = preHookFunc(sd); + 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); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48505,26 +54902,26 @@ int HP_pc_clean_skilltree(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.clean_skilltree(sd); + retVal___ = HPMHooks.source.pc.famerank(char_id, job); } - if( HPMHooks.count.HP_pc_clean_skilltree_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clean_skilltree_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_clean_skilltree_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + 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); } } return retVal___; } -int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, int y, clr_type clrtype) { +int HP_pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setpos_pre ) { - int (*preHookFunc) (struct map_session_data *sd, unsigned short *map_index, int *x, int *y, clr_type *clrtype); + if( HPMHooks.count.HP_pc_set_hate_mob_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *pos, struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setpos_pre[hIndex].func; - retVal___ = preHookFunc(sd, &map_index, &x, &y, &clrtype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_hate_mob_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_set_hate_mob_pre[hIndex].func; + retVal___ = preHookFunc(sd, &pos, bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48532,26 +54929,26 @@ int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, i } } { - retVal___ = HPMHooks.source.pc.setpos(sd, map_index, x, y, clrtype); + retVal___ = HPMHooks.source.pc.set_hate_mob(sd, pos, bl); } - if( HPMHooks.count.HP_pc_setpos_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short *map_index, int *x, int *y, clr_type *clrtype); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_setpos_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &map_index, &x, &y, &clrtype); + if( HPMHooks.count.HP_pc_set_hate_mob_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *pos, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_hate_mob_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_set_hate_mob_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &pos, bl); } } return retVal___; } -int HP_pc_setsavepoint(struct map_session_data *sd, short map_index, int x, int y) { +int HP_pc_readdb(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setsavepoint_pre ) { - int (*preHookFunc) (struct map_session_data *sd, short *map_index, int *x, int *y); + if( HPMHooks.count.HP_pc_readdb_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setsavepoint_pre[hIndex].func; - retVal___ = preHookFunc(sd, &map_index, &x, &y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_readdb_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48559,26 +54956,26 @@ int HP_pc_setsavepoint(struct map_session_data *sd, short map_index, int x, int } } { - retVal___ = HPMHooks.source.pc.setsavepoint(sd, map_index, x, y); + retVal___ = HPMHooks.source.pc.readdb(); } - if( HPMHooks.count.HP_pc_setsavepoint_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *map_index, int *x, int *y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_setsavepoint_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &map_index, &x, &y); + if( HPMHooks.count.HP_pc_readdb_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_readdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_pc_randomwarp(struct map_session_data *sd, clr_type type) { +int HP_pc_map_day_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_randomwarp_pre ) { - int (*preHookFunc) (struct map_session_data *sd, clr_type *type); + if( HPMHooks.count.HP_pc_map_day_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_randomwarp_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_day_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_map_day_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48586,26 +54983,26 @@ int HP_pc_randomwarp(struct map_session_data *sd, clr_type type) { } } { - retVal___ = HPMHooks.source.pc.randomwarp(sd, type); + retVal___ = HPMHooks.source.pc.map_day_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_randomwarp_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, clr_type *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_randomwarp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type); + if( HPMHooks.count.HP_pc_map_day_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_day_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_map_day_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_pc_memo(struct map_session_data *sd, int pos) { +int HP_pc_map_night_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_memo_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *pos); + if( HPMHooks.count.HP_pc_map_night_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_memo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_memo_pre[hIndex].func; - retVal___ = preHookFunc(sd, &pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_night_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_map_night_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48613,52 +55010,51 @@ int HP_pc_memo(struct map_session_data *sd, int pos) { } } { - retVal___ = HPMHooks.source.pc.memo(sd, pos); + retVal___ = HPMHooks.source.pc.map_night_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_memo_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_memo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_memo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &pos); + if( HPMHooks.count.HP_pc_map_night_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_night_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_map_night_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_pc_checkadditem(struct map_session_data *sd, int nameid, int amount) { +void HP_pc_inventory_rentals(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkadditem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *amount); + if( HPMHooks.count.HP_pc_inventory_rentals_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkadditem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_checkadditem_pre[hIndex].func; - retVal___ = preHookFunc(sd, &nameid, &amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rentals_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_inventory_rentals_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.checkadditem(sd, nameid, amount); + HPMHooks.source.pc.inventory_rentals(sd); } - if( HPMHooks.count.HP_pc_checkadditem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid, int *amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkadditem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_checkadditem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &nameid, &amount); + if( HPMHooks.count.HP_pc_inventory_rentals_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rentals_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_inventory_rentals_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -int HP_pc_inventoryblank(struct map_session_data *sd) { +int HP_pc_inventory_rental_clear(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_inventoryblank_pre ) { + if( HPMHooks.count.HP_pc_inventory_rental_clear_pre ) { int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventoryblank_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_inventoryblank_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_inventory_rental_clear_pre[hIndex].func; retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { @@ -48667,53 +55063,52 @@ int HP_pc_inventoryblank(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.inventoryblank(sd); + retVal___ = HPMHooks.source.pc.inventory_rental_clear(sd); } - if( HPMHooks.count.HP_pc_inventoryblank_post ) { + if( HPMHooks.count.HP_pc_inventory_rental_clear_post ) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventoryblank_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_inventoryblank_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_inventory_rental_clear_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_pc_search_inventory(struct map_session_data *sd, int item_id) { +void HP_pc_inventory_rental_add(struct map_session_data *sd, int seconds) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_search_inventory_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *item_id); + if( HPMHooks.count.HP_pc_inventory_rental_add_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *seconds); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_search_inventory_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_search_inventory_pre[hIndex].func; - retVal___ = preHookFunc(sd, &item_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_inventory_rental_add_pre[hIndex].func; + preHookFunc(sd, &seconds); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.search_inventory(sd, item_id); + HPMHooks.source.pc.inventory_rental_add(sd, seconds); } - if( HPMHooks.count.HP_pc_search_inventory_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *item_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_search_inventory_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_search_inventory_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &item_id); + if( HPMHooks.count.HP_pc_inventory_rental_add_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *seconds); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_inventory_rental_add_post[hIndex].func; + postHookFunc(sd, &seconds); } } - return retVal___; + return; } -int HP_pc_payzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type type, struct map_session_data *tsd) { +int HP_pc_disguise(struct map_session_data *sd, int class_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_payzeny_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd); + if( HPMHooks.count.HP_pc_disguise_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_payzeny_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_payzeny_pre[hIndex].func; - retVal___ = preHookFunc(sd, &zeny, &type, tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_disguise_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_disguise_pre[hIndex].func; + retVal___ = preHookFunc(sd, &class_); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48721,26 +55116,26 @@ int HP_pc_payzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type ty } } { - retVal___ = HPMHooks.source.pc.payzeny(sd, zeny, type, tsd); + retVal___ = HPMHooks.source.pc.disguise(sd, class_); } - if( HPMHooks.count.HP_pc_payzeny_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_payzeny_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_payzeny_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &zeny, &type, tsd); + if( HPMHooks.count.HP_pc_disguise_post ) { + 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_); } } return retVal___; } -int HP_pc_additem(struct map_session_data *sd, struct item *item_data, int amount, e_log_pick_type log_type) { +bool HP_pc_isautolooting(struct map_session_data *sd, int nameid) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_additem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type); + bool retVal___ = false; + if( HPMHooks.count.HP_pc_isautolooting_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_additem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_additem_pre[hIndex].func; - retVal___ = preHookFunc(sd, item_data, &amount, &log_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isautolooting_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_isautolooting_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48748,26 +55143,52 @@ int HP_pc_additem(struct map_session_data *sd, struct item *item_data, int amoun } } { - retVal___ = HPMHooks.source.pc.additem(sd, item_data, amount, log_type); + retVal___ = HPMHooks.source.pc.isautolooting(sd, nameid); } - if( HPMHooks.count.HP_pc_additem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_additem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_additem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, item_data, &amount, &log_type); + if( HPMHooks.count.HP_pc_isautolooting_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isautolooting_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_isautolooting_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid); } } return retVal___; } -int HP_pc_getzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type type, struct map_session_data *tsd) { +void HP_pc_overheat(struct map_session_data *sd, int val) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_overheat_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *val); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_overheat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_overheat_pre[hIndex].func; + preHookFunc(sd, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.overheat(sd, val); + } + if( HPMHooks.count.HP_pc_overheat_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_overheat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_overheat_post[hIndex].func; + postHookFunc(sd, &val); + } + } + return; +} +int HP_pc_banding(struct map_session_data *sd, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_getzeny_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd); + if( HPMHooks.count.HP_pc_banding_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getzeny_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_getzeny_pre[hIndex].func; - retVal___ = preHookFunc(sd, &zeny, &type, tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_banding_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_banding_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48775,53 +55196,52 @@ int HP_pc_getzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type ty } } { - retVal___ = HPMHooks.source.pc.getzeny(sd, zeny, type, tsd); + retVal___ = HPMHooks.source.pc.banding(sd, skill_lv); } - if( HPMHooks.count.HP_pc_getzeny_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getzeny_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_getzeny_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &zeny, &type, tsd); + if( HPMHooks.count.HP_pc_banding_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_banding_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_banding_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_lv); } } return retVal___; } -int HP_pc_delitem(struct map_session_data *sd, int n, int amount, int type, short reason, e_log_pick_type log_type) { +void HP_pc_itemcd_do(struct map_session_data *sd, bool load) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_delitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, int *type, short *reason, e_log_pick_type *log_type); + if( HPMHooks.count.HP_pc_itemcd_do_pre ) { + void (*preHookFunc) (struct map_session_data *sd, bool *load); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_delitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n, &amount, &type, &reason, &log_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemcd_do_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_itemcd_do_pre[hIndex].func; + preHookFunc(sd, &load); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.delitem(sd, n, amount, type, reason, log_type); + HPMHooks.source.pc.itemcd_do(sd, load); } - if( HPMHooks.count.HP_pc_delitem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *amount, int *type, short *reason, e_log_pick_type *log_type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_delitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &n, &amount, &type, &reason, &log_type); + if( HPMHooks.count.HP_pc_itemcd_do_post ) { + void (*postHookFunc) (struct map_session_data *sd, bool *load); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemcd_do_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_itemcd_do_post[hIndex].func; + postHookFunc(sd, &load); } } - return retVal___; + return; } -int HP_pc_paycash(struct map_session_data *sd, int price, int points) { +int HP_pc_load_combo(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_paycash_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *price, int *points); + if( HPMHooks.count.HP_pc_load_combo_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_paycash_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_paycash_pre[hIndex].func; - retVal___ = preHookFunc(sd, &price, &points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_load_combo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_load_combo_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48829,107 +55249,104 @@ int HP_pc_paycash(struct map_session_data *sd, int price, int points) { } } { - retVal___ = HPMHooks.source.pc.paycash(sd, price, points); + retVal___ = HPMHooks.source.pc.load_combo(sd); } - if( HPMHooks.count.HP_pc_paycash_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *price, int *points); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_paycash_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_paycash_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &price, &points); + if( HPMHooks.count.HP_pc_load_combo_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_load_combo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_load_combo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_pc_getcash(struct map_session_data *sd, int cash, int points) { +void HP_pc_add_charm(struct map_session_data *sd, int interval, int max, int type) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_getcash_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *cash, int *points); + if( HPMHooks.count.HP_pc_add_charm_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *interval, int *max, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getcash_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_getcash_pre[hIndex].func; - retVal___ = preHookFunc(sd, &cash, &points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_add_charm_pre[hIndex].func; + preHookFunc(sd, &interval, &max, &type); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.getcash(sd, cash, points); + HPMHooks.source.pc.add_charm(sd, interval, max, type); } - if( HPMHooks.count.HP_pc_getcash_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *cash, int *points); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getcash_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_getcash_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &cash, &points); + if( HPMHooks.count.HP_pc_add_charm_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *interval, int *max, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_add_charm_post[hIndex].func; + postHookFunc(sd, &interval, &max, &type); } } - return retVal___; + return; } -int HP_pc_cart_additem(struct map_session_data *sd, struct item *item_data, int amount, e_log_pick_type log_type) { +void HP_pc_del_charm(struct map_session_data *sd, int count, int type) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_cart_additem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type); + if( HPMHooks.count.HP_pc_del_charm_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *count, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_additem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_cart_additem_pre[hIndex].func; - retVal___ = preHookFunc(sd, item_data, &amount, &log_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_del_charm_pre[hIndex].func; + preHookFunc(sd, &count, &type); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.cart_additem(sd, item_data, amount, log_type); + HPMHooks.source.pc.del_charm(sd, count, type); } - if( HPMHooks.count.HP_pc_cart_additem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_additem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_cart_additem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, item_data, &amount, &log_type); + if( HPMHooks.count.HP_pc_del_charm_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *count, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_del_charm_post[hIndex].func; + postHookFunc(sd, &count, &type); } } - return retVal___; + return; } -int HP_pc_cart_delitem(struct map_session_data *sd, int n, int amount, int type, e_log_pick_type log_type) { +void HP_pc_baselevelchanged(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_cart_delitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, int *type, e_log_pick_type *log_type); + if( HPMHooks.count.HP_pc_baselevelchanged_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_delitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_cart_delitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n, &amount, &type, &log_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_baselevelchanged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_baselevelchanged_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.cart_delitem(sd, n, amount, type, log_type); + HPMHooks.source.pc.baselevelchanged(sd); } - if( HPMHooks.count.HP_pc_cart_delitem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *amount, int *type, e_log_pick_type *log_type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_delitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_cart_delitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &n, &amount, &type, &log_type); + if( HPMHooks.count.HP_pc_baselevelchanged_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_baselevelchanged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_baselevelchanged_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -int HP_pc_putitemtocart(struct map_session_data *sd, int idx, int amount) { +int HP_pc_level_penalty_mod(int diff, unsigned char race, unsigned short mode, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_putitemtocart_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount); + if( HPMHooks.count.HP_pc_level_penalty_mod_pre ) { + int (*preHookFunc) (int *diff, unsigned char *race, unsigned short *mode, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_putitemtocart_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_putitemtocart_pre[hIndex].func; - retVal___ = preHookFunc(sd, &idx, &amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_level_penalty_mod_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_level_penalty_mod_pre[hIndex].func; + retVal___ = preHookFunc(&diff, &race, &mode, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48937,26 +55354,26 @@ int HP_pc_putitemtocart(struct map_session_data *sd, int idx, int amount) { } } { - retVal___ = HPMHooks.source.pc.putitemtocart(sd, idx, amount); + retVal___ = HPMHooks.source.pc.level_penalty_mod(diff, race, mode, type); } - if( HPMHooks.count.HP_pc_putitemtocart_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *idx, int *amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_putitemtocart_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_putitemtocart_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &idx, &amount); + if( HPMHooks.count.HP_pc_level_penalty_mod_post ) { + int (*postHookFunc) (int retVal___, int *diff, unsigned char *race, unsigned short *mode, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_level_penalty_mod_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_level_penalty_mod_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &diff, &race, &mode, &type); } } return retVal___; } -int HP_pc_getitemfromcart(struct map_session_data *sd, int idx, int amount) { +int HP_pc_calc_skillpoint(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_getitemfromcart_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount); + if( HPMHooks.count.HP_pc_calc_skillpoint_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getitemfromcart_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_getitemfromcart_pre[hIndex].func; - retVal___ = preHookFunc(sd, &idx, &amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skillpoint_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_calc_skillpoint_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48964,26 +55381,26 @@ int HP_pc_getitemfromcart(struct map_session_data *sd, int idx, int amount) { } } { - retVal___ = HPMHooks.source.pc.getitemfromcart(sd, idx, amount); + retVal___ = HPMHooks.source.pc.calc_skillpoint(sd); } - if( HPMHooks.count.HP_pc_getitemfromcart_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *idx, int *amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getitemfromcart_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_getitemfromcart_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &idx, &amount); + if( HPMHooks.count.HP_pc_calc_skillpoint_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skillpoint_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_calc_skillpoint_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_pc_cartitem_amount(struct map_session_data *sd, int idx, int amount) { +int HP_pc_invincible_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_cartitem_amount_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount); + if( HPMHooks.count.HP_pc_invincible_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cartitem_amount_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_cartitem_amount_pre[hIndex].func; - retVal___ = preHookFunc(sd, &idx, &amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_invincible_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_invincible_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -48991,26 +55408,26 @@ int HP_pc_cartitem_amount(struct map_session_data *sd, int idx, int amount) { } } { - retVal___ = HPMHooks.source.pc.cartitem_amount(sd, idx, amount); + retVal___ = HPMHooks.source.pc.invincible_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_cartitem_amount_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *idx, int *amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cartitem_amount_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_cartitem_amount_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &idx, &amount); + if( HPMHooks.count.HP_pc_invincible_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_invincible_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_invincible_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_pc_takeitem(struct map_session_data *sd, struct flooritem_data *fitem) { +int HP_pc_spiritball_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_takeitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct flooritem_data *fitem); + if( HPMHooks.count.HP_pc_spiritball_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_takeitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_takeitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, fitem); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_spiritball_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_spiritball_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49018,26 +55435,28 @@ int HP_pc_takeitem(struct map_session_data *sd, struct flooritem_data *fitem) { } } { - retVal___ = HPMHooks.source.pc.takeitem(sd, fitem); + retVal___ = HPMHooks.source.pc.spiritball_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_takeitem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct flooritem_data *fitem); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_takeitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_takeitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, fitem); + if( HPMHooks.count.HP_pc_spiritball_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_spiritball_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_spiritball_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_pc_dropitem(struct map_session_data *sd, int n, int amount) { +int HP_pc_check_banding(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_dropitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount); + if( HPMHooks.count.HP_pc_check_banding_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dropitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_dropitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n, &amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_banding_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_pc_check_banding_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49045,26 +55464,30 @@ int HP_pc_dropitem(struct map_session_data *sd, int n, int amount) { } } { - retVal___ = HPMHooks.source.pc.dropitem(sd, n, amount); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.pc.check_banding(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pc_dropitem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dropitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_dropitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &n, &amount); + if( HPMHooks.count.HP_pc_check_banding_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_banding_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_pc_check_banding_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -bool HP_pc_isequipped(struct map_session_data *sd, int nameid) { +int HP_pc_inventory_rental_end(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pc_isequipped_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *nameid); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_inventory_rental_end_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequipped_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_isequipped_pre[hIndex].func; - retVal___ = preHookFunc(sd, &nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_end_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_inventory_rental_end_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49072,53 +55495,52 @@ bool HP_pc_isequipped(struct map_session_data *sd, int nameid) { } } { - retVal___ = HPMHooks.source.pc.isequipped(sd, nameid); + retVal___ = HPMHooks.source.pc.inventory_rental_end(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_isequipped_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequipped_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_isequipped_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &nameid); + if( HPMHooks.count.HP_pc_inventory_rental_end_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_end_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_inventory_rental_end_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -bool HP_pc_can_Adopt(struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd) { +void HP_pc_check_skilltree(struct map_session_data *sd, int skill_id) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pc_can_Adopt_pre ) { - bool (*preHookFunc) (struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd); + if( HPMHooks.count.HP_pc_check_skilltree_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_Adopt_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_can_Adopt_pre[hIndex].func; - retVal___ = preHookFunc(p1_sd, p2_sd, b_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_skilltree_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_check_skilltree_pre[hIndex].func; + preHookFunc(sd, &skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.can_Adopt(p1_sd, p2_sd, b_sd); + HPMHooks.source.pc.check_skilltree(sd, skill_id); } - if( HPMHooks.count.HP_pc_can_Adopt_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_Adopt_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_can_Adopt_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p1_sd, p2_sd, b_sd); + if( HPMHooks.count.HP_pc_check_skilltree_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_skilltree_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_check_skilltree_post[hIndex].func; + postHookFunc(sd, &skill_id); } } - return retVal___; + return; } -bool HP_pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd) { +int HP_pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv, short rate, short flag, short card_id) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pc_adoption_pre ) { - bool (*preHookFunc) (struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_bonus_autospell_pre ) { + int (*preHookFunc) (struct s_autospell *spell, int *max, short *id, short *lv, short *rate, short *flag, short *card_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_adoption_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_adoption_pre[hIndex].func; - retVal___ = preHookFunc(p1_sd, p2_sd, b_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus_autospell_pre[hIndex].func; + retVal___ = preHookFunc(spell, &max, &id, &lv, &rate, &flag, &card_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49126,26 +55548,26 @@ bool HP_pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_ } } { - retVal___ = HPMHooks.source.pc.adoption(p1_sd, p2_sd, b_sd); + retVal___ = HPMHooks.source.pc.bonus_autospell(spell, max, id, lv, rate, flag, card_id); } - if( HPMHooks.count.HP_pc_adoption_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_adoption_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_adoption_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p1_sd, p2_sd, b_sd); + if( HPMHooks.count.HP_pc_bonus_autospell_post ) { + int (*postHookFunc) (int retVal___, struct s_autospell *spell, int *max, short *id, short *lv, short *rate, short *flag, short *card_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus_autospell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, spell, &max, &id, &lv, &rate, &flag, &card_id); } } return retVal___; } -int HP_pc_updateweightstatus(struct map_session_data *sd) { +int HP_pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, short card_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_updateweightstatus_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pc_bonus_autospell_onskill_pre ) { + int (*preHookFunc) (struct s_autospell *spell, int *max, short *src_skill, short *id, short *lv, short *rate, short *card_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_updateweightstatus_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_updateweightstatus_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_onskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus_autospell_onskill_pre[hIndex].func; + retVal___ = preHookFunc(spell, &max, &src_skill, &id, &lv, &rate, &card_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49153,26 +55575,26 @@ int HP_pc_updateweightstatus(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.updateweightstatus(sd); + retVal___ = HPMHooks.source.pc.bonus_autospell_onskill(spell, max, src_skill, id, lv, rate, card_id); } - if( HPMHooks.count.HP_pc_updateweightstatus_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_updateweightstatus_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_updateweightstatus_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_bonus_autospell_onskill_post ) { + int (*postHookFunc) (int retVal___, struct s_autospell *spell, int *max, short *src_skill, short *id, short *lv, short *rate, short *card_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_onskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus_autospell_onskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, spell, &max, &src_skill, &id, &lv, &rate, &card_id); } } return retVal___; } -int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned short pos, bool onskill) { +int HP_pc_bonus_addeff(struct s_addeffect *effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_addautobonus_pre ) { - int (*preHookFunc) (struct s_autobonus *bonus, char *max, const char *bonus_script, short *rate, unsigned int *dur, short *atk_type, const char *o_script, unsigned short *pos, bool *onskill); + if( HPMHooks.count.HP_pc_bonus_addeff_pre ) { + int (*preHookFunc) (struct s_addeffect *effect, int *max, enum sc_type *id, int16 *rate, int16 *arrow_rate, uint8 *flag, uint16 *duration); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_addautobonus_pre[hIndex].func; - retVal___ = preHookFunc(bonus, &max, bonus_script, &rate, &dur, &atk_type, o_script, &pos, &onskill); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus_addeff_pre[hIndex].func; + retVal___ = preHookFunc(effect, &max, &id, &rate, &arrow_rate, &flag, &duration); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49180,26 +55602,26 @@ int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_sc } } { - retVal___ = HPMHooks.source.pc.addautobonus(bonus, max, bonus_script, rate, dur, atk_type, o_script, pos, onskill); + retVal___ = HPMHooks.source.pc.bonus_addeff(effect, max, id, rate, arrow_rate, flag, duration); } - if( HPMHooks.count.HP_pc_addautobonus_post ) { - int (*postHookFunc) (int retVal___, struct s_autobonus *bonus, char *max, const char *bonus_script, short *rate, unsigned int *dur, short *atk_type, const char *o_script, unsigned short *pos, bool *onskill); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_addautobonus_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bonus, &max, bonus_script, &rate, &dur, &atk_type, o_script, &pos, &onskill); + if( HPMHooks.count.HP_pc_bonus_addeff_post ) { + int (*postHookFunc) (int retVal___, struct s_addeffect *effect, int *max, enum sc_type *id, int16 *rate, int16 *arrow_rate, uint8 *flag, uint16 *duration); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus_addeff_post[hIndex].func; + retVal___ = postHookFunc(retVal___, effect, &max, &id, &rate, &arrow_rate, &flag, &duration); } } return retVal___; } -int HP_pc_exeautobonus(struct map_session_data *sd, struct s_autobonus *bonus) { +int HP_pc_bonus_addeff_onskill(struct s_addeffectonskill *effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_exeautobonus_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct s_autobonus *bonus); + if( HPMHooks.count.HP_pc_bonus_addeff_onskill_pre ) { + int (*preHookFunc) (struct s_addeffectonskill *effect, int *max, enum sc_type *id, short *rate, short *skill_id, unsigned char *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_exeautobonus_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_exeautobonus_pre[hIndex].func; - retVal___ = preHookFunc(sd, bonus); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_onskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus_addeff_onskill_pre[hIndex].func; + retVal___ = preHookFunc(effect, &max, &id, &rate, &skill_id, &target); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49207,26 +55629,26 @@ int HP_pc_exeautobonus(struct map_session_data *sd, struct s_autobonus *bonus) { } } { - retVal___ = HPMHooks.source.pc.exeautobonus(sd, bonus); + retVal___ = HPMHooks.source.pc.bonus_addeff_onskill(effect, max, id, rate, skill_id, target); } - if( HPMHooks.count.HP_pc_exeautobonus_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_autobonus *bonus); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_exeautobonus_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_exeautobonus_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, bonus); + if( HPMHooks.count.HP_pc_bonus_addeff_onskill_post ) { + int (*postHookFunc) (int retVal___, struct s_addeffectonskill *effect, int *max, enum sc_type *id, short *rate, short *skill_id, unsigned char *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_onskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus_addeff_onskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, effect, &max, &id, &rate, &skill_id, &target); } } return retVal___; } -int HP_pc_endautobonus(int tid, int64 tick, int id, intptr_t data) { +int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, short group, int race, int rate) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_endautobonus_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_pc_bonus_item_drop_pre ) { + int (*preHookFunc) (struct s_add_drop *drop, const short *max, short *id, short *group, int *race, int *rate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_endautobonus_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_endautobonus_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_item_drop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus_item_drop_pre[hIndex].func; + retVal___ = preHookFunc(drop, &max, &id, &group, &race, &rate); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49234,53 +55656,52 @@ int HP_pc_endautobonus(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.pc.endautobonus(tid, tick, id, data); + retVal___ = HPMHooks.source.pc.bonus_item_drop(drop, max, id, group, race, rate); } - if( HPMHooks.count.HP_pc_endautobonus_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_endautobonus_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_endautobonus_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_pc_bonus_item_drop_post ) { + int (*postHookFunc) (int retVal___, struct s_add_drop *drop, const short *max, short *id, short *group, int *race, int *rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_item_drop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus_item_drop_post[hIndex].func; + retVal___ = postHookFunc(retVal___, drop, &max, &id, &group, &race, &rate); } } return retVal___; } -int HP_pc_delautobonus(struct map_session_data *sd, struct s_autobonus *bonus, char max, bool restore) { +void HP_pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_delautobonus_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct s_autobonus *bonus, char *max, bool *restore); + if( HPMHooks.count.HP_pc_calcexp_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delautobonus_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_delautobonus_pre[hIndex].func; - retVal___ = preHookFunc(sd, bonus, &max, &restore); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_calcexp_pre[hIndex].func; + preHookFunc(sd, base_exp, job_exp, src); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.delautobonus(sd, bonus, max, restore); + HPMHooks.source.pc.calcexp(sd, base_exp, job_exp, src); } - if( HPMHooks.count.HP_pc_delautobonus_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_autobonus *bonus, char *max, bool *restore); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delautobonus_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_delautobonus_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, bonus, &max, &restore); + if( HPMHooks.count.HP_pc_calcexp_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_calcexp_post[hIndex].func; + postHookFunc(sd, base_exp, job_exp, src); } } - return retVal___; + return; } -int HP_pc_bonus(struct map_session_data *sd, int type, int val) { +int HP_pc_respawn_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + if( HPMHooks.count.HP_pc_respawn_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_bonus_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type, &val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_respawn_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49288,26 +55709,28 @@ int HP_pc_bonus(struct map_session_data *sd, int type, int val) { } } { - retVal___ = HPMHooks.source.pc.bonus(sd, type, val); + retVal___ = HPMHooks.source.pc.respawn_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_bonus_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_bonus_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type, &val); + if( HPMHooks.count.HP_pc_respawn_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_respawn_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_pc_bonus2(struct map_session_data *sd, int type, int type2, int val) { +int HP_pc_jobchange_killclone(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus2_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *val); + if( HPMHooks.count.HP_pc_jobchange_killclone_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_bonus2_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type, &type2, &val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_killclone_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_pc_jobchange_killclone_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49315,26 +55738,30 @@ int HP_pc_bonus2(struct map_session_data *sd, int type, int type2, int val) { } } { - retVal___ = HPMHooks.source.pc.bonus2(sd, type, type2, val); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.pc.jobchange_killclone(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pc_bonus2_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *type2, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_bonus2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type, &type2, &val); + if( HPMHooks.count.HP_pc_jobchange_killclone_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_killclone_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_pc_jobchange_killclone_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pc_bonus3(struct map_session_data *sd, int type, int type2, int type3, int val) { +int HP_pc_getstat(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus3_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *val); + if( HPMHooks.count.HP_pc_getstat_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus3_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_bonus3_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type, &type2, &type3, &val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getstat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_getstat_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49342,26 +55769,26 @@ int HP_pc_bonus3(struct map_session_data *sd, int type, int type2, int type3, in } } { - retVal___ = HPMHooks.source.pc.bonus3(sd, type, type2, type3, val); + retVal___ = HPMHooks.source.pc.getstat(sd, type); } - if( HPMHooks.count.HP_pc_bonus3_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *type2, int *type3, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus3_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_bonus3_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type, &type2, &type3, &val); + if( HPMHooks.count.HP_pc_getstat_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getstat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_getstat_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); } } return retVal___; } -int HP_pc_bonus4(struct map_session_data *sd, int type, int type2, int type3, int type4, int val) { +int HP_pc_setstat(struct map_session_data *sd, int type, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus4_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *val); + if( HPMHooks.count.HP_pc_setstat_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus4_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_bonus4_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type, &type2, &type3, &type4, &val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setstat_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &val); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49369,26 +55796,26 @@ int HP_pc_bonus4(struct map_session_data *sd, int type, int type2, int type3, in } } { - retVal___ = HPMHooks.source.pc.bonus4(sd, type, type2, type3, type4, val); + retVal___ = HPMHooks.source.pc.setstat(sd, type, val); } - if( HPMHooks.count.HP_pc_bonus4_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus4_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_bonus4_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type, &type2, &type3, &type4, &val); + if( HPMHooks.count.HP_pc_setstat_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setstat_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &val); } } return retVal___; } -int HP_pc_bonus5(struct map_session_data *sd, int type, int type2, int type3, int type4, int type5, int val) { +int HP_pc_eventtimer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus5_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *type5, int *val); + if( HPMHooks.count.HP_pc_eventtimer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus5_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_bonus5_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type, &type2, &type3, &type4, &type5, &val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_eventtimer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_eventtimer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49396,26 +55823,28 @@ int HP_pc_bonus5(struct map_session_data *sd, int type, int type2, int type3, in } } { - retVal___ = HPMHooks.source.pc.bonus5(sd, type, type2, type3, type4, type5, val); + retVal___ = HPMHooks.source.pc.eventtimer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_bonus5_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *type5, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus5_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_bonus5_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type, &type2, &type3, &type4, &type5, &val); + if( HPMHooks.count.HP_pc_eventtimer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_eventtimer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_eventtimer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_pc_skill(struct map_session_data *sd, int id, int level, int flag) { +int HP_pc_daynight_timer_sub(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_skill_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *id, int *level, int *flag); + if( HPMHooks.count.HP_pc_daynight_timer_sub_pre ) { + int (*preHookFunc) (struct map_session_data *sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skill_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_skill_pre[hIndex].func; - retVal___ = preHookFunc(sd, &id, &level, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_daynight_timer_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_pc_daynight_timer_sub_pre[hIndex].func; + retVal___ = preHookFunc(sd, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49423,26 +55852,30 @@ int HP_pc_skill(struct map_session_data *sd, int id, int level, int flag) { } } { - retVal___ = HPMHooks.source.pc.skill(sd, id, level, flag); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.pc.daynight_timer_sub(sd, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pc_skill_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *id, int *level, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skill_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_skill_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &id, &level, &flag); + if( HPMHooks.count.HP_pc_daynight_timer_sub_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_daynight_timer_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_pc_daynight_timer_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pc_insert_card(struct map_session_data *sd, int idx_card, int idx_equip) { +int HP_pc_charm_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_insert_card_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *idx_card, int *idx_equip); + if( HPMHooks.count.HP_pc_charm_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_insert_card_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_insert_card_pre[hIndex].func; - retVal___ = preHookFunc(sd, &idx_card, &idx_equip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_charm_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_charm_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49450,26 +55883,26 @@ int HP_pc_insert_card(struct map_session_data *sd, int idx_card, int idx_equip) } } { - retVal___ = HPMHooks.source.pc.insert_card(sd, idx_card, idx_equip); + retVal___ = HPMHooks.source.pc.charm_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_insert_card_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *idx_card, int *idx_equip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_insert_card_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_insert_card_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &idx_card, &idx_equip); + if( HPMHooks.count.HP_pc_charm_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_charm_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_charm_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -bool HP_pc_can_insert_card(struct map_session_data *sd, int idx_card) { +bool HP_pc_readdb_levelpenalty(char *fields[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_can_insert_card_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *idx_card); + if( HPMHooks.count.HP_pc_readdb_levelpenalty_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_can_insert_card_pre[hIndex].func; - retVal___ = preHookFunc(sd, &idx_card); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_levelpenalty_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_readdb_levelpenalty_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49477,26 +55910,26 @@ bool HP_pc_can_insert_card(struct map_session_data *sd, int idx_card) { } } { - retVal___ = HPMHooks.source.pc.can_insert_card(sd, idx_card); + retVal___ = HPMHooks.source.pc.readdb_levelpenalty(fields, columns, current); } - if( HPMHooks.count.HP_pc_can_insert_card_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *idx_card); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_can_insert_card_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &idx_card); + if( HPMHooks.count.HP_pc_readdb_levelpenalty_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_levelpenalty_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_readdb_levelpenalty_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); } } return retVal___; } -bool HP_pc_can_insert_card_into(struct map_session_data *sd, int idx_card, int idx_equip) { +int HP_pc_autosave(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pc_can_insert_card_into_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *idx_card, int *idx_equip); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_autosave_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_into_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_can_insert_card_into_pre[hIndex].func; - retVal___ = preHookFunc(sd, &idx_card, &idx_equip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autosave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_autosave_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49504,26 +55937,26 @@ bool HP_pc_can_insert_card_into(struct map_session_data *sd, int idx_card, int i } } { - retVal___ = HPMHooks.source.pc.can_insert_card_into(sd, idx_card, idx_equip); + retVal___ = HPMHooks.source.pc.autosave(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_can_insert_card_into_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *idx_card, int *idx_equip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_into_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_can_insert_card_into_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &idx_card, &idx_equip); + if( HPMHooks.count.HP_pc_autosave_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autosave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_autosave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_pc_steal_item(struct map_session_data *sd, struct block_list *bl, uint16 skill_lv) { +int HP_pc_follow_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_steal_item_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, uint16 *skill_lv); + if( HPMHooks.count.HP_pc_follow_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_item_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_steal_item_pre[hIndex].func; - retVal___ = preHookFunc(sd, bl, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_follow_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49531,53 +55964,52 @@ int HP_pc_steal_item(struct map_session_data *sd, struct block_list *bl, uint16 } } { - retVal___ = HPMHooks.source.pc.steal_item(sd, bl, skill_lv); + retVal___ = HPMHooks.source.pc.follow_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_steal_item_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_item_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_steal_item_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, bl, &skill_lv); + if( HPMHooks.count.HP_pc_follow_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_follow_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_pc_steal_coin(struct map_session_data *sd, struct block_list *bl) { +void HP_pc_read_skill_tree(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_steal_coin_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl); + if( HPMHooks.count.HP_pc_read_skill_tree_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_coin_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_steal_coin_pre[hIndex].func; - retVal___ = preHookFunc(sd, bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_tree_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_read_skill_tree_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.steal_coin(sd, bl); + HPMHooks.source.pc.read_skill_tree(); } - if( HPMHooks.count.HP_pc_steal_coin_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_coin_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_steal_coin_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, bl); + if( HPMHooks.count.HP_pc_read_skill_tree_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_tree_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_read_skill_tree_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_pc_modifybuyvalue(struct map_session_data *sd, int orig_value) { +int HP_pc_isUseitem(struct map_session_data *sd, int n) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_modifybuyvalue_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *orig_value); + if( HPMHooks.count.HP_pc_isUseitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifybuyvalue_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_modifybuyvalue_pre[hIndex].func; - retVal___ = preHookFunc(sd, &orig_value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isUseitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_isUseitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49585,26 +56017,28 @@ int HP_pc_modifybuyvalue(struct map_session_data *sd, int orig_value) { } } { - retVal___ = HPMHooks.source.pc.modifybuyvalue(sd, orig_value); + retVal___ = HPMHooks.source.pc.isUseitem(sd, n); } - if( HPMHooks.count.HP_pc_modifybuyvalue_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *orig_value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifybuyvalue_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_modifybuyvalue_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &orig_value); + if( HPMHooks.count.HP_pc_isUseitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isUseitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_isUseitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n); } } return retVal___; } -int HP_pc_modifysellvalue(struct map_session_data *sd, int orig_value) { +int HP_pc_show_steal(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_modifysellvalue_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *orig_value); + if( HPMHooks.count.HP_pc_show_steal_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifysellvalue_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_modifysellvalue_pre[hIndex].func; - retVal___ = preHookFunc(sd, &orig_value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_show_steal_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_pc_show_steal_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49612,26 +56046,30 @@ int HP_pc_modifysellvalue(struct map_session_data *sd, int orig_value) { } } { - retVal___ = HPMHooks.source.pc.modifysellvalue(sd, orig_value); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.pc.show_steal(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pc_modifysellvalue_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *orig_value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifysellvalue_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_modifysellvalue_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &orig_value); + if( HPMHooks.count.HP_pc_show_steal_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_show_steal_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_pc_show_steal_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pc_follow(struct map_session_data *sd, int target_id) { +int HP_pc_checkcombo(struct map_session_data *sd, struct item_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_follow_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *target_id); + if( HPMHooks.count.HP_pc_checkcombo_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct item_data *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_follow_pre[hIndex].func; - retVal___ = preHookFunc(sd, &target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkcombo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkcombo_pre[hIndex].func; + retVal___ = preHookFunc(sd, data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49639,25 +56077,25 @@ int HP_pc_follow(struct map_session_data *sd, int target_id) { } } { - retVal___ = HPMHooks.source.pc.follow(sd, target_id); + retVal___ = HPMHooks.source.pc.checkcombo(sd, data); } - if( HPMHooks.count.HP_pc_follow_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *target_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_follow_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &target_id); + if( HPMHooks.count.HP_pc_checkcombo_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkcombo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkcombo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, data); } } return retVal___; } -int HP_pc_stop_following(struct map_session_data *sd) { +int HP_pc_calcweapontype(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_stop_following_pre ) { + if( HPMHooks.count.HP_pc_calcweapontype_pre ) { int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_stop_following_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_stop_following_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcweapontype_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_calcweapontype_pre[hIndex].func; retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { @@ -49666,26 +56104,26 @@ int HP_pc_stop_following(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.stop_following(sd); + retVal___ = HPMHooks.source.pc.calcweapontype(sd); } - if( HPMHooks.count.HP_pc_stop_following_post ) { + if( HPMHooks.count.HP_pc_calcweapontype_post ) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_stop_following_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_stop_following_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcweapontype_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_calcweapontype_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -unsigned int HP_pc_maxbaselv(struct map_session_data *sd) { +int HP_pc_removecombo(struct map_session_data *sd, struct item_data *data) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_pc_maxbaselv_pre ) { - unsigned int (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_removecombo_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct item_data *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxbaselv_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_maxbaselv_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_removecombo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_removecombo_pre[hIndex].func; + retVal___ = preHookFunc(sd, data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49693,134 +56131,156 @@ unsigned int HP_pc_maxbaselv(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.maxbaselv(sd); + retVal___ = HPMHooks.source.pc.removecombo(sd, data); } - if( HPMHooks.count.HP_pc_maxbaselv_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxbaselv_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_maxbaselv_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_removecombo_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_removecombo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_removecombo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, data); } } return retVal___; } -unsigned int HP_pc_maxjoblv(struct map_session_data *sd) { +void HP_pc_bank_deposit(struct map_session_data *sd, int money) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_pc_maxjoblv_pre ) { - unsigned int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pc_bank_deposit_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *money); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxjoblv_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_maxjoblv_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_deposit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bank_deposit_pre[hIndex].func; + preHookFunc(sd, &money); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.maxjoblv(sd); + HPMHooks.source.pc.bank_deposit(sd, money); } - if( HPMHooks.count.HP_pc_maxjoblv_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxjoblv_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_maxjoblv_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_bank_deposit_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *money); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_deposit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bank_deposit_post[hIndex].func; + postHookFunc(sd, &money); } } - return retVal___; + return; } -int HP_pc_checkbaselevelup(struct map_session_data *sd) { +void HP_pc_bank_withdraw(struct map_session_data *sd, int money) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkbaselevelup_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pc_bank_withdraw_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *money); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_checkbaselevelup_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_withdraw_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bank_withdraw_pre[hIndex].func; + preHookFunc(sd, &money); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.checkbaselevelup(sd); + HPMHooks.source.pc.bank_withdraw(sd, money); } - if( HPMHooks.count.HP_pc_checkbaselevelup_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_checkbaselevelup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_bank_withdraw_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *money); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_withdraw_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bank_withdraw_post[hIndex].func; + postHookFunc(sd, &money); } } - return retVal___; + return; } -int HP_pc_checkjoblevelup(struct map_session_data *sd) { +void HP_pc_rental_expire(struct map_session_data *sd, int i) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkjoblevelup_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pc_rental_expire_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *i); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkjoblevelup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_checkjoblevelup_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_rental_expire_pre[hIndex].func; + preHookFunc(sd, &i); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.checkjoblevelup(sd); + HPMHooks.source.pc.rental_expire(sd, i); } - if( HPMHooks.count.HP_pc_checkjoblevelup_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkjoblevelup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_checkjoblevelup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_rental_expire_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *i); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_rental_expire_post[hIndex].func; + postHookFunc(sd, &i); } } - return retVal___; + return; } -bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest) { +void HP_pc_scdata_received(struct map_session_data *sd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pc_gainexp_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest); + if( HPMHooks.count.HP_pc_scdata_received_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_gainexp_pre[hIndex].func; - retVal___ = preHookFunc(sd, src, &base_exp, &job_exp, &is_quest); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_scdata_received_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.gainexp(sd, src, base_exp, job_exp, is_quest); + HPMHooks.source.pc.scdata_received(sd); } - if( HPMHooks.count.HP_pc_gainexp_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_gainexp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, src, &base_exp, &job_exp, &is_quest); + if( HPMHooks.count.HP_pc_scdata_received_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_scdata_received_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -unsigned int HP_pc_nextbaseexp(struct map_session_data *sd) { +void HP_pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type type) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_pc_nextbaseexp_pre ) { - unsigned int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pc_bound_clear_pre ) { + void (*preHookFunc) (struct map_session_data *sd, enum e_item_bound_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_nextbaseexp_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bound_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bound_clear_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.bound_clear(sd, type); + } + if( HPMHooks.count.HP_pc_bound_clear_post ) { + void (*postHookFunc) (struct map_session_data *sd, enum e_item_bound_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bound_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bound_clear_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +int HP_pc_expiration_timer(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_pc_expiration_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expiration_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_expiration_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49828,26 +56288,26 @@ unsigned int HP_pc_nextbaseexp(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.nextbaseexp(sd); + retVal___ = HPMHooks.source.pc.expiration_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_nextbaseexp_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_nextbaseexp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_expiration_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expiration_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_expiration_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -unsigned int HP_pc_thisbaseexp(struct map_session_data *sd) { +int HP_pc_global_expiration_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_pc_thisbaseexp_pre ) { - unsigned int (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_pc_global_expiration_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_thisbaseexp_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_global_expiration_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_global_expiration_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49855,53 +56315,52 @@ unsigned int HP_pc_thisbaseexp(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.thisbaseexp(sd); + retVal___ = HPMHooks.source.pc.global_expiration_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_thisbaseexp_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_thisbaseexp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_global_expiration_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_global_expiration_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_global_expiration_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -unsigned int HP_pc_nextjobexp(struct map_session_data *sd) { +void HP_pc_expire_check(struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_pc_nextjobexp_pre ) { - unsigned int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pc_expire_check_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_nextjobexp_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expire_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_expire_check_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.nextjobexp(sd); + HPMHooks.source.pc.expire_check(sd); } - if( HPMHooks.count.HP_pc_nextjobexp_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_nextjobexp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_expire_check_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expire_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_expire_check_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -unsigned int HP_pc_thisjobexp(struct map_session_data *sd) { +bool HP_pc_db_checkid(unsigned int class_) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_pc_thisjobexp_pre ) { - unsigned int (*preHookFunc) (struct map_session_data *sd); + bool retVal___ = false; + if( HPMHooks.count.HP_pc_db_checkid_pre ) { + bool (*preHookFunc) (unsigned int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_thisjobexp_pre[hIndex].func; - retVal___ = preHookFunc(sd); + 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_); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -49909,188 +56368,182 @@ unsigned int HP_pc_thisjobexp(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.thisjobexp(sd); + retVal___ = HPMHooks.source.pc.db_checkid(class_); } - if( HPMHooks.count.HP_pc_thisjobexp_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_thisjobexp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_db_checkid_post ) { + bool (*postHookFunc) (bool retVal___, unsigned 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_); } } return retVal___; } -int HP_pc_gets_status_point(int level) { +void HP_pc_validate_levels(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_gets_status_point_pre ) { - int (*preHookFunc) (int *level); + if( HPMHooks.count.HP_pc_validate_levels_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gets_status_point_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_gets_status_point_pre[hIndex].func; - retVal___ = preHookFunc(&level); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_validate_levels_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_validate_levels_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.gets_status_point(level); + HPMHooks.source.pc.validate_levels(); } - if( HPMHooks.count.HP_pc_gets_status_point_post ) { - int (*postHookFunc) (int retVal___, int *level); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gets_status_point_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_gets_status_point_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &level); + if( HPMHooks.count.HP_pc_validate_levels_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_validate_levels_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_validate_levels_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_pc_need_status_point(struct map_session_data *sd, int type, int val) { +void HP_pc_autotrade_load(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_need_status_point_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + if( HPMHooks.count.HP_pc_autotrade_load_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_need_status_point_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_need_status_point_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type, &val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_autotrade_load_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.need_status_point(sd, type, val); + HPMHooks.source.pc.autotrade_load(); } - if( HPMHooks.count.HP_pc_need_status_point_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_need_status_point_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_need_status_point_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type, &val); + if( HPMHooks.count.HP_pc_autotrade_load_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_autotrade_load_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_pc_maxparameterincrease(struct map_session_data *sd, int type) { +void HP_pc_autotrade_update(struct map_session_data *sd, enum e_pc_autotrade_update_action action) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_maxparameterincrease_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + if( HPMHooks.count.HP_pc_autotrade_update_pre ) { + void (*preHookFunc) (struct map_session_data *sd, enum e_pc_autotrade_update_action *action); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxparameterincrease_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_maxparameterincrease_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_update_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_autotrade_update_pre[hIndex].func; + preHookFunc(sd, &action); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.maxparameterincrease(sd, type); + HPMHooks.source.pc.autotrade_update(sd, action); } - if( HPMHooks.count.HP_pc_maxparameterincrease_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxparameterincrease_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_maxparameterincrease_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type); + if( HPMHooks.count.HP_pc_autotrade_update_post ) { + void (*postHookFunc) (struct map_session_data *sd, enum e_pc_autotrade_update_action *action); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_update_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_autotrade_update_post[hIndex].func; + postHookFunc(sd, &action); } } - return retVal___; + return; } -bool HP_pc_statusup(struct map_session_data *sd, int type, int increase) { +void HP_pc_autotrade_start(struct map_session_data *sd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pc_statusup_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *type, int *increase); + if( HPMHooks.count.HP_pc_autotrade_start_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_statusup_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type, &increase); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_start_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_autotrade_start_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.statusup(sd, type, increase); + HPMHooks.source.pc.autotrade_start(sd); } - if( HPMHooks.count.HP_pc_statusup_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *type, int *increase); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_statusup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type, &increase); + if( HPMHooks.count.HP_pc_autotrade_start_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_start_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_autotrade_start_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -int HP_pc_statusup2(struct map_session_data *sd, int type, int val) { +void HP_pc_autotrade_prepare(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_statusup2_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + if( HPMHooks.count.HP_pc_autotrade_prepare_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_statusup2_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type, &val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_prepare_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_autotrade_prepare_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.statusup2(sd, type, val); + HPMHooks.source.pc.autotrade_prepare(sd); } - if( HPMHooks.count.HP_pc_statusup2_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_statusup2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type, &val); + if( HPMHooks.count.HP_pc_autotrade_prepare_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_prepare_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_autotrade_prepare_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -int HP_pc_skillup(struct map_session_data *sd, uint16 skill_id) { +void HP_pc_autotrade_populate(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_skillup_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + if( HPMHooks.count.HP_pc_autotrade_populate_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_skillup_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_populate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_autotrade_populate_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.skillup(sd, skill_id); + HPMHooks.source.pc.autotrade_populate(sd); } - if( HPMHooks.count.HP_pc_skillup_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_skillup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_id); + if( HPMHooks.count.HP_pc_autotrade_populate_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_populate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_autotrade_populate_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -int HP_pc_allskillup(struct map_session_data *sd) { +int HP_pc_check_job_name(const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_allskillup_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pc_check_job_name_pre ) { + int (*preHookFunc) (const char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_allskillup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_allskillup_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_job_name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_check_job_name_pre[hIndex].func; + retVal___ = preHookFunc(name); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50098,26 +56551,27 @@ int HP_pc_allskillup(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.allskillup(sd); + retVal___ = HPMHooks.source.pc.check_job_name(name); } - if( HPMHooks.count.HP_pc_allskillup_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_allskillup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_allskillup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pc_check_job_name_post ) { + int (*postHookFunc) (int retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_job_name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_check_job_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); } } return retVal___; } -int HP_pc_resetlvl(struct map_session_data *sd, int type) { +/* pet */ +int HP_pet_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_resetlvl_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + if( HPMHooks.count.HP_pet_init_pre ) { + int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetlvl_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_resetlvl_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_init_pre[hIndex].func; + retVal___ = preHookFunc(&minimal); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50125,26 +56579,26 @@ int HP_pc_resetlvl(struct map_session_data *sd, int type) { } } { - retVal___ = HPMHooks.source.pc.resetlvl(sd, type); + retVal___ = HPMHooks.source.pet.init(minimal); } - if( HPMHooks.count.HP_pc_resetlvl_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetlvl_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_resetlvl_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type); + if( HPMHooks.count.HP_pet_init_post ) { + int (*postHookFunc) (int retVal___, bool *minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &minimal); } } return retVal___; } -int HP_pc_resetstate(struct map_session_data *sd) { +int HP_pet_final(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_resetstate_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pet_final_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetstate_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_resetstate_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_final_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50152,26 +56606,26 @@ int HP_pc_resetstate(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.resetstate(sd); + retVal___ = HPMHooks.source.pet.final(); } - if( HPMHooks.count.HP_pc_resetstate_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetstate_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_resetstate_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pet_final_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_pc_resetskill(struct map_session_data *sd, int flag) { +int HP_pet_hungry_val(struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_resetskill_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *flag); + if( HPMHooks.count.HP_pet_hungry_val_pre ) { + int (*preHookFunc) (struct pet_data *pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_resetskill_pre[hIndex].func; - retVal___ = preHookFunc(sd, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_val_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_hungry_val_pre[hIndex].func; + retVal___ = preHookFunc(pd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50179,53 +56633,52 @@ int HP_pc_resetskill(struct map_session_data *sd, int flag) { } } { - retVal___ = HPMHooks.source.pc.resetskill(sd, flag); + retVal___ = HPMHooks.source.pet.hungry_val(pd); } - if( HPMHooks.count.HP_pc_resetskill_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_resetskill_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &flag); + if( HPMHooks.count.HP_pet_hungry_val_post ) { + int (*postHookFunc) (int retVal___, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_val_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_hungry_val_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pd); } } return retVal___; } -int HP_pc_resetfeel(struct map_session_data *sd) { +void HP_pet_set_intimate(struct pet_data *pd, int value) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_resetfeel_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pet_set_intimate_pre ) { + void (*preHookFunc) (struct pet_data *pd, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetfeel_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_resetfeel_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_set_intimate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_set_intimate_pre[hIndex].func; + preHookFunc(pd, &value); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.resetfeel(sd); + HPMHooks.source.pet.set_intimate(pd, value); } - if( HPMHooks.count.HP_pc_resetfeel_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetfeel_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_resetfeel_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pet_set_intimate_post ) { + void (*postHookFunc) (struct pet_data *pd, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_set_intimate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_set_intimate_post[hIndex].func; + postHookFunc(pd, &value); } } - return retVal___; + return; } -int HP_pc_resethate(struct map_session_data *sd) { +int HP_pet_create_egg(struct map_session_data *sd, int item_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_resethate_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pet_create_egg_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *item_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resethate_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_resethate_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_create_egg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_create_egg_pre[hIndex].func; + retVal___ = preHookFunc(sd, &item_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50233,26 +56686,26 @@ int HP_pc_resethate(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.resethate(sd); + retVal___ = HPMHooks.source.pet.create_egg(sd, item_id); } - if( HPMHooks.count.HP_pc_resethate_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resethate_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_resethate_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pet_create_egg_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *item_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_create_egg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_create_egg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &item_id); } } return retVal___; } -int HP_pc_equipitem(struct map_session_data *sd, int n, int req_pos) { +int HP_pet_unlocktarget(struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_equipitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n, int *req_pos); + if( HPMHooks.count.HP_pet_unlocktarget_pre ) { + int (*preHookFunc) (struct pet_data *pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_equipitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n, &req_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unlocktarget_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_unlocktarget_pre[hIndex].func; + retVal___ = preHookFunc(pd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50260,52 +56713,53 @@ int HP_pc_equipitem(struct map_session_data *sd, int n, int req_pos) { } } { - retVal___ = HPMHooks.source.pc.equipitem(sd, n, req_pos); + retVal___ = HPMHooks.source.pet.unlocktarget(pd); } - if( HPMHooks.count.HP_pc_equipitem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *req_pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_equipitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &n, &req_pos); + if( HPMHooks.count.HP_pet_unlocktarget_post ) { + int (*postHookFunc) (int retVal___, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unlocktarget_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_unlocktarget_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pd); } } return retVal___; } -void HP_pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int n, int pos) { +int HP_pet_attackskill(struct pet_data *pd, int target_id) { int hIndex = 0; - if( HPMHooks.count.HP_pc_equipitem_pos_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct item_data *id, int *n, int *pos); + int retVal___ = 0; + if( HPMHooks.count.HP_pet_attackskill_pre ) { + int (*preHookFunc) (struct pet_data *pd, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pos_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_equipitem_pos_pre[hIndex].func; - preHookFunc(sd, id, &n, &pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_attackskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_attackskill_pre[hIndex].func; + retVal___ = preHookFunc(pd, &target_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.equipitem_pos(sd, id, n, pos); + retVal___ = HPMHooks.source.pet.attackskill(pd, target_id); } - if( HPMHooks.count.HP_pc_equipitem_pos_post ) { - void (*postHookFunc) (struct map_session_data *sd, struct item_data *id, int *n, int *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pos_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_equipitem_pos_post[hIndex].func; - postHookFunc(sd, id, &n, &pos); + if( HPMHooks.count.HP_pet_attackskill_post ) { + int (*postHookFunc) (int retVal___, struct pet_data *pd, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_attackskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_attackskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pd, &target_id); } } - return; + return retVal___; } -int HP_pc_unequipitem(struct map_session_data *sd, int n, int flag) { +int HP_pet_target_check(struct map_session_data *sd, struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_unequipitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n, int *flag); + if( HPMHooks.count.HP_pet_target_check_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_unequipitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_target_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_target_check_pre[hIndex].func; + retVal___ = preHookFunc(sd, bl, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50313,52 +56767,53 @@ int HP_pc_unequipitem(struct map_session_data *sd, int n, int flag) { } } { - retVal___ = HPMHooks.source.pc.unequipitem(sd, n, flag); + retVal___ = HPMHooks.source.pet.target_check(sd, bl, type); } - if( HPMHooks.count.HP_pc_unequipitem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_unequipitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &n, &flag); + if( HPMHooks.count.HP_pet_target_check_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_target_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_target_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, bl, &type); } } return retVal___; } -void HP_pc_unequipitem_pos(struct map_session_data *sd, int n, int pos) { +int HP_pet_sc_check(struct map_session_data *sd, int type) { int hIndex = 0; - if( HPMHooks.count.HP_pc_unequipitem_pos_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *n, int *pos); + int retVal___ = 0; + if( HPMHooks.count.HP_pet_sc_check_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pos_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_unequipitem_pos_pre[hIndex].func; - preHookFunc(sd, &n, &pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_sc_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_sc_check_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.unequipitem_pos(sd, n, pos); + retVal___ = HPMHooks.source.pet.sc_check(sd, type); } - if( HPMHooks.count.HP_pc_unequipitem_pos_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *n, int *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pos_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_unequipitem_pos_post[hIndex].func; - postHookFunc(sd, &n, &pos); + if( HPMHooks.count.HP_pet_sc_check_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_sc_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_sc_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); } } - return; + return retVal___; } -int HP_pc_checkitem(struct map_session_data *sd) { +int HP_pet_hungry(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pet_hungry_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_checkitem_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_hungry_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50366,26 +56821,26 @@ int HP_pc_checkitem(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.checkitem(sd); + retVal___ = HPMHooks.source.pet.hungry(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_checkitem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_checkitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pet_hungry_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_hungry_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_pc_useitem(struct map_session_data *sd, int n) { +int HP_pet_search_petDB_index(int key, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_useitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n); + if( HPMHooks.count.HP_pet_search_petDB_index_pre ) { + int (*preHookFunc) (int *key, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_useitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_useitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_search_petDB_index_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_search_petDB_index_pre[hIndex].func; + retVal___ = preHookFunc(&key, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50393,26 +56848,26 @@ int HP_pc_useitem(struct map_session_data *sd, int n) { } } { - retVal___ = HPMHooks.source.pc.useitem(sd, n); + retVal___ = HPMHooks.source.pet.search_petDB_index(key, type); } - if( HPMHooks.count.HP_pc_useitem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_useitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_useitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &n); + if( HPMHooks.count.HP_pet_search_petDB_index_post ) { + int (*postHookFunc) (int retVal___, int *key, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_search_petDB_index_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_search_petDB_index_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, &type); } } return retVal___; } -int HP_pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) { +int HP_pet_hungry_timer_delete(struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_skillatk_bonus_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + if( HPMHooks.count.HP_pet_hungry_timer_delete_pre ) { + int (*preHookFunc) (struct pet_data *pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillatk_bonus_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_skillatk_bonus_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_timer_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_hungry_timer_delete_pre[hIndex].func; + retVal___ = preHookFunc(pd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50420,26 +56875,26 @@ int HP_pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) { } } { - retVal___ = HPMHooks.source.pc.skillatk_bonus(sd, skill_id); + retVal___ = HPMHooks.source.pet.hungry_timer_delete(pd); } - if( HPMHooks.count.HP_pc_skillatk_bonus_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillatk_bonus_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_skillatk_bonus_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_id); + if( HPMHooks.count.HP_pet_hungry_timer_delete_post ) { + int (*postHookFunc) (int retVal___, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_timer_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_hungry_timer_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pd); } } return retVal___; } -int HP_pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) { +int HP_pet_performance(struct map_session_data *sd, struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_skillheal_bonus_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + if( HPMHooks.count.HP_pet_performance_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal_bonus_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_skillheal_bonus_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_performance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_performance_pre[hIndex].func; + retVal___ = preHookFunc(sd, pd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50447,26 +56902,26 @@ int HP_pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) { } } { - retVal___ = HPMHooks.source.pc.skillheal_bonus(sd, skill_id); + retVal___ = HPMHooks.source.pet.performance(sd, pd); } - if( HPMHooks.count.HP_pc_skillheal_bonus_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal_bonus_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_skillheal_bonus_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_id); + if( HPMHooks.count.HP_pet_performance_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_performance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_performance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, pd); } } return retVal___; } -int HP_pc_skillheal2_bonus(struct map_session_data *sd, uint16 skill_id) { +int HP_pet_return_egg(struct map_session_data *sd, struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_skillheal2_bonus_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + if( HPMHooks.count.HP_pet_return_egg_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal2_bonus_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_skillheal2_bonus_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_return_egg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_return_egg_pre[hIndex].func; + retVal___ = preHookFunc(sd, pd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50474,52 +56929,53 @@ int HP_pc_skillheal2_bonus(struct map_session_data *sd, uint16 skill_id) { } } { - retVal___ = HPMHooks.source.pc.skillheal2_bonus(sd, skill_id); + retVal___ = HPMHooks.source.pet.return_egg(sd, pd); } - if( HPMHooks.count.HP_pc_skillheal2_bonus_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal2_bonus_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_skillheal2_bonus_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_id); + if( HPMHooks.count.HP_pet_return_egg_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_return_egg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_return_egg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, pd); } } return retVal___; } -void HP_pc_damage(struct map_session_data *sd, struct block_list *src, unsigned int hp, unsigned int sp) { +int HP_pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) { int hIndex = 0; - if( HPMHooks.count.HP_pc_damage_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct block_list *src, unsigned int *hp, unsigned int *sp); + int retVal___ = 0; + if( HPMHooks.count.HP_pet_data_init_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct s_pet *petinfo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_damage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_damage_pre[hIndex].func; - preHookFunc(sd, src, &hp, &sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_data_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_data_init_pre[hIndex].func; + retVal___ = preHookFunc(sd, petinfo); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.damage(sd, src, hp, sp); + retVal___ = HPMHooks.source.pet.data_init(sd, petinfo); } - if( HPMHooks.count.HP_pc_damage_post ) { - void (*postHookFunc) (struct map_session_data *sd, struct block_list *src, unsigned int *hp, unsigned int *sp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_damage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_damage_post[hIndex].func; - postHookFunc(sd, src, &hp, &sp); + if( HPMHooks.count.HP_pet_data_init_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_pet *petinfo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_data_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_data_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, petinfo); } } - return; + return retVal___; } -int HP_pc_dead(struct map_session_data *sd, struct block_list *src) { +int HP_pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_dead_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct block_list *src); + if( HPMHooks.count.HP_pet_birth_process_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct s_pet *petinfo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dead_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_dead_pre[hIndex].func; - retVal___ = preHookFunc(sd, src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_birth_process_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_birth_process_pre[hIndex].func; + retVal___ = preHookFunc(sd, petinfo); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50527,78 +56983,80 @@ int HP_pc_dead(struct map_session_data *sd, struct block_list *src) { } } { - retVal___ = HPMHooks.source.pc.dead(sd, src); + retVal___ = HPMHooks.source.pet.birth_process(sd, petinfo); } - if( HPMHooks.count.HP_pc_dead_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dead_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_dead_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, src); + if( HPMHooks.count.HP_pet_birth_process_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_pet *petinfo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_birth_process_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_birth_process_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, petinfo); } } return retVal___; } -void HP_pc_revive(struct map_session_data *sd, unsigned int hp, unsigned int sp) { +int HP_pet_recv_petdata(int account_id, struct s_pet *p, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_pc_revive_pre ) { - void (*preHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp); + int retVal___ = 0; + if( HPMHooks.count.HP_pet_recv_petdata_pre ) { + int (*preHookFunc) (int *account_id, struct s_pet *p, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_revive_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_revive_pre[hIndex].func; - preHookFunc(sd, &hp, &sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recv_petdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_recv_petdata_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, p, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.revive(sd, hp, sp); + retVal___ = HPMHooks.source.pet.recv_petdata(account_id, p, flag); } - if( HPMHooks.count.HP_pc_revive_post ) { - void (*postHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_revive_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_revive_post[hIndex].func; - postHookFunc(sd, &hp, &sp); + if( HPMHooks.count.HP_pet_recv_petdata_post ) { + int (*postHookFunc) (int retVal___, int *account_id, struct s_pet *p, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recv_petdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_recv_petdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, p, &flag); } } - return; + return retVal___; } -void HP_pc_heal(struct map_session_data *sd, unsigned int hp, unsigned int sp, int type) { +int HP_pet_select_egg(struct map_session_data *sd, short egg_index) { int hIndex = 0; - if( HPMHooks.count.HP_pc_heal_pre ) { - void (*preHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp, int *type); + int retVal___ = 0; + if( HPMHooks.count.HP_pet_select_egg_pre ) { + int (*preHookFunc) (struct map_session_data *sd, short *egg_index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_heal_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_heal_pre[hIndex].func; - preHookFunc(sd, &hp, &sp, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_select_egg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_select_egg_pre[hIndex].func; + retVal___ = preHookFunc(sd, &egg_index); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.heal(sd, hp, sp, type); + retVal___ = HPMHooks.source.pet.select_egg(sd, egg_index); } - if( HPMHooks.count.HP_pc_heal_post ) { - void (*postHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_heal_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_heal_post[hIndex].func; - postHookFunc(sd, &hp, &sp, &type); + if( HPMHooks.count.HP_pet_select_egg_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *egg_index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_select_egg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_select_egg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &egg_index); } } - return; + return retVal___; } -int HP_pc_itemheal(struct map_session_data *sd, int itemid, int hp, int sp) { +int HP_pet_catch_process1(struct map_session_data *sd, int target_class) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_itemheal_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *itemid, int *hp, int *sp); + if( HPMHooks.count.HP_pet_catch_process1_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *target_class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemheal_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_itemheal_pre[hIndex].func; - retVal___ = preHookFunc(sd, &itemid, &hp, &sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process1_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_catch_process1_pre[hIndex].func; + retVal___ = preHookFunc(sd, &target_class); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50606,26 +57064,26 @@ int HP_pc_itemheal(struct map_session_data *sd, int itemid, int hp, int sp) { } } { - retVal___ = HPMHooks.source.pc.itemheal(sd, itemid, hp, sp); + retVal___ = HPMHooks.source.pet.catch_process1(sd, target_class); } - if( HPMHooks.count.HP_pc_itemheal_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *itemid, int *hp, int *sp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemheal_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_itemheal_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &itemid, &hp, &sp); + if( HPMHooks.count.HP_pet_catch_process1_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *target_class); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process1_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_catch_process1_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &target_class); } } return retVal___; } -int HP_pc_percentheal(struct map_session_data *sd, int hp, int sp) { +int HP_pet_catch_process2(struct map_session_data *sd, int target_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_percentheal_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *hp, int *sp); + if( HPMHooks.count.HP_pet_catch_process2_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_percentheal_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_percentheal_pre[hIndex].func; - retVal___ = preHookFunc(sd, &hp, &sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_catch_process2_pre[hIndex].func; + retVal___ = preHookFunc(sd, &target_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50633,26 +57091,26 @@ int HP_pc_percentheal(struct map_session_data *sd, int hp, int sp) { } } { - retVal___ = HPMHooks.source.pc.percentheal(sd, hp, sp); + retVal___ = HPMHooks.source.pet.catch_process2(sd, target_id); } - if( HPMHooks.count.HP_pc_percentheal_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *hp, int *sp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_percentheal_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_percentheal_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &hp, &sp); + if( HPMHooks.count.HP_pet_catch_process2_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_catch_process2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &target_id); } } return retVal___; } -int HP_pc_jobchange(struct map_session_data *sd, int job, int upper) { +bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_jobchange_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *job, int *upper); + bool retVal___ = false; + if( HPMHooks.count.HP_pet_get_egg_pre ) { + bool (*preHookFunc) (int *account_id, short *pet_class, int *pet_id); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_get_egg_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &pet_class, &pet_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50660,26 +57118,26 @@ int HP_pc_jobchange(struct map_session_data *sd, int job, int upper) { } } { - retVal___ = HPMHooks.source.pc.jobchange(sd, job, upper); + retVal___ = HPMHooks.source.pet.get_egg(account_id, pet_class, pet_id); } - if( HPMHooks.count.HP_pc_jobchange_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *job, 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); + if( HPMHooks.count.HP_pet_get_egg_post ) { + bool (*postHookFunc) (bool retVal___, int *account_id, short *pet_class, int *pet_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_get_egg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, &pet_class, &pet_id); } } return retVal___; } -int HP_pc_setoption(struct map_session_data *sd, int type) { +int HP_pet_unequipitem(struct map_session_data *sd, struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setoption_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + if( HPMHooks.count.HP_pet_unequipitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setoption_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setoption_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unequipitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_unequipitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, pd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50687,26 +57145,26 @@ int HP_pc_setoption(struct map_session_data *sd, int type) { } } { - retVal___ = HPMHooks.source.pc.setoption(sd, type); + retVal___ = HPMHooks.source.pet.unequipitem(sd, pd); } - if( HPMHooks.count.HP_pc_setoption_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setoption_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_setoption_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type); + if( HPMHooks.count.HP_pet_unequipitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unequipitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_unequipitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, pd); } } return retVal___; } -int HP_pc_setcart(struct map_session_data *sd, int type) { +int HP_pet_food(struct map_session_data *sd, struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setcart_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + if( HPMHooks.count.HP_pet_food_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setcart_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setcart_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_food_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_food_pre[hIndex].func; + retVal___ = preHookFunc(sd, pd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50714,156 +57172,167 @@ int HP_pc_setcart(struct map_session_data *sd, int type) { } } { - retVal___ = HPMHooks.source.pc.setcart(sd, type); + retVal___ = HPMHooks.source.pet.food(sd, pd); } - if( HPMHooks.count.HP_pc_setcart_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setcart_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_setcart_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type); + if( HPMHooks.count.HP_pet_food_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_food_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_food_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, pd); } } return retVal___; } -void HP_pc_setfalcon(struct map_session_data *sd, bool flag) { +int HP_pet_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setfalcon_pre ) { - void (*preHookFunc) (struct map_session_data *sd, bool *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setfalcon_pre[hIndex].func; - preHookFunc(sd, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_lootsearch_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.setfalcon(sd, flag); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.pet.ai_sub_hard_lootsearch(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pc_setfalcon_post ) { - 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; - postHookFunc(sd, &flag); + if( HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_lootsearch_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } - return; + return retVal___; } -void HP_pc_setridingpeco(struct map_session_data *sd, bool flag) { +int HP_pet_menu(struct map_session_data *sd, int menunum) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setridingpeco_pre ) { - void (*preHookFunc) (struct map_session_data *sd, bool *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_pet_menu_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *menunum); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingpeco_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setridingpeco_pre[hIndex].func; - preHookFunc(sd, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_menu_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_menu_pre[hIndex].func; + retVal___ = preHookFunc(sd, &menunum); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.setridingpeco(sd, flag); + retVal___ = HPMHooks.source.pet.menu(sd, menunum); } - 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); + if( HPMHooks.count.HP_pet_menu_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *menunum); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_menu_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_menu_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &menunum); } } - return; + return retVal___; } -void HP_pc_setmadogear(struct map_session_data *sd, bool flag) { +int HP_pet_change_name(struct map_session_data *sd, char *name) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setmadogear_pre ) { - void (*preHookFunc) (struct map_session_data *sd, bool *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_pet_change_name_pre ) { + int (*preHookFunc) (struct map_session_data *sd, char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setmadogear_pre[hIndex].func; - preHookFunc(sd, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_change_name_pre[hIndex].func; + retVal___ = preHookFunc(sd, name); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.setmadogear(sd, flag); + retVal___ = HPMHooks.source.pet.change_name(sd, name); } - if( HPMHooks.count.HP_pc_setmadogear_post ) { - 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); + if( HPMHooks.count.HP_pet_change_name_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_change_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name); } } - return; + return retVal___; } -void HP_pc_setridingdragon(struct map_session_data *sd, unsigned int type) { +int HP_pet_change_name_ack(struct map_session_data *sd, char *name, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setridingdragon_pre ) { - void (*preHookFunc) (struct map_session_data *sd, unsigned int *type); + int retVal___ = 0; + if( HPMHooks.count.HP_pet_change_name_ack_pre ) { + int (*preHookFunc) (struct map_session_data *sd, char *name, int *flag); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_change_name_ack_pre[hIndex].func; + retVal___ = preHookFunc(sd, name, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.setridingdragon(sd, type); + retVal___ = HPMHooks.source.pet.change_name_ack(sd, name, flag); } - 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); + if( HPMHooks.count.HP_pet_change_name_ack_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_change_name_ack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name, &flag); } } - return; + return retVal___; } -void HP_pc_setridingwug(struct map_session_data *sd, bool flag) { +int HP_pet_equipitem(struct map_session_data *sd, int index) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setridingwug_pre ) { - void (*preHookFunc) (struct map_session_data *sd, bool *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_pet_equipitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *index); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_equipitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_equipitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &index); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.setridingwug(sd, flag); + retVal___ = HPMHooks.source.pet.equipitem(sd, index); } - 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); + if( HPMHooks.count.HP_pet_equipitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_equipitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_equipitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &index); } } - return; + return retVal___; } -int HP_pc_changelook(struct map_session_data *sd, int type, int val) { +int HP_pet_randomwalk(struct pet_data *pd, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_changelook_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + if( HPMHooks.count.HP_pet_randomwalk_pre ) { + int (*preHookFunc) (struct pet_data *pd, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_changelook_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_changelook_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type, &val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_randomwalk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_randomwalk_pre[hIndex].func; + retVal___ = preHookFunc(pd, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50871,26 +57340,26 @@ int HP_pc_changelook(struct map_session_data *sd, int type, int val) { } } { - retVal___ = HPMHooks.source.pc.changelook(sd, type, val); + retVal___ = HPMHooks.source.pet.randomwalk(pd, tick); } - if( HPMHooks.count.HP_pc_changelook_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_changelook_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_changelook_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type, &val); + if( HPMHooks.count.HP_pet_randomwalk_post ) { + int (*postHookFunc) (int retVal___, struct pet_data *pd, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_randomwalk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_randomwalk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pd, &tick); } } return retVal___; } -int HP_pc_equiplookall(struct map_session_data *sd) { +int HP_pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_equiplookall_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_pet_ai_sub_hard_pre ) { + int (*preHookFunc) (struct pet_data *pd, struct map_session_data *sd, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equiplookall_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_equiplookall_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_pre[hIndex].func; + retVal___ = preHookFunc(pd, sd, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50898,26 +57367,28 @@ int HP_pc_equiplookall(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.equiplookall(sd); + retVal___ = HPMHooks.source.pet.ai_sub_hard(pd, sd, tick); } - if( HPMHooks.count.HP_pc_equiplookall_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equiplookall_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_equiplookall_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_pet_ai_sub_hard_post ) { + int (*postHookFunc) (int retVal___, struct pet_data *pd, struct map_session_data *sd, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pd, sd, &tick); } } return retVal___; } -int HP_pc_readparam(struct map_session_data *sd, int type) { +int HP_pet_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_readparam_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + if( HPMHooks.count.HP_pet_ai_sub_foreachclient_pre ) { + int (*preHookFunc) (struct map_session_data *sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readparam_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_readparam_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_foreachclient_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_pet_ai_sub_foreachclient_pre[hIndex].func; + retVal___ = preHookFunc(sd, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50925,26 +57396,30 @@ int HP_pc_readparam(struct map_session_data *sd, int type) { } } { - retVal___ = HPMHooks.source.pc.readparam(sd, type); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.pet.ai_sub_foreachclient(sd, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pc_readparam_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readparam_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_readparam_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type); + if( HPMHooks.count.HP_pet_ai_sub_foreachclient_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_foreachclient_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_pet_ai_sub_foreachclient_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pc_setparam(struct map_session_data *sd, int type, int val) { +int HP_pet_ai_hard(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setparam_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + if( HPMHooks.count.HP_pet_ai_hard_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setparam_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setparam_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type, &val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_hard_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_ai_hard_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50952,26 +57427,26 @@ int HP_pc_setparam(struct map_session_data *sd, int type, int val) { } } { - retVal___ = HPMHooks.source.pc.setparam(sd, type, val); + retVal___ = HPMHooks.source.pet.ai_hard(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_setparam_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setparam_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_setparam_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type, &val); + if( HPMHooks.count.HP_pet_ai_hard_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_hard_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_ai_hard_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_pc_readreg(struct map_session_data *sd, int64 reg) { +int HP_pet_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_readreg_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int64 *reg); + if( HPMHooks.count.HP_pet_delay_item_drop_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readreg_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_readreg_pre[hIndex].func; - retVal___ = preHookFunc(sd, ®); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_delay_item_drop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_delay_item_drop_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50979,52 +57454,53 @@ int HP_pc_readreg(struct map_session_data *sd, int64 reg) { } } { - retVal___ = HPMHooks.source.pc.readreg(sd, reg); + retVal___ = HPMHooks.source.pet.delay_item_drop(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_readreg_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 *reg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readreg_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_readreg_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, ®); + if( HPMHooks.count.HP_pet_delay_item_drop_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_delay_item_drop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_delay_item_drop_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -void HP_pc_setreg(struct map_session_data *sd, int64 reg, int val) { +int HP_pet_lootitem_drop(struct pet_data *pd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setreg_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int64 *reg, int *val); + int retVal___ = 0; + if( HPMHooks.count.HP_pet_lootitem_drop_pre ) { + int (*preHookFunc) (struct pet_data *pd, struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setreg_pre[hIndex].func; - preHookFunc(sd, ®, &val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_lootitem_drop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_lootitem_drop_pre[hIndex].func; + retVal___ = preHookFunc(pd, sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.setreg(sd, reg, val); + retVal___ = HPMHooks.source.pet.lootitem_drop(pd, sd); } - if( HPMHooks.count.HP_pc_setreg_post ) { - void (*postHookFunc) (struct map_session_data *sd, int64 *reg, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_setreg_post[hIndex].func; - postHookFunc(sd, ®, &val); + if( HPMHooks.count.HP_pet_lootitem_drop_post ) { + int (*postHookFunc) (int retVal___, struct pet_data *pd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_lootitem_drop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_lootitem_drop_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pd, sd); } } - return; + return retVal___; } -char* HP_pc_readregstr(struct map_session_data *sd, int64 reg) { +int HP_pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_pc_readregstr_pre ) { - char* (*preHookFunc) (struct map_session_data *sd, int64 *reg); + int retVal___ = 0; + if( HPMHooks.count.HP_pet_skill_bonus_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregstr_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_readregstr_pre[hIndex].func; - retVal___ = preHookFunc(sd, ®); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_bonus_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_skill_bonus_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51032,52 +57508,53 @@ char* HP_pc_readregstr(struct map_session_data *sd, int64 reg) { } } { - retVal___ = HPMHooks.source.pc.readregstr(sd, reg); + retVal___ = HPMHooks.source.pet.skill_bonus_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_readregstr_post ) { - char* (*postHookFunc) (char* retVal___, struct map_session_data *sd, int64 *reg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregstr_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_readregstr_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, ®); + if( HPMHooks.count.HP_pet_skill_bonus_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_bonus_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_skill_bonus_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -void HP_pc_setregstr(struct map_session_data *sd, int64 reg, const char *str) { +int HP_pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setregstr_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int64 *reg, const char *str); + int retVal___ = 0; + if( HPMHooks.count.HP_pet_recovery_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setregstr_pre[hIndex].func; - preHookFunc(sd, ®, str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recovery_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_recovery_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.setregstr(sd, reg, str); + retVal___ = HPMHooks.source.pet.recovery_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_setregstr_post ) { - void (*postHookFunc) (struct map_session_data *sd, int64 *reg, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_setregstr_post[hIndex].func; - postHookFunc(sd, ®, str); + if( HPMHooks.count.HP_pet_recovery_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recovery_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_recovery_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } - return; + return retVal___; } -int HP_pc_readregistry(struct map_session_data *sd, int64 reg) { +int HP_pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_readregistry_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int64 *reg); + if( HPMHooks.count.HP_pet_skill_support_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_readregistry_pre[hIndex].func; - retVal___ = preHookFunc(sd, ®); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_support_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_skill_support_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51085,26 +57562,26 @@ int HP_pc_readregistry(struct map_session_data *sd, int64 reg) { } } { - retVal___ = HPMHooks.source.pc.readregistry(sd, reg); + retVal___ = HPMHooks.source.pet.skill_support_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_readregistry_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 *reg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_readregistry_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, ®); + if( HPMHooks.count.HP_pet_skill_support_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_support_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_skill_support_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_pc_setregistry(struct map_session_data *sd, int64 reg, int val) { +int HP_pet_read_db(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setregistry_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int64 *reg, int *val); + if( HPMHooks.count.HP_pet_read_db_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setregistry_pre[hIndex].func; - retVal___ = preHookFunc(sd, ®, &val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_read_db_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51112,107 +57589,105 @@ int HP_pc_setregistry(struct map_session_data *sd, int64 reg, int val) { } } { - retVal___ = HPMHooks.source.pc.setregistry(sd, reg, val); + retVal___ = HPMHooks.source.pet.read_db(); } - if( HPMHooks.count.HP_pc_setregistry_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 *reg, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_setregistry_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, ®, &val); + if( HPMHooks.count.HP_pet_read_db_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_read_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -char* HP_pc_readregistry_str(struct map_session_data *sd, int64 reg) { +/* quest */ +void HP_quest_init(bool minimal) { int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_pc_readregistry_str_pre ) { - char* (*preHookFunc) (struct map_session_data *sd, int64 *reg); + if( HPMHooks.count.HP_quest_init_pre ) { + void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_str_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_readregistry_str_pre[hIndex].func; - retVal___ = preHookFunc(sd, ®); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_init_pre[hIndex].func; + preHookFunc(&minimal); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.readregistry_str(sd, reg); + HPMHooks.source.quest.init(minimal); } - if( HPMHooks.count.HP_pc_readregistry_str_post ) { - char* (*postHookFunc) (char* retVal___, struct map_session_data *sd, int64 *reg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_str_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_readregistry_str_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, ®); + if( HPMHooks.count.HP_quest_init_post ) { + void (*postHookFunc) (bool *minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_init_post[hIndex].func; + postHookFunc(&minimal); } } - return retVal___; + return; } -int HP_pc_setregistry_str(struct map_session_data *sd, int64 reg, const char *val) { +void HP_quest_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_setregistry_str_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int64 *reg, const char *val); + if( HPMHooks.count.HP_quest_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_str_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setregistry_str_pre[hIndex].func; - retVal___ = preHookFunc(sd, ®, val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.setregistry_str(sd, reg, val); + HPMHooks.source.quest.final(); } - if( HPMHooks.count.HP_pc_setregistry_str_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 *reg, const char *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_str_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_setregistry_str_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, ®, val); + if( HPMHooks.count.HP_quest_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_pc_addeventtimer(struct map_session_data *sd, int tick, const char *name) { +void HP_quest_reload(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_addeventtimer_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *tick, const char *name); + if( HPMHooks.count.HP_quest_reload_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_addeventtimer_pre[hIndex].func; - retVal___ = preHookFunc(sd, &tick, name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_reload_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.addeventtimer(sd, tick, name); + HPMHooks.source.quest.reload(); } - if( HPMHooks.count.HP_pc_addeventtimer_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *tick, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_addeventtimer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &tick, name); + if( HPMHooks.count.HP_quest_reload_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_reload_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_pc_deleventtimer(struct map_session_data *sd, const char *name) { +struct quest_db* HP_quest_db(int quest_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_deleventtimer_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *name); + struct quest_db* retVal___ = NULL; + if( HPMHooks.count.HP_quest_db_pre ) { + struct quest_db* (*preHookFunc) (int *quest_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_deleventtimer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_deleventtimer_pre[hIndex].func; - retVal___ = preHookFunc(sd, name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_db_pre[hIndex].func; + retVal___ = preHookFunc(&quest_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51220,25 +57695,25 @@ int HP_pc_deleventtimer(struct map_session_data *sd, const char *name) { } } { - retVal___ = HPMHooks.source.pc.deleventtimer(sd, name); + retVal___ = HPMHooks.source.quest.db(quest_id); } - if( HPMHooks.count.HP_pc_deleventtimer_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_deleventtimer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_deleventtimer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, name); + if( HPMHooks.count.HP_quest_db_post ) { + struct quest_db* (*postHookFunc) (struct quest_db* retVal___, int *quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &quest_id); } } return retVal___; } -int HP_pc_cleareventtimer(struct map_session_data *sd) { +int HP_quest_pc_login(TBL_PC *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_cleareventtimer_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_quest_pc_login_pre ) { + int (*preHookFunc) (TBL_PC *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cleareventtimer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_cleareventtimer_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_pc_login_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_pc_login_pre[hIndex].func; retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { @@ -51247,26 +57722,26 @@ int HP_pc_cleareventtimer(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.cleareventtimer(sd); + retVal___ = HPMHooks.source.quest.pc_login(sd); } - if( HPMHooks.count.HP_pc_cleareventtimer_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cleareventtimer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_cleareventtimer_post[hIndex].func; + if( HPMHooks.count.HP_quest_pc_login_post ) { + int (*postHookFunc) (int retVal___, TBL_PC *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_pc_login_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_pc_login_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_pc_addeventtimercount(struct map_session_data *sd, const char *name, int tick) { +int HP_quest_add(TBL_PC *sd, int quest_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_addeventtimercount_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *name, int *tick); + if( HPMHooks.count.HP_quest_add_pre ) { + int (*preHookFunc) (TBL_PC *sd, int *quest_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimercount_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_addeventtimercount_pre[hIndex].func; - retVal___ = preHookFunc(sd, name, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_add_pre[hIndex].func; + retVal___ = preHookFunc(sd, &quest_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51274,26 +57749,26 @@ int HP_pc_addeventtimercount(struct map_session_data *sd, const char *name, int } } { - retVal___ = HPMHooks.source.pc.addeventtimercount(sd, name, tick); + retVal___ = HPMHooks.source.quest.add(sd, quest_id); } - if( HPMHooks.count.HP_pc_addeventtimercount_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name, int *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimercount_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_addeventtimercount_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, name, &tick); + if( HPMHooks.count.HP_quest_add_post ) { + int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &quest_id); } } return retVal___; } -int HP_pc_calc_pvprank(struct map_session_data *sd) { +int HP_quest_change(TBL_PC *sd, int qid1, int qid2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_calc_pvprank_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_quest_change_pre ) { + int (*preHookFunc) (TBL_PC *sd, int *qid1, int *qid2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_calc_pvprank_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_change_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_change_pre[hIndex].func; + retVal___ = preHookFunc(sd, &qid1, &qid2); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51301,26 +57776,26 @@ int HP_pc_calc_pvprank(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.calc_pvprank(sd); + retVal___ = HPMHooks.source.quest.change(sd, qid1, qid2); } - if( HPMHooks.count.HP_pc_calc_pvprank_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_calc_pvprank_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_quest_change_post ) { + int (*postHookFunc) (int retVal___, TBL_PC *sd, int *qid1, int *qid2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_change_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_change_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &qid1, &qid2); } } return retVal___; } -int HP_pc_calc_pvprank_timer(int tid, int64 tick, int id, intptr_t data) { +int HP_quest_delete(TBL_PC *sd, int quest_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_calc_pvprank_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_quest_delete_pre ) { + int (*preHookFunc) (TBL_PC *sd, int *quest_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_calc_pvprank_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_delete_pre[hIndex].func; + retVal___ = preHookFunc(sd, &quest_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51328,26 +57803,28 @@ int HP_pc_calc_pvprank_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.pc.calc_pvprank_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.quest.delete(sd, quest_id); } - if( HPMHooks.count.HP_pc_calc_pvprank_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_calc_pvprank_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_quest_delete_post ) { + int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &quest_id); } } return retVal___; } -int HP_pc_ismarried(struct map_session_data *sd) { +int HP_quest_update_objective_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_ismarried_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_quest_update_objective_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_ismarried_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_ismarried_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_quest_update_objective_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51355,53 +57832,56 @@ int HP_pc_ismarried(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.ismarried(sd); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.quest.update_objective_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pc_ismarried_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_ismarried_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_ismarried_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_quest_update_objective_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_quest_update_objective_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pc_marriage(struct map_session_data *sd, struct map_session_data *dstsd) { +void HP_quest_update_objective(TBL_PC *sd, int mob_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_marriage_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd); + if( HPMHooks.count.HP_quest_update_objective_pre ) { + void (*preHookFunc) (TBL_PC *sd, int *mob_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_marriage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_marriage_pre[hIndex].func; - retVal___ = preHookFunc(sd, dstsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_update_objective_pre[hIndex].func; + preHookFunc(sd, &mob_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.marriage(sd, dstsd); + HPMHooks.source.quest.update_objective(sd, mob_id); } - if( HPMHooks.count.HP_pc_marriage_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct map_session_data *dstsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_marriage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_marriage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, dstsd); + if( HPMHooks.count.HP_quest_update_objective_post ) { + void (*postHookFunc) (TBL_PC *sd, int *mob_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_update_objective_post[hIndex].func; + postHookFunc(sd, &mob_id); } } - return retVal___; + return; } -int HP_pc_divorce(struct map_session_data *sd) { +int HP_quest_update_status(TBL_PC *sd, int quest_id, enum quest_state qs) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_divorce_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_quest_update_status_pre ) { + int (*preHookFunc) (TBL_PC *sd, int *quest_id, enum quest_state *qs); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_divorce_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_divorce_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_status_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_update_status_pre[hIndex].func; + retVal___ = preHookFunc(sd, &quest_id, &qs); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51409,26 +57889,26 @@ int HP_pc_divorce(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.divorce(sd); + retVal___ = HPMHooks.source.quest.update_status(sd, quest_id, qs); } - if( HPMHooks.count.HP_pc_divorce_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_divorce_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_divorce_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_quest_update_status_post ) { + int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id, enum quest_state *qs); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_status_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_update_status_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &quest_id, &qs); } } return retVal___; } -struct map_session_data* HP_pc_get_partner(struct map_session_data *sd) { +int HP_quest_check(TBL_PC *sd, int quest_id, enum quest_check_type type) { int hIndex = 0; - struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_pc_get_partner_pre ) { - struct map_session_data* (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_quest_check_pre ) { + int (*preHookFunc) (TBL_PC *sd, int *quest_id, enum quest_check_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_partner_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_get_partner_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_check_pre[hIndex].func; + retVal___ = preHookFunc(sd, &quest_id, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51436,53 +57916,52 @@ struct map_session_data* HP_pc_get_partner(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.get_partner(sd); + retVal___ = HPMHooks.source.quest.check(sd, quest_id, type); } - if( HPMHooks.count.HP_pc_get_partner_post ) { - struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_partner_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_get_partner_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_quest_check_post ) { + int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id, enum quest_check_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &quest_id, &type); } } return retVal___; } -struct map_session_data* HP_pc_get_father(struct map_session_data *sd) { +void HP_quest_clear(void) { int hIndex = 0; - struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_pc_get_father_pre ) { - struct map_session_data* (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_quest_clear_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_father_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_get_father_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_clear_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.get_father(sd); + HPMHooks.source.quest.clear(); } - if( HPMHooks.count.HP_pc_get_father_post ) { - struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_father_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_get_father_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_quest_clear_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_clear_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -struct map_session_data* HP_pc_get_mother(struct map_session_data *sd) { +int HP_quest_read_db(void) { int hIndex = 0; - struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_pc_get_mother_pre ) { - struct map_session_data* (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_quest_read_db_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_mother_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_get_mother_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_read_db_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51490,26 +57969,26 @@ struct map_session_data* HP_pc_get_mother(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.get_mother(sd); + retVal___ = HPMHooks.source.quest.read_db(); } - if( HPMHooks.count.HP_pc_get_mother_post ) { - struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_mother_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_get_mother_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_quest_read_db_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_read_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -struct map_session_data* HP_pc_get_child(struct map_session_data *sd) { +struct quest_db* HP_quest_read_db_sub(config_setting_t *cs, int n, const char *source) { int hIndex = 0; - struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_pc_get_child_pre ) { - struct map_session_data* (*preHookFunc) (struct map_session_data *sd); + struct quest_db* retVal___ = NULL; + if( HPMHooks.count.HP_quest_read_db_sub_pre ) { + struct quest_db* (*preHookFunc) (config_setting_t *cs, int *n, const char *source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_child_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_get_child_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_read_db_sub_pre[hIndex].func; + retVal___ = preHookFunc(cs, &n, source); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51517,25 +57996,26 @@ struct map_session_data* HP_pc_get_child(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.get_child(sd); + retVal___ = HPMHooks.source.quest.read_db_sub(cs, n, source); } - if( HPMHooks.count.HP_pc_get_child_post ) { - struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_child_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_get_child_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_quest_read_db_sub_post ) { + struct quest_db* (*postHookFunc) (struct quest_db* retVal___, config_setting_t *cs, int *n, const char *source); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_read_db_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cs, &n, source); } } return retVal___; } -void HP_pc_bleeding(struct map_session_data *sd, unsigned int diff_tick) { +/* script */ +void HP_script_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_pc_bleeding_pre ) { - void (*preHookFunc) (struct map_session_data *sd, unsigned int *diff_tick); + if( HPMHooks.count.HP_script_init_pre ) { + void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bleeding_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_bleeding_pre[hIndex].func; - preHookFunc(sd, &diff_tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_init_pre[hIndex].func; + preHookFunc(&minimal); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51543,25 +58023,25 @@ void HP_pc_bleeding(struct map_session_data *sd, unsigned int diff_tick) { } } { - HPMHooks.source.pc.bleeding(sd, diff_tick); + HPMHooks.source.script.init(minimal); } - if( HPMHooks.count.HP_pc_bleeding_post ) { - void (*postHookFunc) (struct map_session_data *sd, unsigned int *diff_tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bleeding_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_bleeding_post[hIndex].func; - postHookFunc(sd, &diff_tick); + if( HPMHooks.count.HP_script_init_post ) { + void (*postHookFunc) (bool *minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_init_post[hIndex].func; + postHookFunc(&minimal); } } return; } -void HP_pc_regen(struct map_session_data *sd, unsigned int diff_tick) { +void HP_script_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_pc_regen_pre ) { - void (*preHookFunc) (struct map_session_data *sd, unsigned int *diff_tick); + if( HPMHooks.count.HP_script_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_regen_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_regen_pre[hIndex].func; - preHookFunc(sd, &diff_tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51569,52 +58049,53 @@ void HP_pc_regen(struct map_session_data *sd, unsigned int diff_tick) { } } { - HPMHooks.source.pc.regen(sd, diff_tick); + HPMHooks.source.script.final(); } - if( HPMHooks.count.HP_pc_regen_post ) { - void (*postHookFunc) (struct map_session_data *sd, unsigned int *diff_tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_regen_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_regen_post[hIndex].func; - postHookFunc(sd, &diff_tick); + if( HPMHooks.count.HP_script_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_final_post[hIndex].func; + postHookFunc(); } } return; } -void HP_pc_setstand(struct map_session_data *sd) { +int HP_script_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setstand_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_script_reload_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstand_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setstand_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_reload_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.setstand(sd); + retVal___ = HPMHooks.source.script.reload(); } - if( HPMHooks.count.HP_pc_setstand_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstand_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_setstand_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_script_reload_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_reload_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -int HP_pc_candrop(struct map_session_data *sd, struct item *item) { +struct script_code* HP_script_parse(const char *src, const char *file, int line, int options, int *retval) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_candrop_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct item *item); + struct script_code* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_pre ) { + struct script_code* (*preHookFunc) (const char *src, const char *file, int *line, int *options, int *retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_candrop_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_candrop_pre[hIndex].func; - retVal___ = preHookFunc(sd, item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_pre[hIndex].func; + retVal___ = preHookFunc(src, file, &line, &options, retval); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51622,26 +58103,26 @@ int HP_pc_candrop(struct map_session_data *sd, struct item *item) { } } { - retVal___ = HPMHooks.source.pc.candrop(sd, item); + retVal___ = HPMHooks.source.script.parse(src, file, line, options, retval); } - if( HPMHooks.count.HP_pc_candrop_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_candrop_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_candrop_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, item); + if( HPMHooks.count.HP_script_parse_post ) { + struct script_code* (*postHookFunc) (struct script_code* retVal___, const char *src, const char *file, int *line, int *options, int *retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, file, &line, &options, retval); } } return retVal___; } -int HP_pc_jobid2mapid(unsigned short b_class) { +bool HP_script_add_builtin(const struct script_function *buildin, bool override) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_jobid2mapid_pre ) { - int (*preHookFunc) (unsigned short *b_class); + bool retVal___ = false; + if( HPMHooks.count.HP_script_add_builtin_pre ) { + bool (*preHookFunc) (const struct script_function *buildin, bool *override); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_add_builtin_pre[hIndex].func; + retVal___ = preHookFunc(buildin, &override); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51649,53 +58130,52 @@ int HP_pc_jobid2mapid(unsigned short b_class) { } } { - retVal___ = HPMHooks.source.pc.jobid2mapid(b_class); + retVal___ = HPMHooks.source.script.add_builtin(buildin, override); } - if( HPMHooks.count.HP_pc_jobid2mapid_post ) { - int (*postHookFunc) (int retVal___, unsigned short *b_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); + if( HPMHooks.count.HP_script_add_builtin_post ) { + bool (*postHookFunc) (bool retVal___, const struct script_function *buildin, bool *override); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_add_builtin_post[hIndex].func; + retVal___ = postHookFunc(retVal___, buildin, &override); } } return retVal___; } -int HP_pc_mapid2jobid(unsigned short class_, int sex) { +void HP_script_parse_builtin(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_mapid2jobid_pre ) { - int (*preHookFunc) (unsigned short *class_, int *sex); + if( HPMHooks.count.HP_script_parse_builtin_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_mapid2jobid_pre[hIndex].func; - retVal___ = preHookFunc(&class_, &sex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_builtin_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_builtin_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.mapid2jobid(class_, sex); + HPMHooks.source.script.parse_builtin(); } - if( HPMHooks.count.HP_pc_mapid2jobid_post ) { - int (*postHookFunc) (int retVal___, unsigned short *class_, int *sex); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_mapid2jobid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &class_, &sex); + if( HPMHooks.count.HP_script_parse_builtin_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_builtin_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_builtin_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -const char* HP_pc_job_name(int class_) { +const char* HP_script_parse_subexpr(const char *p, int limit) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_pc_job_name_pre ) { - const char* (*preHookFunc) (int *class_); + if( HPMHooks.count.HP_script_parse_subexpr_pre ) { + const char* (*preHookFunc) (const char *p, int *limit); *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_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_subexpr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_subexpr_pre[hIndex].func; + retVal___ = preHookFunc(p, &limit); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51703,51 +58183,52 @@ const char* HP_pc_job_name(int class_) { } } { - retVal___ = HPMHooks.source.pc.job_name(class_); + retVal___ = HPMHooks.source.script.parse_subexpr(p, limit); } - if( HPMHooks.count.HP_pc_job_name_post ) { - 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_); + if( HPMHooks.count.HP_script_parse_subexpr_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p, int *limit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_subexpr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_subexpr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, &limit); } } return retVal___; } -void HP_pc_setinvincibletimer(struct map_session_data *sd, int val) { +const char* HP_script_skip_space(const char *p) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setinvincibletimer_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *val); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_skip_space_pre ) { + const char* (*preHookFunc) (const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinvincibletimer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setinvincibletimer_pre[hIndex].func; - preHookFunc(sd, &val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_space_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_skip_space_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.setinvincibletimer(sd, val); + retVal___ = HPMHooks.source.script.skip_space(p); } - if( HPMHooks.count.HP_pc_setinvincibletimer_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinvincibletimer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_setinvincibletimer_post[hIndex].func; - postHookFunc(sd, &val); + if( HPMHooks.count.HP_script_skip_space_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_space_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_skip_space_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } - return; + return retVal___; } -void HP_pc_delinvincibletimer(struct map_session_data *sd) { +void HP_script_error(const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos) { int hIndex = 0; - if( HPMHooks.count.HP_pc_delinvincibletimer_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_script_error_pre ) { + void (*preHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delinvincibletimer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_delinvincibletimer_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_error_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_error_pre[hIndex].func; + preHookFunc(src, file, &start_line, error_msg, error_pos); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51755,53 +58236,52 @@ void HP_pc_delinvincibletimer(struct map_session_data *sd) { } } { - HPMHooks.source.pc.delinvincibletimer(sd); + HPMHooks.source.script.error(src, file, start_line, error_msg, error_pos); } - if( HPMHooks.count.HP_pc_delinvincibletimer_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delinvincibletimer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_delinvincibletimer_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_script_error_post ) { + void (*postHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_error_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_error_post[hIndex].func; + postHookFunc(src, file, &start_line, error_msg, error_pos); } } return; } -int HP_pc_addspiritball(struct map_session_data *sd, int interval, int max) { +void HP_script_warning(const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_addspiritball_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *interval, int *max); + if( HPMHooks.count.HP_script_warning_pre ) { + void (*preHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addspiritball_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_addspiritball_pre[hIndex].func; - retVal___ = preHookFunc(sd, &interval, &max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_warning_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_warning_pre[hIndex].func; + preHookFunc(src, file, &start_line, error_msg, error_pos); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.addspiritball(sd, interval, max); + HPMHooks.source.script.warning(src, file, start_line, error_msg, error_pos); } - if( HPMHooks.count.HP_pc_addspiritball_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *interval, int *max); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addspiritball_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_addspiritball_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &interval, &max); + if( HPMHooks.count.HP_script_warning_post ) { + void (*postHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_warning_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_warning_post[hIndex].func; + postHookFunc(src, file, &start_line, error_msg, error_pos); } } - return retVal___; + return; } -int HP_pc_delspiritball(struct map_session_data *sd, int count, int type) { +bool HP_script_addScript(char *name, char *args, bool ( *func ) (struct script_state *st), bool isDeprecated) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_delspiritball_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *count, int *type); + bool retVal___ = false; + if( HPMHooks.count.HP_script_addScript_pre ) { + bool (*preHookFunc) (char *name, char *args, bool ( *func ) (struct script_state *st), bool *isDeprecated); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delspiritball_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_delspiritball_pre[hIndex].func; - retVal___ = preHookFunc(sd, &count, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addScript_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_addScript_pre[hIndex].func; + retVal___ = preHookFunc(name, args, func, &isDeprecated); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51809,26 +58289,26 @@ int HP_pc_delspiritball(struct map_session_data *sd, int count, int type) { } } { - retVal___ = HPMHooks.source.pc.delspiritball(sd, count, type); + retVal___ = HPMHooks.source.script.addScript(name, args, func, isDeprecated); } - if( HPMHooks.count.HP_pc_delspiritball_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *count, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delspiritball_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_delspiritball_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &count, &type); + if( HPMHooks.count.HP_script_addScript_post ) { + bool (*postHookFunc) (bool retVal___, char *name, char *args, bool ( *func ) (struct script_state *st), bool *isDeprecated); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addScript_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_addScript_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, args, func, &isDeprecated); } } return retVal___; } -int HP_pc_getmaxspiritball(struct map_session_data *sd, int min) { +int HP_script_conv_num(struct script_state *st, struct script_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_getmaxspiritball_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *min); + if( HPMHooks.count.HP_script_conv_num_pre ) { + int (*preHookFunc) (struct script_state *st, struct script_data *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getmaxspiritball_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_getmaxspiritball_pre[hIndex].func; - retVal___ = preHookFunc(sd, &min); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_num_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_conv_num_pre[hIndex].func; + retVal___ = preHookFunc(st, data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51836,52 +58316,53 @@ int HP_pc_getmaxspiritball(struct map_session_data *sd, int min) { } } { - retVal___ = HPMHooks.source.pc.getmaxspiritball(sd, min); + retVal___ = HPMHooks.source.script.conv_num(st, data); } - if( HPMHooks.count.HP_pc_getmaxspiritball_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *min); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getmaxspiritball_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_getmaxspiritball_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &min); + if( HPMHooks.count.HP_script_conv_num_post ) { + int (*postHookFunc) (int retVal___, struct script_state *st, struct script_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_num_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_conv_num_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, data); } } return retVal___; } -void HP_pc_addfame(struct map_session_data *sd, int count) { +const char* HP_script_conv_str(struct script_state *st, struct script_data *data) { int hIndex = 0; - if( HPMHooks.count.HP_pc_addfame_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *count); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_conv_str_pre ) { + const char* (*preHookFunc) (struct script_state *st, struct script_data *data); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_conv_str_pre[hIndex].func; + retVal___ = preHookFunc(st, data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.addfame(sd, count); + retVal___ = HPMHooks.source.script.conv_str(st, data); } - if( HPMHooks.count.HP_pc_addfame_post ) { - void (*postHookFunc) (struct map_session_data *sd, 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); + if( HPMHooks.count.HP_script_conv_str_post ) { + const char* (*postHookFunc) (const char* retVal___, struct script_state *st, struct script_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_conv_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, data); } } - return; + return retVal___; } -unsigned char HP_pc_famerank(int char_id, int job) { +TBL_PC* HP_script_rid2sd(struct script_state *st) { int hIndex = 0; - unsigned char retVal___ = 0; - if( HPMHooks.count.HP_pc_famerank_pre ) { - unsigned char (*preHookFunc) (int *char_id, int *job); + TBL_PC* retVal___ = NULL; + if( HPMHooks.count.HP_script_rid2sd_pre ) { + TBL_PC* (*preHookFunc) (struct script_state *st); *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_script_rid2sd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_rid2sd_pre[hIndex].func; + retVal___ = preHookFunc(st); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51889,53 +58370,52 @@ unsigned char HP_pc_famerank(int char_id, int job) { } } { - retVal___ = HPMHooks.source.pc.famerank(char_id, job); + retVal___ = HPMHooks.source.script.rid2sd(st); } - 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_script_rid2sd_post ) { + TBL_PC* (*postHookFunc) (TBL_PC* retVal___, struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_rid2sd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_rid2sd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st); } } return retVal___; } -int HP_pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list *bl) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_set_hate_mob_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *pos, struct block_list *bl); +void HP_script_detach_rid(struct script_state *st) { + int hIndex = 0; + if( HPMHooks.count.HP_script_detach_rid_pre ) { + void (*preHookFunc) (struct script_state *st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_hate_mob_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_set_hate_mob_pre[hIndex].func; - retVal___ = preHookFunc(sd, &pos, bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_rid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_detach_rid_pre[hIndex].func; + preHookFunc(st); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.set_hate_mob(sd, pos, bl); + HPMHooks.source.script.detach_rid(st); } - if( HPMHooks.count.HP_pc_set_hate_mob_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *pos, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_hate_mob_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_set_hate_mob_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &pos, bl); + if( HPMHooks.count.HP_script_detach_rid_post ) { + void (*postHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_rid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_detach_rid_post[hIndex].func; + postHookFunc(st); } } - return retVal___; + return; } -int HP_pc_readdb(void) { +struct script_data* HP_script_push_val(struct script_stack *stack, enum c_op type, int64 val, struct reg_db *ref) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_readdb_pre ) { - int (*preHookFunc) (void); + struct script_data* retVal___ = NULL; + if( HPMHooks.count.HP_script_push_val_pre ) { + struct script_data* (*preHookFunc) (struct script_stack *stack, enum c_op *type, int64 *val, struct reg_db *ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_readdb_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_val_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_push_val_pre[hIndex].func; + retVal___ = preHookFunc(stack, &type, &val, ref); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51943,26 +58423,26 @@ int HP_pc_readdb(void) { } } { - retVal___ = HPMHooks.source.pc.readdb(); + retVal___ = HPMHooks.source.script.push_val(stack, type, val, ref); } - if( HPMHooks.count.HP_pc_readdb_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_readdb_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_script_push_val_post ) { + struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, enum c_op *type, int64 *val, struct reg_db *ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_val_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_push_val_post[hIndex].func; + retVal___ = postHookFunc(retVal___, stack, &type, &val, ref); } } return retVal___; } -int HP_pc_map_day_timer(int tid, int64 tick, int id, intptr_t data) { +struct script_data* HP_script_get_val(struct script_state *st, struct script_data *data) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_map_day_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + struct script_data* retVal___ = NULL; + if( HPMHooks.count.HP_script_get_val_pre ) { + struct script_data* (*preHookFunc) (struct script_state *st, struct script_data *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_day_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_map_day_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_get_val_pre[hIndex].func; + retVal___ = preHookFunc(st, data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51970,26 +58450,26 @@ int HP_pc_map_day_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.pc.map_day_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.script.get_val(st, data); } - if( HPMHooks.count.HP_pc_map_day_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_day_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_map_day_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_get_val_post ) { + struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_state *st, struct script_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_get_val_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, data); } } return retVal___; } -int HP_pc_map_night_timer(int tid, int64 tick, int id, intptr_t data) { +void* HP_script_get_val2(struct script_state *st, int64 uid, struct reg_db *ref) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_map_night_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + void* retVal___ = NULL; + if( HPMHooks.count.HP_script_get_val2_pre ) { + void* (*preHookFunc) (struct script_state *st, int64 *uid, struct reg_db *ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_night_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_map_night_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_get_val2_pre[hIndex].func; + retVal___ = preHookFunc(st, &uid, ref); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -51997,52 +58477,53 @@ int HP_pc_map_night_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.pc.map_night_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.script.get_val2(st, uid, ref); } - if( HPMHooks.count.HP_pc_map_night_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_night_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_map_night_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_get_val2_post ) { + void* (*postHookFunc) (void* retVal___, struct script_state *st, int64 *uid, struct reg_db *ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_get_val2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, &uid, ref); } } return retVal___; } -void HP_pc_inventory_rentals(struct map_session_data *sd) { +struct script_data* HP_script_push_str(struct script_stack *stack, enum c_op type, char *str) { int hIndex = 0; - if( HPMHooks.count.HP_pc_inventory_rentals_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + struct script_data* retVal___ = NULL; + if( HPMHooks.count.HP_script_push_str_pre ) { + struct script_data* (*preHookFunc) (struct script_stack *stack, enum c_op *type, char *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rentals_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_inventory_rentals_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_push_str_pre[hIndex].func; + retVal___ = preHookFunc(stack, &type, str); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.inventory_rentals(sd); + retVal___ = HPMHooks.source.script.push_str(stack, type, str); } - if( HPMHooks.count.HP_pc_inventory_rentals_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rentals_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_inventory_rentals_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_script_push_str_post ) { + struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, enum c_op *type, char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_push_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, stack, &type, str); } } - return; + return retVal___; } -int HP_pc_inventory_rental_clear(struct map_session_data *sd) { +struct script_data* HP_script_push_copy(struct script_stack *stack, int pos) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_inventory_rental_clear_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + struct script_data* retVal___ = NULL; + if( HPMHooks.count.HP_script_push_copy_pre ) { + struct script_data* (*preHookFunc) (struct script_stack *stack, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_clear_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_inventory_rental_clear_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_copy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_push_copy_pre[hIndex].func; + retVal___ = preHookFunc(stack, &pos); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52050,25 +58531,25 @@ int HP_pc_inventory_rental_clear(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.inventory_rental_clear(sd); + retVal___ = HPMHooks.source.script.push_copy(stack, pos); } - if( HPMHooks.count.HP_pc_inventory_rental_clear_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_clear_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_inventory_rental_clear_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_script_push_copy_post ) { + struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_copy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_push_copy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, stack, &pos); } } return retVal___; } -void HP_pc_inventory_rental_add(struct map_session_data *sd, int seconds) { +void HP_script_pop_stack(struct script_state *st, int start, int end) { int hIndex = 0; - if( HPMHooks.count.HP_pc_inventory_rental_add_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *seconds); + if( HPMHooks.count.HP_script_pop_stack_pre ) { + void (*preHookFunc) (struct script_state *st, int *start, int *end); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_add_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_inventory_rental_add_pre[hIndex].func; - preHookFunc(sd, &seconds); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_pop_stack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_pop_stack_pre[hIndex].func; + preHookFunc(st, &start, &end); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52076,132 +58557,130 @@ void HP_pc_inventory_rental_add(struct map_session_data *sd, int seconds) { } } { - HPMHooks.source.pc.inventory_rental_add(sd, seconds); + HPMHooks.source.script.pop_stack(st, start, end); } - if( HPMHooks.count.HP_pc_inventory_rental_add_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *seconds); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_add_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_inventory_rental_add_post[hIndex].func; - postHookFunc(sd, &seconds); + if( HPMHooks.count.HP_script_pop_stack_post ) { + void (*postHookFunc) (struct script_state *st, int *start, int *end); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_pop_stack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_pop_stack_post[hIndex].func; + postHookFunc(st, &start, &end); } } return; } -int HP_pc_disguise(struct map_session_data *sd, int class_) { +void HP_script_set_constant(const char *name, int value, bool isparameter) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_disguise_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *class_); + if( HPMHooks.count.HP_script_set_constant_pre ) { + void (*preHookFunc) (const char *name, int *value, bool *isparameter); *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_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_set_constant_pre[hIndex].func; + preHookFunc(name, &value, &isparameter); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.disguise(sd, class_); + HPMHooks.source.script.set_constant(name, value, isparameter); } - if( HPMHooks.count.HP_pc_disguise_post ) { - 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_); + if( HPMHooks.count.HP_script_set_constant_post ) { + void (*postHookFunc) (const char *name, int *value, bool *isparameter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_set_constant_post[hIndex].func; + postHookFunc(name, &value, &isparameter); } } - return retVal___; + return; } -bool HP_pc_isautolooting(struct map_session_data *sd, int nameid) { +void HP_script_set_constant2(const char *name, int value, bool isparameter) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pc_isautolooting_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *nameid); + if( HPMHooks.count.HP_script_set_constant2_pre ) { + void (*preHookFunc) (const char *name, int *value, bool *isparameter); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isautolooting_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_isautolooting_pre[hIndex].func; - retVal___ = preHookFunc(sd, &nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_set_constant2_pre[hIndex].func; + preHookFunc(name, &value, &isparameter); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.isautolooting(sd, nameid); + HPMHooks.source.script.set_constant2(name, value, isparameter); } - if( HPMHooks.count.HP_pc_isautolooting_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isautolooting_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_isautolooting_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &nameid); + if( HPMHooks.count.HP_script_set_constant2_post ) { + void (*postHookFunc) (const char *name, int *value, bool *isparameter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_set_constant2_post[hIndex].func; + postHookFunc(name, &value, &isparameter); } } - return retVal___; + return; } -void HP_pc_overheat(struct map_session_data *sd, int val) { +bool HP_script_get_constant(const char *name, int *value) { int hIndex = 0; - if( HPMHooks.count.HP_pc_overheat_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *val); + bool retVal___ = false; + if( HPMHooks.count.HP_script_get_constant_pre ) { + bool (*preHookFunc) (const char *name, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_overheat_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_overheat_pre[hIndex].func; - preHookFunc(sd, &val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_constant_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_get_constant_pre[hIndex].func; + retVal___ = preHookFunc(name, value); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.overheat(sd, val); + retVal___ = HPMHooks.source.script.get_constant(name, value); } - if( HPMHooks.count.HP_pc_overheat_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_overheat_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_overheat_post[hIndex].func; - postHookFunc(sd, &val); + if( HPMHooks.count.HP_script_get_constant_post ) { + bool (*postHookFunc) (bool retVal___, const char *name, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_constant_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_get_constant_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, value); } } - return; + return retVal___; } -int HP_pc_banding(struct map_session_data *sd, uint16 skill_lv) { +void HP_script_label_add(int key, int pos) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_banding_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv); + if( HPMHooks.count.HP_script_label_add_pre ) { + void (*preHookFunc) (int *key, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_banding_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_banding_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_label_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_label_add_pre[hIndex].func; + preHookFunc(&key, &pos); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.banding(sd, skill_lv); + HPMHooks.source.script.label_add(key, pos); } - if( HPMHooks.count.HP_pc_banding_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_banding_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_banding_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_lv); + if( HPMHooks.count.HP_script_label_add_post ) { + void (*postHookFunc) (int *key, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_label_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_label_add_post[hIndex].func; + postHookFunc(&key, &pos); } } - return retVal___; + return; } -void HP_pc_itemcd_do(struct map_session_data *sd, bool load) { +void HP_script_run(struct script_code *rootscript, int pos, int rid, int oid) { int hIndex = 0; - if( HPMHooks.count.HP_pc_itemcd_do_pre ) { - void (*preHookFunc) (struct map_session_data *sd, bool *load); + if( HPMHooks.count.HP_script_run_pre ) { + void (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemcd_do_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_itemcd_do_pre[hIndex].func; - preHookFunc(sd, &load); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_run_pre[hIndex].func; + preHookFunc(rootscript, &pos, &rid, &oid); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52209,52 +58688,51 @@ void HP_pc_itemcd_do(struct map_session_data *sd, bool load) { } } { - HPMHooks.source.pc.itemcd_do(sd, load); + HPMHooks.source.script.run(rootscript, pos, rid, oid); } - if( HPMHooks.count.HP_pc_itemcd_do_post ) { - void (*postHookFunc) (struct map_session_data *sd, bool *load); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemcd_do_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_itemcd_do_post[hIndex].func; - postHookFunc(sd, &load); + if( HPMHooks.count.HP_script_run_post ) { + void (*postHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_run_post[hIndex].func; + postHookFunc(rootscript, &pos, &rid, &oid); } } return; } -int HP_pc_load_combo(struct map_session_data *sd) { +void HP_script_run_npc(struct script_code *rootscript, int pos, int rid, int oid) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_load_combo_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_script_run_npc_pre ) { + void (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_load_combo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_load_combo_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_npc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_run_npc_pre[hIndex].func; + preHookFunc(rootscript, &pos, &rid, &oid); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.load_combo(sd); + HPMHooks.source.script.run_npc(rootscript, pos, rid, oid); } - if( HPMHooks.count.HP_pc_load_combo_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_load_combo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_load_combo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_script_run_npc_post ) { + void (*postHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_npc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_run_npc_post[hIndex].func; + postHookFunc(rootscript, &pos, &rid, &oid); } } - return retVal___; + return; } -void HP_pc_add_charm(struct map_session_data *sd, int interval, int max, int type) { +void HP_script_run_pet(struct script_code *rootscript, int pos, int rid, int oid) { int hIndex = 0; - if( HPMHooks.count.HP_pc_add_charm_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *interval, int *max, int *type); + if( HPMHooks.count.HP_script_run_pet_pre ) { + void (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_add_charm_pre[hIndex].func; - preHookFunc(sd, &interval, &max, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pet_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_run_pet_pre[hIndex].func; + preHookFunc(rootscript, &pos, &rid, &oid); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52262,25 +58740,25 @@ void HP_pc_add_charm(struct map_session_data *sd, int interval, int max, int typ } } { - HPMHooks.source.pc.add_charm(sd, interval, max, type); + HPMHooks.source.script.run_pet(rootscript, pos, rid, oid); } - if( HPMHooks.count.HP_pc_add_charm_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *interval, int *max, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_add_charm_post[hIndex].func; - postHookFunc(sd, &interval, &max, &type); + if( HPMHooks.count.HP_script_run_pet_post ) { + void (*postHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pet_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_run_pet_post[hIndex].func; + postHookFunc(rootscript, &pos, &rid, &oid); } } return; } -void HP_pc_del_charm(struct map_session_data *sd, int count, int type) { +void HP_script_run_main(struct script_state *st) { int hIndex = 0; - if( HPMHooks.count.HP_pc_del_charm_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *count, int *type); + if( HPMHooks.count.HP_script_run_main_pre ) { + void (*preHookFunc) (struct script_state *st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_del_charm_pre[hIndex].func; - preHookFunc(sd, &count, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_main_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_run_main_pre[hIndex].func; + preHookFunc(st); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52288,52 +58766,53 @@ void HP_pc_del_charm(struct map_session_data *sd, int count, int type) { } } { - HPMHooks.source.pc.del_charm(sd, count, type); + HPMHooks.source.script.run_main(st); } - if( HPMHooks.count.HP_pc_del_charm_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *count, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_del_charm_post[hIndex].func; - postHookFunc(sd, &count, &type); + if( HPMHooks.count.HP_script_run_main_post ) { + void (*postHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_main_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_run_main_post[hIndex].func; + postHookFunc(st); } } return; } -void HP_pc_baselevelchanged(struct map_session_data *sd) { +int HP_script_run_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - if( HPMHooks.count.HP_pc_baselevelchanged_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_script_run_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_baselevelchanged_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_baselevelchanged_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_run_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.baselevelchanged(sd); + retVal___ = HPMHooks.source.script.run_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_baselevelchanged_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_baselevelchanged_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_baselevelchanged_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_script_run_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_run_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } - return; + return retVal___; } -int HP_pc_level_penalty_mod(int diff, unsigned char race, unsigned short mode, int type) { +int HP_script_set_var(struct map_session_data *sd, char *name, void *val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_level_penalty_mod_pre ) { - int (*preHookFunc) (int *diff, unsigned char *race, unsigned short *mode, int *type); + if( HPMHooks.count.HP_script_set_var_pre ) { + int (*preHookFunc) (struct map_session_data *sd, char *name, void *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_level_penalty_mod_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_level_penalty_mod_pre[hIndex].func; - retVal___ = preHookFunc(&diff, &race, &mode, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_var_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_set_var_pre[hIndex].func; + retVal___ = preHookFunc(sd, name, val); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52341,109 +58820,104 @@ int HP_pc_level_penalty_mod(int diff, unsigned char race, unsigned short mode, i } } { - retVal___ = HPMHooks.source.pc.level_penalty_mod(diff, race, mode, type); + retVal___ = HPMHooks.source.script.set_var(sd, name, val); } - if( HPMHooks.count.HP_pc_level_penalty_mod_post ) { - int (*postHookFunc) (int retVal___, int *diff, unsigned char *race, unsigned short *mode, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_level_penalty_mod_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_level_penalty_mod_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &diff, &race, &mode, &type); + if( HPMHooks.count.HP_script_set_var_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name, void *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_var_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_set_var_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name, val); } } return retVal___; } -int HP_pc_calc_skillpoint(struct map_session_data *sd) { +void HP_script_stop_instances(struct script_code *code) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_calc_skillpoint_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_script_stop_instances_pre ) { + void (*preHookFunc) (struct script_code *code); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skillpoint_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_calc_skillpoint_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stop_instances_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_stop_instances_pre[hIndex].func; + preHookFunc(code); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.calc_skillpoint(sd); + HPMHooks.source.script.stop_instances(code); } - if( HPMHooks.count.HP_pc_calc_skillpoint_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skillpoint_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_calc_skillpoint_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_script_stop_instances_post ) { + void (*postHookFunc) (struct script_code *code); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stop_instances_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_stop_instances_post[hIndex].func; + postHookFunc(code); } } - return retVal___; + return; } -int HP_pc_invincible_timer(int tid, int64 tick, int id, intptr_t data) { +void HP_script_free_code(struct script_code *code) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_invincible_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_script_free_code_pre ) { + void (*preHookFunc) (struct script_code *code); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_invincible_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_invincible_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_code_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_free_code_pre[hIndex].func; + preHookFunc(code); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.invincible_timer(tid, tick, id, data); + HPMHooks.source.script.free_code(code); } - if( HPMHooks.count.HP_pc_invincible_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_invincible_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_invincible_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_free_code_post ) { + void (*postHookFunc) (struct script_code *code); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_code_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_free_code_post[hIndex].func; + postHookFunc(code); } } - return retVal___; + return; } -int HP_pc_spiritball_timer(int tid, int64 tick, int id, intptr_t data) { +void HP_script_free_vars(struct DBMap *var_storage) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_spiritball_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_script_free_vars_pre ) { + void (*preHookFunc) (struct DBMap *var_storage); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_spiritball_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_spiritball_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_vars_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_free_vars_pre[hIndex].func; + preHookFunc(var_storage); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.spiritball_timer(tid, tick, id, data); + HPMHooks.source.script.free_vars(var_storage); } - if( HPMHooks.count.HP_pc_spiritball_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_spiritball_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_spiritball_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_free_vars_post ) { + void (*postHookFunc) (struct DBMap *var_storage); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_vars_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_free_vars_post[hIndex].func; + postHookFunc(var_storage); } } - return retVal___; + return; } -int HP_pc_check_banding(struct block_list *bl, va_list ap) { +struct script_state* HP_script_alloc_state(struct script_code *rootscript, int pos, int rid, int oid) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_check_banding_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + struct script_state* retVal___ = NULL; + if( HPMHooks.count.HP_script_alloc_state_pre ) { + struct script_state* (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_banding_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_pc_check_banding_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_alloc_state_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_alloc_state_pre[hIndex].func; + retVal___ = preHookFunc(rootscript, &pos, &rid, &oid); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52451,56 +58925,51 @@ int HP_pc_check_banding(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.pc.check_banding(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.script.alloc_state(rootscript, pos, rid, oid); } - if( HPMHooks.count.HP_pc_check_banding_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_banding_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_pc_check_banding_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_script_alloc_state_post ) { + struct script_state* (*postHookFunc) (struct script_state* retVal___, struct script_code *rootscript, int *pos, int *rid, int *oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_alloc_state_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_alloc_state_post[hIndex].func; + retVal___ = postHookFunc(retVal___, rootscript, &pos, &rid, &oid); } } return retVal___; } -int HP_pc_inventory_rental_end(int tid, int64 tick, int id, intptr_t data) { +void HP_script_free_state(struct script_state *st) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_inventory_rental_end_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_script_free_state_pre ) { + void (*preHookFunc) (struct script_state *st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_end_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_inventory_rental_end_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_state_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_free_state_pre[hIndex].func; + preHookFunc(st); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.inventory_rental_end(tid, tick, id, data); + HPMHooks.source.script.free_state(st); } - if( HPMHooks.count.HP_pc_inventory_rental_end_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_end_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_inventory_rental_end_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_free_state_post ) { + void (*postHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_state_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_free_state_post[hIndex].func; + postHookFunc(st); } } - return retVal___; + return; } -void HP_pc_check_skilltree(struct map_session_data *sd, int skill_id) { +void HP_script_add_pending_ref(struct script_state *st, struct reg_db *ref) { int hIndex = 0; - if( HPMHooks.count.HP_pc_check_skilltree_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *skill_id); + if( HPMHooks.count.HP_script_add_pending_ref_pre ) { + void (*preHookFunc) (struct script_state *st, struct reg_db *ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_skilltree_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_check_skilltree_pre[hIndex].func; - preHookFunc(sd, &skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_add_pending_ref_pre[hIndex].func; + preHookFunc(st, ref); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52508,107 +58977,104 @@ void HP_pc_check_skilltree(struct map_session_data *sd, int skill_id) { } } { - HPMHooks.source.pc.check_skilltree(sd, skill_id); + HPMHooks.source.script.add_pending_ref(st, ref); } - if( HPMHooks.count.HP_pc_check_skilltree_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_skilltree_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_check_skilltree_post[hIndex].func; - postHookFunc(sd, &skill_id); + if( HPMHooks.count.HP_script_add_pending_ref_post ) { + void (*postHookFunc) (struct script_state *st, struct reg_db *ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_add_pending_ref_post[hIndex].func; + postHookFunc(st, ref); } } return; } -int HP_pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv, short rate, short flag, short card_id) { +void HP_script_run_autobonus(const char *autobonus, int id, int pos) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus_autospell_pre ) { - int (*preHookFunc) (struct s_autospell *spell, int *max, short *id, short *lv, short *rate, short *flag, short *card_id); + if( HPMHooks.count.HP_script_run_autobonus_pre ) { + void (*preHookFunc) (const char *autobonus, int *id, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_bonus_autospell_pre[hIndex].func; - retVal___ = preHookFunc(spell, &max, &id, &lv, &rate, &flag, &card_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_autobonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_run_autobonus_pre[hIndex].func; + preHookFunc(autobonus, &id, &pos); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.bonus_autospell(spell, max, id, lv, rate, flag, card_id); + HPMHooks.source.script.run_autobonus(autobonus, id, pos); } - if( HPMHooks.count.HP_pc_bonus_autospell_post ) { - int (*postHookFunc) (int retVal___, struct s_autospell *spell, int *max, short *id, short *lv, short *rate, short *flag, short *card_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_bonus_autospell_post[hIndex].func; - retVal___ = postHookFunc(retVal___, spell, &max, &id, &lv, &rate, &flag, &card_id); + if( HPMHooks.count.HP_script_run_autobonus_post ) { + void (*postHookFunc) (const char *autobonus, int *id, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_autobonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_run_autobonus_post[hIndex].func; + postHookFunc(autobonus, &id, &pos); } } - return retVal___; + return; } -int HP_pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, short card_id) { +void HP_script_cleararray_pc(struct map_session_data *sd, const char *varname, void *value) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus_autospell_onskill_pre ) { - int (*preHookFunc) (struct s_autospell *spell, int *max, short *src_skill, short *id, short *lv, short *rate, short *card_id); + if( HPMHooks.count.HP_script_cleararray_pc_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *varname, void *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_onskill_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_bonus_autospell_onskill_pre[hIndex].func; - retVal___ = preHookFunc(spell, &max, &src_skill, &id, &lv, &rate, &card_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleararray_pc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_cleararray_pc_pre[hIndex].func; + preHookFunc(sd, varname, value); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.bonus_autospell_onskill(spell, max, src_skill, id, lv, rate, card_id); + HPMHooks.source.script.cleararray_pc(sd, varname, value); } - if( HPMHooks.count.HP_pc_bonus_autospell_onskill_post ) { - int (*postHookFunc) (int retVal___, struct s_autospell *spell, int *max, short *src_skill, short *id, short *lv, short *rate, short *card_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_onskill_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_bonus_autospell_onskill_post[hIndex].func; - retVal___ = postHookFunc(retVal___, spell, &max, &src_skill, &id, &lv, &rate, &card_id); + if( HPMHooks.count.HP_script_cleararray_pc_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *varname, void *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleararray_pc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_cleararray_pc_post[hIndex].func; + postHookFunc(sd, varname, value); } } - return retVal___; + return; } -int HP_pc_bonus_addeff(struct s_addeffect *effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration) { +void HP_script_setarray_pc(struct map_session_data *sd, const char *varname, uint32 idx, void *value, int *refcache) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus_addeff_pre ) { - int (*preHookFunc) (struct s_addeffect *effect, int *max, enum sc_type *id, int16 *rate, int16 *arrow_rate, uint8 *flag, uint16 *duration); + if( HPMHooks.count.HP_script_setarray_pc_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *varname, uint32 *idx, void *value, int *refcache); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_bonus_addeff_pre[hIndex].func; - retVal___ = preHookFunc(effect, &max, &id, &rate, &arrow_rate, &flag, &duration); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setarray_pc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_setarray_pc_pre[hIndex].func; + preHookFunc(sd, varname, &idx, value, refcache); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.bonus_addeff(effect, max, id, rate, arrow_rate, flag, duration); + HPMHooks.source.script.setarray_pc(sd, varname, idx, value, refcache); } - if( HPMHooks.count.HP_pc_bonus_addeff_post ) { - int (*postHookFunc) (int retVal___, struct s_addeffect *effect, int *max, enum sc_type *id, int16 *rate, int16 *arrow_rate, uint8 *flag, uint16 *duration); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_bonus_addeff_post[hIndex].func; - retVal___ = postHookFunc(retVal___, effect, &max, &id, &rate, &arrow_rate, &flag, &duration); + if( HPMHooks.count.HP_script_setarray_pc_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *varname, uint32 *idx, void *value, int *refcache); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setarray_pc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_setarray_pc_post[hIndex].func; + postHookFunc(sd, varname, &idx, value, refcache); } } - return retVal___; + return; } -int HP_pc_bonus_addeff_onskill(struct s_addeffectonskill *effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target) { +int HP_script_config_read(char *cfgName) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus_addeff_onskill_pre ) { - int (*preHookFunc) (struct s_addeffectonskill *effect, int *max, enum sc_type *id, short *rate, short *skill_id, unsigned char *target); + if( HPMHooks.count.HP_script_config_read_pre ) { + int (*preHookFunc) (char *cfgName); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_onskill_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_bonus_addeff_onskill_pre[hIndex].func; - retVal___ = preHookFunc(effect, &max, &id, &rate, &skill_id, &target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_config_read_pre[hIndex].func; + retVal___ = preHookFunc(cfgName); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52616,26 +59082,26 @@ int HP_pc_bonus_addeff_onskill(struct s_addeffectonskill *effect, int max, enum } } { - retVal___ = HPMHooks.source.pc.bonus_addeff_onskill(effect, max, id, rate, skill_id, target); + retVal___ = HPMHooks.source.script.config_read(cfgName); } - if( HPMHooks.count.HP_pc_bonus_addeff_onskill_post ) { - int (*postHookFunc) (int retVal___, struct s_addeffectonskill *effect, int *max, enum sc_type *id, short *rate, short *skill_id, unsigned char *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_onskill_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_bonus_addeff_onskill_post[hIndex].func; - retVal___ = postHookFunc(retVal___, effect, &max, &id, &rate, &skill_id, &target); + if( HPMHooks.count.HP_script_config_read_post ) { + int (*postHookFunc) (int retVal___, char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cfgName); } } return retVal___; } -int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, short group, int race, int rate) { +int HP_script_add_str(const char *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus_item_drop_pre ) { - int (*preHookFunc) (struct s_add_drop *drop, const short *max, short *id, short *group, int *race, int *rate); + if( HPMHooks.count.HP_script_add_str_pre ) { + int (*preHookFunc) (const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_item_drop_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_bonus_item_drop_pre[hIndex].func; - retVal___ = preHookFunc(drop, &max, &id, &group, &race, &rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_add_str_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52643,52 +59109,53 @@ int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, sh } } { - retVal___ = HPMHooks.source.pc.bonus_item_drop(drop, max, id, group, race, rate); + retVal___ = HPMHooks.source.script.add_str(p); } - if( HPMHooks.count.HP_pc_bonus_item_drop_post ) { - int (*postHookFunc) (int retVal___, struct s_add_drop *drop, const short *max, short *id, short *group, int *race, int *rate); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_item_drop_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_bonus_item_drop_post[hIndex].func; - retVal___ = postHookFunc(retVal___, drop, &max, &id, &group, &race, &rate); + if( HPMHooks.count.HP_script_add_str_post ) { + int (*postHookFunc) (int retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_add_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } return retVal___; } -void HP_pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src) { +const char* HP_script_get_str(int id) { int hIndex = 0; - if( HPMHooks.count.HP_pc_calcexp_pre ) { - void (*preHookFunc) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_get_str_pre ) { + const char* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_calcexp_pre[hIndex].func; - preHookFunc(sd, base_exp, job_exp, src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_get_str_pre[hIndex].func; + retVal___ = preHookFunc(&id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.calcexp(sd, base_exp, job_exp, src); + retVal___ = HPMHooks.source.script.get_str(id); } - if( HPMHooks.count.HP_pc_calcexp_post ) { - void (*postHookFunc) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_calcexp_post[hIndex].func; - postHookFunc(sd, base_exp, job_exp, src); + if( HPMHooks.count.HP_script_get_str_post ) { + const char* (*postHookFunc) (const char* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_get_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); } } - return; + return retVal___; } -int HP_pc_respawn_timer(int tid, int64 tick, int id, intptr_t data) { +int HP_script_search_str(const char *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_respawn_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_script_search_str_pre ) { + int (*preHookFunc) (const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_respawn_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_search_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_search_str_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52696,86 +59163,78 @@ int HP_pc_respawn_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.pc.respawn_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.script.search_str(p); } - if( HPMHooks.count.HP_pc_respawn_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_respawn_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_search_str_post ) { + int (*postHookFunc) (int retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_search_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_search_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } return retVal___; } -int HP_pc_jobchange_killclone(struct block_list *bl, va_list ap) { +void HP_script_setd_sub(struct script_state *st, struct map_session_data *sd, const char *varname, int elem, void *value, struct reg_db *ref) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_jobchange_killclone_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_script_setd_sub_pre ) { + void (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *varname, int *elem, void *value, struct reg_db *ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_killclone_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_pc_jobchange_killclone_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setd_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_setd_sub_pre[hIndex].func; + preHookFunc(st, sd, varname, &elem, value, ref); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.pc.jobchange_killclone(bl, ap___copy); - va_end(ap___copy); + HPMHooks.source.script.setd_sub(st, sd, varname, elem, value, ref); } - if( HPMHooks.count.HP_pc_jobchange_killclone_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_killclone_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_pc_jobchange_killclone_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_script_setd_sub_post ) { + void (*postHookFunc) (struct script_state *st, struct map_session_data *sd, const char *varname, int *elem, void *value, struct reg_db *ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setd_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_setd_sub_post[hIndex].func; + postHookFunc(st, sd, varname, &elem, value, ref); } } - return retVal___; + return; } -int HP_pc_getstat(struct map_session_data *sd, int type) { +void HP_script_attach_state(struct script_state *st) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_getstat_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + if( HPMHooks.count.HP_script_attach_state_pre ) { + void (*preHookFunc) (struct script_state *st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getstat_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_getstat_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_attach_state_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_attach_state_pre[hIndex].func; + preHookFunc(st); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.getstat(sd, type); + HPMHooks.source.script.attach_state(st); } - if( HPMHooks.count.HP_pc_getstat_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getstat_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_getstat_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type); + if( HPMHooks.count.HP_script_attach_state_post ) { + void (*postHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_attach_state_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_attach_state_post[hIndex].func; + postHookFunc(st); } } - return retVal___; + return; } -int HP_pc_setstat(struct map_session_data *sd, int type, int val) { +struct hQueue* HP_script_queue(int idx) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_setstat_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + struct hQueue* retVal___ = NULL; + if( HPMHooks.count.HP_script_queue_pre ) { + struct hQueue* (*preHookFunc) (int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstat_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_setstat_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type, &val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_queue_pre[hIndex].func; + retVal___ = preHookFunc(&idx); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52783,26 +59242,26 @@ int HP_pc_setstat(struct map_session_data *sd, int type, int val) { } } { - retVal___ = HPMHooks.source.pc.setstat(sd, type, val); + retVal___ = HPMHooks.source.script.queue(idx); } - if( HPMHooks.count.HP_pc_setstat_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstat_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_setstat_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type, &val); + if( HPMHooks.count.HP_script_queue_post ) { + struct hQueue* (*postHookFunc) (struct hQueue* retVal___, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_queue_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &idx); } } return retVal___; } -int HP_pc_eventtimer(int tid, int64 tick, int id, intptr_t data) { +bool HP_script_queue_add(int idx, int var) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_eventtimer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + bool retVal___ = false; + if( HPMHooks.count.HP_script_queue_add_pre ) { + bool (*preHookFunc) (int *idx, int *var); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_eventtimer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_eventtimer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_queue_add_pre[hIndex].func; + retVal___ = preHookFunc(&idx, &var); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52810,28 +59269,26 @@ int HP_pc_eventtimer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.pc.eventtimer(tid, tick, id, data); + retVal___ = HPMHooks.source.script.queue_add(idx, var); } - if( HPMHooks.count.HP_pc_eventtimer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_eventtimer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_eventtimer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_queue_add_post ) { + bool (*postHookFunc) (bool retVal___, int *idx, int *var); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_queue_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &idx, &var); } } return retVal___; } -int HP_pc_daynight_timer_sub(struct map_session_data *sd, va_list ap) { +bool HP_script_queue_del(int idx) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_daynight_timer_sub_pre ) { - int (*preHookFunc) (struct map_session_data *sd, va_list ap); + bool retVal___ = false; + if( HPMHooks.count.HP_script_queue_del_pre ) { + bool (*preHookFunc) (int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_daynight_timer_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_pc_daynight_timer_sub_pre[hIndex].func; - retVal___ = preHookFunc(sd, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_del_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_queue_del_pre[hIndex].func; + retVal___ = preHookFunc(&idx); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52839,30 +59296,26 @@ int HP_pc_daynight_timer_sub(struct map_session_data *sd, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.pc.daynight_timer_sub(sd, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.script.queue_del(idx); } - if( HPMHooks.count.HP_pc_daynight_timer_sub_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_daynight_timer_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_pc_daynight_timer_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_script_queue_del_post ) { + bool (*postHookFunc) (bool retVal___, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_del_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_queue_del_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &idx); } } return retVal___; } -int HP_pc_charm_timer(int tid, int64 tick, int id, intptr_t data) { +bool HP_script_queue_remove(int idx, int var) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_charm_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + bool retVal___ = false; + if( HPMHooks.count.HP_script_queue_remove_pre ) { + bool (*preHookFunc) (int *idx, int *var); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_charm_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_charm_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_queue_remove_pre[hIndex].func; + retVal___ = preHookFunc(&idx, &var); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52870,26 +59323,26 @@ int HP_pc_charm_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.pc.charm_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.script.queue_remove(idx, var); } - if( HPMHooks.count.HP_pc_charm_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_charm_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_charm_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_queue_remove_post ) { + bool (*postHookFunc) (bool retVal___, int *idx, int *var); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_queue_remove_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &idx, &var); } } return retVal___; } -bool HP_pc_readdb_levelpenalty(char *fields[], int columns, int current) { +int HP_script_queue_create(void) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pc_readdb_levelpenalty_pre ) { - bool (*preHookFunc) (char *fields[], int *columns, int *current); + int retVal___ = 0; + if( HPMHooks.count.HP_script_queue_create_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_levelpenalty_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_readdb_levelpenalty_pre[hIndex].func; - retVal___ = preHookFunc(fields, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_queue_create_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52897,53 +59350,52 @@ bool HP_pc_readdb_levelpenalty(char *fields[], int columns, int current) { } } { - retVal___ = HPMHooks.source.pc.readdb_levelpenalty(fields, columns, current); + retVal___ = HPMHooks.source.script.queue_create(); } - if( HPMHooks.count.HP_pc_readdb_levelpenalty_post ) { - bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_levelpenalty_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_readdb_levelpenalty_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + if( HPMHooks.count.HP_script_queue_create_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_queue_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_pc_autosave(int tid, int64 tick, int id, intptr_t data) { +void HP_script_queue_clear(int idx) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_autosave_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_script_queue_clear_pre ) { + void (*preHookFunc) (int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autosave_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_autosave_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_queue_clear_pre[hIndex].func; + preHookFunc(&idx); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.autosave(tid, tick, id, data); + HPMHooks.source.script.queue_clear(idx); } - if( HPMHooks.count.HP_pc_autosave_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autosave_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_autosave_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_queue_clear_post ) { + void (*postHookFunc) (int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_queue_clear_post[hIndex].func; + postHookFunc(&idx); } } - return retVal___; + return; } -int HP_pc_follow_timer(int tid, int64 tick, int id, intptr_t data) { +const char* HP_script_parse_curly_close(const char *p) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_follow_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_curly_close_pre ) { + const char* (*preHookFunc) (const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_follow_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_curly_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_curly_close_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52951,52 +59403,53 @@ int HP_pc_follow_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.pc.follow_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.script.parse_curly_close(p); } - if( HPMHooks.count.HP_pc_follow_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_follow_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_parse_curly_close_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_curly_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_curly_close_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } return retVal___; } -void HP_pc_read_skill_tree(void) { +const char* HP_script_parse_syntax_close(const char *p) { int hIndex = 0; - if( HPMHooks.count.HP_pc_read_skill_tree_pre ) { - void (*preHookFunc) (void); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_syntax_close_pre ) { + const char* (*preHookFunc) (const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_tree_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_read_skill_tree_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_syntax_close_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.read_skill_tree(); + retVal___ = HPMHooks.source.script.parse_syntax_close(p); } - if( HPMHooks.count.HP_pc_read_skill_tree_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_tree_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_read_skill_tree_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_script_parse_syntax_close_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_syntax_close_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } - return; + return retVal___; } -int HP_pc_isUseitem(struct map_session_data *sd, int n) { +const char* HP_script_parse_syntax_close_sub(const char *p, int *flag) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_isUseitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_syntax_close_sub_pre ) { + const char* (*preHookFunc) (const char *p, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isUseitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_isUseitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_syntax_close_sub_pre[hIndex].func; + retVal___ = preHookFunc(p, flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53004,28 +59457,26 @@ int HP_pc_isUseitem(struct map_session_data *sd, int n) { } } { - retVal___ = HPMHooks.source.pc.isUseitem(sd, n); + retVal___ = HPMHooks.source.script.parse_syntax_close_sub(p, flag); } - if( HPMHooks.count.HP_pc_isUseitem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isUseitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_isUseitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &n); + if( HPMHooks.count.HP_script_parse_syntax_close_sub_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_syntax_close_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, flag); } } return retVal___; } -int HP_pc_show_steal(struct block_list *bl, va_list ap) { +const char* HP_script_parse_syntax(const char *p) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_show_steal_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_syntax_pre ) { + const char* (*preHookFunc) (const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_show_steal_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_pc_show_steal_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_syntax_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53033,30 +59484,26 @@ int HP_pc_show_steal(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.pc.show_steal(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.script.parse_syntax(p); } - if( HPMHooks.count.HP_pc_show_steal_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_show_steal_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_pc_show_steal_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_script_parse_syntax_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_syntax_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } return retVal___; } -int HP_pc_checkcombo(struct map_session_data *sd, struct item_data *data) { +c_op HP_script_get_com(unsigned char *scriptbuf, int *pos) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkcombo_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct item_data *data); + c_op retVal___ = C_NOP; + if( HPMHooks.count.HP_script_get_com_pre ) { + c_op (*preHookFunc) (unsigned char *scriptbuf, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkcombo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_checkcombo_pre[hIndex].func; - retVal___ = preHookFunc(sd, data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_com_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_get_com_pre[hIndex].func; + retVal___ = preHookFunc(scriptbuf, pos); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53064,26 +59511,26 @@ int HP_pc_checkcombo(struct map_session_data *sd, struct item_data *data) { } } { - retVal___ = HPMHooks.source.pc.checkcombo(sd, data); + retVal___ = HPMHooks.source.script.get_com(scriptbuf, pos); } - if( HPMHooks.count.HP_pc_checkcombo_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkcombo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_checkcombo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, data); + if( HPMHooks.count.HP_script_get_com_post ) { + c_op (*postHookFunc) (c_op retVal___, unsigned char *scriptbuf, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_com_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_get_com_post[hIndex].func; + retVal___ = postHookFunc(retVal___, scriptbuf, pos); } } return retVal___; } -int HP_pc_calcweapontype(struct map_session_data *sd) { +int HP_script_get_num(unsigned char *scriptbuf, int *pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_calcweapontype_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_script_get_num_pre ) { + int (*preHookFunc) (unsigned char *scriptbuf, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcweapontype_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_calcweapontype_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_num_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_get_num_pre[hIndex].func; + retVal___ = preHookFunc(scriptbuf, pos); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53091,26 +59538,26 @@ int HP_pc_calcweapontype(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pc.calcweapontype(sd); + retVal___ = HPMHooks.source.script.get_num(scriptbuf, pos); } - if( HPMHooks.count.HP_pc_calcweapontype_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcweapontype_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_calcweapontype_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_script_get_num_post ) { + int (*postHookFunc) (int retVal___, unsigned char *scriptbuf, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_num_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_get_num_post[hIndex].func; + retVal___ = postHookFunc(retVal___, scriptbuf, pos); } } return retVal___; } -int HP_pc_removecombo(struct map_session_data *sd, struct item_data *data) { +const char* HP_script_op2name(int op) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_removecombo_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct item_data *data); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_op2name_pre ) { + const char* (*preHookFunc) (int *op); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_removecombo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_removecombo_pre[hIndex].func; - retVal___ = preHookFunc(sd, data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op2name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_op2name_pre[hIndex].func; + retVal___ = preHookFunc(&op); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53118,25 +59565,25 @@ int HP_pc_removecombo(struct map_session_data *sd, struct item_data *data) { } } { - retVal___ = HPMHooks.source.pc.removecombo(sd, data); + retVal___ = HPMHooks.source.script.op2name(op); } - if( HPMHooks.count.HP_pc_removecombo_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_removecombo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_removecombo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, data); + if( HPMHooks.count.HP_script_op2name_post ) { + const char* (*postHookFunc) (const char* retVal___, int *op); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op2name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_op2name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &op); } } return retVal___; } -void HP_pc_bank_deposit(struct map_session_data *sd, int money) { +void HP_script_reportsrc(struct script_state *st) { int hIndex = 0; - if( HPMHooks.count.HP_pc_bank_deposit_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *money); + if( HPMHooks.count.HP_script_reportsrc_pre ) { + void (*preHookFunc) (struct script_state *st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_deposit_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_bank_deposit_pre[hIndex].func; - preHookFunc(sd, &money); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportsrc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_reportsrc_pre[hIndex].func; + preHookFunc(st); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53144,25 +59591,25 @@ void HP_pc_bank_deposit(struct map_session_data *sd, int money) { } } { - HPMHooks.source.pc.bank_deposit(sd, money); + HPMHooks.source.script.reportsrc(st); } - if( HPMHooks.count.HP_pc_bank_deposit_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *money); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_deposit_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_bank_deposit_post[hIndex].func; - postHookFunc(sd, &money); + if( HPMHooks.count.HP_script_reportsrc_post ) { + void (*postHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportsrc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_reportsrc_post[hIndex].func; + postHookFunc(st); } } return; } -void HP_pc_bank_withdraw(struct map_session_data *sd, int money) { +void HP_script_reportdata(struct script_data *data) { int hIndex = 0; - if( HPMHooks.count.HP_pc_bank_withdraw_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *money); + if( HPMHooks.count.HP_script_reportdata_pre ) { + void (*preHookFunc) (struct script_data *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_withdraw_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_bank_withdraw_pre[hIndex].func; - preHookFunc(sd, &money); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_reportdata_pre[hIndex].func; + preHookFunc(data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53170,25 +59617,25 @@ void HP_pc_bank_withdraw(struct map_session_data *sd, int money) { } } { - HPMHooks.source.pc.bank_withdraw(sd, money); + HPMHooks.source.script.reportdata(data); } - if( HPMHooks.count.HP_pc_bank_withdraw_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *money); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_withdraw_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_bank_withdraw_post[hIndex].func; - postHookFunc(sd, &money); + if( HPMHooks.count.HP_script_reportdata_post ) { + void (*postHookFunc) (struct script_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_reportdata_post[hIndex].func; + postHookFunc(data); } } return; } -void HP_pc_rental_expire(struct map_session_data *sd, int i) { +void HP_script_reportfunc(struct script_state *st) { int hIndex = 0; - if( HPMHooks.count.HP_pc_rental_expire_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *i); + if( HPMHooks.count.HP_script_reportfunc_pre ) { + void (*preHookFunc) (struct script_state *st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_rental_expire_pre[hIndex].func; - preHookFunc(sd, &i); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportfunc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_reportfunc_pre[hIndex].func; + preHookFunc(st); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53196,25 +59643,25 @@ void HP_pc_rental_expire(struct map_session_data *sd, int i) { } } { - HPMHooks.source.pc.rental_expire(sd, i); + HPMHooks.source.script.reportfunc(st); } - if( HPMHooks.count.HP_pc_rental_expire_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *i); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_rental_expire_post[hIndex].func; - postHookFunc(sd, &i); + if( HPMHooks.count.HP_script_reportfunc_post ) { + void (*postHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportfunc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_reportfunc_post[hIndex].func; + postHookFunc(st); } } return; } -void HP_pc_scdata_received(struct map_session_data *sd) { +void HP_script_disp_warning_message(const char *mes, const char *pos) { int hIndex = 0; - if( HPMHooks.count.HP_pc_scdata_received_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_script_disp_warning_message_pre ) { + void (*preHookFunc) (const char *mes, const char *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_scdata_received_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_warning_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_disp_warning_message_pre[hIndex].func; + preHookFunc(mes, pos); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53222,25 +59669,25 @@ void HP_pc_scdata_received(struct map_session_data *sd) { } } { - HPMHooks.source.pc.scdata_received(sd); + HPMHooks.source.script.disp_warning_message(mes, pos); } - if( HPMHooks.count.HP_pc_scdata_received_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_scdata_received_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_script_disp_warning_message_post ) { + void (*postHookFunc) (const char *mes, const char *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_warning_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_disp_warning_message_post[hIndex].func; + postHookFunc(mes, pos); } } return; } -void HP_pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type type) { +void HP_script_check_event(struct script_state *st, const char *evt) { int hIndex = 0; - if( HPMHooks.count.HP_pc_bound_clear_pre ) { - void (*preHookFunc) (struct map_session_data *sd, enum e_item_bound_type *type); + if( HPMHooks.count.HP_script_check_event_pre ) { + void (*preHookFunc) (struct script_state *st, const char *evt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bound_clear_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_bound_clear_pre[hIndex].func; - preHookFunc(sd, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_check_event_pre[hIndex].func; + preHookFunc(st, evt); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53248,26 +59695,26 @@ void HP_pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type type) } } { - HPMHooks.source.pc.bound_clear(sd, type); + HPMHooks.source.script.check_event(st, evt); } - if( HPMHooks.count.HP_pc_bound_clear_post ) { - void (*postHookFunc) (struct map_session_data *sd, enum e_item_bound_type *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bound_clear_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_bound_clear_post[hIndex].func; - postHookFunc(sd, &type); + if( HPMHooks.count.HP_script_check_event_post ) { + void (*postHookFunc) (struct script_state *st, const char *evt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_check_event_post[hIndex].func; + postHookFunc(st, evt); } } return; } -int HP_pc_expiration_timer(int tid, int64 tick, int id, intptr_t data) { +unsigned int HP_script_calc_hash(const char *p) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_expiration_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_script_calc_hash_pre ) { + unsigned int (*preHookFunc) (const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expiration_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_expiration_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_calc_hash_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53275,52 +59722,51 @@ int HP_pc_expiration_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.pc.expiration_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.script.calc_hash(p); } - if( HPMHooks.count.HP_pc_expiration_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expiration_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_expiration_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_calc_hash_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_calc_hash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } return retVal___; } -int HP_pc_global_expiration_timer(int tid, int64 tick, int id, intptr_t data) { +void HP_script_addb(int a) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_global_expiration_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_script_addb_pre ) { + void (*preHookFunc) (int *a); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_global_expiration_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_global_expiration_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_addb_pre[hIndex].func; + preHookFunc(&a); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.global_expiration_timer(tid, tick, id, data); + HPMHooks.source.script.addb(a); } - if( HPMHooks.count.HP_pc_global_expiration_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_global_expiration_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_global_expiration_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_addb_post ) { + void (*postHookFunc) (int *a); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_addb_post[hIndex].func; + postHookFunc(&a); } } - return retVal___; + return; } -void HP_pc_expire_check(struct map_session_data *sd) { +void HP_script_addc(int a) { int hIndex = 0; - if( HPMHooks.count.HP_pc_expire_check_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_script_addc_pre ) { + void (*preHookFunc) (int *a); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expire_check_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_expire_check_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_addc_pre[hIndex].func; + preHookFunc(&a); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53328,52 +59774,51 @@ void HP_pc_expire_check(struct map_session_data *sd) { } } { - HPMHooks.source.pc.expire_check(sd); + HPMHooks.source.script.addc(a); } - if( HPMHooks.count.HP_pc_expire_check_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expire_check_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_expire_check_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_script_addc_post ) { + void (*postHookFunc) (int *a); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_addc_post[hIndex].func; + postHookFunc(&a); } } return; } -bool HP_pc_db_checkid(unsigned int class_) { +void HP_script_addi(int a) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pc_db_checkid_pre ) { - bool (*preHookFunc) (unsigned int *class_); + if( HPMHooks.count.HP_script_addi_pre ) { + void (*preHookFunc) (int *a); *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_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addi_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_addi_pre[hIndex].func; + preHookFunc(&a); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pc.db_checkid(class_); + HPMHooks.source.script.addi(a); } - if( HPMHooks.count.HP_pc_db_checkid_post ) { - bool (*postHookFunc) (bool retVal___, unsigned 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_); + if( HPMHooks.count.HP_script_addi_post ) { + void (*postHookFunc) (int *a); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addi_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_addi_post[hIndex].func; + postHookFunc(&a); } } - return retVal___; + return; } -void HP_pc_validate_levels(void) { +void HP_script_addl(int l) { int hIndex = 0; - if( HPMHooks.count.HP_pc_validate_levels_pre ) { - void (*preHookFunc) (void); + if( HPMHooks.count.HP_script_addl_pre ) { + void (*preHookFunc) (int *l); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_validate_levels_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_validate_levels_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addl_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_addl_pre[hIndex].func; + preHookFunc(&l); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53381,25 +59826,25 @@ void HP_pc_validate_levels(void) { } } { - HPMHooks.source.pc.validate_levels(); + HPMHooks.source.script.addl(l); } - if( HPMHooks.count.HP_pc_validate_levels_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_validate_levels_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_validate_levels_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_script_addl_post ) { + void (*postHookFunc) (int *l); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addl_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_addl_post[hIndex].func; + postHookFunc(&l); } } return; } -void HP_pc_autotrade_load(void) { +void HP_script_set_label(int l, int pos, const char *script_pos) { int hIndex = 0; - if( HPMHooks.count.HP_pc_autotrade_load_pre ) { - void (*preHookFunc) (void); + if( HPMHooks.count.HP_script_set_label_pre ) { + void (*preHookFunc) (int *l, int *pos, const char *script_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_load_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_autotrade_load_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_label_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_set_label_pre[hIndex].func; + preHookFunc(&l, &pos, script_pos); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53407,103 +59852,106 @@ void HP_pc_autotrade_load(void) { } } { - HPMHooks.source.pc.autotrade_load(); + HPMHooks.source.script.set_label(l, pos, script_pos); } - if( HPMHooks.count.HP_pc_autotrade_load_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_load_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_autotrade_load_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_script_set_label_post ) { + void (*postHookFunc) (int *l, int *pos, const char *script_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_label_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_set_label_post[hIndex].func; + postHookFunc(&l, &pos, script_pos); } } return; } -void HP_pc_autotrade_update(struct map_session_data *sd, enum e_pc_autotrade_update_action action) { +const char* HP_script_skip_word(const char *p) { int hIndex = 0; - if( HPMHooks.count.HP_pc_autotrade_update_pre ) { - void (*preHookFunc) (struct map_session_data *sd, enum e_pc_autotrade_update_action *action); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_skip_word_pre ) { + const char* (*preHookFunc) (const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_update_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_autotrade_update_pre[hIndex].func; - preHookFunc(sd, &action); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_word_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_skip_word_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.autotrade_update(sd, action); + retVal___ = HPMHooks.source.script.skip_word(p); } - if( HPMHooks.count.HP_pc_autotrade_update_post ) { - void (*postHookFunc) (struct map_session_data *sd, enum e_pc_autotrade_update_action *action); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_update_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_autotrade_update_post[hIndex].func; - postHookFunc(sd, &action); + if( HPMHooks.count.HP_script_skip_word_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_word_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_skip_word_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } - return; + return retVal___; } -void HP_pc_autotrade_start(struct map_session_data *sd) { +int HP_script_add_word(const char *p) { int hIndex = 0; - if( HPMHooks.count.HP_pc_autotrade_start_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_script_add_word_pre ) { + int (*preHookFunc) (const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_start_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_autotrade_start_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_word_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_add_word_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.autotrade_start(sd); + retVal___ = HPMHooks.source.script.add_word(p); } - if( HPMHooks.count.HP_pc_autotrade_start_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_start_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_autotrade_start_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_script_add_word_post ) { + int (*postHookFunc) (int retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_word_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_add_word_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } - return; + return retVal___; } -void HP_pc_autotrade_prepare(struct map_session_data *sd) { +const char* HP_script_parse_callfunc(const char *p, int require_paren, int is_custom) { int hIndex = 0; - if( HPMHooks.count.HP_pc_autotrade_prepare_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_callfunc_pre ) { + const char* (*preHookFunc) (const char *p, int *require_paren, int *is_custom); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_prepare_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_autotrade_prepare_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_callfunc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_callfunc_pre[hIndex].func; + retVal___ = preHookFunc(p, &require_paren, &is_custom); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.pc.autotrade_prepare(sd); + retVal___ = HPMHooks.source.script.parse_callfunc(p, require_paren, is_custom); } - if( HPMHooks.count.HP_pc_autotrade_prepare_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_prepare_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_autotrade_prepare_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_script_parse_callfunc_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p, int *require_paren, int *is_custom); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_callfunc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_callfunc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, &require_paren, &is_custom); } } - return; + return retVal___; } -void HP_pc_autotrade_populate(struct map_session_data *sd) { +void HP_script_parse_nextline(bool first, const char *p) { int hIndex = 0; - if( HPMHooks.count.HP_pc_autotrade_populate_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_script_parse_nextline_pre ) { + void (*preHookFunc) (bool *first, const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_populate_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_autotrade_populate_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_nextline_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_nextline_pre[hIndex].func; + preHookFunc(&first, p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53511,26 +59959,26 @@ void HP_pc_autotrade_populate(struct map_session_data *sd) { } } { - HPMHooks.source.pc.autotrade_populate(sd); + HPMHooks.source.script.parse_nextline(first, p); } - if( HPMHooks.count.HP_pc_autotrade_populate_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_populate_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_autotrade_populate_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_script_parse_nextline_post ) { + void (*postHookFunc) (bool *first, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_nextline_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_nextline_post[hIndex].func; + postHookFunc(&first, p); } } return; } -int HP_pc_check_job_name(const char *name) { +const char* HP_script_parse_variable(const char *p) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_check_job_name_pre ) { - int (*preHookFunc) (const char *name); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_variable_pre ) { + const char* (*preHookFunc) (const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_job_name_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pc_check_job_name_pre[hIndex].func; - retVal___ = preHookFunc(name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_variable_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_variable_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53538,27 +59986,26 @@ int HP_pc_check_job_name(const char *name) { } } { - retVal___ = HPMHooks.source.pc.check_job_name(name); + retVal___ = HPMHooks.source.script.parse_variable(p); } - if( HPMHooks.count.HP_pc_check_job_name_post ) { - int (*postHookFunc) (int retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_job_name_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pc_check_job_name_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name); + if( HPMHooks.count.HP_script_parse_variable_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_variable_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_variable_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } return retVal___; } -/* pet */ -int HP_pet_init(bool minimal) { +const char* HP_script_parse_simpleexpr(const char *p) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_init_pre ) { - int (*preHookFunc) (bool *minimal); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_simpleexpr_pre ) { + const char* (*preHookFunc) (const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_init_pre[hIndex].func; - retVal___ = preHookFunc(&minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53566,26 +60013,26 @@ int HP_pet_init(bool minimal) { } } { - retVal___ = HPMHooks.source.pet.init(minimal); + retVal___ = HPMHooks.source.script.parse_simpleexpr(p); } - if( HPMHooks.count.HP_pet_init_post ) { - int (*postHookFunc) (int retVal___, bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &minimal); + if( HPMHooks.count.HP_script_parse_simpleexpr_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } return retVal___; } -int HP_pet_final(void) { +const char* HP_script_parse_expr(const char *p) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_final_pre ) { - int (*preHookFunc) (void); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_expr_pre ) { + const char* (*preHookFunc) (const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_final_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_expr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_expr_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53593,26 +60040,26 @@ int HP_pet_final(void) { } } { - retVal___ = HPMHooks.source.pet.final(); + retVal___ = HPMHooks.source.script.parse_expr(p); } - if( HPMHooks.count.HP_pet_final_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_final_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_script_parse_expr_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_expr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_expr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } return retVal___; } -int HP_pet_hungry_val(struct pet_data *pd) { +const char* HP_script_parse_line(const char *p) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_hungry_val_pre ) { - int (*preHookFunc) (struct pet_data *pd); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_line_pre ) { + const char* (*preHookFunc) (const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_val_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_hungry_val_pre[hIndex].func; - retVal___ = preHookFunc(pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_line_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_line_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53620,25 +60067,25 @@ int HP_pet_hungry_val(struct pet_data *pd) { } } { - retVal___ = HPMHooks.source.pet.hungry_val(pd); + retVal___ = HPMHooks.source.script.parse_line(p); } - if( HPMHooks.count.HP_pet_hungry_val_post ) { - int (*postHookFunc) (int retVal___, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_val_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_hungry_val_post[hIndex].func; - retVal___ = postHookFunc(retVal___, pd); + if( HPMHooks.count.HP_script_parse_line_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_line_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_line_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } return retVal___; } -void HP_pet_set_intimate(struct pet_data *pd, int value) { +void HP_script_read_constdb(void) { int hIndex = 0; - if( HPMHooks.count.HP_pet_set_intimate_pre ) { - void (*preHookFunc) (struct pet_data *pd, int *value); + if( HPMHooks.count.HP_script_read_constdb_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_set_intimate_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_set_intimate_pre[hIndex].func; - preHookFunc(pd, &value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_read_constdb_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53646,26 +60093,26 @@ void HP_pet_set_intimate(struct pet_data *pd, int value) { } } { - HPMHooks.source.pet.set_intimate(pd, value); + HPMHooks.source.script.read_constdb(); } - if( HPMHooks.count.HP_pet_set_intimate_post ) { - void (*postHookFunc) (struct pet_data *pd, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_set_intimate_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_set_intimate_post[hIndex].func; - postHookFunc(pd, &value); + if( HPMHooks.count.HP_script_read_constdb_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_read_constdb_post[hIndex].func; + postHookFunc(); } } return; } -int HP_pet_create_egg(struct map_session_data *sd, int item_id) { +const char* HP_script_print_line(StringBuf *buf, const char *p, const char *mark, int line) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_create_egg_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *item_id); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_print_line_pre ) { + const char* (*preHookFunc) (StringBuf *buf, const char *p, const char *mark, int *line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_create_egg_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_create_egg_pre[hIndex].func; - retVal___ = preHookFunc(sd, &item_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_print_line_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_print_line_pre[hIndex].func; + retVal___ = preHookFunc(buf, p, mark, &line); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53673,53 +60120,52 @@ int HP_pet_create_egg(struct map_session_data *sd, int item_id) { } } { - retVal___ = HPMHooks.source.pet.create_egg(sd, item_id); + retVal___ = HPMHooks.source.script.print_line(buf, p, mark, line); } - if( HPMHooks.count.HP_pet_create_egg_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *item_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_create_egg_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_create_egg_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &item_id); + if( HPMHooks.count.HP_script_print_line_post ) { + const char* (*postHookFunc) (const char* retVal___, StringBuf *buf, const char *p, const char *mark, int *line); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_print_line_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_print_line_post[hIndex].func; + retVal___ = postHookFunc(retVal___, buf, p, mark, &line); } } return retVal___; } -int HP_pet_unlocktarget(struct pet_data *pd) { +void HP_script_errorwarning_sub(StringBuf *buf, const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_unlocktarget_pre ) { - int (*preHookFunc) (struct pet_data *pd); + if( HPMHooks.count.HP_script_errorwarning_sub_pre ) { + void (*preHookFunc) (StringBuf *buf, const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unlocktarget_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_unlocktarget_pre[hIndex].func; - retVal___ = preHookFunc(pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_errorwarning_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_errorwarning_sub_pre[hIndex].func; + preHookFunc(buf, src, file, &start_line, error_msg, error_pos); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pet.unlocktarget(pd); + HPMHooks.source.script.errorwarning_sub(buf, src, file, start_line, error_msg, error_pos); } - if( HPMHooks.count.HP_pet_unlocktarget_post ) { - int (*postHookFunc) (int retVal___, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unlocktarget_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_unlocktarget_post[hIndex].func; - retVal___ = postHookFunc(retVal___, pd); + if( HPMHooks.count.HP_script_errorwarning_sub_post ) { + void (*postHookFunc) (StringBuf *buf, const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_errorwarning_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_errorwarning_sub_post[hIndex].func; + postHookFunc(buf, src, file, &start_line, error_msg, error_pos); } } - return retVal___; + return; } -int HP_pet_attackskill(struct pet_data *pd, int target_id) { +int HP_script_set_reg(struct script_state *st, TBL_PC *sd, int64 num, const char *name, const void *value, struct reg_db *ref) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_attackskill_pre ) { - int (*preHookFunc) (struct pet_data *pd, int *target_id); + if( HPMHooks.count.HP_script_set_reg_pre ) { + int (*preHookFunc) (struct script_state *st, TBL_PC *sd, int64 *num, const char *name, const void *value, struct reg_db *ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_attackskill_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_attackskill_pre[hIndex].func; - retVal___ = preHookFunc(pd, &target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_set_reg_pre[hIndex].func; + retVal___ = preHookFunc(st, sd, &num, name, value, ref); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53727,53 +60173,52 @@ int HP_pet_attackskill(struct pet_data *pd, int target_id) { } } { - retVal___ = HPMHooks.source.pet.attackskill(pd, target_id); + retVal___ = HPMHooks.source.script.set_reg(st, sd, num, name, value, ref); } - if( HPMHooks.count.HP_pet_attackskill_post ) { - int (*postHookFunc) (int retVal___, struct pet_data *pd, int *target_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_attackskill_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_attackskill_post[hIndex].func; - retVal___ = postHookFunc(retVal___, pd, &target_id); + if( HPMHooks.count.HP_script_set_reg_post ) { + int (*postHookFunc) (int retVal___, struct script_state *st, TBL_PC *sd, int64 *num, const char *name, const void *value, struct reg_db *ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_set_reg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, sd, &num, name, value, ref); } } return retVal___; } -int HP_pet_target_check(struct map_session_data *sd, struct block_list *bl, int type) { +void HP_script_stack_expand(struct script_stack *stack) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_target_check_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, int *type); + if( HPMHooks.count.HP_script_stack_expand_pre ) { + void (*preHookFunc) (struct script_stack *stack); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_target_check_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_target_check_pre[hIndex].func; - retVal___ = preHookFunc(sd, bl, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stack_expand_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_stack_expand_pre[hIndex].func; + preHookFunc(stack); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pet.target_check(sd, bl, type); + HPMHooks.source.script.stack_expand(stack); } - if( HPMHooks.count.HP_pet_target_check_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_target_check_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_target_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, bl, &type); + if( HPMHooks.count.HP_script_stack_expand_post ) { + void (*postHookFunc) (struct script_stack *stack); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stack_expand_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_stack_expand_post[hIndex].func; + postHookFunc(stack); } } - return retVal___; + return; } -int HP_pet_sc_check(struct map_session_data *sd, int type) { +struct script_data* HP_script_push_retinfo(struct script_stack *stack, struct script_retinfo *ri, struct reg_db *ref) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_sc_check_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + struct script_data* retVal___ = NULL; + if( HPMHooks.count.HP_script_push_retinfo_pre ) { + struct script_data* (*preHookFunc) (struct script_stack *stack, struct script_retinfo *ri, struct reg_db *ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_sc_check_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_sc_check_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_retinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_push_retinfo_pre[hIndex].func; + retVal___ = preHookFunc(stack, ri, ref); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53781,215 +60226,210 @@ int HP_pet_sc_check(struct map_session_data *sd, int type) { } } { - retVal___ = HPMHooks.source.pet.sc_check(sd, type); + retVal___ = HPMHooks.source.script.push_retinfo(stack, ri, ref); } - if( HPMHooks.count.HP_pet_sc_check_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_sc_check_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_sc_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type); + if( HPMHooks.count.HP_script_push_retinfo_post ) { + struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, struct script_retinfo *ri, struct reg_db *ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_retinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_push_retinfo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, stack, ri, ref); } } return retVal___; } -int HP_pet_hungry(int tid, int64 tick, int id, intptr_t data) { +void HP_script_op_3(struct script_state *st, int op) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_hungry_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_script_op_3_pre ) { + void (*preHookFunc) (struct script_state *st, int *op); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_hungry_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_3_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_op_3_pre[hIndex].func; + preHookFunc(st, &op); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pet.hungry(tid, tick, id, data); + HPMHooks.source.script.op_3(st, op); } - if( HPMHooks.count.HP_pet_hungry_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_hungry_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_op_3_post ) { + void (*postHookFunc) (struct script_state *st, int *op); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_3_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_op_3_post[hIndex].func; + postHookFunc(st, &op); } } - return retVal___; + return; } -int HP_pet_search_petDB_index(int key, int type) { +void HP_script_op_2str(struct script_state *st, int op, const char *s1, const char *s2) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_search_petDB_index_pre ) { - int (*preHookFunc) (int *key, int *type); + if( HPMHooks.count.HP_script_op_2str_pre ) { + void (*preHookFunc) (struct script_state *st, int *op, const char *s1, const char *s2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_search_petDB_index_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_search_petDB_index_pre[hIndex].func; - retVal___ = preHookFunc(&key, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_op_2str_pre[hIndex].func; + preHookFunc(st, &op, s1, s2); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pet.search_petDB_index(key, type); + HPMHooks.source.script.op_2str(st, op, s1, s2); } - if( HPMHooks.count.HP_pet_search_petDB_index_post ) { - int (*postHookFunc) (int retVal___, int *key, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_search_petDB_index_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_search_petDB_index_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, &type); + if( HPMHooks.count.HP_script_op_2str_post ) { + void (*postHookFunc) (struct script_state *st, int *op, const char *s1, const char *s2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_op_2str_post[hIndex].func; + postHookFunc(st, &op, s1, s2); } } - return retVal___; + return; } -int HP_pet_hungry_timer_delete(struct pet_data *pd) { +void HP_script_op_2num(struct script_state *st, int op, int i1, int i2) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_hungry_timer_delete_pre ) { - int (*preHookFunc) (struct pet_data *pd); + if( HPMHooks.count.HP_script_op_2num_pre ) { + void (*preHookFunc) (struct script_state *st, int *op, int *i1, int *i2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_timer_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_hungry_timer_delete_pre[hIndex].func; - retVal___ = preHookFunc(pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2num_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_op_2num_pre[hIndex].func; + preHookFunc(st, &op, &i1, &i2); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pet.hungry_timer_delete(pd); + HPMHooks.source.script.op_2num(st, op, i1, i2); } - if( HPMHooks.count.HP_pet_hungry_timer_delete_post ) { - int (*postHookFunc) (int retVal___, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_timer_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_hungry_timer_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, pd); + if( HPMHooks.count.HP_script_op_2num_post ) { + void (*postHookFunc) (struct script_state *st, int *op, int *i1, int *i2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2num_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_op_2num_post[hIndex].func; + postHookFunc(st, &op, &i1, &i2); } } - return retVal___; + return; } -int HP_pet_performance(struct map_session_data *sd, struct pet_data *pd) { +void HP_script_op_2(struct script_state *st, int op) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_performance_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd); + if( HPMHooks.count.HP_script_op_2_pre ) { + void (*preHookFunc) (struct script_state *st, int *op); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_performance_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_performance_pre[hIndex].func; - retVal___ = preHookFunc(sd, pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_op_2_pre[hIndex].func; + preHookFunc(st, &op); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pet.performance(sd, pd); + HPMHooks.source.script.op_2(st, op); } - if( HPMHooks.count.HP_pet_performance_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_performance_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_performance_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, pd); + if( HPMHooks.count.HP_script_op_2_post ) { + void (*postHookFunc) (struct script_state *st, int *op); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_op_2_post[hIndex].func; + postHookFunc(st, &op); } } - return retVal___; + return; } -int HP_pet_return_egg(struct map_session_data *sd, struct pet_data *pd) { +void HP_script_op_1(struct script_state *st, int op) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_return_egg_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd); + if( HPMHooks.count.HP_script_op_1_pre ) { + void (*preHookFunc) (struct script_state *st, int *op); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_return_egg_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_return_egg_pre[hIndex].func; - retVal___ = preHookFunc(sd, pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_1_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_op_1_pre[hIndex].func; + preHookFunc(st, &op); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pet.return_egg(sd, pd); + HPMHooks.source.script.op_1(st, op); } - if( HPMHooks.count.HP_pet_return_egg_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_return_egg_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_return_egg_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, pd); + if( HPMHooks.count.HP_script_op_1_post ) { + void (*postHookFunc) (struct script_state *st, int *op); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_1_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_op_1_post[hIndex].func; + postHookFunc(st, &op); } } - return retVal___; + return; } -int HP_pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) { +void HP_script_check_buildin_argtype(struct script_state *st, int func) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_data_init_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct s_pet *petinfo); + if( HPMHooks.count.HP_script_check_buildin_argtype_pre ) { + void (*preHookFunc) (struct script_state *st, int *func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_data_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_data_init_pre[hIndex].func; - retVal___ = preHookFunc(sd, petinfo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_buildin_argtype_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_check_buildin_argtype_pre[hIndex].func; + preHookFunc(st, &func); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } - { - retVal___ = HPMHooks.source.pet.data_init(sd, petinfo); - } - if( HPMHooks.count.HP_pet_data_init_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_pet *petinfo); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_data_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_data_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, petinfo); + { + HPMHooks.source.script.check_buildin_argtype(st, func); + } + if( HPMHooks.count.HP_script_check_buildin_argtype_post ) { + void (*postHookFunc) (struct script_state *st, int *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_buildin_argtype_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_check_buildin_argtype_post[hIndex].func; + postHookFunc(st, &func); } } - return retVal___; + return; } -int HP_pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) { +void HP_script_detach_state(struct script_state *st, bool dequeue_event) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_birth_process_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct s_pet *petinfo); + if( HPMHooks.count.HP_script_detach_state_pre ) { + void (*preHookFunc) (struct script_state *st, bool *dequeue_event); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_birth_process_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_birth_process_pre[hIndex].func; - retVal___ = preHookFunc(sd, petinfo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_state_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_detach_state_pre[hIndex].func; + preHookFunc(st, &dequeue_event); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pet.birth_process(sd, petinfo); + HPMHooks.source.script.detach_state(st, dequeue_event); } - if( HPMHooks.count.HP_pet_birth_process_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_pet *petinfo); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_birth_process_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_birth_process_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, petinfo); + if( HPMHooks.count.HP_script_detach_state_post ) { + void (*postHookFunc) (struct script_state *st, bool *dequeue_event); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_state_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_detach_state_post[hIndex].func; + postHookFunc(st, &dequeue_event); } } - return retVal___; + return; } -int HP_pet_recv_petdata(int account_id, struct s_pet *p, int flag) { +int HP_script_db_free_code_sub(DBKey key, DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_recv_petdata_pre ) { - int (*preHookFunc) (int *account_id, struct s_pet *p, int *flag); + if( HPMHooks.count.HP_script_db_free_code_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recv_petdata_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_recv_petdata_pre[hIndex].func; - retVal___ = preHookFunc(&account_id, p, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_db_free_code_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_db_free_code_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -53997,53 +60437,56 @@ int HP_pet_recv_petdata(int account_id, struct s_pet *p, int flag) { } } { - retVal___ = HPMHooks.source.pet.recv_petdata(account_id, p, flag); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.db_free_code_sub(key, data, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pet_recv_petdata_post ) { - int (*postHookFunc) (int retVal___, int *account_id, struct s_pet *p, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recv_petdata_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_recv_petdata_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &account_id, p, &flag); + if( HPMHooks.count.HP_script_db_free_code_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_db_free_code_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_db_free_code_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pet_select_egg(struct map_session_data *sd, short egg_index) { +void HP_script_add_autobonus(const char *autobonus) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_select_egg_pre ) { - int (*preHookFunc) (struct map_session_data *sd, short *egg_index); + if( HPMHooks.count.HP_script_add_autobonus_pre ) { + void (*preHookFunc) (const char *autobonus); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_select_egg_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_select_egg_pre[hIndex].func; - retVal___ = preHookFunc(sd, &egg_index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_autobonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_add_autobonus_pre[hIndex].func; + preHookFunc(autobonus); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pet.select_egg(sd, egg_index); + HPMHooks.source.script.add_autobonus(autobonus); } - if( HPMHooks.count.HP_pet_select_egg_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *egg_index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_select_egg_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_select_egg_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &egg_index); + if( HPMHooks.count.HP_script_add_autobonus_post ) { + void (*postHookFunc) (const char *autobonus); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_autobonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_add_autobonus_post[hIndex].func; + postHookFunc(autobonus); } } - return retVal___; + return; } -int HP_pet_catch_process1(struct map_session_data *sd, int target_class) { +int HP_script_menu_countoptions(const char *str, int max_count, int *total) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_catch_process1_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *target_class); + if( HPMHooks.count.HP_script_menu_countoptions_pre ) { + int (*preHookFunc) (const char *str, int *max_count, int *total); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process1_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_catch_process1_pre[hIndex].func; - retVal___ = preHookFunc(sd, &target_class); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_menu_countoptions_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_menu_countoptions_pre[hIndex].func; + retVal___ = preHookFunc(str, &max_count, total); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54051,26 +60494,28 @@ int HP_pet_catch_process1(struct map_session_data *sd, int target_class) { } } { - retVal___ = HPMHooks.source.pet.catch_process1(sd, target_class); + retVal___ = HPMHooks.source.script.menu_countoptions(str, max_count, total); } - if( HPMHooks.count.HP_pet_catch_process1_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *target_class); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process1_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_catch_process1_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &target_class); + if( HPMHooks.count.HP_script_menu_countoptions_post ) { + int (*postHookFunc) (int retVal___, const char *str, int *max_count, int *total); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_menu_countoptions_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_menu_countoptions_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &max_count, total); } } return retVal___; } -int HP_pet_catch_process2(struct map_session_data *sd, int target_id) { +int HP_script_buildin_areawarp_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_catch_process2_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *target_id); + if( HPMHooks.count.HP_script_buildin_areawarp_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_catch_process2_pre[hIndex].func; - retVal___ = preHookFunc(sd, &target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areawarp_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_areawarp_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54078,26 +60523,32 @@ int HP_pet_catch_process2(struct map_session_data *sd, int target_id) { } } { - retVal___ = HPMHooks.source.pet.catch_process2(sd, target_id); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_areawarp_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pet_catch_process2_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *target_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_catch_process2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &target_id); + if( HPMHooks.count.HP_script_buildin_areawarp_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areawarp_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_areawarp_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) { +int HP_script_buildin_areapercentheal_sub(struct block_list *bl, va_list ap) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_pet_get_egg_pre ) { - bool (*preHookFunc) (int *account_id, short *pet_class, int *pet_id); + int retVal___ = 0; + if( HPMHooks.count.HP_script_buildin_areapercentheal_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_get_egg_pre[hIndex].func; - retVal___ = preHookFunc(&account_id, &pet_class, &pet_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areapercentheal_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_areapercentheal_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54105,53 +60556,56 @@ bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) { } } { - retVal___ = HPMHooks.source.pet.get_egg(account_id, pet_class, pet_id); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_areapercentheal_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pet_get_egg_post ) { - bool (*postHookFunc) (bool retVal___, int *account_id, short *pet_class, int *pet_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_get_egg_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &account_id, &pet_class, &pet_id); + if( HPMHooks.count.HP_script_buildin_areapercentheal_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areapercentheal_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_areapercentheal_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pet_unequipitem(struct map_session_data *sd, struct pet_data *pd) { +void HP_script_buildin_delitem_delete(struct map_session_data *sd, int idx, int *amount, bool delete_items) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_unequipitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd); + if( HPMHooks.count.HP_script_buildin_delitem_delete_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount, bool *delete_items); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unequipitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_unequipitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_buildin_delitem_delete_pre[hIndex].func; + preHookFunc(sd, &idx, amount, &delete_items); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pet.unequipitem(sd, pd); + HPMHooks.source.script.buildin_delitem_delete(sd, idx, amount, delete_items); } - if( HPMHooks.count.HP_pet_unequipitem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unequipitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_unequipitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, pd); + if( HPMHooks.count.HP_script_buildin_delitem_delete_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *idx, int *amount, bool *delete_items); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_buildin_delitem_delete_post[hIndex].func; + postHookFunc(sd, &idx, amount, &delete_items); } } - return retVal___; + return; } -int HP_pet_food(struct map_session_data *sd, struct pet_data *pd) { +bool HP_script_buildin_delitem_search(struct map_session_data *sd, struct item *it, bool exact_match) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_food_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd); + bool retVal___ = false; + if( HPMHooks.count.HP_script_buildin_delitem_search_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, struct item *it, bool *exact_match); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_food_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_food_pre[hIndex].func; - retVal___ = preHookFunc(sd, pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_buildin_delitem_search_pre[hIndex].func; + retVal___ = preHookFunc(sd, it, &exact_match); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54159,26 +60613,26 @@ int HP_pet_food(struct map_session_data *sd, struct pet_data *pd) { } } { - retVal___ = HPMHooks.source.pet.food(sd, pd); + retVal___ = HPMHooks.source.script.buildin_delitem_search(sd, it, exact_match); } - if( HPMHooks.count.HP_pet_food_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_food_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_food_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, pd); + if( HPMHooks.count.HP_script_buildin_delitem_search_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct item *it, bool *exact_match); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_buildin_delitem_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, it, &exact_match); } } return retVal___; } -int HP_pet_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { +int HP_script_buildin_killmonster_sub_strip(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_pre ) { + if( HPMHooks.count.HP_script_buildin_killmonster_sub_strip_pre ) { int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_pre; hIndex++ ) { + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_strip_pre; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_lootsearch_pre[hIndex].func; + preHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_strip_pre[hIndex].func; retVal___ = preHookFunc(bl, ap___copy); va_end(ap___copy); } @@ -54189,29 +60643,31 @@ int HP_pet_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { } { va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.pet.ai_sub_hard_lootsearch(bl, ap___copy); + retVal___ = HPMHooks.source.script.buildin_killmonster_sub_strip(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_post ) { + if( HPMHooks.count.HP_script_buildin_killmonster_sub_strip_post ) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_post; hIndex++ ) { + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_strip_post; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_lootsearch_post[hIndex].func; + postHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_strip_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, ap___copy); va_end(ap___copy); } } return retVal___; } -int HP_pet_menu(struct map_session_data *sd, int menunum) { +int HP_script_buildin_killmonster_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_menu_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *menunum); + if( HPMHooks.count.HP_script_buildin_killmonster_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_menu_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_menu_pre[hIndex].func; - retVal___ = preHookFunc(sd, &menunum); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54219,26 +60675,32 @@ int HP_pet_menu(struct map_session_data *sd, int menunum) { } } { - retVal___ = HPMHooks.source.pet.menu(sd, menunum); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_killmonster_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pet_menu_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *menunum); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_menu_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_menu_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &menunum); + if( HPMHooks.count.HP_script_buildin_killmonster_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pet_change_name(struct map_session_data *sd, char *name) { +int HP_script_buildin_killmonsterall_sub_strip(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_change_name_pre ) { - int (*preHookFunc) (struct map_session_data *sd, char *name); + if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_change_name_pre[hIndex].func; - retVal___ = preHookFunc(sd, name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_strip_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54246,26 +60708,32 @@ int HP_pet_change_name(struct map_session_data *sd, char *name) { } } { - retVal___ = HPMHooks.source.pet.change_name(sd, name); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_killmonsterall_sub_strip(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pet_change_name_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_change_name_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, name); + if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_strip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pet_change_name_ack(struct map_session_data *sd, char *name, int flag) { +int HP_script_buildin_killmonsterall_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_change_name_ack_pre ) { - int (*preHookFunc) (struct map_session_data *sd, char *name, int *flag); + if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_ack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_change_name_ack_pre[hIndex].func; - retVal___ = preHookFunc(sd, name, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54273,26 +60741,32 @@ int HP_pet_change_name_ack(struct map_session_data *sd, char *name, int flag) { } } { - retVal___ = HPMHooks.source.pet.change_name_ack(sd, name, flag); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_killmonsterall_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pet_change_name_ack_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_ack_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_change_name_ack_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, name, &flag); + if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pet_equipitem(struct map_session_data *sd, int index) { +int HP_script_buildin_announce_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_equipitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *index); + if( HPMHooks.count.HP_script_buildin_announce_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_equipitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_equipitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, &index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_announce_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_announce_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54300,26 +60774,32 @@ int HP_pet_equipitem(struct map_session_data *sd, int index) { } } { - retVal___ = HPMHooks.source.pet.equipitem(sd, index); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_announce_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pet_equipitem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_equipitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_equipitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &index); + if( HPMHooks.count.HP_script_buildin_announce_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_announce_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_announce_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pet_randomwalk(struct pet_data *pd, int64 tick) { +int HP_script_buildin_getareausers_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_randomwalk_pre ) { - int (*preHookFunc) (struct pet_data *pd, int64 *tick); + if( HPMHooks.count.HP_script_buildin_getareausers_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_randomwalk_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_randomwalk_pre[hIndex].func; - retVal___ = preHookFunc(pd, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareausers_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_getareausers_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54327,26 +60807,32 @@ int HP_pet_randomwalk(struct pet_data *pd, int64 tick) { } } { - retVal___ = HPMHooks.source.pet.randomwalk(pd, tick); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_getareausers_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pet_randomwalk_post ) { - int (*postHookFunc) (int retVal___, struct pet_data *pd, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_randomwalk_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_randomwalk_post[hIndex].func; - retVal___ = postHookFunc(retVal___, pd, &tick); + if( HPMHooks.count.HP_script_buildin_getareausers_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareausers_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_getareausers_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick) { +int HP_script_buildin_getareadropitem_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_ai_sub_hard_pre ) { - int (*preHookFunc) (struct pet_data *pd, struct map_session_data *sd, int64 *tick); + if( HPMHooks.count.HP_script_buildin_getareadropitem_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_pre[hIndex].func; - retVal___ = preHookFunc(pd, sd, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareadropitem_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_getareadropitem_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54354,27 +60840,31 @@ int HP_pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 t } } { - retVal___ = HPMHooks.source.pet.ai_sub_hard(pd, sd, tick); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_getareadropitem_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pet_ai_sub_hard_post ) { - int (*postHookFunc) (int retVal___, struct pet_data *pd, struct map_session_data *sd, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_post[hIndex].func; - retVal___ = postHookFunc(retVal___, pd, sd, &tick); + if( HPMHooks.count.HP_script_buildin_getareadropitem_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareadropitem_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_getareadropitem_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pet_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { +int HP_script_mapflag_pvp_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_ai_sub_foreachclient_pre ) { - int (*preHookFunc) (struct map_session_data *sd, va_list ap); + if( HPMHooks.count.HP_script_mapflag_pvp_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_foreachclient_pre; hIndex++ ) { + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapflag_pvp_sub_pre; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_pet_ai_sub_foreachclient_pre[hIndex].func; - retVal___ = preHookFunc(sd, ap___copy); + preHookFunc = HPMHooks.list.HP_script_mapflag_pvp_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); va_end(ap___copy); } if( *HPMforce_return ) { @@ -54384,29 +60874,31 @@ int HP_pet_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { } { va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.pet.ai_sub_foreachclient(sd, ap___copy); + retVal___ = HPMHooks.source.script.mapflag_pvp_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_pet_ai_sub_foreachclient_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_foreachclient_post; hIndex++ ) { + if( HPMHooks.count.HP_script_mapflag_pvp_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapflag_pvp_sub_post; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_pet_ai_sub_foreachclient_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, ap___copy); + postHookFunc = HPMHooks.list.HP_script_mapflag_pvp_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); va_end(ap___copy); } } return retVal___; } -int HP_pet_ai_hard(int tid, int64 tick, int id, intptr_t data) { +int HP_script_buildin_pvpoff_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_ai_hard_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_script_buildin_pvpoff_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_hard_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_ai_hard_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_pvpoff_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_pvpoff_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54414,26 +60906,32 @@ int HP_pet_ai_hard(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.pet.ai_hard(tid, tick, id, data); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_pvpoff_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pet_ai_hard_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_hard_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_ai_hard_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_buildin_pvpoff_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_pvpoff_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_pvpoff_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pet_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { +int HP_script_buildin_maprespawnguildid_sub_pc(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_delay_item_drop_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_pre ) { + int (*preHookFunc) (struct map_session_data *sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_delay_item_drop_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_delay_item_drop_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_pc_pre[hIndex].func; + retVal___ = preHookFunc(sd, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54441,26 +60939,32 @@ int HP_pet_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.pet.delay_item_drop(tid, tick, id, data); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_maprespawnguildid_sub_pc(sd, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pet_delay_item_drop_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_delay_item_drop_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_delay_item_drop_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_pc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pet_lootitem_drop(struct pet_data *pd, struct map_session_data *sd) { +int HP_script_buildin_maprespawnguildid_sub_mob(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_lootitem_drop_pre ) { - int (*preHookFunc) (struct pet_data *pd, struct map_session_data *sd); + if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_lootitem_drop_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_lootitem_drop_pre[hIndex].func; - retVal___ = preHookFunc(pd, sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_mob_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54468,26 +60972,32 @@ int HP_pet_lootitem_drop(struct pet_data *pd, struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.pet.lootitem_drop(pd, sd); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_maprespawnguildid_sub_mob(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pet_lootitem_drop_post ) { - int (*postHookFunc) (int retVal___, struct pet_data *pd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_lootitem_drop_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_lootitem_drop_post[hIndex].func; - retVal___ = postHookFunc(retVal___, pd, sd); + if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_mob_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) { +int HP_script_buildin_mobcount_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_skill_bonus_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_script_buildin_mobcount_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_bonus_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_skill_bonus_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobcount_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_mobcount_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54495,26 +61005,32 @@ int HP_pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.pet.skill_bonus_timer(tid, tick, id, data); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_mobcount_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pet_skill_bonus_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_bonus_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_skill_bonus_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_buildin_mobcount_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobcount_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_mobcount_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) { +int HP_script_playbgm_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_recovery_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_script_playbgm_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recovery_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_recovery_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playbgm_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_playbgm_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54522,26 +61038,32 @@ int HP_pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.pet.recovery_timer(tid, tick, id, data); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.playbgm_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pet_recovery_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recovery_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_recovery_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_playbgm_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playbgm_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_playbgm_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) { +int HP_script_playbgm_foreachpc_sub(struct map_session_data *sd, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_skill_support_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_script_playbgm_foreachpc_sub_pre ) { + int (*preHookFunc) (struct map_session_data *sd, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_support_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_skill_support_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playbgm_foreachpc_sub_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_script_playbgm_foreachpc_sub_pre[hIndex].func; + retVal___ = preHookFunc(sd, args___copy); + va_end(args___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54549,26 +61071,32 @@ int HP_pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.pet.skill_support_timer(tid, tick, id, data); + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.script.playbgm_foreachpc_sub(sd, args___copy); + va_end(args___copy); } - if( HPMHooks.count.HP_pet_skill_support_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_support_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_skill_support_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_script_playbgm_foreachpc_sub_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playbgm_foreachpc_sub_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_script_playbgm_foreachpc_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, args___copy); + va_end(args___copy); } } return retVal___; } -int HP_pet_read_db(void) { +int HP_script_soundeffect_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_read_db_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_script_soundeffect_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pet_read_db_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_soundeffect_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_soundeffect_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54576,105 +61104,125 @@ int HP_pet_read_db(void) { } } { - retVal___ = HPMHooks.source.pet.read_db(); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.soundeffect_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_pet_read_db_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pet_read_db_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_script_soundeffect_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_soundeffect_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_soundeffect_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -/* quest */ -void HP_quest_init(bool minimal) { +int HP_script_buildin_query_sql_sub(struct script_state *st, Sql *handle) { int hIndex = 0; - if( HPMHooks.count.HP_quest_init_pre ) { - void (*preHookFunc) (bool *minimal); + int retVal___ = 0; + if( HPMHooks.count.HP_script_buildin_query_sql_sub_pre ) { + int (*preHookFunc) (struct script_state *st, Sql *handle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_quest_init_pre[hIndex].func; - preHookFunc(&minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_query_sql_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_buildin_query_sql_sub_pre[hIndex].func; + retVal___ = preHookFunc(st, handle); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.quest.init(minimal); + retVal___ = HPMHooks.source.script.buildin_query_sql_sub(st, handle); } - if( HPMHooks.count.HP_quest_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_quest_init_post[hIndex].func; - postHookFunc(&minimal); + if( HPMHooks.count.HP_script_buildin_query_sql_sub_post ) { + int (*postHookFunc) (int retVal___, struct script_state *st, Sql *handle); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_query_sql_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_buildin_query_sql_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, handle); } } - return; + return retVal___; } -void HP_quest_final(void) { +int HP_script_buildin_instance_warpall_sub(struct block_list *bl, va_list ap) { int hIndex = 0; - if( HPMHooks.count.HP_quest_final_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_script_buildin_instance_warpall_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_quest_final_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_instance_warpall_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_instance_warpall_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.quest.final(); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_instance_warpall_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_quest_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_quest_final_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_script_buildin_instance_warpall_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_instance_warpall_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_instance_warpall_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } - return; + return retVal___; } -void HP_quest_reload(void) { +int HP_script_buildin_mobuseskill_sub(struct block_list *bl, va_list ap) { int hIndex = 0; - if( HPMHooks.count.HP_quest_reload_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_script_buildin_mobuseskill_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_quest_reload_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobuseskill_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_mobuseskill_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.quest.reload(); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_mobuseskill_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_quest_reload_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_quest_reload_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_script_buildin_mobuseskill_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobuseskill_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_mobuseskill_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } - return; + return retVal___; } -struct quest_db* HP_quest_db(int quest_id) { +int HP_script_cleanfloor_sub(struct block_list *bl, va_list ap) { int hIndex = 0; - struct quest_db* retVal___ = NULL; - if( HPMHooks.count.HP_quest_db_pre ) { - struct quest_db* (*preHookFunc) (int *quest_id); + int retVal___ = 0; + if( HPMHooks.count.HP_script_cleanfloor_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_quest_db_pre[hIndex].func; - retVal___ = preHookFunc(&quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleanfloor_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_cleanfloor_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54682,26 +61230,30 @@ struct quest_db* HP_quest_db(int quest_id) { } } { - retVal___ = HPMHooks.source.quest.db(quest_id); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.cleanfloor_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_quest_db_post ) { - struct quest_db* (*postHookFunc) (struct quest_db* retVal___, int *quest_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_quest_db_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &quest_id); + if( HPMHooks.count.HP_script_cleanfloor_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleanfloor_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_cleanfloor_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_quest_pc_login(TBL_PC *sd) { +int HP_script_run_func(struct script_state *st) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_pc_login_pre ) { - int (*preHookFunc) (TBL_PC *sd); + if( HPMHooks.count.HP_script_run_func_pre ) { + int (*preHookFunc) (struct script_state *st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_pc_login_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_quest_pc_login_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_func_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_run_func_pre[hIndex].func; + retVal___ = preHookFunc(st); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54709,26 +61261,26 @@ int HP_quest_pc_login(TBL_PC *sd) { } } { - retVal___ = HPMHooks.source.quest.pc_login(sd); + retVal___ = HPMHooks.source.script.run_func(st); } - if( HPMHooks.count.HP_quest_pc_login_post ) { - int (*postHookFunc) (int retVal___, TBL_PC *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_pc_login_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_quest_pc_login_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_script_run_func_post ) { + int (*postHookFunc) (int retVal___, struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_func_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_run_func_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st); } } return retVal___; } -int HP_quest_add(TBL_PC *sd, int quest_id) { +const char* HP_script_getfuncname(struct script_state *st) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_quest_add_pre ) { - int (*preHookFunc) (TBL_PC *sd, int *quest_id); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_getfuncname_pre ) { + const char* (*preHookFunc) (struct script_state *st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_add_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_quest_add_pre[hIndex].func; - retVal___ = preHookFunc(sd, &quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_getfuncname_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_getfuncname_pre[hIndex].func; + retVal___ = preHookFunc(st); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54736,26 +61288,26 @@ int HP_quest_add(TBL_PC *sd, int quest_id) { } } { - retVal___ = HPMHooks.source.quest.add(sd, quest_id); + retVal___ = HPMHooks.source.script.getfuncname(st); } - if( HPMHooks.count.HP_quest_add_post ) { - int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_add_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_quest_add_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &quest_id); + if( HPMHooks.count.HP_script_getfuncname_post ) { + const char* (*postHookFunc) (const char* retVal___, struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_getfuncname_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_getfuncname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st); } } return retVal___; } -int HP_quest_change(TBL_PC *sd, int qid1, int qid2) { +unsigned int HP_script_calc_hash_ci(const char *p) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_quest_change_pre ) { - int (*preHookFunc) (TBL_PC *sd, int *qid1, int *qid2); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_script_calc_hash_ci_pre ) { + unsigned int (*preHookFunc) (const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_change_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_quest_change_pre[hIndex].func; - retVal___ = preHookFunc(sd, &qid1, &qid2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_calc_hash_ci_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54763,26 +61315,26 @@ int HP_quest_change(TBL_PC *sd, int qid1, int qid2) { } } { - retVal___ = HPMHooks.source.quest.change(sd, qid1, qid2); + retVal___ = HPMHooks.source.script.calc_hash_ci(p); } - if( HPMHooks.count.HP_quest_change_post ) { - int (*postHookFunc) (int retVal___, TBL_PC *sd, int *qid1, int *qid2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_change_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_quest_change_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &qid1, &qid2); + if( HPMHooks.count.HP_script_calc_hash_ci_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_calc_hash_ci_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } return retVal___; } -int HP_quest_delete(TBL_PC *sd, int quest_id) { +struct reg_db* HP_script_array_src(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_quest_delete_pre ) { - int (*preHookFunc) (TBL_PC *sd, int *quest_id); + struct reg_db* retVal___ = NULL; + if( HPMHooks.count.HP_script_array_src_pre ) { + struct reg_db* (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_quest_delete_pre[hIndex].func; - retVal___ = preHookFunc(sd, &quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_src_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_array_src_pre[hIndex].func; + retVal___ = preHookFunc(st, sd, name, ref); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54790,58 +61342,51 @@ int HP_quest_delete(TBL_PC *sd, int quest_id) { } } { - retVal___ = HPMHooks.source.quest.delete(sd, quest_id); + retVal___ = HPMHooks.source.script.array_src(st, sd, name, ref); } - if( HPMHooks.count.HP_quest_delete_post ) { - int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_quest_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &quest_id); + if( HPMHooks.count.HP_script_array_src_post ) { + struct reg_db* (*postHookFunc) (struct reg_db* retVal___, struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_src_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_array_src_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, sd, name, ref); } } return retVal___; } -int HP_quest_update_objective_sub(struct block_list *bl, va_list ap) { +void HP_script_array_update(struct reg_db *src, int64 num, bool empty) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_quest_update_objective_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_script_array_update_pre ) { + void (*preHookFunc) (struct reg_db *src, int64 *num, bool *empty); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_quest_update_objective_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_update_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_array_update_pre[hIndex].func; + preHookFunc(src, &num, &empty); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.quest.update_objective_sub(bl, ap___copy); - va_end(ap___copy); + HPMHooks.source.script.array_update(src, num, empty); } - if( HPMHooks.count.HP_quest_update_objective_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_quest_update_objective_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_script_array_update_post ) { + void (*postHookFunc) (struct reg_db *src, int64 *num, bool *empty); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_update_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_array_update_post[hIndex].func; + postHookFunc(src, &num, &empty); } } - return retVal___; + return; } -void HP_quest_update_objective(TBL_PC *sd, int mob_id) { +void HP_script_array_delete(struct reg_db *src, struct script_array *sa) { int hIndex = 0; - if( HPMHooks.count.HP_quest_update_objective_pre ) { - void (*preHookFunc) (TBL_PC *sd, int *mob_id); + if( HPMHooks.count.HP_script_array_delete_pre ) { + void (*preHookFunc) (struct reg_db *src, struct script_array *sa); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_quest_update_objective_pre[hIndex].func; - preHookFunc(sd, &mob_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_array_delete_pre[hIndex].func; + preHookFunc(src, sa); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54849,106 +61394,105 @@ void HP_quest_update_objective(TBL_PC *sd, int mob_id) { } } { - HPMHooks.source.quest.update_objective(sd, mob_id); + HPMHooks.source.script.array_delete(src, sa); } - if( HPMHooks.count.HP_quest_update_objective_post ) { - void (*postHookFunc) (TBL_PC *sd, int *mob_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_quest_update_objective_post[hIndex].func; - postHookFunc(sd, &mob_id); + if( HPMHooks.count.HP_script_array_delete_post ) { + void (*postHookFunc) (struct reg_db *src, struct script_array *sa); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_array_delete_post[hIndex].func; + postHookFunc(src, sa); } } return; } -int HP_quest_update_status(TBL_PC *sd, int quest_id, enum quest_state qs) { +void HP_script_array_remove_member(struct reg_db *src, struct script_array *sa, unsigned int idx) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_quest_update_status_pre ) { - int (*preHookFunc) (TBL_PC *sd, int *quest_id, enum quest_state *qs); + if( HPMHooks.count.HP_script_array_remove_member_pre ) { + void (*preHookFunc) (struct reg_db *src, struct script_array *sa, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_status_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_quest_update_status_pre[hIndex].func; - retVal___ = preHookFunc(sd, &quest_id, &qs); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_remove_member_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_array_remove_member_pre[hIndex].func; + preHookFunc(src, sa, &idx); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.quest.update_status(sd, quest_id, qs); + HPMHooks.source.script.array_remove_member(src, sa, idx); } - if( HPMHooks.count.HP_quest_update_status_post ) { - int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id, enum quest_state *qs); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_status_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_quest_update_status_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &quest_id, &qs); + if( HPMHooks.count.HP_script_array_remove_member_post ) { + void (*postHookFunc) (struct reg_db *src, struct script_array *sa, unsigned int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_remove_member_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_array_remove_member_post[hIndex].func; + postHookFunc(src, sa, &idx); } } - return retVal___; + return; } -int HP_quest_check(TBL_PC *sd, int quest_id, enum quest_check_type type) { +void HP_script_array_add_member(struct script_array *sa, unsigned int idx) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_quest_check_pre ) { - int (*preHookFunc) (TBL_PC *sd, int *quest_id, enum quest_check_type *type); + if( HPMHooks.count.HP_script_array_add_member_pre ) { + void (*preHookFunc) (struct script_array *sa, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_check_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_quest_check_pre[hIndex].func; - retVal___ = preHookFunc(sd, &quest_id, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_add_member_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_array_add_member_pre[hIndex].func; + preHookFunc(sa, &idx); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.quest.check(sd, quest_id, type); + HPMHooks.source.script.array_add_member(sa, idx); } - if( HPMHooks.count.HP_quest_check_post ) { - int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id, enum quest_check_type *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_check_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_quest_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &quest_id, &type); + if( HPMHooks.count.HP_script_array_add_member_post ) { + void (*postHookFunc) (struct script_array *sa, unsigned int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_add_member_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_array_add_member_post[hIndex].func; + postHookFunc(sa, &idx); } } - return retVal___; + return; } -void HP_quest_clear(void) { +unsigned int HP_script_array_size(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) { int hIndex = 0; - if( HPMHooks.count.HP_quest_clear_pre ) { - void (*preHookFunc) (void); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_script_array_size_pre ) { + unsigned int (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_quest_clear_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_size_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_array_size_pre[hIndex].func; + retVal___ = preHookFunc(st, sd, name, ref); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.quest.clear(); + retVal___ = HPMHooks.source.script.array_size(st, sd, name, ref); } - if( HPMHooks.count.HP_quest_clear_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_quest_clear_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_script_array_size_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_size_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_array_size_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, sd, name, ref); } } - return; + return retVal___; } -int HP_quest_read_db(void) { +unsigned int HP_script_array_highest_key(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_quest_read_db_pre ) { - int (*preHookFunc) (void); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_script_array_highest_key_pre ) { + unsigned int (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_quest_read_db_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_highest_key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_array_highest_key_pre[hIndex].func; + retVal___ = preHookFunc(st, sd, name, ref); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54956,26 +61500,28 @@ int HP_quest_read_db(void) { } } { - retVal___ = HPMHooks.source.quest.read_db(); + retVal___ = HPMHooks.source.script.array_highest_key(st, sd, name, ref); } - if( HPMHooks.count.HP_quest_read_db_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_quest_read_db_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_script_array_highest_key_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_highest_key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_array_highest_key_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, sd, name, ref); } } return retVal___; } -struct quest_db* HP_quest_read_db_sub(config_setting_t *cs, int n, const char *source) { +int HP_script_array_free_db(DBKey key, DBData *data, va_list ap) { int hIndex = 0; - struct quest_db* retVal___ = NULL; - if( HPMHooks.count.HP_quest_read_db_sub_pre ) { - struct quest_db* (*preHookFunc) (config_setting_t *cs, int *n, const char *source); + int retVal___ = 0; + if( HPMHooks.count.HP_script_array_free_db_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_quest_read_db_sub_pre[hIndex].func; - retVal___ = preHookFunc(cs, &n, source); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_free_db_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_array_free_db_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -54983,26 +61529,29 @@ struct quest_db* HP_quest_read_db_sub(config_setting_t *cs, int n, const char *s } } { - retVal___ = HPMHooks.source.quest.read_db_sub(cs, n, source); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.array_free_db(key, data, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_quest_read_db_sub_post ) { - struct quest_db* (*postHookFunc) (struct quest_db* retVal___, config_setting_t *cs, int *n, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_quest_read_db_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, cs, &n, source); + if( HPMHooks.count.HP_script_array_free_db_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_free_db_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_array_free_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); } } return retVal___; } -/* script */ -void HP_script_init(bool minimal) { +void HP_script_array_ensure_zero(struct script_state *st, struct map_session_data *sd, int64 uid, struct reg_db *ref) { int hIndex = 0; - if( HPMHooks.count.HP_script_init_pre ) { - void (*preHookFunc) (bool *minimal); + if( HPMHooks.count.HP_script_array_ensure_zero_pre ) { + void (*preHookFunc) (struct script_state *st, struct map_session_data *sd, int64 *uid, struct reg_db *ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_init_pre[hIndex].func; - preHookFunc(&minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_ensure_zero_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_array_ensure_zero_pre[hIndex].func; + preHookFunc(st, sd, &uid, ref); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55010,25 +61559,25 @@ void HP_script_init(bool minimal) { } } { - HPMHooks.source.script.init(minimal); + HPMHooks.source.script.array_ensure_zero(st, sd, uid, ref); } - if( HPMHooks.count.HP_script_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_init_post[hIndex].func; - postHookFunc(&minimal); + if( HPMHooks.count.HP_script_array_ensure_zero_post ) { + void (*postHookFunc) (struct script_state *st, struct map_session_data *sd, int64 *uid, struct reg_db *ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_ensure_zero_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_array_ensure_zero_post[hIndex].func; + postHookFunc(st, sd, &uid, ref); } } return; } -void HP_script_final(void) { +void HP_script_reg_destroy_single(struct map_session_data *sd, int64 reg, struct script_reg_state *data) { int hIndex = 0; - if( HPMHooks.count.HP_script_final_pre ) { - void (*preHookFunc) (void); + if( HPMHooks.count.HP_script_reg_destroy_single_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int64 *reg, struct script_reg_state *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_final_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_single_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_reg_destroy_single_pre[hIndex].func; + preHookFunc(sd, ®, data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55036,26 +61585,28 @@ void HP_script_final(void) { } } { - HPMHooks.source.script.final(); + HPMHooks.source.script.reg_destroy_single(sd, reg, data); } - if( HPMHooks.count.HP_script_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_final_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_script_reg_destroy_single_post ) { + void (*postHookFunc) (struct map_session_data *sd, int64 *reg, struct script_reg_state *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_single_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_reg_destroy_single_post[hIndex].func; + postHookFunc(sd, ®, data); } } return; } -int HP_script_reload(void) { +int HP_script_reg_destroy(DBKey key, DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_reload_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_script_reg_destroy_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reload_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_reload_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_reg_destroy_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55063,53 +61614,56 @@ int HP_script_reload(void) { } } { - retVal___ = HPMHooks.source.script.reload(); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.reg_destroy(key, data, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_script_reload_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reload_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_reload_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_script_reg_destroy_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_reg_destroy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); } } return retVal___; } -struct script_code* HP_script_parse(const char *src, const char *file, int line, int options, int *retval) { +void HP_script_generic_ui_array_expand(unsigned int plus) { int hIndex = 0; - struct script_code* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_pre ) { - struct script_code* (*preHookFunc) (const char *src, const char *file, int *line, int *options, int *retval); + if( HPMHooks.count.HP_script_generic_ui_array_expand_pre ) { + void (*preHookFunc) (unsigned int *plus); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_parse_pre[hIndex].func; - retVal___ = preHookFunc(src, file, &line, &options, retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_generic_ui_array_expand_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_generic_ui_array_expand_pre[hIndex].func; + preHookFunc(&plus); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.script.parse(src, file, line, options, retval); + HPMHooks.source.script.generic_ui_array_expand(plus); } - if( HPMHooks.count.HP_script_parse_post ) { - struct script_code* (*postHookFunc) (struct script_code* retVal___, const char *src, const char *file, int *line, int *options, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_parse_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, file, &line, &options, retval); + if( HPMHooks.count.HP_script_generic_ui_array_expand_post ) { + void (*postHookFunc) (unsigned int *plus); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_generic_ui_array_expand_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_generic_ui_array_expand_post[hIndex].func; + postHookFunc(&plus); } } - return retVal___; + return; } -bool HP_script_add_builtin(const struct script_function *buildin, bool override) { +unsigned int* HP_script_array_cpy_list(struct script_array *sa) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_script_add_builtin_pre ) { - bool (*preHookFunc) (const struct script_function *buildin, bool *override); + unsigned int* retVal___ = NULL; + if( HPMHooks.count.HP_script_array_cpy_list_pre ) { + unsigned int* (*preHookFunc) (struct script_array *sa); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_add_builtin_pre[hIndex].func; - retVal___ = preHookFunc(buildin, &override); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_cpy_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_array_cpy_list_pre[hIndex].func; + retVal___ = preHookFunc(sa); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55117,24 +61671,24 @@ bool HP_script_add_builtin(const struct script_function *buildin, bool override) } } { - retVal___ = HPMHooks.source.script.add_builtin(buildin, override); + retVal___ = HPMHooks.source.script.array_cpy_list(sa); } - if( HPMHooks.count.HP_script_add_builtin_post ) { - bool (*postHookFunc) (bool retVal___, const struct script_function *buildin, bool *override); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_add_builtin_post[hIndex].func; - retVal___ = postHookFunc(retVal___, buildin, &override); + if( HPMHooks.count.HP_script_array_cpy_list_post ) { + unsigned int* (*postHookFunc) (unsigned int* retVal___, struct script_array *sa); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_cpy_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_array_cpy_list_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sa); } } return retVal___; } -void HP_script_parse_builtin(void) { +void HP_script_hardcoded_constants(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_parse_builtin_pre ) { + if( HPMHooks.count.HP_script_hardcoded_constants_pre ) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_builtin_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_parse_builtin_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_hardcoded_constants_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_hardcoded_constants_pre[hIndex].func; preHookFunc(); } if( *HPMforce_return ) { @@ -55143,26 +61697,26 @@ void HP_script_parse_builtin(void) { } } { - HPMHooks.source.script.parse_builtin(); + HPMHooks.source.script.hardcoded_constants(); } - if( HPMHooks.count.HP_script_parse_builtin_post ) { + if( HPMHooks.count.HP_script_hardcoded_constants_post ) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_builtin_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_parse_builtin_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_hardcoded_constants_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_hardcoded_constants_post[hIndex].func; postHookFunc(); } } return; } -const char* HP_script_parse_subexpr(const char *p, int limit) { +unsigned short HP_script_mapindexname2id(struct script_state *st, const char *name) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_subexpr_pre ) { - const char* (*preHookFunc) (const char *p, int *limit); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_script_mapindexname2id_pre ) { + unsigned short (*preHookFunc) (struct script_state *st, const char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_subexpr_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_parse_subexpr_pre[hIndex].func; - retVal___ = preHookFunc(p, &limit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapindexname2id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_mapindexname2id_pre[hIndex].func; + retVal___ = preHookFunc(st, name); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55170,26 +61724,26 @@ const char* HP_script_parse_subexpr(const char *p, int limit) { } } { - retVal___ = HPMHooks.source.script.parse_subexpr(p, limit); + retVal___ = HPMHooks.source.script.mapindexname2id(st, name); } - if( HPMHooks.count.HP_script_parse_subexpr_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *p, int *limit); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_subexpr_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_parse_subexpr_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, &limit); + if( HPMHooks.count.HP_script_mapindexname2id_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct script_state *st, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapindexname2id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_mapindexname2id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, name); } } return retVal___; } -const char* HP_script_skip_space(const char *p) { +int HP_script_string_dup(char *str) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_skip_space_pre ) { - const char* (*preHookFunc) (const char *p); + int retVal___ = 0; + if( HPMHooks.count.HP_script_string_dup_pre ) { + int (*preHookFunc) (char *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_space_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_skip_space_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_string_dup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_string_dup_pre[hIndex].func; + retVal___ = preHookFunc(str); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55197,25 +61751,25 @@ const char* HP_script_skip_space(const char *p) { } } { - retVal___ = HPMHooks.source.script.skip_space(p); + retVal___ = HPMHooks.source.script.string_dup(str); } - if( HPMHooks.count.HP_script_skip_space_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_space_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_skip_space_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_script_string_dup_post ) { + int (*postHookFunc) (int retVal___, char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_string_dup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_string_dup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); } } return retVal___; } -void HP_script_error(const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos) { +void HP_script_load_translations(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_error_pre ) { - void (*preHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); + if( HPMHooks.count.HP_script_load_translations_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_error_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_error_pre[hIndex].func; - preHookFunc(src, file, &start_line, error_msg, error_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translations_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_load_translations_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55223,25 +61777,25 @@ void HP_script_error(const char *src, const char *file, int start_line, const ch } } { - HPMHooks.source.script.error(src, file, start_line, error_msg, error_pos); + HPMHooks.source.script.load_translations(); } - if( HPMHooks.count.HP_script_error_post ) { - void (*postHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_error_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_error_post[hIndex].func; - postHookFunc(src, file, &start_line, error_msg, error_pos); + if( HPMHooks.count.HP_script_load_translations_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translations_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_load_translations_post[hIndex].func; + postHookFunc(); } } return; } -void HP_script_warning(const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos) { +void HP_script_load_translation(const char *file, uint8 lang_id, uint32 *total) { int hIndex = 0; - if( HPMHooks.count.HP_script_warning_pre ) { - void (*preHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); + if( HPMHooks.count.HP_script_load_translation_pre ) { + void (*preHookFunc) (const char *file, uint8 *lang_id, uint32 *total); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_warning_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_warning_pre[hIndex].func; - preHookFunc(src, file, &start_line, error_msg, error_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_load_translation_pre[hIndex].func; + preHookFunc(file, &lang_id, total); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55249,53 +61803,28 @@ void HP_script_warning(const char *src, const char *file, int start_line, const } } { - HPMHooks.source.script.warning(src, file, start_line, error_msg, error_pos); + HPMHooks.source.script.load_translation(file, lang_id, total); } - if( HPMHooks.count.HP_script_warning_post ) { - void (*postHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_warning_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_warning_post[hIndex].func; - postHookFunc(src, file, &start_line, error_msg, error_pos); + if( HPMHooks.count.HP_script_load_translation_post ) { + void (*postHookFunc) (const char *file, uint8 *lang_id, uint32 *total); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_load_translation_post[hIndex].func; + postHookFunc(file, &lang_id, total); } } return; } -bool HP_script_addScript(char *name, char *args, bool ( *func ) (struct script_state *st), bool isDeprecated) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_script_addScript_pre ) { - bool (*preHookFunc) (char *name, char *args, bool ( *func ) (struct script_state *st), bool *isDeprecated); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addScript_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_addScript_pre[hIndex].func; - retVal___ = preHookFunc(name, args, func, &isDeprecated); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.script.addScript(name, args, func, isDeprecated); - } - if( HPMHooks.count.HP_script_addScript_post ) { - bool (*postHookFunc) (bool retVal___, char *name, char *args, bool ( *func ) (struct script_state *st), bool *isDeprecated); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addScript_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_addScript_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name, args, func, &isDeprecated); - } - } - return retVal___; -} -int HP_script_conv_num(struct script_state *st, struct script_data *data) { +int HP_script_translation_db_destroyer(DBKey key, DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_conv_num_pre ) { - int (*preHookFunc) (struct script_state *st, struct script_data *data); + if( HPMHooks.count.HP_script_translation_db_destroyer_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_num_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_conv_num_pre[hIndex].func; - retVal___ = preHookFunc(st, data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_translation_db_destroyer_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_translation_db_destroyer_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55303,53 +61832,56 @@ int HP_script_conv_num(struct script_state *st, struct script_data *data) { } } { - retVal___ = HPMHooks.source.script.conv_num(st, data); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.translation_db_destroyer(key, data, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_script_conv_num_post ) { - int (*postHookFunc) (int retVal___, struct script_state *st, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_num_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_conv_num_post[hIndex].func; - retVal___ = postHookFunc(retVal___, st, data); + if( HPMHooks.count.HP_script_translation_db_destroyer_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_translation_db_destroyer_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_translation_db_destroyer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); } } return retVal___; } -const char* HP_script_conv_str(struct script_state *st, struct script_data *data) { +void HP_script_clear_translations(bool reload) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_conv_str_pre ) { - const char* (*preHookFunc) (struct script_state *st, struct script_data *data); + if( HPMHooks.count.HP_script_clear_translations_pre ) { + void (*preHookFunc) (bool *reload); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_str_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_conv_str_pre[hIndex].func; - retVal___ = preHookFunc(st, data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_clear_translations_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_clear_translations_pre[hIndex].func; + preHookFunc(&reload); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.script.conv_str(st, data); + HPMHooks.source.script.clear_translations(reload); } - if( HPMHooks.count.HP_script_conv_str_post ) { - const char* (*postHookFunc) (const char* retVal___, struct script_state *st, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_str_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_conv_str_post[hIndex].func; - retVal___ = postHookFunc(retVal___, st, data); + if( HPMHooks.count.HP_script_clear_translations_post ) { + void (*postHookFunc) (bool *reload); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_clear_translations_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_clear_translations_post[hIndex].func; + postHookFunc(&reload); } } - return retVal___; + return; } -TBL_PC* HP_script_rid2sd(struct script_state *st) { +int HP_script_parse_cleanup_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - TBL_PC* retVal___ = NULL; - if( HPMHooks.count.HP_script_rid2sd_pre ) { - TBL_PC* (*preHookFunc) (struct script_state *st); + int retVal___ = 0; + if( HPMHooks.count.HP_script_parse_cleanup_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_rid2sd_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_rid2sd_pre[hIndex].func; - retVal___ = preHookFunc(st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_cleanup_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_cleanup_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55357,52 +61889,26 @@ TBL_PC* HP_script_rid2sd(struct script_state *st) { } } { - retVal___ = HPMHooks.source.script.rid2sd(st); + retVal___ = HPMHooks.source.script.parse_cleanup_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_script_rid2sd_post ) { - TBL_PC* (*postHookFunc) (TBL_PC* retVal___, struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_rid2sd_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_rid2sd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, st); + if( HPMHooks.count.HP_script_parse_cleanup_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_cleanup_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_cleanup_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -void HP_script_detach_rid(struct script_state *st) { - int hIndex = 0; - if( HPMHooks.count.HP_script_detach_rid_pre ) { - void (*preHookFunc) (struct script_state *st); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_rid_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_detach_rid_pre[hIndex].func; - preHookFunc(st); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.script.detach_rid(st); - } - if( HPMHooks.count.HP_script_detach_rid_post ) { - void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_rid_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_detach_rid_post[hIndex].func; - postHookFunc(st); - } - } - return; -} -struct script_data* HP_script_push_val(struct script_stack *stack, enum c_op type, int64 val, struct reg_db *ref) { +uint8 HP_script_add_language(const char *name) { int hIndex = 0; - struct script_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_push_val_pre ) { - struct script_data* (*preHookFunc) (struct script_stack *stack, enum c_op *type, int64 *val, struct reg_db *ref); + uint8 retVal___ = 0; + if( HPMHooks.count.HP_script_add_language_pre ) { + uint8 (*preHookFunc) (const char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_val_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_push_val_pre[hIndex].func; - retVal___ = preHookFunc(stack, &type, &val, ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_language_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_add_language_pre[hIndex].func; + retVal___ = preHookFunc(name); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55410,26 +61916,26 @@ struct script_data* HP_script_push_val(struct script_stack *stack, enum c_op typ } } { - retVal___ = HPMHooks.source.script.push_val(stack, type, val, ref); + retVal___ = HPMHooks.source.script.add_language(name); } - if( HPMHooks.count.HP_script_push_val_post ) { - struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, enum c_op *type, int64 *val, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_val_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_push_val_post[hIndex].func; - retVal___ = postHookFunc(retVal___, stack, &type, &val, ref); + if( HPMHooks.count.HP_script_add_language_post ) { + uint8 (*postHookFunc) (uint8 retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_language_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_add_language_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); } } return retVal___; } -struct script_data* HP_script_get_val(struct script_state *st, struct script_data *data) { +const char* HP_script_get_translation_file_name(const char *file) { int hIndex = 0; - struct script_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_val_pre ) { - struct script_data* (*preHookFunc) (struct script_state *st, struct script_data *data); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_get_translation_file_name_pre ) { + const char* (*preHookFunc) (const char *file); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_get_val_pre[hIndex].func; - retVal___ = preHookFunc(st, data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_translation_file_name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_get_translation_file_name_pre[hIndex].func; + retVal___ = preHookFunc(file); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55437,106 +61943,103 @@ struct script_data* HP_script_get_val(struct script_state *st, struct script_dat } } { - retVal___ = HPMHooks.source.script.get_val(st, data); + retVal___ = HPMHooks.source.script.get_translation_file_name(file); } - if( HPMHooks.count.HP_script_get_val_post ) { - struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_state *st, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_get_val_post[hIndex].func; - retVal___ = postHookFunc(retVal___, st, data); + if( HPMHooks.count.HP_script_get_translation_file_name_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *file); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_translation_file_name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_get_translation_file_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, file); } } return retVal___; } -void* HP_script_get_val2(struct script_state *st, int64 uid, struct reg_db *ref) { +void HP_script_parser_clean_leftovers(void) { int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_val2_pre ) { - void* (*preHookFunc) (struct script_state *st, int64 *uid, struct reg_db *ref); + if( HPMHooks.count.HP_script_parser_clean_leftovers_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_get_val2_pre[hIndex].func; - retVal___ = preHookFunc(st, &uid, ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parser_clean_leftovers_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parser_clean_leftovers_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.script.get_val2(st, uid, ref); + HPMHooks.source.script.parser_clean_leftovers(); } - if( HPMHooks.count.HP_script_get_val2_post ) { - void* (*postHookFunc) (void* retVal___, struct script_state *st, int64 *uid, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_get_val2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, st, &uid, ref); + if( HPMHooks.count.HP_script_parser_clean_leftovers_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parser_clean_leftovers_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parser_clean_leftovers_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -struct script_data* HP_script_push_str(struct script_stack *stack, enum c_op type, char *str) { +void HP_script_run_use_script(struct map_session_data *sd, struct item_data *data, int oid) { int hIndex = 0; - struct script_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_push_str_pre ) { - struct script_data* (*preHookFunc) (struct script_stack *stack, enum c_op *type, char *str); + if( HPMHooks.count.HP_script_run_use_script_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_str_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_push_str_pre[hIndex].func; - retVal___ = preHookFunc(stack, &type, str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_use_script_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_run_use_script_pre[hIndex].func; + preHookFunc(sd, data, &oid); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.script.push_str(stack, type, str); + HPMHooks.source.script.run_use_script(sd, data, oid); } - if( HPMHooks.count.HP_script_push_str_post ) { - struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, enum c_op *type, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_str_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_push_str_post[hIndex].func; - retVal___ = postHookFunc(retVal___, stack, &type, str); + if( HPMHooks.count.HP_script_run_use_script_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_use_script_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_run_use_script_post[hIndex].func; + postHookFunc(sd, data, &oid); } } - return retVal___; + return; } -struct script_data* HP_script_push_copy(struct script_stack *stack, int pos) { +void HP_script_run_item_equip_script(struct map_session_data *sd, struct item_data *data, int oid) { int hIndex = 0; - struct script_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_push_copy_pre ) { - struct script_data* (*preHookFunc) (struct script_stack *stack, int *pos); + if( HPMHooks.count.HP_script_run_item_equip_script_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_copy_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_push_copy_pre[hIndex].func; - retVal___ = preHookFunc(stack, &pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_equip_script_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_run_item_equip_script_pre[hIndex].func; + preHookFunc(sd, data, &oid); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.script.push_copy(stack, pos); + HPMHooks.source.script.run_item_equip_script(sd, data, oid); } - if( HPMHooks.count.HP_script_push_copy_post ) { - struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, int *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_copy_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_push_copy_post[hIndex].func; - retVal___ = postHookFunc(retVal___, stack, &pos); + if( HPMHooks.count.HP_script_run_item_equip_script_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_equip_script_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_run_item_equip_script_post[hIndex].func; + postHookFunc(sd, data, &oid); } } - return retVal___; + return; } -void HP_script_pop_stack(struct script_state *st, int start, int end) { +void HP_script_run_item_unequip_script(struct map_session_data *sd, struct item_data *data, int oid) { int hIndex = 0; - if( HPMHooks.count.HP_script_pop_stack_pre ) { - void (*preHookFunc) (struct script_state *st, int *start, int *end); + if( HPMHooks.count.HP_script_run_item_unequip_script_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_pop_stack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_pop_stack_pre[hIndex].func; - preHookFunc(st, &start, &end); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_unequip_script_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_run_item_unequip_script_pre[hIndex].func; + preHookFunc(sd, data, &oid); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55544,51 +62047,53 @@ void HP_script_pop_stack(struct script_state *st, int start, int end) { } } { - HPMHooks.source.script.pop_stack(st, start, end); + HPMHooks.source.script.run_item_unequip_script(sd, data, oid); } - if( HPMHooks.count.HP_script_pop_stack_post ) { - void (*postHookFunc) (struct script_state *st, int *start, int *end); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_pop_stack_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_pop_stack_post[hIndex].func; - postHookFunc(st, &start, &end); + if( HPMHooks.count.HP_script_run_item_unequip_script_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_unequip_script_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_run_item_unequip_script_post[hIndex].func; + postHookFunc(sd, data, &oid); } } return; } -void HP_script_set_constant(const char *name, int value, bool isparameter) { +/* searchstore */ +bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigned short effect) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_constant_pre ) { - void (*preHookFunc) (const char *name, int *value, bool *isparameter); + bool retVal___ = false; + if( HPMHooks.count.HP_searchstore_open_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, unsigned int *uses, unsigned short *effect); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_set_constant_pre[hIndex].func; - preHookFunc(name, &value, &isparameter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_open_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_open_pre[hIndex].func; + retVal___ = preHookFunc(sd, &uses, &effect); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.set_constant(name, value, isparameter); + retVal___ = HPMHooks.source.searchstore.open(sd, uses, effect); } - if( HPMHooks.count.HP_script_set_constant_post ) { - void (*postHookFunc) (const char *name, int *value, bool *isparameter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_set_constant_post[hIndex].func; - postHookFunc(name, &value, &isparameter); + if( HPMHooks.count.HP_searchstore_open_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int *uses, unsigned short *effect); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_open_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_open_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &uses, &effect); } } - return; + return retVal___; } -void HP_script_set_constant2(const char *name, int value, bool isparameter) { +void HP_searchstore_query(struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const unsigned short *itemlist, unsigned int item_count, const unsigned short *cardlist, unsigned int card_count) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_constant2_pre ) { - void (*preHookFunc) (const char *name, int *value, bool *isparameter); + if( HPMHooks.count.HP_searchstore_query_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const unsigned short *itemlist, unsigned int *item_count, const unsigned short *cardlist, unsigned int *card_count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_set_constant2_pre[hIndex].func; - preHookFunc(name, &value, &isparameter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_query_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_query_pre[hIndex].func; + preHookFunc(sd, &type, &min_price, &max_price, itemlist, &item_count, cardlist, &card_count); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55596,26 +62101,26 @@ void HP_script_set_constant2(const char *name, int value, bool isparameter) { } } { - HPMHooks.source.script.set_constant2(name, value, isparameter); + HPMHooks.source.searchstore.query(sd, type, min_price, max_price, itemlist, item_count, cardlist, card_count); } - if( HPMHooks.count.HP_script_set_constant2_post ) { - void (*postHookFunc) (const char *name, int *value, bool *isparameter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_set_constant2_post[hIndex].func; - postHookFunc(name, &value, &isparameter); + if( HPMHooks.count.HP_searchstore_query_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const unsigned short *itemlist, unsigned int *item_count, const unsigned short *cardlist, unsigned int *card_count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_query_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_query_post[hIndex].func; + postHookFunc(sd, &type, &min_price, &max_price, itemlist, &item_count, cardlist, &card_count); } } return; } -bool HP_script_get_constant(const char *name, int *value) { +bool HP_searchstore_querynext(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_get_constant_pre ) { - bool (*preHookFunc) (const char *name, int *value); + if( HPMHooks.count.HP_searchstore_querynext_pre ) { + bool (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_constant_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_get_constant_pre[hIndex].func; - retVal___ = preHookFunc(name, value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_querynext_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_querynext_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55623,25 +62128,25 @@ bool HP_script_get_constant(const char *name, int *value) { } } { - retVal___ = HPMHooks.source.script.get_constant(name, value); + retVal___ = HPMHooks.source.searchstore.querynext(sd); } - if( HPMHooks.count.HP_script_get_constant_post ) { - bool (*postHookFunc) (bool retVal___, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_constant_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_get_constant_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name, value); + if( HPMHooks.count.HP_searchstore_querynext_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_querynext_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_querynext_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -void HP_script_label_add(int key, int pos) { +void HP_searchstore_next(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_script_label_add_pre ) { - void (*preHookFunc) (int *key, int *pos); + if( HPMHooks.count.HP_searchstore_next_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_label_add_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_label_add_pre[hIndex].func; - preHookFunc(&key, &pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_next_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_next_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55649,25 +62154,25 @@ void HP_script_label_add(int key, int pos) { } } { - HPMHooks.source.script.label_add(key, pos); + HPMHooks.source.searchstore.next(sd); } - if( HPMHooks.count.HP_script_label_add_post ) { - void (*postHookFunc) (int *key, int *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_label_add_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_label_add_post[hIndex].func; - postHookFunc(&key, &pos); + if( HPMHooks.count.HP_searchstore_next_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_next_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_next_post[hIndex].func; + postHookFunc(sd); } } return; } -void HP_script_run(struct script_code *rootscript, int pos, int rid, int oid) { +void HP_searchstore_clear(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_pre ) { - void (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); + if( HPMHooks.count.HP_searchstore_clear_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_run_pre[hIndex].func; - preHookFunc(rootscript, &pos, &rid, &oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_clear_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55675,25 +62180,25 @@ void HP_script_run(struct script_code *rootscript, int pos, int rid, int oid) { } } { - HPMHooks.source.script.run(rootscript, pos, rid, oid); + HPMHooks.source.searchstore.clear(sd); } - if( HPMHooks.count.HP_script_run_post ) { - void (*postHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_run_post[hIndex].func; - postHookFunc(rootscript, &pos, &rid, &oid); + if( HPMHooks.count.HP_searchstore_clear_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_clear_post[hIndex].func; + postHookFunc(sd); } } return; } -void HP_script_run_npc(struct script_code *rootscript, int pos, int rid, int oid) { +void HP_searchstore_close(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_npc_pre ) { - void (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); + if( HPMHooks.count.HP_searchstore_close_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_npc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_run_npc_pre[hIndex].func; - preHookFunc(rootscript, &pos, &rid, &oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_close_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55701,25 +62206,25 @@ void HP_script_run_npc(struct script_code *rootscript, int pos, int rid, int oid } } { - HPMHooks.source.script.run_npc(rootscript, pos, rid, oid); + HPMHooks.source.searchstore.close(sd); } - if( HPMHooks.count.HP_script_run_npc_post ) { - void (*postHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_npc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_run_npc_post[hIndex].func; - postHookFunc(rootscript, &pos, &rid, &oid); + if( HPMHooks.count.HP_searchstore_close_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_close_post[hIndex].func; + postHookFunc(sd); } } return; } -void HP_script_run_pet(struct script_code *rootscript, int pos, int rid, int oid) { +void HP_searchstore_click(struct map_session_data *sd, int account_id, int store_id, unsigned short nameid) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_pet_pre ) { - void (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); + if( HPMHooks.count.HP_searchstore_click_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *account_id, int *store_id, unsigned short *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pet_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_run_pet_pre[hIndex].func; - preHookFunc(rootscript, &pos, &rid, &oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_click_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_click_pre[hIndex].func; + preHookFunc(sd, &account_id, &store_id, &nameid); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55727,79 +62232,79 @@ void HP_script_run_pet(struct script_code *rootscript, int pos, int rid, int oid } } { - HPMHooks.source.script.run_pet(rootscript, pos, rid, oid); + HPMHooks.source.searchstore.click(sd, account_id, store_id, nameid); } - if( HPMHooks.count.HP_script_run_pet_post ) { - void (*postHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pet_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_run_pet_post[hIndex].func; - postHookFunc(rootscript, &pos, &rid, &oid); + if( HPMHooks.count.HP_searchstore_click_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *account_id, int *store_id, unsigned short *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_click_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_click_post[hIndex].func; + postHookFunc(sd, &account_id, &store_id, &nameid); } } return; } -void HP_script_run_main(struct script_state *st) { +bool HP_searchstore_queryremote(struct map_session_data *sd, int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_main_pre ) { - void (*preHookFunc) (struct script_state *st); + bool retVal___ = false; + if( HPMHooks.count.HP_searchstore_queryremote_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_main_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_run_main_pre[hIndex].func; - preHookFunc(st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_queryremote_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_queryremote_pre[hIndex].func; + retVal___ = preHookFunc(sd, &account_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.run_main(st); + retVal___ = HPMHooks.source.searchstore.queryremote(sd, account_id); } - if( HPMHooks.count.HP_script_run_main_post ) { - void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_main_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_run_main_post[hIndex].func; - postHookFunc(st); + if( HPMHooks.count.HP_searchstore_queryremote_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_queryremote_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_queryremote_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &account_id); } } - return; + return retVal___; } -int HP_script_run_timer(int tid, int64 tick, int id, intptr_t data) { +void HP_searchstore_clearremote(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_script_run_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_searchstore_clearremote_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_run_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clearremote_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_clearremote_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.script.run_timer(tid, tick, id, data); + HPMHooks.source.searchstore.clearremote(sd); } - if( HPMHooks.count.HP_script_run_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_run_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_searchstore_clearremote_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clearremote_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_clearremote_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -int HP_script_set_var(struct map_session_data *sd, char *name, void *val) { +bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_script_set_var_pre ) { - int (*preHookFunc) (struct map_session_data *sd, char *name, void *val); + bool retVal___ = false; + if( HPMHooks.count.HP_searchstore_result_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, unsigned int *store_id, int *account_id, const char *store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short *card, unsigned char *refine); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_var_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_set_var_pre[hIndex].func; - retVal___ = preHookFunc(sd, name, val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_result_pre[hIndex].func; + retVal___ = preHookFunc(sd, &store_id, &account_id, store_name, &nameid, &amount, &price, card, &refine); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55807,25 +62312,26 @@ int HP_script_set_var(struct map_session_data *sd, char *name, void *val) { } } { - retVal___ = HPMHooks.source.script.set_var(sd, name, val); + retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine); } - if( HPMHooks.count.HP_script_set_var_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name, void *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_var_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_set_var_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, name, val); + if( HPMHooks.count.HP_searchstore_result_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int *store_id, int *account_id, const char *store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short *card, unsigned char *refine); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_result_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &store_id, &account_id, store_name, &nameid, &amount, &price, card, &refine); } } return retVal___; } -void HP_script_stop_instances(struct script_code *code) { +/* showmsg */ +void HP_showmsg_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_stop_instances_pre ) { - void (*preHookFunc) (struct script_code *code); + if( HPMHooks.count.HP_showmsg_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stop_instances_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_stop_instances_pre[hIndex].func; - preHookFunc(code); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_showmsg_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55833,25 +62339,25 @@ void HP_script_stop_instances(struct script_code *code) { } } { - HPMHooks.source.script.stop_instances(code); + HPMHooks.source.showmsg.init(); } - if( HPMHooks.count.HP_script_stop_instances_post ) { - void (*postHookFunc) (struct script_code *code); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stop_instances_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_stop_instances_post[hIndex].func; - postHookFunc(code); + if( HPMHooks.count.HP_showmsg_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_showmsg_init_post[hIndex].func; + postHookFunc(); } } return; } -void HP_script_free_code(struct script_code *code) { +void HP_showmsg_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_free_code_pre ) { - void (*preHookFunc) (struct script_code *code); + if( HPMHooks.count.HP_showmsg_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_code_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_free_code_pre[hIndex].func; - preHookFunc(code); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_showmsg_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55859,25 +62365,25 @@ void HP_script_free_code(struct script_code *code) { } } { - HPMHooks.source.script.free_code(code); + HPMHooks.source.showmsg.final(); } - if( HPMHooks.count.HP_script_free_code_post ) { - void (*postHookFunc) (struct script_code *code); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_code_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_free_code_post[hIndex].func; - postHookFunc(code); + if( HPMHooks.count.HP_showmsg_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_showmsg_final_post[hIndex].func; + postHookFunc(); } } return; } -void HP_script_free_vars(struct DBMap *var_storage) { +void HP_showmsg_clearScreen(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_free_vars_pre ) { - void (*preHookFunc) (struct DBMap *var_storage); + if( HPMHooks.count.HP_showmsg_clearScreen_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_vars_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_free_vars_pre[hIndex].func; - preHookFunc(var_storage); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_showmsg_clearScreen_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55885,26 +62391,28 @@ void HP_script_free_vars(struct DBMap *var_storage) { } } { - HPMHooks.source.script.free_vars(var_storage); + HPMHooks.source.showmsg.clearScreen(); } - if( HPMHooks.count.HP_script_free_vars_post ) { - void (*postHookFunc) (struct DBMap *var_storage); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_vars_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_free_vars_post[hIndex].func; - postHookFunc(var_storage); + if( HPMHooks.count.HP_showmsg_clearScreen_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_showmsg_clearScreen_post[hIndex].func; + postHookFunc(); } } return; } -struct script_state* HP_script_alloc_state(struct script_code *rootscript, int pos, int rid, int oid) { +int HP_showmsg_showMessageV(const char *string, va_list ap) { int hIndex = 0; - struct script_state* retVal___ = NULL; - if( HPMHooks.count.HP_script_alloc_state_pre ) { - struct script_state* (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); + int retVal___ = 0; + if( HPMHooks.count.HP_showmsg_showMessageV_pre ) { + int (*preHookFunc) (const char *string, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_alloc_state_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_alloc_state_pre[hIndex].func; - retVal___ = preHookFunc(rootscript, &pos, &rid, &oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_showmsg_showMessageV_pre[hIndex].func; + retVal___ = preHookFunc(string, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55912,77 +62420,84 @@ struct script_state* HP_script_alloc_state(struct script_code *rootscript, int p } } { - retVal___ = HPMHooks.source.script.alloc_state(rootscript, pos, rid, oid); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.showmsg.showMessageV(string, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_script_alloc_state_post ) { - struct script_state* (*postHookFunc) (struct script_state* retVal___, struct script_code *rootscript, int *pos, int *rid, int *oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_alloc_state_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_alloc_state_post[hIndex].func; - retVal___ = postHookFunc(retVal___, rootscript, &pos, &rid, &oid); + if( HPMHooks.count.HP_showmsg_showMessageV_post ) { + int (*postHookFunc) (int retVal___, const char *string, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_showmsg_showMessageV_post[hIndex].func; + retVal___ = postHookFunc(retVal___, string, ap___copy); + va_end(ap___copy); } } return retVal___; } -void HP_script_free_state(struct script_state *st) { +/* skill */ +int HP_skill_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_script_free_state_pre ) { - void (*preHookFunc) (struct script_state *st); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_init_pre ) { + int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_state_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_free_state_pre[hIndex].func; - preHookFunc(st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_init_pre[hIndex].func; + retVal___ = preHookFunc(&minimal); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.free_state(st); + retVal___ = HPMHooks.source.skill.init(minimal); } - if( HPMHooks.count.HP_script_free_state_post ) { - void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_state_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_free_state_post[hIndex].func; - postHookFunc(st); + if( HPMHooks.count.HP_skill_init_post ) { + int (*postHookFunc) (int retVal___, bool *minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &minimal); } } - return; + return retVal___; } -void HP_script_add_pending_ref(struct script_state *st, struct reg_db *ref) { +int HP_skill_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_add_pending_ref_pre ) { - void (*preHookFunc) (struct script_state *st, struct reg_db *ref); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_final_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_add_pending_ref_pre[hIndex].func; - preHookFunc(st, ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_final_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.add_pending_ref(st, ref); + retVal___ = HPMHooks.source.skill.final(); } - if( HPMHooks.count.HP_script_add_pending_ref_post ) { - void (*postHookFunc) (struct script_state *st, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_add_pending_ref_post[hIndex].func; - postHookFunc(st, ref); + if( HPMHooks.count.HP_skill_final_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -void HP_script_run_autobonus(const char *autobonus, int id, int pos) { +void HP_skill_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_autobonus_pre ) { - void (*preHookFunc) (const char *autobonus, int *id, int *pos); + if( HPMHooks.count.HP_skill_reload_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_autobonus_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_run_autobonus_pre[hIndex].func; - preHookFunc(autobonus, &id, &pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_reload_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -55990,25 +62505,25 @@ void HP_script_run_autobonus(const char *autobonus, int id, int pos) { } } { - HPMHooks.source.script.run_autobonus(autobonus, id, pos); + HPMHooks.source.skill.reload(); } - if( HPMHooks.count.HP_script_run_autobonus_post ) { - void (*postHookFunc) (const char *autobonus, int *id, int *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_autobonus_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_run_autobonus_post[hIndex].func; - postHookFunc(autobonus, &id, &pos); + if( HPMHooks.count.HP_skill_reload_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_reload_post[hIndex].func; + postHookFunc(); } } return; } -void HP_script_cleararray_pc(struct map_session_data *sd, const char *varname, void *value) { +void HP_skill_read_db(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_script_cleararray_pc_pre ) { - void (*preHookFunc) (struct map_session_data *sd, const char *varname, void *value); + if( HPMHooks.count.HP_skill_read_db_pre ) { + void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleararray_pc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_cleararray_pc_pre[hIndex].func; - preHookFunc(sd, varname, value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_read_db_pre[hIndex].func; + preHookFunc(&minimal); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56016,52 +62531,53 @@ void HP_script_cleararray_pc(struct map_session_data *sd, const char *varname, v } } { - HPMHooks.source.script.cleararray_pc(sd, varname, value); + HPMHooks.source.skill.read_db(minimal); } - if( HPMHooks.count.HP_script_cleararray_pc_post ) { - void (*postHookFunc) (struct map_session_data *sd, const char *varname, void *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleararray_pc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_cleararray_pc_post[hIndex].func; - postHookFunc(sd, varname, value); + if( HPMHooks.count.HP_skill_read_db_post ) { + void (*postHookFunc) (bool *minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_read_db_post[hIndex].func; + postHookFunc(&minimal); } } return; } -void HP_script_setarray_pc(struct map_session_data *sd, const char *varname, uint32 idx, void *value, int *refcache) { +int HP_skill_get_index(uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_script_setarray_pc_pre ) { - void (*preHookFunc) (struct map_session_data *sd, const char *varname, uint32 *idx, void *value, int *refcache); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_index_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setarray_pc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_setarray_pc_pre[hIndex].func; - preHookFunc(sd, varname, &idx, value, refcache); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_index_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_index_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.setarray_pc(sd, varname, idx, value, refcache); + retVal___ = HPMHooks.source.skill.get_index(skill_id); } - if( HPMHooks.count.HP_script_setarray_pc_post ) { - void (*postHookFunc) (struct map_session_data *sd, const char *varname, uint32 *idx, void *value, int *refcache); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setarray_pc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_setarray_pc_post[hIndex].func; - postHookFunc(sd, varname, &idx, value, refcache); + if( HPMHooks.count.HP_skill_get_index_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_index_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_index_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } - return; + return retVal___; } -int HP_script_config_read(char *cfgName) { +int HP_skill_get_type(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_config_read_pre ) { - int (*preHookFunc) (char *cfgName); + if( HPMHooks.count.HP_skill_get_type_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_config_read_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_config_read_pre[hIndex].func; - retVal___ = preHookFunc(cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_type_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_type_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56069,26 +62585,26 @@ int HP_script_config_read(char *cfgName) { } } { - retVal___ = HPMHooks.source.script.config_read(cfgName); + retVal___ = HPMHooks.source.skill.get_type(skill_id); } - if( HPMHooks.count.HP_script_config_read_post ) { - int (*postHookFunc) (int retVal___, char *cfgName); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_config_read_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_config_read_post[hIndex].func; - retVal___ = postHookFunc(retVal___, cfgName); + if( HPMHooks.count.HP_skill_get_type_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_type_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } return retVal___; } -int HP_script_add_str(const char *p) { +int HP_skill_get_hit(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_add_str_pre ) { - int (*preHookFunc) (const char *p); + if( HPMHooks.count.HP_skill_get_hit_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_str_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_add_str_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_hit_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56096,26 +62612,26 @@ int HP_script_add_str(const char *p) { } } { - retVal___ = HPMHooks.source.script.add_str(p); + retVal___ = HPMHooks.source.skill.get_hit(skill_id); } - if( HPMHooks.count.HP_script_add_str_post ) { - int (*postHookFunc) (int retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_str_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_add_str_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_skill_get_hit_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_hit_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } return retVal___; } -const char* HP_script_get_str(int id) { +int HP_skill_get_inf(uint16 skill_id) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_str_pre ) { - const char* (*preHookFunc) (int *id); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_inf_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_str_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_get_str_pre[hIndex].func; - retVal___ = preHookFunc(&id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_inf_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56123,26 +62639,26 @@ const char* HP_script_get_str(int id) { } } { - retVal___ = HPMHooks.source.script.get_str(id); + retVal___ = HPMHooks.source.skill.get_inf(skill_id); } - if( HPMHooks.count.HP_script_get_str_post ) { - const char* (*postHookFunc) (const char* retVal___, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_str_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_get_str_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + if( HPMHooks.count.HP_skill_get_inf_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_inf_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } return retVal___; } -int HP_script_search_str(const char *p) { +int HP_skill_get_ele(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_search_str_pre ) { - int (*preHookFunc) (const char *p); + if( HPMHooks.count.HP_skill_get_ele_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_search_str_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_search_str_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ele_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_ele_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56150,78 +62666,80 @@ int HP_script_search_str(const char *p) { } } { - retVal___ = HPMHooks.source.script.search_str(p); + retVal___ = HPMHooks.source.skill.get_ele(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_search_str_post ) { - int (*postHookFunc) (int retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_search_str_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_search_str_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_skill_get_ele_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ele_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_ele_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -void HP_script_setd_sub(struct script_state *st, struct map_session_data *sd, const char *varname, int elem, void *value, struct reg_db *ref) { +int HP_skill_get_nk(uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_script_setd_sub_pre ) { - void (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *varname, int *elem, void *value, struct reg_db *ref); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_nk_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setd_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_setd_sub_pre[hIndex].func; - preHookFunc(st, sd, varname, &elem, value, ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_nk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_nk_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.setd_sub(st, sd, varname, elem, value, ref); + retVal___ = HPMHooks.source.skill.get_nk(skill_id); } - if( HPMHooks.count.HP_script_setd_sub_post ) { - void (*postHookFunc) (struct script_state *st, struct map_session_data *sd, const char *varname, int *elem, void *value, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setd_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_setd_sub_post[hIndex].func; - postHookFunc(st, sd, varname, &elem, value, ref); + if( HPMHooks.count.HP_skill_get_nk_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_nk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_nk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } - return; + return retVal___; } -void HP_script_attach_state(struct script_state *st) { +int HP_skill_get_max(uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_script_attach_state_pre ) { - void (*preHookFunc) (struct script_state *st); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_max_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_attach_state_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_attach_state_pre[hIndex].func; - preHookFunc(st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_max_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_max_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.attach_state(st); + retVal___ = HPMHooks.source.skill.get_max(skill_id); } - if( HPMHooks.count.HP_script_attach_state_post ) { - void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_attach_state_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_attach_state_post[hIndex].func; - postHookFunc(st); + if( HPMHooks.count.HP_skill_get_max_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_max_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_max_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } - return; + return retVal___; } -struct hQueue* HP_script_queue(int idx) { +int HP_skill_get_range(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - struct hQueue* retVal___ = NULL; - if( HPMHooks.count.HP_script_queue_pre ) { - struct hQueue* (*preHookFunc) (int *idx); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_range_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_queue_pre[hIndex].func; - retVal___ = preHookFunc(&idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_range_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56229,26 +62747,26 @@ struct hQueue* HP_script_queue(int idx) { } } { - retVal___ = HPMHooks.source.script.queue(idx); + retVal___ = HPMHooks.source.skill.get_range(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_queue_post ) { - struct hQueue* (*postHookFunc) (struct hQueue* retVal___, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_queue_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &idx); + if( HPMHooks.count.HP_skill_get_range_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_range_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -bool HP_script_queue_add(int idx, int var) { +int HP_skill_get_range2(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_script_queue_add_pre ) { - bool (*preHookFunc) (int *idx, int *var); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_range2_pre ) { + int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_add_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_queue_add_pre[hIndex].func; - retVal___ = preHookFunc(&idx, &var); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_range2_pre[hIndex].func; + retVal___ = preHookFunc(bl, &skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56256,26 +62774,26 @@ bool HP_script_queue_add(int idx, int var) { } } { - retVal___ = HPMHooks.source.script.queue_add(idx, var); + retVal___ = HPMHooks.source.skill.get_range2(bl, skill_id, skill_lv); } - if( HPMHooks.count.HP_script_queue_add_post ) { - bool (*postHookFunc) (bool retVal___, int *idx, int *var); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_add_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_queue_add_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &idx, &var); + if( HPMHooks.count.HP_skill_get_range2_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_range2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &skill_id, &skill_lv); } } return retVal___; } -bool HP_script_queue_del(int idx) { +int HP_skill_get_splash(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_script_queue_del_pre ) { - bool (*preHookFunc) (int *idx); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_splash_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_del_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_queue_del_pre[hIndex].func; - retVal___ = preHookFunc(&idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_splash_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_splash_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56283,26 +62801,26 @@ bool HP_script_queue_del(int idx) { } } { - retVal___ = HPMHooks.source.script.queue_del(idx); + retVal___ = HPMHooks.source.skill.get_splash(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_queue_del_post ) { - bool (*postHookFunc) (bool retVal___, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_del_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_queue_del_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &idx); + if( HPMHooks.count.HP_skill_get_splash_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_splash_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_splash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -bool HP_script_queue_remove(int idx, int var) { +int HP_skill_get_hp(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_script_queue_remove_pre ) { - bool (*preHookFunc) (int *idx, int *var); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_hp_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_remove_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_queue_remove_pre[hIndex].func; - retVal___ = preHookFunc(&idx, &var); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_hp_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56310,26 +62828,26 @@ bool HP_script_queue_remove(int idx, int var) { } } { - retVal___ = HPMHooks.source.script.queue_remove(idx, var); + retVal___ = HPMHooks.source.skill.get_hp(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_queue_remove_post ) { - bool (*postHookFunc) (bool retVal___, int *idx, int *var); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_remove_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_queue_remove_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &idx, &var); + if( HPMHooks.count.HP_skill_get_hp_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_hp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -int HP_script_queue_create(void) { +int HP_skill_get_mhp(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_queue_create_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_skill_get_mhp_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_create_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_queue_create_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_mhp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_mhp_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56337,52 +62855,53 @@ int HP_script_queue_create(void) { } } { - retVal___ = HPMHooks.source.script.queue_create(); + retVal___ = HPMHooks.source.skill.get_mhp(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_queue_create_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_create_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_queue_create_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_skill_get_mhp_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_mhp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_mhp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -void HP_script_queue_clear(int idx) { +int HP_skill_get_sp(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - if( HPMHooks.count.HP_script_queue_clear_pre ) { - void (*preHookFunc) (int *idx); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_sp_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_queue_clear_pre[hIndex].func; - preHookFunc(&idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_sp_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.queue_clear(idx); + retVal___ = HPMHooks.source.skill.get_sp(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_queue_clear_post ) { - void (*postHookFunc) (int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_queue_clear_post[hIndex].func; - postHookFunc(&idx); + if( HPMHooks.count.HP_skill_get_sp_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_sp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } - return; + return retVal___; } -const char* HP_script_parse_curly_close(const char *p) { +int HP_skill_get_state(uint16 skill_id) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_curly_close_pre ) { - const char* (*preHookFunc) (const char *p); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_state_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_curly_close_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_parse_curly_close_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_state_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_state_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56390,26 +62909,26 @@ const char* HP_script_parse_curly_close(const char *p) { } } { - retVal___ = HPMHooks.source.script.parse_curly_close(p); + retVal___ = HPMHooks.source.skill.get_state(skill_id); } - if( HPMHooks.count.HP_script_parse_curly_close_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_curly_close_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_parse_curly_close_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_skill_get_state_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_state_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_state_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } return retVal___; } -const char* HP_script_parse_syntax_close(const char *p) { +int HP_skill_get_spiritball(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_syntax_close_pre ) { - const char* (*preHookFunc) (const char *p); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_spiritball_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_parse_syntax_close_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_spiritball_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_spiritball_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56417,26 +62936,26 @@ const char* HP_script_parse_syntax_close(const char *p) { } } { - retVal___ = HPMHooks.source.script.parse_syntax_close(p); + retVal___ = HPMHooks.source.skill.get_spiritball(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_parse_syntax_close_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_parse_syntax_close_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_skill_get_spiritball_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_spiritball_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_spiritball_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -const char* HP_script_parse_syntax_close_sub(const char *p, int *flag) { +int HP_skill_get_zeny(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_syntax_close_sub_pre ) { - const char* (*preHookFunc) (const char *p, int *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_zeny_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_parse_syntax_close_sub_pre[hIndex].func; - retVal___ = preHookFunc(p, flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_zeny_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_zeny_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56444,26 +62963,26 @@ const char* HP_script_parse_syntax_close_sub(const char *p, int *flag) { } } { - retVal___ = HPMHooks.source.script.parse_syntax_close_sub(p, flag); + retVal___ = HPMHooks.source.skill.get_zeny(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_parse_syntax_close_sub_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *p, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_parse_syntax_close_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, flag); + if( HPMHooks.count.HP_skill_get_zeny_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_zeny_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_zeny_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -const char* HP_script_parse_syntax(const char *p) { +int HP_skill_get_num(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_syntax_pre ) { - const char* (*preHookFunc) (const char *p); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_num_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_parse_syntax_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_num_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_num_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56471,53 +62990,53 @@ const char* HP_script_parse_syntax(const char *p) { } } { - retVal___ = HPMHooks.source.script.parse_syntax(p); + retVal___ = HPMHooks.source.skill.get_num(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_parse_syntax_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_parse_syntax_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_skill_get_num_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_num_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_num_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -c_op HP_script_get_com(unsigned char *scriptbuf, int *pos) { +int HP_skill_get_cast(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - c_op retVal___ = C_NOP; - if( HPMHooks.count.HP_script_get_com_pre ) { - c_op (*preHookFunc) (unsigned char *scriptbuf, int *pos); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_cast_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_com_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_get_com_pre[hIndex].func; - retVal___ = preHookFunc(scriptbuf, pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cast_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_cast_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; return retVal___; } - } - { - retVal___ = HPMHooks.source.script.get_com(scriptbuf, pos); - } - if( HPMHooks.count.HP_script_get_com_post ) { - c_op (*postHookFunc) (c_op retVal___, unsigned char *scriptbuf, int *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_com_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_get_com_post[hIndex].func; - retVal___ = postHookFunc(retVal___, scriptbuf, pos); + } + { + retVal___ = HPMHooks.source.skill.get_cast(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_cast_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cast_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_cast_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -int HP_script_get_num(unsigned char *scriptbuf, int *pos) { +int HP_skill_get_delay(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_get_num_pre ) { - int (*preHookFunc) (unsigned char *scriptbuf, int *pos); + if( HPMHooks.count.HP_skill_get_delay_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_num_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_get_num_pre[hIndex].func; - retVal___ = preHookFunc(scriptbuf, pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delay_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_delay_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56525,26 +63044,26 @@ int HP_script_get_num(unsigned char *scriptbuf, int *pos) { } } { - retVal___ = HPMHooks.source.script.get_num(scriptbuf, pos); + retVal___ = HPMHooks.source.skill.get_delay(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_get_num_post ) { - int (*postHookFunc) (int retVal___, unsigned char *scriptbuf, int *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_num_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_get_num_post[hIndex].func; - retVal___ = postHookFunc(retVal___, scriptbuf, pos); + if( HPMHooks.count.HP_skill_get_delay_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delay_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_delay_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -const char* HP_script_op2name(int op) { +int HP_skill_get_walkdelay(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_op2name_pre ) { - const char* (*preHookFunc) (int *op); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_walkdelay_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op2name_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_op2name_pre[hIndex].func; - retVal___ = preHookFunc(&op); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_walkdelay_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_walkdelay_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56552,156 +63071,161 @@ const char* HP_script_op2name(int op) { } } { - retVal___ = HPMHooks.source.script.op2name(op); + retVal___ = HPMHooks.source.skill.get_walkdelay(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_op2name_post ) { - const char* (*postHookFunc) (const char* retVal___, int *op); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op2name_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_op2name_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &op); + if( HPMHooks.count.HP_skill_get_walkdelay_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_walkdelay_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_walkdelay_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -void HP_script_reportsrc(struct script_state *st) { +int HP_skill_get_time(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - if( HPMHooks.count.HP_script_reportsrc_pre ) { - void (*preHookFunc) (struct script_state *st); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_time_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportsrc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_reportsrc_pre[hIndex].func; - preHookFunc(st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_time_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.reportsrc(st); + retVal___ = HPMHooks.source.skill.get_time(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_reportsrc_post ) { - void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportsrc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_reportsrc_post[hIndex].func; - postHookFunc(st); + if( HPMHooks.count.HP_skill_get_time_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_time_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } - return; + return retVal___; } -void HP_script_reportdata(struct script_data *data) { +int HP_skill_get_time2(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - if( HPMHooks.count.HP_script_reportdata_pre ) { - void (*preHookFunc) (struct script_data *data); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_time2_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportdata_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_reportdata_pre[hIndex].func; - preHookFunc(data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_time2_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.reportdata(data); + retVal___ = HPMHooks.source.skill.get_time2(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_reportdata_post ) { - void (*postHookFunc) (struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportdata_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_reportdata_post[hIndex].func; - postHookFunc(data); + if( HPMHooks.count.HP_skill_get_time2_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_time2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } - return; + return retVal___; } -void HP_script_reportfunc(struct script_state *st) { +int HP_skill_get_castnodex(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - if( HPMHooks.count.HP_script_reportfunc_pre ) { - void (*preHookFunc) (struct script_state *st); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_castnodex_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportfunc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_reportfunc_pre[hIndex].func; - preHookFunc(st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castnodex_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_castnodex_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.reportfunc(st); + retVal___ = HPMHooks.source.skill.get_castnodex(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_reportfunc_post ) { - void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportfunc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_reportfunc_post[hIndex].func; - postHookFunc(st); + if( HPMHooks.count.HP_skill_get_castnodex_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castnodex_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_castnodex_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } - return; + return retVal___; } -void HP_script_disp_warning_message(const char *mes, const char *pos) { +int HP_skill_get_delaynodex(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - if( HPMHooks.count.HP_script_disp_warning_message_pre ) { - void (*preHookFunc) (const char *mes, const char *pos); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_delaynodex_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_warning_message_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_disp_warning_message_pre[hIndex].func; - preHookFunc(mes, pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delaynodex_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_delaynodex_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.disp_warning_message(mes, pos); + retVal___ = HPMHooks.source.skill.get_delaynodex(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_disp_warning_message_post ) { - void (*postHookFunc) (const char *mes, const char *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_warning_message_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_disp_warning_message_post[hIndex].func; - postHookFunc(mes, pos); + if( HPMHooks.count.HP_skill_get_delaynodex_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delaynodex_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_delaynodex_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } - return; + return retVal___; } -void HP_script_check_event(struct script_state *st, const char *evt) { +int HP_skill_get_castdef(uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_script_check_event_pre ) { - void (*preHookFunc) (struct script_state *st, const char *evt); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_castdef_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_event_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_check_event_pre[hIndex].func; - preHookFunc(st, evt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castdef_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_castdef_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.check_event(st, evt); + retVal___ = HPMHooks.source.skill.get_castdef(skill_id); } - if( HPMHooks.count.HP_script_check_event_post ) { - void (*postHookFunc) (struct script_state *st, const char *evt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_event_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_check_event_post[hIndex].func; - postHookFunc(st, evt); + if( HPMHooks.count.HP_skill_get_castdef_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castdef_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_castdef_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } - return; + return retVal___; } -unsigned int HP_script_calc_hash(const char *p) { +int HP_skill_get_weapontype(uint16 skill_id) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_script_calc_hash_pre ) { - unsigned int (*preHookFunc) (const char *p); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_weapontype_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_calc_hash_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_weapontype_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_weapontype_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56709,156 +63233,161 @@ unsigned int HP_script_calc_hash(const char *p) { } } { - retVal___ = HPMHooks.source.script.calc_hash(p); + retVal___ = HPMHooks.source.skill.get_weapontype(skill_id); } - if( HPMHooks.count.HP_script_calc_hash_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_calc_hash_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_skill_get_weapontype_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_weapontype_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_weapontype_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } return retVal___; } -void HP_script_addb(int a) { +int HP_skill_get_ammotype(uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_script_addb_pre ) { - void (*preHookFunc) (int *a); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_ammotype_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_addb_pre[hIndex].func; - preHookFunc(&a); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammotype_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_ammotype_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.addb(a); + retVal___ = HPMHooks.source.skill.get_ammotype(skill_id); } - if( HPMHooks.count.HP_script_addb_post ) { - void (*postHookFunc) (int *a); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_addb_post[hIndex].func; - postHookFunc(&a); + if( HPMHooks.count.HP_skill_get_ammotype_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammotype_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_ammotype_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } - return; + return retVal___; } -void HP_script_addc(int a) { +int HP_skill_get_ammo_qty(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - if( HPMHooks.count.HP_script_addc_pre ) { - void (*preHookFunc) (int *a); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_ammo_qty_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_addc_pre[hIndex].func; - preHookFunc(&a); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammo_qty_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_ammo_qty_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.addc(a); + retVal___ = HPMHooks.source.skill.get_ammo_qty(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_addc_post ) { - void (*postHookFunc) (int *a); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_addc_post[hIndex].func; - postHookFunc(&a); + if( HPMHooks.count.HP_skill_get_ammo_qty_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammo_qty_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_ammo_qty_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } - return; + return retVal___; } -void HP_script_addi(int a) { +int HP_skill_get_unit_id(uint16 skill_id, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_script_addi_pre ) { - void (*preHookFunc) (int *a); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_unit_id_pre ) { + int (*preHookFunc) (uint16 *skill_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addi_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_addi_pre[hIndex].func; - preHookFunc(&a); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_unit_id_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.addi(a); + retVal___ = HPMHooks.source.skill.get_unit_id(skill_id, flag); } - if( HPMHooks.count.HP_script_addi_post ) { - void (*postHookFunc) (int *a); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addi_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_addi_post[hIndex].func; - postHookFunc(&a); + if( HPMHooks.count.HP_skill_get_unit_id_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_unit_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &flag); } } - return; + return retVal___; } -void HP_script_addl(int l) { +int HP_skill_get_inf2(uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_script_addl_pre ) { - void (*preHookFunc) (int *l); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_inf2_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addl_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_addl_pre[hIndex].func; - preHookFunc(&l); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_inf2_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.addl(l); + retVal___ = HPMHooks.source.skill.get_inf2(skill_id); } - if( HPMHooks.count.HP_script_addl_post ) { - void (*postHookFunc) (int *l); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addl_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_addl_post[hIndex].func; - postHookFunc(&l); + if( HPMHooks.count.HP_skill_get_inf2_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_inf2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } - return; + return retVal___; } -void HP_script_set_label(int l, int pos, const char *script_pos) { +int HP_skill_get_castcancel(uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_label_pre ) { - void (*preHookFunc) (int *l, int *pos, const char *script_pos); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_castcancel_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_label_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_set_label_pre[hIndex].func; - preHookFunc(&l, &pos, script_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castcancel_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_castcancel_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.set_label(l, pos, script_pos); + retVal___ = HPMHooks.source.skill.get_castcancel(skill_id); } - if( HPMHooks.count.HP_script_set_label_post ) { - void (*postHookFunc) (int *l, int *pos, const char *script_pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_label_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_set_label_post[hIndex].func; - postHookFunc(&l, &pos, script_pos); + if( HPMHooks.count.HP_skill_get_castcancel_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castcancel_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_castcancel_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } - return; + return retVal___; } -const char* HP_script_skip_word(const char *p) { +int HP_skill_get_maxcount(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_skip_word_pre ) { - const char* (*preHookFunc) (const char *p); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_maxcount_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_word_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_skip_word_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_maxcount_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_maxcount_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56866,26 +63395,26 @@ const char* HP_script_skip_word(const char *p) { } } { - retVal___ = HPMHooks.source.script.skip_word(p); + retVal___ = HPMHooks.source.skill.get_maxcount(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_skip_word_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_word_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_skip_word_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_skill_get_maxcount_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_maxcount_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_maxcount_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -int HP_script_add_word(const char *p) { +int HP_skill_get_blewcount(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_add_word_pre ) { - int (*preHookFunc) (const char *p); + if( HPMHooks.count.HP_skill_get_blewcount_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_word_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_add_word_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_blewcount_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_blewcount_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56893,26 +63422,26 @@ int HP_script_add_word(const char *p) { } } { - retVal___ = HPMHooks.source.script.add_word(p); + retVal___ = HPMHooks.source.skill.get_blewcount(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_add_word_post ) { - int (*postHookFunc) (int retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_word_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_add_word_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_skill_get_blewcount_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_blewcount_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_blewcount_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -const char* HP_script_parse_callfunc(const char *p, int require_paren, int is_custom) { +int HP_skill_get_unit_flag(uint16 skill_id) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_callfunc_pre ) { - const char* (*preHookFunc) (const char *p, int *require_paren, int *is_custom); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_unit_flag_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_callfunc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_parse_callfunc_pre[hIndex].func; - retVal___ = preHookFunc(p, &require_paren, &is_custom); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_flag_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_unit_flag_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56920,52 +63449,53 @@ const char* HP_script_parse_callfunc(const char *p, int require_paren, int is_cu } } { - retVal___ = HPMHooks.source.script.parse_callfunc(p, require_paren, is_custom); + retVal___ = HPMHooks.source.skill.get_unit_flag(skill_id); } - if( HPMHooks.count.HP_script_parse_callfunc_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *p, int *require_paren, int *is_custom); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_callfunc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_parse_callfunc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, &require_paren, &is_custom); + if( HPMHooks.count.HP_skill_get_unit_flag_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_flag_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_unit_flag_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } return retVal___; } -void HP_script_parse_nextline(bool first, const char *p) { +int HP_skill_get_unit_target(uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_script_parse_nextline_pre ) { - void (*preHookFunc) (bool *first, const char *p); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_unit_target_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_nextline_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_parse_nextline_pre[hIndex].func; - preHookFunc(&first, p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_target_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_unit_target_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.parse_nextline(first, p); + retVal___ = HPMHooks.source.skill.get_unit_target(skill_id); } - if( HPMHooks.count.HP_script_parse_nextline_post ) { - void (*postHookFunc) (bool *first, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_nextline_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_parse_nextline_post[hIndex].func; - postHookFunc(&first, p); + if( HPMHooks.count.HP_skill_get_unit_target_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_target_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_unit_target_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } - return; + return retVal___; } -const char* HP_script_parse_variable(const char *p) { +int HP_skill_get_unit_interval(uint16 skill_id) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_variable_pre ) { - const char* (*preHookFunc) (const char *p); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_unit_interval_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_variable_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_parse_variable_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_interval_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_unit_interval_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -56973,26 +63503,26 @@ const char* HP_script_parse_variable(const char *p) { } } { - retVal___ = HPMHooks.source.script.parse_variable(p); + retVal___ = HPMHooks.source.skill.get_unit_interval(skill_id); } - if( HPMHooks.count.HP_script_parse_variable_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_variable_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_parse_variable_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_skill_get_unit_interval_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_interval_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_unit_interval_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } return retVal___; } -const char* HP_script_parse_simpleexpr(const char *p) { +int HP_skill_get_unit_bl_target(uint16 skill_id) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_simpleexpr_pre ) { - const char* (*preHookFunc) (const char *p); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_unit_bl_target_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_bl_target_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_unit_bl_target_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57000,26 +63530,26 @@ const char* HP_script_parse_simpleexpr(const char *p) { } } { - retVal___ = HPMHooks.source.script.parse_simpleexpr(p); + retVal___ = HPMHooks.source.skill.get_unit_bl_target(skill_id); } - if( HPMHooks.count.HP_script_parse_simpleexpr_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_skill_get_unit_bl_target_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_bl_target_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_unit_bl_target_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } return retVal___; } -const char* HP_script_parse_expr(const char *p) { +int HP_skill_get_unit_layout_type(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_expr_pre ) { - const char* (*preHookFunc) (const char *p); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_unit_layout_type_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_expr_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_parse_expr_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_type_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_unit_layout_type_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57027,26 +63557,26 @@ const char* HP_script_parse_expr(const char *p) { } } { - retVal___ = HPMHooks.source.script.parse_expr(p); + retVal___ = HPMHooks.source.skill.get_unit_layout_type(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_parse_expr_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_expr_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_parse_expr_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_skill_get_unit_layout_type_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_type_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_unit_layout_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -const char* HP_script_parse_line(const char *p) { +int HP_skill_get_unit_range(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_line_pre ) { - const char* (*preHookFunc) (const char *p); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_unit_range_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_line_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_parse_line_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_range_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_unit_range_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57054,52 +63584,53 @@ const char* HP_script_parse_line(const char *p) { } } { - retVal___ = HPMHooks.source.script.parse_line(p); + retVal___ = HPMHooks.source.skill.get_unit_range(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_parse_line_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_line_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_parse_line_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_skill_get_unit_range_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_range_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_unit_range_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -void HP_script_read_constdb(void) { +int HP_skill_get_cooldown(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - if( HPMHooks.count.HP_script_read_constdb_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_cooldown_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_read_constdb_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cooldown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_cooldown_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.read_constdb(); + retVal___ = HPMHooks.source.skill.get_cooldown(skill_id, skill_lv); } - if( HPMHooks.count.HP_script_read_constdb_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_read_constdb_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_skill_get_cooldown_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cooldown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_cooldown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } - return; + return retVal___; } -const char* HP_script_print_line(StringBuf *buf, const char *p, const char *mark, int line) { +int HP_skill_tree_get_max(uint16 skill_id, int b_class) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_print_line_pre ) { - const char* (*preHookFunc) (StringBuf *buf, const char *p, const char *mark, int *line); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_tree_get_max_pre ) { + int (*preHookFunc) (uint16 *skill_id, int *b_class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_print_line_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_print_line_pre[hIndex].func; - retVal___ = preHookFunc(buf, p, mark, &line); + 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); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57107,52 +63638,53 @@ const char* HP_script_print_line(StringBuf *buf, const char *p, const char *mark } } { - retVal___ = HPMHooks.source.script.print_line(buf, p, mark, line); + retVal___ = HPMHooks.source.skill.tree_get_max(skill_id, b_class); } - if( HPMHooks.count.HP_script_print_line_post ) { - const char* (*postHookFunc) (const char* retVal___, StringBuf *buf, const char *p, const char *mark, int *line); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_print_line_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_print_line_post[hIndex].func; - retVal___ = postHookFunc(retVal___, buf, p, mark, &line); + if( HPMHooks.count.HP_skill_tree_get_max_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, int *b_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); } } return retVal___; } -void HP_script_errorwarning_sub(StringBuf *buf, const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos) { +const char* HP_skill_get_name(uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_script_errorwarning_sub_pre ) { - void (*preHookFunc) (StringBuf *buf, const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_skill_get_name_pre ) { + const char* (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_errorwarning_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_errorwarning_sub_pre[hIndex].func; - preHookFunc(buf, src, file, &start_line, error_msg, error_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_name_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.errorwarning_sub(buf, src, file, start_line, error_msg, error_pos); + retVal___ = HPMHooks.source.skill.get_name(skill_id); } - if( HPMHooks.count.HP_script_errorwarning_sub_post ) { - void (*postHookFunc) (StringBuf *buf, const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_errorwarning_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_errorwarning_sub_post[hIndex].func; - postHookFunc(buf, src, file, &start_line, error_msg, error_pos); + if( HPMHooks.count.HP_skill_get_name_post ) { + const char* (*postHookFunc) (const char* retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } - return; + return retVal___; } -int HP_script_set_reg(struct script_state *st, TBL_PC *sd, int64 num, const char *name, const void *value, struct reg_db *ref) { +const char* HP_skill_get_desc(uint16 skill_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_script_set_reg_pre ) { - int (*preHookFunc) (struct script_state *st, TBL_PC *sd, int64 *num, const char *name, const void *value, struct reg_db *ref); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_skill_get_desc_pre ) { + const char* (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_set_reg_pre[hIndex].func; - retVal___ = preHookFunc(st, sd, &num, name, value, ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_desc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_desc_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57160,25 +63692,25 @@ int HP_script_set_reg(struct script_state *st, TBL_PC *sd, int64 num, const char } } { - retVal___ = HPMHooks.source.script.set_reg(st, sd, num, name, value, ref); + retVal___ = HPMHooks.source.skill.get_desc(skill_id); } - if( HPMHooks.count.HP_script_set_reg_post ) { - int (*postHookFunc) (int retVal___, struct script_state *st, TBL_PC *sd, int64 *num, const char *name, const void *value, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_set_reg_post[hIndex].func; - retVal___ = postHookFunc(retVal___, st, sd, &num, name, value, ref); + if( HPMHooks.count.HP_skill_get_desc_post ) { + const char* (*postHookFunc) (const char* retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_desc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_desc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } return retVal___; } -void HP_script_stack_expand(struct script_stack *stack) { +void HP_skill_chk(uint16 *skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_script_stack_expand_pre ) { - void (*preHookFunc) (struct script_stack *stack); + if( HPMHooks.count.HP_skill_chk_pre ) { + void (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stack_expand_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_stack_expand_pre[hIndex].func; - preHookFunc(stack); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_chk_pre[hIndex].func; + preHookFunc(skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57186,26 +63718,26 @@ void HP_script_stack_expand(struct script_stack *stack) { } } { - HPMHooks.source.script.stack_expand(stack); + HPMHooks.source.skill.chk(skill_id); } - if( HPMHooks.count.HP_script_stack_expand_post ) { - void (*postHookFunc) (struct script_stack *stack); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stack_expand_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_stack_expand_post[hIndex].func; - postHookFunc(stack); + if( HPMHooks.count.HP_skill_chk_post ) { + void (*postHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_chk_post[hIndex].func; + postHookFunc(skill_id); } } return; } -struct script_data* HP_script_push_retinfo(struct script_stack *stack, struct script_retinfo *ri, struct reg_db *ref) { +int HP_skill_get_casttype(uint16 skill_id) { int hIndex = 0; - struct script_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_push_retinfo_pre ) { - struct script_data* (*preHookFunc) (struct script_stack *stack, struct script_retinfo *ri, struct reg_db *ref); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_casttype_pre ) { + int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_retinfo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_push_retinfo_pre[hIndex].func; - retVal___ = preHookFunc(stack, ri, ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_casttype_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57213,210 +63745,188 @@ struct script_data* HP_script_push_retinfo(struct script_stack *stack, struct sc } } { - retVal___ = HPMHooks.source.script.push_retinfo(stack, ri, ref); + retVal___ = HPMHooks.source.skill.get_casttype(skill_id); } - if( HPMHooks.count.HP_script_push_retinfo_post ) { - struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, struct script_retinfo *ri, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_retinfo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_push_retinfo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, stack, ri, ref); + if( HPMHooks.count.HP_skill_get_casttype_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_casttype_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } return retVal___; } -void HP_script_op_3(struct script_state *st, int op) { - int hIndex = 0; - if( HPMHooks.count.HP_script_op_3_pre ) { - void (*preHookFunc) (struct script_state *st, int *op); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_3_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_op_3_pre[hIndex].func; - preHookFunc(st, &op); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.script.op_3(st, op); - } - if( HPMHooks.count.HP_script_op_3_post ) { - void (*postHookFunc) (struct script_state *st, int *op); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_3_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_op_3_post[hIndex].func; - postHookFunc(st, &op); - } - } - return; -} -void HP_script_op_2str(struct script_state *st, int op, const char *s1, const char *s2) { +int HP_skill_get_casttype2(uint16 index) { int hIndex = 0; - if( HPMHooks.count.HP_script_op_2str_pre ) { - void (*preHookFunc) (struct script_state *st, int *op, const char *s1, const char *s2); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_casttype2_pre ) { + int (*preHookFunc) (uint16 *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2str_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_op_2str_pre[hIndex].func; - preHookFunc(st, &op, s1, s2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_casttype2_pre[hIndex].func; + retVal___ = preHookFunc(&index); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.op_2str(st, op, s1, s2); + retVal___ = HPMHooks.source.skill.get_casttype2(index); } - if( HPMHooks.count.HP_script_op_2str_post ) { - void (*postHookFunc) (struct script_state *st, int *op, const char *s1, const char *s2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2str_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_op_2str_post[hIndex].func; - postHookFunc(st, &op, s1, s2); + if( HPMHooks.count.HP_skill_get_casttype2_post ) { + int (*postHookFunc) (int retVal___, uint16 *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_casttype2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &index); } } - return; + return retVal___; } -void HP_script_op_2num(struct script_state *st, int op, int i1, int i2) { +bool HP_skill_is_combo(int skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_script_op_2num_pre ) { - void (*preHookFunc) (struct script_state *st, int *op, int *i1, int *i2); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_is_combo_pre ) { + bool (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2num_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_op_2num_pre[hIndex].func; - preHookFunc(st, &op, &i1, &i2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_combo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_is_combo_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.op_2num(st, op, i1, i2); + retVal___ = HPMHooks.source.skill.is_combo(skill_id); } - if( HPMHooks.count.HP_script_op_2num_post ) { - void (*postHookFunc) (struct script_state *st, int *op, int *i1, int *i2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2num_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_op_2num_post[hIndex].func; - postHookFunc(st, &op, &i1, &i2); + if( HPMHooks.count.HP_skill_is_combo_post ) { + bool (*postHookFunc) (bool retVal___, int *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_combo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_is_combo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } - return; + return retVal___; } -void HP_script_op_2(struct script_state *st, int op) { +int HP_skill_name2id(const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_script_op_2_pre ) { - void (*preHookFunc) (struct script_state *st, int *op); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_name2id_pre ) { + int (*preHookFunc) (const char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_op_2_pre[hIndex].func; - preHookFunc(st, &op); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_name2id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_name2id_pre[hIndex].func; + retVal___ = preHookFunc(name); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.op_2(st, op); + retVal___ = HPMHooks.source.skill.name2id(name); } - if( HPMHooks.count.HP_script_op_2_post ) { - void (*postHookFunc) (struct script_state *st, int *op); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_op_2_post[hIndex].func; - postHookFunc(st, &op); + if( HPMHooks.count.HP_skill_name2id_post ) { + int (*postHookFunc) (int retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_name2id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_name2id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); } } - return; + return retVal___; } -void HP_script_op_1(struct script_state *st, int op) { +int HP_skill_isammotype(struct map_session_data *sd, int skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_script_op_1_pre ) { - void (*preHookFunc) (struct script_state *st, int *op); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_isammotype_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_1_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_op_1_pre[hIndex].func; - preHookFunc(st, &op); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_isammotype_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.op_1(st, op); + retVal___ = HPMHooks.source.skill.isammotype(sd, skill_id); } - if( HPMHooks.count.HP_script_op_1_post ) { - void (*postHookFunc) (struct script_state *st, int *op); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_1_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_op_1_post[hIndex].func; - postHookFunc(st, &op); + if( HPMHooks.count.HP_skill_isammotype_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_isammotype_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id); } } - return; + return retVal___; } -void HP_script_check_buildin_argtype(struct script_state *st, int func) { +int HP_skill_castend_id(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - if( HPMHooks.count.HP_script_check_buildin_argtype_pre ) { - void (*preHookFunc) (struct script_state *st, int *func); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_castend_id_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_buildin_argtype_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_check_buildin_argtype_pre[hIndex].func; - preHookFunc(st, &func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_id_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.check_buildin_argtype(st, func); + retVal___ = HPMHooks.source.skill.castend_id(tid, tick, id, data); } - if( HPMHooks.count.HP_script_check_buildin_argtype_post ) { - void (*postHookFunc) (struct script_state *st, int *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_buildin_argtype_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_check_buildin_argtype_post[hIndex].func; - postHookFunc(st, &func); + if( HPMHooks.count.HP_skill_castend_id_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } - return; + return retVal___; } -void HP_script_detach_state(struct script_state *st, bool dequeue_event) { +int HP_skill_castend_pos(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - if( HPMHooks.count.HP_script_detach_state_pre ) { - void (*preHookFunc) (struct script_state *st, bool *dequeue_event); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_castend_pos_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_state_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_detach_state_pre[hIndex].func; - preHookFunc(st, &dequeue_event); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_pos_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.detach_state(st, dequeue_event); + retVal___ = HPMHooks.source.skill.castend_pos(tid, tick, id, data); } - if( HPMHooks.count.HP_script_detach_state_post ) { - void (*postHookFunc) (struct script_state *st, bool *dequeue_event); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_state_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_detach_state_post[hIndex].func; - postHookFunc(st, &dequeue_event); + if( HPMHooks.count.HP_skill_castend_pos_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_pos_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } - return; + return retVal___; } -int HP_script_db_free_code_sub(DBKey key, DBData *data, va_list ap) { +int HP_skill_castend_map(struct map_session_data *sd, uint16 skill_id, const char *mapname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_db_free_code_sub_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + if( HPMHooks.count.HP_skill_castend_map_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, const char *mapname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_db_free_code_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_db_free_code_sub_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_map_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_map_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, mapname); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57424,56 +63934,53 @@ int HP_script_db_free_code_sub(DBKey key, DBData *data, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.db_free_code_sub(key, data, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.castend_map(sd, skill_id, mapname); } - if( HPMHooks.count.HP_script_db_free_code_sub_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_db_free_code_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_db_free_code_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_castend_map_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, const char *mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_map_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_map_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, mapname); } } return retVal___; } -void HP_script_add_autobonus(const char *autobonus) { +int HP_skill_cleartimerskill(struct block_list *src) { int hIndex = 0; - if( HPMHooks.count.HP_script_add_autobonus_pre ) { - void (*preHookFunc) (const char *autobonus); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_cleartimerskill_pre ) { + int (*preHookFunc) (struct block_list *src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_autobonus_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_add_autobonus_pre[hIndex].func; - preHookFunc(autobonus); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_cleartimerskill_pre[hIndex].func; + retVal___ = preHookFunc(src); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.add_autobonus(autobonus); + retVal___ = HPMHooks.source.skill.cleartimerskill(src); } - if( HPMHooks.count.HP_script_add_autobonus_post ) { - void (*postHookFunc) (const char *autobonus); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_autobonus_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_add_autobonus_post[hIndex].func; - postHookFunc(autobonus); + if( HPMHooks.count.HP_skill_cleartimerskill_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_cleartimerskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src); } } - return; + return retVal___; } -int HP_script_menu_countoptions(const char *str, int max_count, int *total) { +int HP_skill_addtimerskill(struct block_list *src, int64 tick, int target, int x, int y, uint16 skill_id, uint16 skill_lv, int type, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_menu_countoptions_pre ) { - int (*preHookFunc) (const char *str, int *max_count, int *total); + if( HPMHooks.count.HP_skill_addtimerskill_pre ) { + int (*preHookFunc) (struct block_list *src, int64 *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_menu_countoptions_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_menu_countoptions_pre[hIndex].func; - retVal___ = preHookFunc(str, &max_count, total); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_addtimerskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_addtimerskill_pre[hIndex].func; + retVal___ = preHookFunc(src, &tick, &target, &x, &y, &skill_id, &skill_lv, &type, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57481,28 +63988,26 @@ int HP_script_menu_countoptions(const char *str, int max_count, int *total) { } } { - retVal___ = HPMHooks.source.script.menu_countoptions(str, max_count, total); + retVal___ = HPMHooks.source.skill.addtimerskill(src, tick, target, x, y, skill_id, skill_lv, type, flag); } - if( HPMHooks.count.HP_script_menu_countoptions_post ) { - int (*postHookFunc) (int retVal___, const char *str, int *max_count, int *total); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_menu_countoptions_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_menu_countoptions_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, &max_count, total); + if( HPMHooks.count.HP_skill_addtimerskill_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, int64 *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_addtimerskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_addtimerskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &tick, &target, &x, &y, &skill_id, &skill_lv, &type, &flag); } } return retVal___; } -int HP_script_buildin_areawarp_sub(struct block_list *bl, va_list ap) { +int HP_skill_additional_effect(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int dmg_lv, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_areawarp_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_skill_additional_effect_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areawarp_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_buildin_areawarp_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_additional_effect_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &attack_type, &dmg_lv, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57510,32 +64015,26 @@ int HP_script_buildin_areawarp_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.buildin_areawarp_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.additional_effect(src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick); } - if( HPMHooks.count.HP_script_buildin_areawarp_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areawarp_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_buildin_areawarp_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_additional_effect_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_additional_effect_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &attack_type, &dmg_lv, &tick); } } return retVal___; } -int HP_script_buildin_areapercentheal_sub(struct block_list *bl, va_list ap) { +int HP_skill_counter_additional_effect(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_areapercentheal_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_skill_counter_additional_effect_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areapercentheal_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_buildin_areapercentheal_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &attack_type, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57543,56 +64042,53 @@ int HP_script_buildin_areapercentheal_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.buildin_areapercentheal_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.counter_additional_effect(src, bl, skill_id, skill_lv, attack_type, tick); } - if( HPMHooks.count.HP_script_buildin_areapercentheal_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areapercentheal_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_buildin_areapercentheal_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_counter_additional_effect_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &attack_type, &tick); } } return retVal___; } -void HP_script_buildin_delitem_delete(struct map_session_data *sd, int idx, int *amount, bool delete_items) { +int HP_skill_blown(struct block_list *src, struct block_list *target, int count, int8 dir, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_script_buildin_delitem_delete_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount, bool *delete_items); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_blown_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target, int *count, int8 *dir, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_buildin_delitem_delete_pre[hIndex].func; - preHookFunc(sd, &idx, amount, &delete_items); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_blown_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &count, &dir, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.buildin_delitem_delete(sd, idx, amount, delete_items); + retVal___ = HPMHooks.source.skill.blown(src, target, count, dir, flag); } - if( HPMHooks.count.HP_script_buildin_delitem_delete_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *idx, int *amount, bool *delete_items); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_buildin_delitem_delete_post[hIndex].func; - postHookFunc(sd, &idx, amount, &delete_items); + if( HPMHooks.count.HP_skill_blown_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int *count, int8 *dir, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_blown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &count, &dir, &flag); } } - return; + return retVal___; } -bool HP_script_buildin_delitem_search(struct map_session_data *sd, struct item *it, bool exact_match) { +int HP_skill_break_equip(struct block_list *bl, unsigned short where, int rate, int flag) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_script_buildin_delitem_search_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, struct item *it, bool *exact_match); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_break_equip_pre ) { + int (*preHookFunc) (struct block_list *bl, unsigned short *where, int *rate, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_search_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_buildin_delitem_search_pre[hIndex].func; - retVal___ = preHookFunc(sd, it, &exact_match); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_break_equip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_break_equip_pre[hIndex].func; + retVal___ = preHookFunc(bl, &where, &rate, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57600,28 +64096,26 @@ bool HP_script_buildin_delitem_search(struct map_session_data *sd, struct item * } } { - retVal___ = HPMHooks.source.script.buildin_delitem_search(sd, it, exact_match); + retVal___ = HPMHooks.source.skill.break_equip(bl, where, rate, flag); } - if( HPMHooks.count.HP_script_buildin_delitem_search_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct item *it, bool *exact_match); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_search_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_buildin_delitem_search_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, it, &exact_match); + if( HPMHooks.count.HP_skill_break_equip_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned short *where, int *rate, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_break_equip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_break_equip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &where, &rate, &flag); } } return retVal___; } -int HP_script_buildin_killmonster_sub_strip(struct block_list *bl, va_list ap) { +int HP_skill_strip_equip(struct block_list *bl, unsigned short where, int rate, int lv, int time) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_killmonster_sub_strip_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_skill_strip_equip_pre ) { + int (*preHookFunc) (struct block_list *bl, unsigned short *where, int *rate, int *lv, int *time); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_strip_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_strip_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_strip_equip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_strip_equip_pre[hIndex].func; + retVal___ = preHookFunc(bl, &where, &rate, &lv, &time); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57629,32 +64123,26 @@ int HP_script_buildin_killmonster_sub_strip(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.buildin_killmonster_sub_strip(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.strip_equip(bl, where, rate, lv, time); } - if( HPMHooks.count.HP_script_buildin_killmonster_sub_strip_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_strip_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_strip_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_strip_equip_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned short *where, int *rate, int *lv, int *time); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_strip_equip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_strip_equip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &where, &rate, &lv, &time); } } return retVal___; } -int HP_script_buildin_killmonster_sub(struct block_list *bl, va_list ap) { +struct skill_unit_group* HP_skill_id2group(int group_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_killmonster_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + struct skill_unit_group* retVal___ = NULL; + if( HPMHooks.count.HP_skill_id2group_pre ) { + struct skill_unit_group* (*preHookFunc) (int *group_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_id2group_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_id2group_pre[hIndex].func; + retVal___ = preHookFunc(&group_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57662,32 +64150,26 @@ int HP_script_buildin_killmonster_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.buildin_killmonster_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.id2group(group_id); } - if( HPMHooks.count.HP_script_buildin_killmonster_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_id2group_post ) { + struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, int *group_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_id2group_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_id2group_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &group_id); } } return retVal___; } -int HP_script_buildin_killmonsterall_sub_strip(struct block_list *bl, va_list ap) { +struct skill_unit_group* HP_skill_unitsetting(struct block_list *src, uint16 skill_id, uint16 skill_lv, short x, short y, int flag) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + struct skill_unit_group* retVal___ = NULL; + if( HPMHooks.count.HP_skill_unitsetting_pre ) { + struct skill_unit_group* (*preHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_strip_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unitsetting_pre[hIndex].func; + retVal___ = preHookFunc(src, &skill_id, &skill_lv, &x, &y, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57695,32 +64177,26 @@ int HP_script_buildin_killmonsterall_sub_strip(struct block_list *bl, va_list ap } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.buildin_killmonsterall_sub_strip(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.unitsetting(src, skill_id, skill_lv, x, y, flag); } - if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_strip_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_unitsetting_post ) { + struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, struct block_list *src, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unitsetting_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &skill_id, &skill_lv, &x, &y, &flag); } } return retVal___; } -int HP_script_buildin_killmonsterall_sub(struct block_list *bl, va_list ap) { +struct skill_unit* HP_skill_initunit(struct skill_unit_group *group, int idx, int x, int y, int val1, int val2) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + struct skill_unit* retVal___ = NULL; + if( HPMHooks.count.HP_skill_initunit_pre ) { + struct skill_unit* (*preHookFunc) (struct skill_unit_group *group, int *idx, int *x, int *y, int *val1, int *val2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_initunit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_initunit_pre[hIndex].func; + retVal___ = preHookFunc(group, &idx, &x, &y, &val1, &val2); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57728,32 +64204,26 @@ int HP_script_buildin_killmonsterall_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.buildin_killmonsterall_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.initunit(group, idx, x, y, val1, val2); } - if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_initunit_post ) { + struct skill_unit* (*postHookFunc) (struct skill_unit* retVal___, struct skill_unit_group *group, int *idx, int *x, int *y, int *val1, int *val2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_initunit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_initunit_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group, &idx, &x, &y, &val1, &val2); } } return retVal___; } -int HP_script_buildin_announce_sub(struct block_list *bl, va_list ap) { +int HP_skill_delunit(struct skill_unit *su) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_announce_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_skill_delunit_pre ) { + int (*preHookFunc) (struct skill_unit *su); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_announce_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_buildin_announce_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delunit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_delunit_pre[hIndex].func; + retVal___ = preHookFunc(su); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57761,32 +64231,26 @@ int HP_script_buildin_announce_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.buildin_announce_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.delunit(su); } - if( HPMHooks.count.HP_script_buildin_announce_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_announce_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_buildin_announce_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_delunit_post ) { + int (*postHookFunc) (int retVal___, struct skill_unit *su); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delunit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_delunit_post[hIndex].func; + retVal___ = postHookFunc(retVal___, su); } } return retVal___; } -int HP_script_buildin_getareausers_sub(struct block_list *bl, va_list ap) { +struct skill_unit_group* HP_skill_init_unitgroup(struct block_list *src, int count, uint16 skill_id, uint16 skill_lv, int unit_id, int limit, int interval) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_getareausers_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + struct skill_unit_group* retVal___ = NULL; + if( HPMHooks.count.HP_skill_init_unitgroup_pre ) { + struct skill_unit_group* (*preHookFunc) (struct block_list *src, int *count, uint16 *skill_id, uint16 *skill_lv, int *unit_id, int *limit, int *interval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareausers_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_buildin_getareausers_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unitgroup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_init_unitgroup_pre[hIndex].func; + retVal___ = preHookFunc(src, &count, &skill_id, &skill_lv, &unit_id, &limit, &interval); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57794,32 +64258,26 @@ int HP_script_buildin_getareausers_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.buildin_getareausers_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.init_unitgroup(src, count, skill_id, skill_lv, unit_id, limit, interval); } - if( HPMHooks.count.HP_script_buildin_getareausers_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareausers_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_buildin_getareausers_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_init_unitgroup_post ) { + struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, struct block_list *src, int *count, uint16 *skill_id, uint16 *skill_lv, int *unit_id, int *limit, int *interval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unitgroup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_init_unitgroup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &count, &skill_id, &skill_lv, &unit_id, &limit, &interval); } } return retVal___; } -int HP_script_buildin_getareadropitem_sub(struct block_list *bl, va_list ap) { +int HP_skill_del_unitgroup(struct skill_unit_group *group, const char *file, int line, const char *func) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_getareadropitem_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_skill_del_unitgroup_pre ) { + int (*preHookFunc) (struct skill_unit_group *group, const char *file, int *line, const char *func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareadropitem_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_buildin_getareadropitem_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_del_unitgroup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_del_unitgroup_pre[hIndex].func; + retVal___ = preHookFunc(group, file, &line, func); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57827,32 +64285,26 @@ int HP_script_buildin_getareadropitem_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.buildin_getareadropitem_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.del_unitgroup(group, file, line, func); } - if( HPMHooks.count.HP_script_buildin_getareadropitem_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareadropitem_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_buildin_getareadropitem_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_del_unitgroup_post ) { + int (*postHookFunc) (int retVal___, struct skill_unit_group *group, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_del_unitgroup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_del_unitgroup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group, file, &line, func); } } return retVal___; } -int HP_script_mapflag_pvp_sub(struct block_list *bl, va_list ap) { +int HP_skill_clear_unitgroup(struct block_list *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_mapflag_pvp_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_skill_clear_unitgroup_pre ) { + int (*preHookFunc) (struct block_list *src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapflag_pvp_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_mapflag_pvp_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_unitgroup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_clear_unitgroup_pre[hIndex].func; + retVal___ = preHookFunc(src); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57860,32 +64312,26 @@ int HP_script_mapflag_pvp_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.mapflag_pvp_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.clear_unitgroup(src); } - if( HPMHooks.count.HP_script_mapflag_pvp_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapflag_pvp_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_mapflag_pvp_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_clear_unitgroup_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_unitgroup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_clear_unitgroup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src); } } return retVal___; } -int HP_script_buildin_pvpoff_sub(struct block_list *bl, va_list ap) { +int HP_skill_clear_group(struct block_list *bl, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_pvpoff_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_skill_clear_group_pre ) { + int (*preHookFunc) (struct block_list *bl, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_pvpoff_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_buildin_pvpoff_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_group_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_clear_group_pre[hIndex].func; + retVal___ = preHookFunc(bl, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57893,32 +64339,26 @@ int HP_script_buildin_pvpoff_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.buildin_pvpoff_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.clear_group(bl, flag); } - if( HPMHooks.count.HP_script_buildin_pvpoff_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_pvpoff_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_buildin_pvpoff_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_clear_group_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_group_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_clear_group_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &flag); } } return retVal___; } -int HP_script_buildin_maprespawnguildid_sub_pc(struct map_session_data *sd, va_list ap) { +int HP_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_pre ) { - int (*preHookFunc) (struct map_session_data *sd, va_list ap); + if( HPMHooks.count.HP_skill_unit_onplace_pre ) { + int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_pc_pre[hIndex].func; - retVal___ = preHookFunc(sd, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_onplace_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57926,32 +64366,26 @@ int HP_script_buildin_maprespawnguildid_sub_pc(struct map_session_data *sd, va_l } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.buildin_maprespawnguildid_sub_pc(sd, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.unit_onplace(src, bl, tick); } - if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_pc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_unit_onplace_post ) { + int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_onplace_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &tick); } } return retVal___; } -int HP_script_buildin_maprespawnguildid_sub_mob(struct block_list *bl, va_list ap) { +int HP_skill_unit_ondamaged(struct skill_unit *src, struct block_list *bl, int64 damage, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_skill_unit_ondamaged_pre ) { + int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *damage, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_mob_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_ondamaged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_ondamaged_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &damage, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57959,32 +64393,26 @@ int HP_script_buildin_maprespawnguildid_sub_mob(struct block_list *bl, va_list a } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.buildin_maprespawnguildid_sub_mob(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.unit_ondamaged(src, bl, damage, tick); } - if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_mob_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_unit_ondamaged_post ) { + int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 *damage, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_ondamaged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_ondamaged_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &damage, &tick); } } return retVal___; } -int HP_script_buildin_mobcount_sub(struct block_list *bl, va_list ap) { +int HP_skill_cast_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_mobcount_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_skill_cast_fix_pre ) { + int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobcount_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_buildin_mobcount_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_cast_fix_pre[hIndex].func; + retVal___ = preHookFunc(bl, &skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -57992,65 +64420,53 @@ int HP_script_buildin_mobcount_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.buildin_mobcount_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.cast_fix(bl, skill_id, skill_lv); } - if( HPMHooks.count.HP_script_buildin_mobcount_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobcount_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_buildin_mobcount_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_cast_fix_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_cast_fix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &skill_id, &skill_lv); } } return retVal___; } -int HP_script_playbgm_sub(struct block_list *bl, va_list ap) { +int HP_skill_cast_fix_sc(struct block_list *bl, int time) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_playbgm_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_skill_cast_fix_sc_pre ) { + int (*preHookFunc) (struct block_list *bl, int *time); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playbgm_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_playbgm_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_sc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_cast_fix_sc_pre[hIndex].func; + retVal___ = preHookFunc(bl, &time); } if( *HPMforce_return ) { *HPMforce_return = false; return retVal___; } } - { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.playbgm_sub(bl, ap___copy); - va_end(ap___copy); - } - if( HPMHooks.count.HP_script_playbgm_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playbgm_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_playbgm_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + { + retVal___ = HPMHooks.source.skill.cast_fix_sc(bl, time); + } + if( HPMHooks.count.HP_skill_cast_fix_sc_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *time); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_sc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_cast_fix_sc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &time); } } return retVal___; } -int HP_script_playbgm_foreachpc_sub(struct map_session_data *sd, va_list args) { +int HP_skill_vf_cast_fix(struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_playbgm_foreachpc_sub_pre ) { - int (*preHookFunc) (struct map_session_data *sd, va_list args); + if( HPMHooks.count.HP_skill_vf_cast_fix_pre ) { + int (*preHookFunc) (struct block_list *bl, double *time, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playbgm_foreachpc_sub_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_script_playbgm_foreachpc_sub_pre[hIndex].func; - retVal___ = preHookFunc(sd, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_vf_cast_fix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_vf_cast_fix_pre[hIndex].func; + retVal___ = preHookFunc(bl, &time, &skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58058,32 +64474,26 @@ int HP_script_playbgm_foreachpc_sub(struct map_session_data *sd, va_list args) { } } { - va_list args___copy; va_copy(args___copy, args); - retVal___ = HPMHooks.source.script.playbgm_foreachpc_sub(sd, args___copy); - va_end(args___copy); + retVal___ = HPMHooks.source.skill.vf_cast_fix(bl, time, skill_id, skill_lv); } - if( HPMHooks.count.HP_script_playbgm_foreachpc_sub_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playbgm_foreachpc_sub_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_script_playbgm_foreachpc_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_skill_vf_cast_fix_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, double *time, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_vf_cast_fix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_vf_cast_fix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &time, &skill_id, &skill_lv); } } return retVal___; } -int HP_script_soundeffect_sub(struct block_list *bl, va_list ap) { +int HP_skill_delay_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_soundeffect_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_skill_delay_fix_pre ) { + int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_soundeffect_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_soundeffect_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delay_fix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_delay_fix_pre[hIndex].func; + retVal___ = preHookFunc(bl, &skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58091,30 +64501,26 @@ int HP_script_soundeffect_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.soundeffect_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.delay_fix(bl, skill_id, skill_lv); } - if( HPMHooks.count.HP_script_soundeffect_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_soundeffect_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_soundeffect_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_delay_fix_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delay_fix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_delay_fix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &skill_id, &skill_lv); } } return retVal___; } -int HP_script_buildin_query_sql_sub(struct script_state *st, Sql *handle) { +int HP_skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_query_sql_sub_pre ) { - int (*preHookFunc) (struct script_state *st, Sql *handle); + if( HPMHooks.count.HP_skill_check_condition_castbegin_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_query_sql_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_buildin_query_sql_sub_pre[hIndex].func; - retVal___ = preHookFunc(st, handle); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58122,28 +64528,26 @@ int HP_script_buildin_query_sql_sub(struct script_state *st, Sql *handle) { } } { - retVal___ = HPMHooks.source.script.buildin_query_sql_sub(st, handle); + retVal___ = HPMHooks.source.skill.check_condition_castbegin(sd, skill_id, skill_lv); } - if( HPMHooks.count.HP_script_buildin_query_sql_sub_post ) { - int (*postHookFunc) (int retVal___, struct script_state *st, Sql *handle); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_query_sql_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_buildin_query_sql_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, st, handle); + if( HPMHooks.count.HP_skill_check_condition_castbegin_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv); } } return retVal___; } -int HP_script_buildin_instance_warpall_sub(struct block_list *bl, va_list ap) { +int HP_skill_check_condition_castend(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_instance_warpall_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_skill_check_condition_castend_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_instance_warpall_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_buildin_instance_warpall_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_condition_castend_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58151,32 +64555,26 @@ int HP_script_buildin_instance_warpall_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.buildin_instance_warpall_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.check_condition_castend(sd, skill_id, skill_lv); } - if( HPMHooks.count.HP_script_buildin_instance_warpall_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_instance_warpall_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_buildin_instance_warpall_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_check_condition_castend_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_condition_castend_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv); } } return retVal___; } -int HP_script_buildin_mobuseskill_sub(struct block_list *bl, va_list ap) { +int HP_skill_consume_requirement(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, short type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_mobuseskill_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_skill_consume_requirement_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, short *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobuseskill_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_buildin_mobuseskill_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_consume_requirement_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_consume_requirement_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, &skill_lv, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58184,32 +64582,27 @@ int HP_script_buildin_mobuseskill_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.buildin_mobuseskill_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.consume_requirement(sd, skill_id, skill_lv, type); } - if( HPMHooks.count.HP_script_buildin_mobuseskill_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobuseskill_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_buildin_mobuseskill_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_consume_requirement_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, short *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_consume_requirement_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_consume_requirement_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv, &type); } } return retVal___; } -int HP_script_cleanfloor_sub(struct block_list *bl, va_list ap) { +struct skill_condition HP_skill_get_requirement(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_script_cleanfloor_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + struct skill_condition retVal___; + memset(&retVal___, '\0', sizeof(struct skill_condition)); + if( HPMHooks.count.HP_skill_get_requirement_pre ) { + struct skill_condition (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleanfloor_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_cleanfloor_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_requirement_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58217,30 +64610,26 @@ int HP_script_cleanfloor_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.cleanfloor_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.get_requirement(sd, skill_id, skill_lv); } - if( HPMHooks.count.HP_script_cleanfloor_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleanfloor_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_cleanfloor_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_get_requirement_post ) { + struct skill_condition (*postHookFunc) (struct skill_condition retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_requirement_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv); } } return retVal___; } -int HP_script_run_func(struct script_state *st) { +int HP_skill_check_pc_partner(struct map_session_data *sd, uint16 skill_id, uint16 *skill_lv, int range, int cast_flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_run_func_pre ) { - int (*preHookFunc) (struct script_state *st); + if( HPMHooks.count.HP_skill_check_pc_partner_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, int *range, int *cast_flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_func_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_run_func_pre[hIndex].func; - retVal___ = preHookFunc(st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_pc_partner_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_pc_partner_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, skill_lv, &range, &cast_flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58248,26 +64637,26 @@ int HP_script_run_func(struct script_state *st) { } } { - retVal___ = HPMHooks.source.script.run_func(st); + retVal___ = HPMHooks.source.skill.check_pc_partner(sd, skill_id, skill_lv, range, cast_flag); } - if( HPMHooks.count.HP_script_run_func_post ) { - int (*postHookFunc) (int retVal___, struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_func_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_run_func_post[hIndex].func; - retVal___ = postHookFunc(retVal___, st); + if( HPMHooks.count.HP_skill_check_pc_partner_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, int *range, int *cast_flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_pc_partner_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_pc_partner_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, skill_lv, &range, &cast_flag); } } return retVal___; } -const char* HP_script_getfuncname(struct script_state *st) { +int HP_skill_unit_move(struct block_list *bl, int64 tick, int flag) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_getfuncname_pre ) { - const char* (*preHookFunc) (struct script_state *st); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_unit_move_pre ) { + int (*preHookFunc) (struct block_list *bl, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_getfuncname_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_getfuncname_pre[hIndex].func; - retVal___ = preHookFunc(st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_move_pre[hIndex].func; + retVal___ = preHookFunc(bl, &tick, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58275,26 +64664,26 @@ const char* HP_script_getfuncname(struct script_state *st) { } } { - retVal___ = HPMHooks.source.script.getfuncname(st); + retVal___ = HPMHooks.source.skill.unit_move(bl, tick, flag); } - if( HPMHooks.count.HP_script_getfuncname_post ) { - const char* (*postHookFunc) (const char* retVal___, struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_getfuncname_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_getfuncname_post[hIndex].func; - retVal___ = postHookFunc(retVal___, st); + if( HPMHooks.count.HP_skill_unit_move_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_move_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &tick, &flag); } } return retVal___; } -unsigned int HP_script_calc_hash_ci(const char *p) { +int HP_skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_script_calc_hash_ci_pre ) { - unsigned int (*preHookFunc) (const char *p); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_unit_onleft_pre ) { + int (*preHookFunc) (uint16 *skill_id, struct block_list *bl, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_calc_hash_ci_pre[hIndex].func; - retVal___ = preHookFunc(p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onleft_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_onleft_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, bl, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58302,26 +64691,26 @@ unsigned int HP_script_calc_hash_ci(const char *p) { } } { - retVal___ = HPMHooks.source.script.calc_hash_ci(p); + retVal___ = HPMHooks.source.skill.unit_onleft(skill_id, bl, tick); } - if( HPMHooks.count.HP_script_calc_hash_ci_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_calc_hash_ci_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p); + if( HPMHooks.count.HP_skill_unit_onleft_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, struct block_list *bl, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onleft_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_onleft_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, bl, &tick); } } return retVal___; } -struct reg_db* HP_script_array_src(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) { +int HP_skill_unit_onout(struct skill_unit *src, struct block_list *bl, int64 tick) { int hIndex = 0; - struct reg_db* retVal___ = NULL; - if( HPMHooks.count.HP_script_array_src_pre ) { - struct reg_db* (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_unit_onout_pre ) { + int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_src_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_array_src_pre[hIndex].func; - retVal___ = preHookFunc(st, sd, name, ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onout_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_onout_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58329,77 +64718,79 @@ struct reg_db* HP_script_array_src(struct script_state *st, struct map_session_d } } { - retVal___ = HPMHooks.source.script.array_src(st, sd, name, ref); + retVal___ = HPMHooks.source.skill.unit_onout(src, bl, tick); } - if( HPMHooks.count.HP_script_array_src_post ) { - struct reg_db* (*postHookFunc) (struct reg_db* retVal___, struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_src_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_array_src_post[hIndex].func; - retVal___ = postHookFunc(retVal___, st, sd, name, ref); + if( HPMHooks.count.HP_skill_unit_onout_post ) { + int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onout_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_onout_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &tick); } } return retVal___; } -void HP_script_array_update(struct reg_db *src, int64 num, bool empty) { +int HP_skill_unit_move_unit_group(struct skill_unit_group *group, int16 m, int16 dx, int16 dy) { int hIndex = 0; - if( HPMHooks.count.HP_script_array_update_pre ) { - void (*preHookFunc) (struct reg_db *src, int64 *num, bool *empty); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_unit_move_unit_group_pre ) { + int (*preHookFunc) (struct skill_unit_group *group, int16 *m, int16 *dx, int16 *dy); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_update_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_array_update_pre[hIndex].func; - preHookFunc(src, &num, &empty); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_unit_group_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_move_unit_group_pre[hIndex].func; + retVal___ = preHookFunc(group, &m, &dx, &dy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.array_update(src, num, empty); + retVal___ = HPMHooks.source.skill.unit_move_unit_group(group, m, dx, dy); } - if( HPMHooks.count.HP_script_array_update_post ) { - void (*postHookFunc) (struct reg_db *src, int64 *num, bool *empty); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_update_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_array_update_post[hIndex].func; - postHookFunc(src, &num, &empty); + if( HPMHooks.count.HP_skill_unit_move_unit_group_post ) { + int (*postHookFunc) (int retVal___, struct skill_unit_group *group, int16 *m, int16 *dx, int16 *dy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_unit_group_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_move_unit_group_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group, &m, &dx, &dy); } } - return; + return retVal___; } -void HP_script_array_delete(struct reg_db *src, struct script_array *sa) { +int HP_skill_sit(struct map_session_data *sd, int type) { int hIndex = 0; - if( HPMHooks.count.HP_script_array_delete_pre ) { - void (*preHookFunc) (struct reg_db *src, struct script_array *sa); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_sit_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_array_delete_pre[hIndex].func; - preHookFunc(src, sa); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_sit_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.array_delete(src, sa); + retVal___ = HPMHooks.source.skill.sit(sd, type); } - if( HPMHooks.count.HP_script_array_delete_post ) { - void (*postHookFunc) (struct reg_db *src, struct script_array *sa); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_array_delete_post[hIndex].func; - postHookFunc(src, sa); + if( HPMHooks.count.HP_skill_sit_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_sit_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); } } - return; + return retVal___; } -void HP_script_array_remove_member(struct reg_db *src, struct script_array *sa, unsigned int idx) { +void HP_skill_brandishspear(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_script_array_remove_member_pre ) { - void (*preHookFunc) (struct reg_db *src, struct script_array *sa, unsigned int *idx); + if( HPMHooks.count.HP_skill_brandishspear_pre ) { + void (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_remove_member_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_array_remove_member_pre[hIndex].func; - preHookFunc(src, sa, &idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_brandishspear_pre[hIndex].func; + preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58407,25 +64798,25 @@ void HP_script_array_remove_member(struct reg_db *src, struct script_array *sa, } } { - HPMHooks.source.script.array_remove_member(src, sa, idx); + HPMHooks.source.skill.brandishspear(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_script_array_remove_member_post ) { - void (*postHookFunc) (struct reg_db *src, struct script_array *sa, unsigned int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_remove_member_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_array_remove_member_post[hIndex].func; - postHookFunc(src, sa, &idx); + if( HPMHooks.count.HP_skill_brandishspear_post ) { + void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_brandishspear_post[hIndex].func; + postHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag); } } return; } -void HP_script_array_add_member(struct script_array *sa, unsigned int idx) { +void HP_skill_repairweapon(struct map_session_data *sd, int idx) { int hIndex = 0; - if( HPMHooks.count.HP_script_array_add_member_pre ) { - void (*preHookFunc) (struct script_array *sa, unsigned int *idx); + if( HPMHooks.count.HP_skill_repairweapon_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_add_member_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_array_add_member_pre[hIndex].func; - preHookFunc(sa, &idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_repairweapon_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_repairweapon_pre[hIndex].func; + preHookFunc(sd, &idx); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58433,82 +64824,78 @@ void HP_script_array_add_member(struct script_array *sa, unsigned int idx) { } } { - HPMHooks.source.script.array_add_member(sa, idx); + HPMHooks.source.skill.repairweapon(sd, idx); } - if( HPMHooks.count.HP_script_array_add_member_post ) { - void (*postHookFunc) (struct script_array *sa, unsigned int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_add_member_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_array_add_member_post[hIndex].func; - postHookFunc(sa, &idx); + if( HPMHooks.count.HP_skill_repairweapon_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_repairweapon_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_repairweapon_post[hIndex].func; + postHookFunc(sd, &idx); } } return; } -unsigned int HP_script_array_size(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) { +void HP_skill_identify(struct map_session_data *sd, int idx) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_script_array_size_pre ) { - unsigned int (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); + if( HPMHooks.count.HP_skill_identify_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_size_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_array_size_pre[hIndex].func; - retVal___ = preHookFunc(st, sd, name, ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_identify_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_identify_pre[hIndex].func; + preHookFunc(sd, &idx); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.script.array_size(st, sd, name, ref); + HPMHooks.source.skill.identify(sd, idx); } - if( HPMHooks.count.HP_script_array_size_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_size_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_array_size_post[hIndex].func; - retVal___ = postHookFunc(retVal___, st, sd, name, ref); + if( HPMHooks.count.HP_skill_identify_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_identify_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_identify_post[hIndex].func; + postHookFunc(sd, &idx); } } - return retVal___; + return; } -unsigned int HP_script_array_highest_key(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) { +void HP_skill_weaponrefine(struct map_session_data *sd, int idx) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_script_array_highest_key_pre ) { - unsigned int (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); + if( HPMHooks.count.HP_skill_weaponrefine_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_highest_key_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_array_highest_key_pre[hIndex].func; - retVal___ = preHookFunc(st, sd, name, ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_weaponrefine_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_weaponrefine_pre[hIndex].func; + preHookFunc(sd, &idx); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.script.array_highest_key(st, sd, name, ref); + HPMHooks.source.skill.weaponrefine(sd, idx); } - if( HPMHooks.count.HP_script_array_highest_key_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_highest_key_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_array_highest_key_post[hIndex].func; - retVal___ = postHookFunc(retVal___, st, sd, name, ref); + if( HPMHooks.count.HP_skill_weaponrefine_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_weaponrefine_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_weaponrefine_post[hIndex].func; + postHookFunc(sd, &idx); } } - return retVal___; + return; } -int HP_script_array_free_db(DBKey key, DBData *data, va_list ap) { +int HP_skill_autospell(struct map_session_data *md, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_array_free_db_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + if( HPMHooks.count.HP_skill_autospell_pre ) { + int (*preHookFunc) (struct map_session_data *md, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_free_db_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_array_free_db_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_autospell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_autospell_pre[hIndex].func; + retVal___ = preHookFunc(md, &skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58516,83 +64903,81 @@ int HP_script_array_free_db(DBKey key, DBData *data, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.array_free_db(key, data, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.autospell(md, skill_id); } - if( HPMHooks.count.HP_script_array_free_db_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_free_db_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_array_free_db_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_autospell_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *md, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_autospell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_autospell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &skill_id); } } return retVal___; } -void HP_script_array_ensure_zero(struct script_state *st, struct map_session_data *sd, int64 uid, struct reg_db *ref) { +int HP_skill_calc_heal(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, bool heal) { int hIndex = 0; - if( HPMHooks.count.HP_script_array_ensure_zero_pre ) { - void (*preHookFunc) (struct script_state *st, struct map_session_data *sd, int64 *uid, struct reg_db *ref); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_calc_heal_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, bool *heal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_ensure_zero_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_array_ensure_zero_pre[hIndex].func; - preHookFunc(st, sd, &uid, ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_calc_heal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_calc_heal_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &heal); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.array_ensure_zero(st, sd, uid, ref); + retVal___ = HPMHooks.source.skill.calc_heal(src, target, skill_id, skill_lv, heal); } - if( HPMHooks.count.HP_script_array_ensure_zero_post ) { - void (*postHookFunc) (struct script_state *st, struct map_session_data *sd, int64 *uid, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_ensure_zero_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_array_ensure_zero_post[hIndex].func; - postHookFunc(st, sd, &uid, ref); + if( HPMHooks.count.HP_skill_calc_heal_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, bool *heal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_calc_heal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_calc_heal_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &heal); } } - return; + return retVal___; } -void HP_script_reg_destroy_single(struct map_session_data *sd, int64 reg, struct script_reg_state *data) { +bool HP_skill_check_cloaking(struct block_list *bl, struct status_change_entry *sce) { int hIndex = 0; - if( HPMHooks.count.HP_script_reg_destroy_single_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int64 *reg, struct script_reg_state *data); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_check_cloaking_pre ) { + bool (*preHookFunc) (struct block_list *bl, struct status_change_entry *sce); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_single_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_reg_destroy_single_pre[hIndex].func; - preHookFunc(sd, ®, data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_cloaking_pre[hIndex].func; + retVal___ = preHookFunc(bl, sce); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.reg_destroy_single(sd, reg, data); + retVal___ = HPMHooks.source.skill.check_cloaking(bl, sce); } - if( HPMHooks.count.HP_script_reg_destroy_single_post ) { - void (*postHookFunc) (struct map_session_data *sd, int64 *reg, struct script_reg_state *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_single_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_reg_destroy_single_post[hIndex].func; - postHookFunc(sd, ®, data); + if( HPMHooks.count.HP_skill_check_cloaking_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct status_change_entry *sce); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_cloaking_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sce); } } - return; + return retVal___; } -int HP_script_reg_destroy(DBKey key, DBData *data, va_list ap) { +int HP_skill_check_cloaking_end(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_reg_destroy_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + if( HPMHooks.count.HP_skill_check_cloaking_end_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_pre; hIndex++ ) { + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_pre; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_reg_destroy_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); + preHookFunc = HPMHooks.list.HP_skill_check_cloaking_end_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); va_end(ap___copy); } if( *HPMforce_return ) { @@ -58602,55 +64987,29 @@ int HP_script_reg_destroy(DBKey key, DBData *data, va_list ap) { } { va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.reg_destroy(key, data, ap___copy); + retVal___ = HPMHooks.source.skill.check_cloaking_end(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_reg_destroy_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_post; hIndex++ ) { + if( HPMHooks.count.HP_skill_check_cloaking_end_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_post; hIndex++ ) { va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_reg_destroy_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + postHookFunc = HPMHooks.list.HP_skill_check_cloaking_end_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); va_end(ap___copy); } } return retVal___; } -void HP_script_generic_ui_array_expand(unsigned int plus) { - int hIndex = 0; - if( HPMHooks.count.HP_script_generic_ui_array_expand_pre ) { - void (*preHookFunc) (unsigned int *plus); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_generic_ui_array_expand_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_generic_ui_array_expand_pre[hIndex].func; - preHookFunc(&plus); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.script.generic_ui_array_expand(plus); - } - if( HPMHooks.count.HP_script_generic_ui_array_expand_post ) { - void (*postHookFunc) (unsigned int *plus); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_generic_ui_array_expand_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_generic_ui_array_expand_post[hIndex].func; - postHookFunc(&plus); - } - } - return; -} -unsigned int* HP_script_array_cpy_list(struct script_array *sa) { +bool HP_skill_can_cloak(struct map_session_data *sd) { int hIndex = 0; - unsigned int* retVal___ = NULL; - if( HPMHooks.count.HP_script_array_cpy_list_pre ) { - unsigned int* (*preHookFunc) (struct script_array *sa); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_can_cloak_pre ) { + bool (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_cpy_list_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_array_cpy_list_pre[hIndex].func; - retVal___ = preHookFunc(sa); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_can_cloak_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58658,52 +65017,53 @@ unsigned int* HP_script_array_cpy_list(struct script_array *sa) { } } { - retVal___ = HPMHooks.source.script.array_cpy_list(sa); + retVal___ = HPMHooks.source.skill.can_cloak(sd); } - if( HPMHooks.count.HP_script_array_cpy_list_post ) { - unsigned int* (*postHookFunc) (unsigned int* retVal___, struct script_array *sa); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_cpy_list_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_array_cpy_list_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sa); + if( HPMHooks.count.HP_skill_can_cloak_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_can_cloak_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -void HP_script_hardcoded_constants(void) { +int HP_skill_enchant_elemental_end(struct block_list *bl, int type) { int hIndex = 0; - if( HPMHooks.count.HP_script_hardcoded_constants_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_enchant_elemental_end_pre ) { + int (*preHookFunc) (struct block_list *bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_hardcoded_constants_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_hardcoded_constants_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_enchant_elemental_end_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_enchant_elemental_end_pre[hIndex].func; + retVal___ = preHookFunc(bl, &type); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.hardcoded_constants(); + retVal___ = HPMHooks.source.skill.enchant_elemental_end(bl, type); } - if( HPMHooks.count.HP_script_hardcoded_constants_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_hardcoded_constants_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_hardcoded_constants_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_skill_enchant_elemental_end_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_enchant_elemental_end_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_enchant_elemental_end_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &type); } } - return; + return retVal___; } -unsigned short HP_script_mapindexname2id(struct script_state *st, const char *name) { +int HP_skill_not_ok(uint16 skill_id, struct map_session_data *sd) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_script_mapindexname2id_pre ) { - unsigned short (*preHookFunc) (struct script_state *st, const char *name); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_not_ok_pre ) { + int (*preHookFunc) (uint16 *skill_id, struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapindexname2id_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_mapindexname2id_pre[hIndex].func; - retVal___ = preHookFunc(st, name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_not_ok_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58711,26 +65071,26 @@ unsigned short HP_script_mapindexname2id(struct script_state *st, const char *na } } { - retVal___ = HPMHooks.source.script.mapindexname2id(st, name); + retVal___ = HPMHooks.source.skill.not_ok(skill_id, sd); } - if( HPMHooks.count.HP_script_mapindexname2id_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct script_state *st, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapindexname2id_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_mapindexname2id_post[hIndex].func; - retVal___ = postHookFunc(retVal___, st, name); + if( HPMHooks.count.HP_skill_not_ok_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_not_ok_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, sd); } } return retVal___; } -int HP_script_string_dup(char *str) { +int HP_skill_not_ok_hom(uint16 skill_id, struct homun_data *hd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_string_dup_pre ) { - int (*preHookFunc) (char *str); + if( HPMHooks.count.HP_skill_not_ok_hom_pre ) { + int (*preHookFunc) (uint16 *skill_id, struct homun_data *hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_string_dup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_string_dup_pre[hIndex].func; - retVal___ = preHookFunc(str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_not_ok_hom_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, hd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58738,80 +65098,86 @@ int HP_script_string_dup(char *str) { } } { - retVal___ = HPMHooks.source.script.string_dup(str); + retVal___ = HPMHooks.source.skill.not_ok_hom(skill_id, hd); } - if( HPMHooks.count.HP_script_string_dup_post ) { - int (*postHookFunc) (int retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_string_dup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_string_dup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str); + if( HPMHooks.count.HP_skill_not_ok_hom_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_not_ok_hom_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, hd); } } return retVal___; } -void HP_script_load_translations(void) { +int HP_skill_not_ok_mercenary(uint16 skill_id, struct mercenary_data *md) { int hIndex = 0; - if( HPMHooks.count.HP_script_load_translations_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_not_ok_mercenary_pre ) { + int (*preHookFunc) (uint16 *skill_id, struct mercenary_data *md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translations_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_load_translations_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_mercenary_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_not_ok_mercenary_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, md); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.load_translations(); + retVal___ = HPMHooks.source.skill.not_ok_mercenary(skill_id, md); } - if( HPMHooks.count.HP_script_load_translations_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translations_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_load_translations_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_skill_not_ok_mercenary_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_mercenary_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_not_ok_mercenary_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, md); } } - return; + return retVal___; } -void HP_script_load_translation(const char *file, uint8 lang_id, uint32 *total) { +int HP_skill_chastle_mob_changetarget(struct block_list *bl, va_list ap) { int hIndex = 0; - if( HPMHooks.count.HP_script_load_translation_pre ) { - void (*preHookFunc) (const char *file, uint8 *lang_id, uint32 *total); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_chastle_mob_changetarget_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_load_translation_pre[hIndex].func; - preHookFunc(file, &lang_id, total); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chastle_mob_changetarget_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_chastle_mob_changetarget_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.load_translation(file, lang_id, total); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.chastle_mob_changetarget(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_script_load_translation_post ) { - void (*postHookFunc) (const char *file, uint8 *lang_id, uint32 *total); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_load_translation_post[hIndex].func; - postHookFunc(file, &lang_id, total); + if( HPMHooks.count.HP_skill_chastle_mob_changetarget_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chastle_mob_changetarget_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_chastle_mob_changetarget_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } - return; + return retVal___; } -int HP_script_translation_db_destroyer(DBKey key, DBData *data, va_list ap) { +int HP_skill_can_produce_mix(struct map_session_data *sd, int nameid, int trigger, int qty) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_translation_db_destroyer_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + if( HPMHooks.count.HP_skill_can_produce_mix_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *trigger, int *qty); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_translation_db_destroyer_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_script_translation_db_destroyer_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_produce_mix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_can_produce_mix_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid, &trigger, &qty); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58819,56 +65185,53 @@ int HP_script_translation_db_destroyer(DBKey key, DBData *data, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.script.translation_db_destroyer(key, data, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.can_produce_mix(sd, nameid, trigger, qty); } - if( HPMHooks.count.HP_script_translation_db_destroyer_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_translation_db_destroyer_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_script_translation_db_destroyer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_can_produce_mix_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid, int *trigger, int *qty); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_produce_mix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_can_produce_mix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid, &trigger, &qty); } } return retVal___; } -void HP_script_clear_translations(bool reload) { +int HP_skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, int slot1, int slot2, int slot3, int qty) { int hIndex = 0; - if( HPMHooks.count.HP_script_clear_translations_pre ) { - void (*preHookFunc) (bool *reload); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_produce_mix_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *nameid, int *slot1, int *slot2, int *slot3, int *qty); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_clear_translations_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_clear_translations_pre[hIndex].func; - preHookFunc(&reload); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_produce_mix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_produce_mix_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, &nameid, &slot1, &slot2, &slot3, &qty); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.clear_translations(reload); + retVal___ = HPMHooks.source.skill.produce_mix(sd, skill_id, nameid, slot1, slot2, slot3, qty); } - if( HPMHooks.count.HP_script_clear_translations_post ) { - void (*postHookFunc) (bool *reload); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_clear_translations_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_clear_translations_post[hIndex].func; - postHookFunc(&reload); + if( HPMHooks.count.HP_skill_produce_mix_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, int *nameid, int *slot1, int *slot2, int *slot3, int *qty); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_produce_mix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_produce_mix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, &nameid, &slot1, &slot2, &slot3, &qty); } } - return; + return retVal___; } -int HP_script_parse_cleanup_timer(int tid, int64 tick, int id, intptr_t data) { +int HP_skill_arrow_create(struct map_session_data *sd, int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_parse_cleanup_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_skill_arrow_create_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_cleanup_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_parse_cleanup_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_arrow_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_arrow_create_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58876,26 +65239,26 @@ int HP_script_parse_cleanup_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.script.parse_cleanup_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.skill.arrow_create(sd, nameid); } - if( HPMHooks.count.HP_script_parse_cleanup_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_cleanup_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_parse_cleanup_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_skill_arrow_create_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_arrow_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_arrow_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid); } } return retVal___; } -uint8 HP_script_add_language(const char *name) { +int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; - uint8 retVal___ = 0; - if( HPMHooks.count.HP_script_add_language_pre ) { - uint8 (*preHookFunc) (const char *name); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_castend_nodamage_id_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_language_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_add_language_pre[hIndex].func; - retVal___ = preHookFunc(name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58903,26 +65266,26 @@ uint8 HP_script_add_language(const char *name) { } } { - retVal___ = HPMHooks.source.script.add_language(name); + retVal___ = HPMHooks.source.skill.castend_nodamage_id(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_script_add_language_post ) { - uint8 (*postHookFunc) (uint8 retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_language_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_add_language_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name); + if( HPMHooks.count.HP_skill_castend_nodamage_id_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &tick, &flag); } } return retVal___; } -const char* HP_script_get_translation_file_name(const char *file) { +int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_translation_file_name_pre ) { - const char* (*preHookFunc) (const char *file); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_castend_damage_id_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_translation_file_name_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_get_translation_file_name_pre[hIndex].func; - retVal___ = preHookFunc(file); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_damage_id_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -58930,131 +65293,134 @@ const char* HP_script_get_translation_file_name(const char *file) { } } { - retVal___ = HPMHooks.source.script.get_translation_file_name(file); + retVal___ = HPMHooks.source.skill.castend_damage_id(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_script_get_translation_file_name_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *file); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_translation_file_name_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_get_translation_file_name_post[hIndex].func; - retVal___ = postHookFunc(retVal___, file); + if( HPMHooks.count.HP_skill_castend_damage_id_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_damage_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &tick, &flag); } } return retVal___; } -void HP_script_parser_clean_leftovers(void) { +int HP_skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_script_parser_clean_leftovers_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_castend_pos2_pre ) { + int (*preHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parser_clean_leftovers_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_parser_clean_leftovers_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_pos2_pre[hIndex].func; + retVal___ = preHookFunc(src, &x, &y, &skill_id, &skill_lv, &tick, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.parser_clean_leftovers(); + retVal___ = HPMHooks.source.skill.castend_pos2(src, x, y, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_script_parser_clean_leftovers_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parser_clean_leftovers_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_parser_clean_leftovers_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_skill_castend_pos2_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_pos2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &x, &y, &skill_id, &skill_lv, &tick, &flag); } } - return; + return retVal___; } -void HP_script_run_use_script(struct map_session_data *sd, struct item_data *data, int oid) { +int HP_skill_blockpc_start(struct map_session_data *sd, uint16 skill_id, int tick) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_use_script_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_blockpc_start_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_use_script_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_run_use_script_pre[hIndex].func; - preHookFunc(sd, data, &oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_start_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_blockpc_start_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.run_use_script(sd, data, oid); + retVal___ = HPMHooks.source.skill.blockpc_start(sd, skill_id, tick); } - if( HPMHooks.count.HP_script_run_use_script_post ) { - void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_use_script_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_run_use_script_post[hIndex].func; - postHookFunc(sd, data, &oid); + if( HPMHooks.count.HP_skill_blockpc_start_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_start_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_blockpc_start_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, &tick); } } - return; + return retVal___; } -void HP_script_run_item_equip_script(struct map_session_data *sd, struct item_data *data, int oid) { +int HP_skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_item_equip_script_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_blockhomun_start_pre ) { + int (*preHookFunc) (struct homun_data *hd, uint16 *skill_id, int *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_equip_script_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_run_item_equip_script_pre[hIndex].func; - preHookFunc(sd, data, &oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_start_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_blockhomun_start_pre[hIndex].func; + retVal___ = preHookFunc(hd, &skill_id, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.run_item_equip_script(sd, data, oid); + retVal___ = HPMHooks.source.skill.blockhomun_start(hd, skill_id, tick); } - if( HPMHooks.count.HP_script_run_item_equip_script_post ) { - void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_equip_script_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_run_item_equip_script_post[hIndex].func; - postHookFunc(sd, data, &oid); + if( HPMHooks.count.HP_skill_blockhomun_start_post ) { + int (*postHookFunc) (int retVal___, struct homun_data *hd, uint16 *skill_id, int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_start_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_blockhomun_start_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd, &skill_id, &tick); } } - return; + return retVal___; } -void HP_script_run_item_unequip_script(struct map_session_data *sd, struct item_data *data, int oid) { +int HP_skill_blockmerc_start(struct mercenary_data *md, uint16 skill_id, int tick) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_item_unequip_script_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_blockmerc_start_pre ) { + int (*preHookFunc) (struct mercenary_data *md, uint16 *skill_id, int *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_unequip_script_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_run_item_unequip_script_pre[hIndex].func; - preHookFunc(sd, data, &oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_start_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_blockmerc_start_pre[hIndex].func; + retVal___ = preHookFunc(md, &skill_id, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.run_item_unequip_script(sd, data, oid); + retVal___ = HPMHooks.source.skill.blockmerc_start(md, skill_id, tick); } - if( HPMHooks.count.HP_script_run_item_unequip_script_post ) { - void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_unequip_script_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_run_item_unequip_script_post[hIndex].func; - postHookFunc(sd, data, &oid); + if( HPMHooks.count.HP_skill_blockmerc_start_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md, uint16 *skill_id, int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_start_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_blockmerc_start_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &skill_id, &tick); } } - return; + return retVal___; } -/* searchstore */ -bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigned short effect) { +int HP_skill_attack(int attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_searchstore_open_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, unsigned int *uses, unsigned short *effect); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_attack_pre ) { + int (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_open_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_searchstore_open_pre[hIndex].func; - retVal___ = preHookFunc(sd, &uses, &effect); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_attack_pre[hIndex].func; + retVal___ = preHookFunc(&attack_type, src, dsrc, bl, &skill_id, &skill_lv, &tick, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59062,52 +65428,61 @@ bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigne } } { - retVal___ = HPMHooks.source.searchstore.open(sd, uses, effect); + retVal___ = HPMHooks.source.skill.attack(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_searchstore_open_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int *uses, unsigned short *effect); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_open_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_searchstore_open_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &uses, &effect); + if( HPMHooks.count.HP_skill_attack_post ) { + int (*postHookFunc) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_attack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &attack_type, src, dsrc, bl, &skill_id, &skill_lv, &tick, &flag); } } return retVal___; } -void HP_searchstore_query(struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const unsigned short *itemlist, unsigned int item_count, const unsigned short *cardlist, unsigned int card_count) { +int HP_skill_attack_area(struct block_list *bl, va_list ap) { int hIndex = 0; - if( HPMHooks.count.HP_searchstore_query_pre ) { - void (*preHookFunc) (struct map_session_data *sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const unsigned short *itemlist, unsigned int *item_count, const unsigned short *cardlist, unsigned int *card_count); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_attack_area_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_query_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_searchstore_query_pre[hIndex].func; - preHookFunc(sd, &type, &min_price, &max_price, itemlist, &item_count, cardlist, &card_count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_area_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_attack_area_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.searchstore.query(sd, type, min_price, max_price, itemlist, item_count, cardlist, card_count); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.attack_area(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_searchstore_query_post ) { - void (*postHookFunc) (struct map_session_data *sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const unsigned short *itemlist, unsigned int *item_count, const unsigned short *cardlist, unsigned int *card_count); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_query_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_searchstore_query_post[hIndex].func; - postHookFunc(sd, &type, &min_price, &max_price, itemlist, &item_count, cardlist, &card_count); + if( HPMHooks.count.HP_skill_attack_area_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_area_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_attack_area_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } - return; + return retVal___; } -bool HP_searchstore_querynext(struct map_session_data *sd) { +int HP_skill_area_sub(struct block_list *bl, va_list ap) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_searchstore_querynext_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_area_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_querynext_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_searchstore_querynext_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_area_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59115,130 +65490,146 @@ bool HP_searchstore_querynext(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.searchstore.querynext(sd); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.area_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_searchstore_querynext_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_querynext_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_searchstore_querynext_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_skill_area_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_area_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -void HP_searchstore_next(struct map_session_data *sd) { +int HP_skill_area_sub_count(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_searchstore_next_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_area_sub_count_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_next_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_searchstore_next_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_count_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_area_sub_count_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &tick, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.searchstore.next(sd); + retVal___ = HPMHooks.source.skill.area_sub_count(src, target, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_searchstore_next_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_next_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_searchstore_next_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_skill_area_sub_count_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_count_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_area_sub_count_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &tick, &flag); } } - return; + return retVal___; } -void HP_searchstore_clear(struct map_session_data *sd) { +int HP_skill_check_unit_range(struct block_list *bl, int x, int y, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - if( HPMHooks.count.HP_searchstore_clear_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_check_unit_range_pre ) { + int (*preHookFunc) (struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clear_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_searchstore_clear_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_unit_range_pre[hIndex].func; + retVal___ = preHookFunc(bl, &x, &y, &skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.searchstore.clear(sd); + retVal___ = HPMHooks.source.skill.check_unit_range(bl, x, y, skill_id, skill_lv); } - if( HPMHooks.count.HP_searchstore_clear_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clear_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_searchstore_clear_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_skill_check_unit_range_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_unit_range_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &x, &y, &skill_id, &skill_lv); } } - return; + return retVal___; } -void HP_searchstore_close(struct map_session_data *sd) { +int HP_skill_check_unit_range_sub(struct block_list *bl, va_list ap) { int hIndex = 0; - if( HPMHooks.count.HP_searchstore_close_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_check_unit_range_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_close_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_searchstore_close_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_check_unit_range_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.searchstore.close(sd); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.check_unit_range_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_searchstore_close_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_close_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_searchstore_close_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_skill_check_unit_range_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_check_unit_range_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } - return; + return retVal___; } -void HP_searchstore_click(struct map_session_data *sd, int account_id, int store_id, unsigned short nameid) { +int HP_skill_check_unit_range2(struct block_list *bl, int x, int y, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - if( HPMHooks.count.HP_searchstore_click_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *account_id, int *store_id, unsigned short *nameid); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_check_unit_range2_pre ) { + int (*preHookFunc) (struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_click_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_searchstore_click_pre[hIndex].func; - preHookFunc(sd, &account_id, &store_id, &nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_unit_range2_pre[hIndex].func; + retVal___ = preHookFunc(bl, &x, &y, &skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.searchstore.click(sd, account_id, store_id, nameid); + retVal___ = HPMHooks.source.skill.check_unit_range2(bl, x, y, skill_id, skill_lv); } - if( HPMHooks.count.HP_searchstore_click_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *account_id, int *store_id, unsigned short *nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_click_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_searchstore_click_post[hIndex].func; - postHookFunc(sd, &account_id, &store_id, &nameid); + if( HPMHooks.count.HP_skill_check_unit_range2_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_unit_range2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &x, &y, &skill_id, &skill_lv); } } - return; + return retVal___; } -bool HP_searchstore_queryremote(struct map_session_data *sd, int account_id) { +int HP_skill_check_unit_range2_sub(struct block_list *bl, va_list ap) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_searchstore_queryremote_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *account_id); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_check_unit_range2_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_queryremote_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_searchstore_queryremote_pre[hIndex].func; - retVal___ = preHookFunc(sd, &account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_check_unit_range2_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59246,25 +65637,29 @@ bool HP_searchstore_queryremote(struct map_session_data *sd, int account_id) { } } { - retVal___ = HPMHooks.source.searchstore.queryremote(sd, account_id); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.check_unit_range2_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_searchstore_queryremote_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_queryremote_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_searchstore_queryremote_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &account_id); + if( HPMHooks.count.HP_skill_check_unit_range2_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_check_unit_range2_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -void HP_searchstore_clearremote(struct map_session_data *sd) { +void HP_skill_toggle_magicpower(struct block_list *bl, uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_searchstore_clearremote_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_skill_toggle_magicpower_pre ) { + void (*preHookFunc) (struct block_list *bl, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clearremote_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_searchstore_clearremote_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_toggle_magicpower_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_toggle_magicpower_pre[hIndex].func; + preHookFunc(bl, &skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59272,26 +65667,26 @@ void HP_searchstore_clearremote(struct map_session_data *sd) { } } { - HPMHooks.source.searchstore.clearremote(sd); + HPMHooks.source.skill.toggle_magicpower(bl, skill_id); } - if( HPMHooks.count.HP_searchstore_clearremote_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clearremote_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_searchstore_clearremote_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_skill_toggle_magicpower_post ) { + void (*postHookFunc) (struct block_list *bl, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_toggle_magicpower_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_toggle_magicpower_post[hIndex].func; + postHookFunc(bl, &skill_id); } } return; } -bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine) { +int HP_skill_magic_reflect(struct block_list *src, struct block_list *bl, int type) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_searchstore_result_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, unsigned int *store_id, int *account_id, const char *store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short *card, unsigned char *refine); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_magic_reflect_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_searchstore_result_pre[hIndex].func; - retVal___ = preHookFunc(sd, &store_id, &account_id, store_name, &nameid, &amount, &price, card, &refine); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magic_reflect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_magic_reflect_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59299,27 +65694,26 @@ bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, i } } { - retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine); + retVal___ = HPMHooks.source.skill.magic_reflect(src, bl, type); } - if( HPMHooks.count.HP_searchstore_result_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int *store_id, int *account_id, const char *store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short *card, unsigned char *refine); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_searchstore_result_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &store_id, &account_id, store_name, &nameid, &amount, &price, card, &refine); + if( HPMHooks.count.HP_skill_magic_reflect_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magic_reflect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_magic_reflect_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &type); } } return retVal___; } -/* skill */ -int HP_skill_init(bool minimal) { +int HP_skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint16 skill_id, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_init_pre ) { - int (*preHookFunc) (bool *minimal); + if( HPMHooks.count.HP_skill_onskillusage_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, uint16 *skill_id, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_init_pre[hIndex].func; - retVal___ = preHookFunc(&minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_onskillusage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_onskillusage_pre[hIndex].func; + retVal___ = preHookFunc(sd, bl, &skill_id, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59327,26 +65721,28 @@ int HP_skill_init(bool minimal) { } } { - retVal___ = HPMHooks.source.skill.init(minimal); + retVal___ = HPMHooks.source.skill.onskillusage(sd, bl, skill_id, tick); } - if( HPMHooks.count.HP_skill_init_post ) { - int (*postHookFunc) (int retVal___, bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &minimal); + if( HPMHooks.count.HP_skill_onskillusage_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl, uint16 *skill_id, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_onskillusage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_onskillusage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, bl, &skill_id, &tick); } } return retVal___; } -int HP_skill_final(void) { +int HP_skill_cell_overlap(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_final_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_skill_cell_overlap_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_final_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cell_overlap_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_cell_overlap_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59354,78 +65750,90 @@ int HP_skill_final(void) { } } { - retVal___ = HPMHooks.source.skill.final(); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.cell_overlap(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_final_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_final_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_skill_cell_overlap_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cell_overlap_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_cell_overlap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -void HP_skill_reload(void) { +int HP_skill_timerskill(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - if( HPMHooks.count.HP_skill_reload_pre ) { - void (*preHookFunc) (void); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_timerskill_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_reload_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_timerskill_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.reload(); + retVal___ = HPMHooks.source.skill.timerskill(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_reload_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_reload_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_skill_timerskill_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_timerskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } - return; + return retVal___; } -void HP_skill_read_db(bool minimal) { +int HP_skill_trap_splash(struct block_list *bl, va_list ap) { int hIndex = 0; - if( HPMHooks.count.HP_skill_read_db_pre ) { - void (*preHookFunc) (bool *minimal); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_trap_splash_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_read_db_pre[hIndex].func; - preHookFunc(&minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_splash_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_trap_splash_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.read_db(minimal); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.trap_splash(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_read_db_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_read_db_post[hIndex].func; - postHookFunc(&minimal); + if( HPMHooks.count.HP_skill_trap_splash_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_splash_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_trap_splash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } - return; + return retVal___; } -int HP_skill_get_index(uint16 skill_id) { +int HP_skill_check_condition_mercenary(struct block_list *bl, int skill_id, int lv, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_index_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if( HPMHooks.count.HP_skill_check_condition_mercenary_pre ) { + int (*preHookFunc) (struct block_list *bl, int *skill_id, int *lv, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_index_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_index_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mercenary_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_condition_mercenary_pre[hIndex].func; + retVal___ = preHookFunc(bl, &skill_id, &lv, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59433,26 +65841,26 @@ int HP_skill_get_index(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_index(skill_id); + retVal___ = HPMHooks.source.skill.check_condition_mercenary(bl, skill_id, lv, type); } - if( HPMHooks.count.HP_skill_get_index_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_index_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_index_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_check_condition_mercenary_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *skill_id, int *lv, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mercenary_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_condition_mercenary_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &skill_id, &lv, &type); } } return retVal___; } -int HP_skill_get_type(uint16 skill_id) { +struct skill_unit_group* HP_skill_locate_element_field(struct block_list *bl) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_type_pre ) { - int (*preHookFunc) (uint16 *skill_id); + struct skill_unit_group* retVal___ = NULL; + if( HPMHooks.count.HP_skill_locate_element_field_pre ) { + struct skill_unit_group* (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_type_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_type_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_locate_element_field_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_locate_element_field_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59460,26 +65868,28 @@ int HP_skill_get_type(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_type(skill_id); + retVal___ = HPMHooks.source.skill.locate_element_field(bl); } - if( HPMHooks.count.HP_skill_get_type_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_type_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_type_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_locate_element_field_post ) { + struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_locate_element_field_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_locate_element_field_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -int HP_skill_get_hit(uint16 skill_id) { +int HP_skill_graffitiremover(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_hit_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if( HPMHooks.count.HP_skill_graffitiremover_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hit_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_hit_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_graffitiremover_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_graffitiremover_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59487,26 +65897,32 @@ int HP_skill_get_hit(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_hit(skill_id); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.graffitiremover(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_get_hit_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hit_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_hit_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_graffitiremover_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_graffitiremover_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_graffitiremover_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_skill_get_inf(uint16 skill_id) { +int HP_skill_activate_reverberation(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_inf_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if( HPMHooks.count.HP_skill_activate_reverberation_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_inf_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_activate_reverberation_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_activate_reverberation_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59514,26 +65930,32 @@ int HP_skill_get_inf(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_inf(skill_id); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.activate_reverberation(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_get_inf_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_inf_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_activate_reverberation_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_activate_reverberation_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_activate_reverberation_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_skill_get_ele(uint16 skill_id, uint16 skill_lv) { +int HP_skill_dance_overlap_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_ele_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_dance_overlap_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ele_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_ele_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_dance_overlap_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59541,26 +65963,30 @@ int HP_skill_get_ele(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_ele(skill_id, skill_lv); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.dance_overlap_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_get_ele_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ele_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_ele_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_dance_overlap_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_dance_overlap_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_skill_get_nk(uint16 skill_id) { +int HP_skill_dance_overlap(struct skill_unit *su, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_nk_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if( HPMHooks.count.HP_skill_dance_overlap_pre ) { + int (*preHookFunc) (struct skill_unit *su, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_nk_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_nk_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_dance_overlap_pre[hIndex].func; + retVal___ = preHookFunc(su, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59568,26 +65994,26 @@ int HP_skill_get_nk(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_nk(skill_id); + retVal___ = HPMHooks.source.skill.dance_overlap(su, flag); } - if( HPMHooks.count.HP_skill_get_nk_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_nk_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_nk_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_dance_overlap_post ) { + int (*postHookFunc) (int retVal___, struct skill_unit *su, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_dance_overlap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, su, &flag); } } return retVal___; } -int HP_skill_get_max(uint16 skill_id) { +struct s_skill_unit_layout* HP_skill_get_unit_layout(uint16 skill_id, uint16 skill_lv, struct block_list *src, int x, int y) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_max_pre ) { - int (*preHookFunc) (uint16 *skill_id); + struct s_skill_unit_layout* retVal___ = NULL; + if( HPMHooks.count.HP_skill_get_unit_layout_pre ) { + struct s_skill_unit_layout* (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv, struct block_list *src, int *x, int *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_max_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_max_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_unit_layout_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv, src, &x, &y); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59595,26 +66021,28 @@ int HP_skill_get_max(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_max(skill_id); + retVal___ = HPMHooks.source.skill.get_unit_layout(skill_id, skill_lv, src, x, y); } - if( HPMHooks.count.HP_skill_get_max_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_max_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_max_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_get_unit_layout_post ) { + struct s_skill_unit_layout* (*postHookFunc) (struct s_skill_unit_layout* retVal___, uint16 *skill_id, uint16 *skill_lv, struct block_list *src, int *x, int *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_unit_layout_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv, src, &x, &y); } } return retVal___; } -int HP_skill_get_range(uint16 skill_id, uint16 skill_lv) { +int HP_skill_frostjoke_scream(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_range_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_frostjoke_scream_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_range_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_frostjoke_scream_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_frostjoke_scream_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59622,26 +66050,32 @@ int HP_skill_get_range(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_range(skill_id, skill_lv); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.frostjoke_scream(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_get_range_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_range_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_frostjoke_scream_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_frostjoke_scream_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_frostjoke_scream_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_skill_get_range2(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { +int HP_skill_greed(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_range2_pre ) { - int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_greed_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_range2_pre[hIndex].func; - retVal___ = preHookFunc(bl, &skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_greed_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_greed_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59649,26 +66083,32 @@ int HP_skill_get_range2(struct block_list *bl, uint16 skill_id, uint16 skill_lv) } } { - retVal___ = HPMHooks.source.skill.get_range2(bl, skill_id, skill_lv); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.greed(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_get_range2_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_range2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_greed_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_greed_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_greed_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_skill_get_splash(uint16 skill_id, uint16 skill_lv) { +int HP_skill_destroy_trap(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_splash_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_destroy_trap_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_splash_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_splash_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_destroy_trap_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_destroy_trap_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59676,26 +66116,30 @@ int HP_skill_get_splash(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_splash(skill_id, skill_lv); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.destroy_trap(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_get_splash_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_splash_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_splash_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_destroy_trap_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_destroy_trap_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_destroy_trap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_skill_get_hp(uint16 skill_id, uint16 skill_lv) { +struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_list *bl, struct skill_unit_group *group, int64 tick) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_hp_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + struct skill_unit_group_tickset* retVal___ = NULL; + if( HPMHooks.count.HP_skill_unitgrouptickset_search_pre ) { + struct skill_unit_group_tickset* (*preHookFunc) (struct block_list *bl, struct skill_unit_group *group, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_hp_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitgrouptickset_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unitgrouptickset_search_pre[hIndex].func; + retVal___ = preHookFunc(bl, group, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59703,26 +66147,26 @@ int HP_skill_get_hp(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_hp(skill_id, skill_lv); + retVal___ = HPMHooks.source.skill.unitgrouptickset_search(bl, group, tick); } - if( HPMHooks.count.HP_skill_get_hp_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_hp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_unitgrouptickset_search_post ) { + struct skill_unit_group_tickset* (*postHookFunc) (struct skill_unit_group_tickset* retVal___, struct block_list *bl, struct skill_unit_group *group, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitgrouptickset_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unitgrouptickset_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, group, &tick); } } return retVal___; } -int HP_skill_get_mhp(uint16 skill_id, uint16 skill_lv) { +bool HP_skill_dance_switch(struct skill_unit *su, int flag) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_mhp_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_dance_switch_pre ) { + bool (*preHookFunc) (struct skill_unit *su, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_mhp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_mhp_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_switch_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_dance_switch_pre[hIndex].func; + retVal___ = preHookFunc(su, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59730,26 +66174,28 @@ int HP_skill_get_mhp(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_mhp(skill_id, skill_lv); + retVal___ = HPMHooks.source.skill.dance_switch(su, flag); } - if( HPMHooks.count.HP_skill_get_mhp_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_mhp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_mhp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_dance_switch_post ) { + bool (*postHookFunc) (bool retVal___, struct skill_unit *su, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_switch_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_dance_switch_post[hIndex].func; + retVal___ = postHookFunc(retVal___, su, &flag); } } return retVal___; } -int HP_skill_get_sp(uint16 skill_id, uint16 skill_lv) { +int HP_skill_check_condition_char_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_sp_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_check_condition_char_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_sp_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_char_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_check_condition_char_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59757,26 +66203,32 @@ int HP_skill_get_sp(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_sp(skill_id, skill_lv); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.check_condition_char_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_get_sp_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_sp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_check_condition_char_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_char_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_check_condition_char_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_skill_get_state(uint16 skill_id) { +int HP_skill_check_condition_mob_master_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_state_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if( HPMHooks.count.HP_skill_check_condition_mob_master_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_state_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_state_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mob_master_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_check_condition_mob_master_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59784,79 +66236,81 @@ int HP_skill_get_state(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_state(skill_id); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.check_condition_mob_master_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_get_state_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_state_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_state_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_check_condition_mob_master_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mob_master_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_check_condition_mob_master_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_skill_get_spiritball(uint16 skill_id, uint16 skill_lv) { +void HP_skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_spiritball_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_brandishspear_first_pre ) { + void (*preHookFunc) (struct square *tc, uint8 *dir, int16 *x, int16 *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_spiritball_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_spiritball_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_first_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_brandishspear_first_pre[hIndex].func; + preHookFunc(tc, &dir, &x, &y); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.get_spiritball(skill_id, skill_lv); + HPMHooks.source.skill.brandishspear_first(tc, dir, x, y); } - if( HPMHooks.count.HP_skill_get_spiritball_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_spiritball_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_spiritball_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_brandishspear_first_post ) { + void (*postHookFunc) (struct square *tc, uint8 *dir, int16 *x, int16 *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_first_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_brandishspear_first_post[hIndex].func; + postHookFunc(tc, &dir, &x, &y); } } - return retVal___; + return; } -int HP_skill_get_zeny(uint16 skill_id, uint16 skill_lv) { +void HP_skill_brandishspear_dir(struct square *tc, uint8 dir, int are) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_zeny_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_brandishspear_dir_pre ) { + void (*preHookFunc) (struct square *tc, uint8 *dir, int *are); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_zeny_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_zeny_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_dir_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_brandishspear_dir_pre[hIndex].func; + preHookFunc(tc, &dir, &are); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.get_zeny(skill_id, skill_lv); + HPMHooks.source.skill.brandishspear_dir(tc, dir, are); } - if( HPMHooks.count.HP_skill_get_zeny_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_zeny_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_zeny_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_brandishspear_dir_post ) { + void (*postHookFunc) (struct square *tc, uint8 *dir, int *are); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_dir_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_brandishspear_dir_post[hIndex].func; + postHookFunc(tc, &dir, &are); } } - return retVal___; + return; } -int HP_skill_get_num(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_fixed_cast(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_num_pre ) { + if( HPMHooks.count.HP_skill_get_fixed_cast_pre ) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_num_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_num_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_fixed_cast_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_fixed_cast_pre[hIndex].func; retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { @@ -59865,26 +66319,28 @@ int HP_skill_get_num(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_num(skill_id, skill_lv); + retVal___ = HPMHooks.source.skill.get_fixed_cast(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_num_post ) { + if( HPMHooks.count.HP_skill_get_fixed_cast_post ) { int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_num_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_num_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_fixed_cast_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_fixed_cast_post[hIndex].func; retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -int HP_skill_get_cast(uint16 skill_id, uint16 skill_lv) { +int HP_skill_sit_count(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_cast_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_sit_count_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cast_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_cast_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_count_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_sit_count_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59892,26 +66348,32 @@ int HP_skill_get_cast(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_cast(skill_id, skill_lv); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.sit_count(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_get_cast_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cast_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_cast_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_sit_count_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_count_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_sit_count_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_skill_get_delay(uint16 skill_id, uint16 skill_lv) { +int HP_skill_sit_in(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_delay_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_sit_in_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delay_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_delay_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_in_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_sit_in_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59919,26 +66381,32 @@ int HP_skill_get_delay(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_delay(skill_id, skill_lv); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.sit_in(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_get_delay_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delay_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_delay_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_sit_in_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_in_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_sit_in_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_skill_get_walkdelay(uint16 skill_id, uint16 skill_lv) { +int HP_skill_sit_out(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_walkdelay_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_sit_out_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_walkdelay_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_walkdelay_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_out_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_sit_out_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -59946,53 +66414,56 @@ int HP_skill_get_walkdelay(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_walkdelay(skill_id, skill_lv); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.sit_out(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_get_walkdelay_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_walkdelay_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_walkdelay_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_sit_out_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_out_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_sit_out_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_skill_get_time(uint16 skill_id, uint16 skill_lv) { +void HP_skill_unitsetmapcell(struct skill_unit *src, uint16 skill_id, uint16 skill_lv, cell_t cell, bool flag) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_time_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_unitsetmapcell_pre ) { + void (*preHookFunc) (struct skill_unit *src, uint16 *skill_id, uint16 *skill_lv, cell_t *cell, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_time_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetmapcell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unitsetmapcell_pre[hIndex].func; + preHookFunc(src, &skill_id, &skill_lv, &cell, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.get_time(skill_id, skill_lv); + HPMHooks.source.skill.unitsetmapcell(src, skill_id, skill_lv, cell, flag); } - if( HPMHooks.count.HP_skill_get_time_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_time_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_unitsetmapcell_post ) { + void (*postHookFunc) (struct skill_unit *src, uint16 *skill_id, uint16 *skill_lv, cell_t *cell, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetmapcell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unitsetmapcell_post[hIndex].func; + postHookFunc(src, &skill_id, &skill_lv, &cell, &flag); } } - return retVal___; + return; } -int HP_skill_get_time2(uint16 skill_id, uint16 skill_lv) { +int HP_skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_time2_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_unit_onplace_timer_pre ) { + int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_time2_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_onplace_timer_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60000,26 +66471,28 @@ int HP_skill_get_time2(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_time2(skill_id, skill_lv); + retVal___ = HPMHooks.source.skill.unit_onplace_timer(src, bl, tick); } - if( HPMHooks.count.HP_skill_get_time2_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_time2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_unit_onplace_timer_post ) { + int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_onplace_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &tick); } } return retVal___; } -int HP_skill_get_castnodex(uint16 skill_id, uint16 skill_lv) { +int HP_skill_unit_effect(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_castnodex_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_unit_effect_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castnodex_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_castnodex_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_effect_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_unit_effect_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60027,26 +66500,32 @@ int HP_skill_get_castnodex(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_castnodex(skill_id, skill_lv); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.unit_effect(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_get_castnodex_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castnodex_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_castnodex_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_unit_effect_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_effect_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_unit_effect_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_skill_get_delaynodex(uint16 skill_id, uint16 skill_lv) { +int HP_skill_unit_timer_sub_onplace(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_delaynodex_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_unit_timer_sub_onplace_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delaynodex_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_delaynodex_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_onplace_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_onplace_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60054,26 +66533,32 @@ int HP_skill_get_delaynodex(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_delaynodex(skill_id, skill_lv); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.unit_timer_sub_onplace(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_get_delaynodex_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delaynodex_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_delaynodex_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_unit_timer_sub_onplace_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_onplace_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_onplace_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_skill_get_castdef(uint16 skill_id) { +int HP_skill_unit_move_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_castdef_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if( HPMHooks.count.HP_skill_unit_move_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castdef_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_castdef_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_unit_move_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60081,26 +66566,30 @@ int HP_skill_get_castdef(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_castdef(skill_id); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.unit_move_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_get_castdef_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castdef_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_castdef_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_unit_move_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_unit_move_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_skill_get_weapontype(uint16 skill_id) { +int HP_skill_blockpc_end(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_weapontype_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if( HPMHooks.count.HP_skill_blockpc_end_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_weapontype_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_weapontype_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_end_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_blockpc_end_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60108,26 +66597,26 @@ int HP_skill_get_weapontype(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_weapontype(skill_id); + retVal___ = HPMHooks.source.skill.blockpc_end(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_get_weapontype_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_weapontype_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_weapontype_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_blockpc_end_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_end_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_blockpc_end_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_skill_get_ammotype(uint16 skill_id) { +int HP_skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_ammotype_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if( HPMHooks.count.HP_skill_blockhomun_end_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammotype_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_ammotype_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_end_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_blockhomun_end_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60135,26 +66624,26 @@ int HP_skill_get_ammotype(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_ammotype(skill_id); + retVal___ = HPMHooks.source.skill.blockhomun_end(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_get_ammotype_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammotype_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_ammotype_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_blockhomun_end_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_end_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_blockhomun_end_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_skill_get_ammo_qty(uint16 skill_id, uint16 skill_lv) { +int HP_skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_ammo_qty_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_blockmerc_end_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammo_qty_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_ammo_qty_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_end_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_blockmerc_end_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60162,26 +66651,26 @@ int HP_skill_get_ammo_qty(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_ammo_qty(skill_id, skill_lv); + retVal___ = HPMHooks.source.skill.blockmerc_end(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_get_ammo_qty_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammo_qty_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_ammo_qty_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_blockmerc_end_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_end_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_blockmerc_end_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_skill_get_unit_id(uint16 skill_id, int flag) { +int HP_skill_split_atoi(char *str, int *val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_id_pre ) { - int (*preHookFunc) (uint16 *skill_id, int *flag); + if( HPMHooks.count.HP_skill_split_atoi_pre ) { + int (*preHookFunc) (char *str, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_id_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_unit_id_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_split_atoi_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_split_atoi_pre[hIndex].func; + retVal___ = preHookFunc(str, val); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60189,26 +66678,26 @@ int HP_skill_get_unit_id(uint16 skill_id, int flag) { } } { - retVal___ = HPMHooks.source.skill.get_unit_id(skill_id, flag); + retVal___ = HPMHooks.source.skill.split_atoi(str, val); } - if( HPMHooks.count.HP_skill_get_unit_id_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_id_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_unit_id_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &flag); + if( HPMHooks.count.HP_skill_split_atoi_post ) { + int (*postHookFunc) (int retVal___, char *str, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_split_atoi_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_split_atoi_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, val); } } return retVal___; } -int HP_skill_get_inf2(uint16 skill_id) { +int HP_skill_unit_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_inf2_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if( HPMHooks.count.HP_skill_unit_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_inf2_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60216,26 +66705,28 @@ int HP_skill_get_inf2(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_inf2(skill_id); + retVal___ = HPMHooks.source.skill.unit_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_get_inf2_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_inf2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_unit_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_skill_get_castcancel(uint16 skill_id) { +int HP_skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_castcancel_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if( HPMHooks.count.HP_skill_unit_timer_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castcancel_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_castcancel_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60243,53 +66734,56 @@ int HP_skill_get_castcancel(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_castcancel(skill_id); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.unit_timer_sub(key, data, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_get_castcancel_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castcancel_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_castcancel_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_unit_timer_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_skill_get_maxcount(uint16 skill_id, uint16 skill_lv) { +void HP_skill_init_unit_layout(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_maxcount_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_init_unit_layout_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_maxcount_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_maxcount_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_init_unit_layout_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.get_maxcount(skill_id, skill_lv); + HPMHooks.source.skill.init_unit_layout(); } - if( HPMHooks.count.HP_skill_get_maxcount_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_maxcount_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_maxcount_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_init_unit_layout_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_init_unit_layout_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_skill_get_blewcount(uint16 skill_id, uint16 skill_lv) { +bool HP_skill_parse_row_skilldb(char *split[], int columns, int current) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_blewcount_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_parse_row_skilldb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_blewcount_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_blewcount_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_skilldb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_skilldb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60297,26 +66791,26 @@ int HP_skill_get_blewcount(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_blewcount(skill_id, skill_lv); + retVal___ = HPMHooks.source.skill.parse_row_skilldb(split, columns, current); } - if( HPMHooks.count.HP_skill_get_blewcount_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_blewcount_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_blewcount_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_parse_row_skilldb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_skilldb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_skilldb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); } } return retVal___; } -int HP_skill_get_unit_flag(uint16 skill_id) { +bool HP_skill_parse_row_requiredb(char *split[], int columns, int current) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_flag_pre ) { - int (*preHookFunc) (uint16 *skill_id); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_parse_row_requiredb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_flag_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_unit_flag_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_requiredb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_requiredb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60324,26 +66818,26 @@ int HP_skill_get_unit_flag(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_unit_flag(skill_id); + retVal___ = HPMHooks.source.skill.parse_row_requiredb(split, columns, current); } - if( HPMHooks.count.HP_skill_get_unit_flag_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_flag_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_unit_flag_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_parse_row_requiredb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_requiredb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_requiredb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); } } return retVal___; } -int HP_skill_get_unit_target(uint16 skill_id) { +bool HP_skill_parse_row_castdb(char *split[], int columns, int current) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_target_pre ) { - int (*preHookFunc) (uint16 *skill_id); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_parse_row_castdb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_target_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_unit_target_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_castdb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60351,26 +66845,26 @@ int HP_skill_get_unit_target(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_unit_target(skill_id); + retVal___ = HPMHooks.source.skill.parse_row_castdb(split, columns, current); } - if( HPMHooks.count.HP_skill_get_unit_target_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_target_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_unit_target_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_parse_row_castdb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_castdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); } } return retVal___; } -int HP_skill_get_unit_interval(uint16 skill_id) { +bool HP_skill_parse_row_castnodexdb(char *split[], int columns, int current) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_interval_pre ) { - int (*preHookFunc) (uint16 *skill_id); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_parse_row_castnodexdb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_interval_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_unit_interval_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castnodexdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_castnodexdb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60378,26 +66872,26 @@ int HP_skill_get_unit_interval(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_unit_interval(skill_id); + retVal___ = HPMHooks.source.skill.parse_row_castnodexdb(split, columns, current); } - if( HPMHooks.count.HP_skill_get_unit_interval_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_interval_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_unit_interval_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_parse_row_castnodexdb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castnodexdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_castnodexdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); } } return retVal___; } -int HP_skill_get_unit_bl_target(uint16 skill_id) { +bool HP_skill_parse_row_unitdb(char *split[], int columns, int current) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_bl_target_pre ) { - int (*preHookFunc) (uint16 *skill_id); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_parse_row_unitdb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_bl_target_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_unit_bl_target_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_unitdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_unitdb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60405,26 +66899,26 @@ int HP_skill_get_unit_bl_target(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_unit_bl_target(skill_id); + retVal___ = HPMHooks.source.skill.parse_row_unitdb(split, columns, current); } - if( HPMHooks.count.HP_skill_get_unit_bl_target_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_bl_target_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_unit_bl_target_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_parse_row_unitdb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_unitdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_unitdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); } } return retVal___; } -int HP_skill_get_unit_layout_type(uint16 skill_id, uint16 skill_lv) { +bool HP_skill_parse_row_producedb(char *split[], int columns, int current) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_layout_type_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_parse_row_producedb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_type_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_unit_layout_type_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_producedb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_producedb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60432,26 +66926,26 @@ int HP_skill_get_unit_layout_type(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_unit_layout_type(skill_id, skill_lv); + retVal___ = HPMHooks.source.skill.parse_row_producedb(split, columns, current); } - if( HPMHooks.count.HP_skill_get_unit_layout_type_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_type_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_unit_layout_type_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_parse_row_producedb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_producedb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_producedb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); } } return retVal___; } -int HP_skill_get_unit_range(uint16 skill_id, uint16 skill_lv) { +bool HP_skill_parse_row_createarrowdb(char *split[], int columns, int current) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_range_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_parse_row_createarrowdb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_range_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_unit_range_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_createarrowdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_createarrowdb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60459,26 +66953,26 @@ int HP_skill_get_unit_range(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_unit_range(skill_id, skill_lv); + retVal___ = HPMHooks.source.skill.parse_row_createarrowdb(split, columns, current); } - if( HPMHooks.count.HP_skill_get_unit_range_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_range_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_unit_range_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_parse_row_createarrowdb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_createarrowdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_createarrowdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); } } return retVal___; } -int HP_skill_get_cooldown(uint16 skill_id, uint16 skill_lv) { +bool HP_skill_parse_row_abradb(char *split[], int columns, int current) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_cooldown_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_parse_row_abradb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cooldown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_cooldown_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_abradb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_abradb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60486,26 +66980,26 @@ int HP_skill_get_cooldown(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_cooldown(skill_id, skill_lv); + retVal___ = HPMHooks.source.skill.parse_row_abradb(split, columns, current); } - if( HPMHooks.count.HP_skill_get_cooldown_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cooldown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_cooldown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_parse_row_abradb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_abradb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_abradb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); } } return retVal___; } -int HP_skill_tree_get_max(uint16 skill_id, int b_class) { +bool HP_skill_parse_row_spellbookdb(char *split[], int columns, int current) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_tree_get_max_pre ) { - int (*preHookFunc) (uint16 *skill_id, int *b_class); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_parse_row_spellbookdb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); *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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_spellbookdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_spellbookdb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60513,26 +67007,26 @@ 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.parse_row_spellbookdb(split, columns, current); } - if( HPMHooks.count.HP_skill_tree_get_max_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, int *b_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); + if( HPMHooks.count.HP_skill_parse_row_spellbookdb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_spellbookdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_spellbookdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); } } return retVal___; } -const char* HP_skill_get_name(uint16 skill_id) { +bool HP_skill_parse_row_magicmushroomdb(char *split[], int column, int current) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_skill_get_name_pre ) { - const char* (*preHookFunc) (uint16 *skill_id); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_parse_row_magicmushroomdb_pre ) { + bool (*preHookFunc) (char *split[], int *column, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_name_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_name_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_magicmushroomdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_magicmushroomdb_pre[hIndex].func; + retVal___ = preHookFunc(split, &column, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60540,26 +67034,26 @@ const char* HP_skill_get_name(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_name(skill_id); + retVal___ = HPMHooks.source.skill.parse_row_magicmushroomdb(split, column, current); } - if( HPMHooks.count.HP_skill_get_name_post ) { - const char* (*postHookFunc) (const char* retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_name_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_name_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_parse_row_magicmushroomdb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *column, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_magicmushroomdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_magicmushroomdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &column, ¤t); } } return retVal___; } -const char* HP_skill_get_desc(uint16 skill_id) { +bool HP_skill_parse_row_reproducedb(char *split[], int column, int current) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_skill_get_desc_pre ) { - const char* (*preHookFunc) (uint16 *skill_id); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_parse_row_reproducedb_pre ) { + bool (*preHookFunc) (char *split[], int *column, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_desc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_desc_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_reproducedb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_reproducedb_pre[hIndex].func; + retVal___ = preHookFunc(split, &column, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60567,52 +67061,53 @@ const char* HP_skill_get_desc(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_desc(skill_id); + retVal___ = HPMHooks.source.skill.parse_row_reproducedb(split, column, current); } - if( HPMHooks.count.HP_skill_get_desc_post ) { - const char* (*postHookFunc) (const char* retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_desc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_desc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_parse_row_reproducedb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *column, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_reproducedb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_reproducedb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &column, ¤t); } } return retVal___; } -void HP_skill_chk(uint16 *skill_id) { +bool HP_skill_parse_row_improvisedb(char *split[], int columns, int current) { int hIndex = 0; - if( HPMHooks.count.HP_skill_chk_pre ) { - void (*preHookFunc) (uint16 *skill_id); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_parse_row_improvisedb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chk_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_chk_pre[hIndex].func; - preHookFunc(skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_improvisedb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_improvisedb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.chk(skill_id); + retVal___ = HPMHooks.source.skill.parse_row_improvisedb(split, columns, current); } - if( HPMHooks.count.HP_skill_chk_post ) { - void (*postHookFunc) (uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chk_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_chk_post[hIndex].func; - postHookFunc(skill_id); + if( HPMHooks.count.HP_skill_parse_row_improvisedb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_improvisedb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_improvisedb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); } } - return; + return retVal___; } -int HP_skill_get_casttype(uint16 skill_id) { +bool HP_skill_parse_row_changematerialdb(char *split[], int columns, int current) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_casttype_pre ) { - int (*preHookFunc) (uint16 *skill_id); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_parse_row_changematerialdb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_casttype_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_changematerialdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_changematerialdb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60620,107 +67115,104 @@ int HP_skill_get_casttype(uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.get_casttype(skill_id); + retVal___ = HPMHooks.source.skill.parse_row_changematerialdb(split, columns, current); } - if( HPMHooks.count.HP_skill_get_casttype_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_casttype_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_parse_row_changematerialdb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_changematerialdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_changematerialdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); } } return retVal___; } -int HP_skill_get_casttype2(uint16 index) { +void HP_skill_usave_add(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_casttype2_pre ) { - int (*preHookFunc) (uint16 *index); + if( HPMHooks.count.HP_skill_usave_add_pre ) { + void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_casttype2_pre[hIndex].func; - retVal___ = preHookFunc(&index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_usave_add_pre[hIndex].func; + preHookFunc(sd, &skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.get_casttype2(index); + HPMHooks.source.skill.usave_add(sd, skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_casttype2_post ) { - int (*postHookFunc) (int retVal___, uint16 *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_casttype2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &index); + if( HPMHooks.count.HP_skill_usave_add_post ) { + void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_usave_add_post[hIndex].func; + postHookFunc(sd, &skill_id, &skill_lv); } } - return retVal___; + return; } -bool HP_skill_is_combo(int skill_id) { +void HP_skill_usave_trigger(struct map_session_data *sd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_is_combo_pre ) { - bool (*preHookFunc) (int *skill_id); + if( HPMHooks.count.HP_skill_usave_trigger_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_combo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_is_combo_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_trigger_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_usave_trigger_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.is_combo(skill_id); + HPMHooks.source.skill.usave_trigger(sd); } - if( HPMHooks.count.HP_skill_is_combo_post ) { - bool (*postHookFunc) (bool retVal___, int *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_combo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_is_combo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_skill_usave_trigger_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_trigger_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_usave_trigger_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -int HP_skill_name2id(const char *name) { +void HP_skill_cooldown_load(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_name2id_pre ) { - int (*preHookFunc) (const char *name); + if( HPMHooks.count.HP_skill_cooldown_load_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_name2id_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_name2id_pre[hIndex].func; - retVal___ = preHookFunc(name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_cooldown_load_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.name2id(name); + HPMHooks.source.skill.cooldown_load(sd); } - if( HPMHooks.count.HP_skill_name2id_post ) { - int (*postHookFunc) (int retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_name2id_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_name2id_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name); + if( HPMHooks.count.HP_skill_cooldown_load_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_cooldown_load_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -int HP_skill_isammotype(struct map_session_data *sd, int skill_id) { +int HP_skill_spellbook(struct map_session_data *sd, int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_isammotype_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *skill_id); + if( HPMHooks.count.HP_skill_spellbook_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_isammotype_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_spellbook_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_spellbook_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60728,26 +67220,26 @@ int HP_skill_isammotype(struct map_session_data *sd, int skill_id) { } } { - retVal___ = HPMHooks.source.skill.isammotype(sd, skill_id); + retVal___ = HPMHooks.source.skill.spellbook(sd, nameid); } - if( HPMHooks.count.HP_skill_isammotype_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_isammotype_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_id); + if( HPMHooks.count.HP_skill_spellbook_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_spellbook_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_spellbook_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid); } } return retVal___; } -int HP_skill_castend_id(int tid, int64 tick, int id, intptr_t data) { +int HP_skill_block_check(struct block_list *bl, enum sc_type type, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_castend_id_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_skill_block_check_pre ) { + int (*preHookFunc) (struct block_list *bl, enum sc_type *type, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_castend_id_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_block_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_block_check_pre[hIndex].func; + retVal___ = preHookFunc(bl, &type, &skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60755,26 +67247,28 @@ int HP_skill_castend_id(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.skill.castend_id(tid, tick, id, data); + retVal___ = HPMHooks.source.skill.block_check(bl, type, skill_id); } - if( HPMHooks.count.HP_skill_castend_id_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_castend_id_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_skill_block_check_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, enum sc_type *type, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_block_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_block_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &type, &skill_id); } } return retVal___; } -int HP_skill_castend_pos(int tid, int64 tick, int id, intptr_t data) { +int HP_skill_detonator(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_castend_pos_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_skill_detonator_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_castend_pos_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_detonator_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_detonator_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60782,26 +67276,30 @@ int HP_skill_castend_pos(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.skill.castend_pos(tid, tick, id, data); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.detonator(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_castend_pos_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_castend_pos_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_skill_detonator_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_detonator_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_detonator_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; } -int HP_skill_castend_map(struct map_session_data *sd, uint16 skill_id, const char *mapname) { +bool HP_skill_check_camouflage(struct block_list *bl, struct status_change_entry *sce) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_castend_map_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, const char *mapname); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_check_camouflage_pre ) { + bool (*preHookFunc) (struct block_list *bl, struct status_change_entry *sce); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_map_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_castend_map_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id, mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_camouflage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_camouflage_pre[hIndex].func; + retVal___ = preHookFunc(bl, sce); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60809,26 +67307,26 @@ int HP_skill_castend_map(struct map_session_data *sd, uint16 skill_id, const cha } } { - retVal___ = HPMHooks.source.skill.castend_map(sd, skill_id, mapname); + retVal___ = HPMHooks.source.skill.check_camouflage(bl, sce); } - if( HPMHooks.count.HP_skill_castend_map_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, const char *mapname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_map_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_castend_map_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_id, mapname); + if( HPMHooks.count.HP_skill_check_camouflage_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct status_change_entry *sce); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_camouflage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_camouflage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sce); } } return retVal___; } -int HP_skill_cleartimerskill(struct block_list *src) { +int HP_skill_magicdecoy(struct map_session_data *sd, int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_cleartimerskill_pre ) { - int (*preHookFunc) (struct block_list *src); + if( HPMHooks.count.HP_skill_magicdecoy_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_cleartimerskill_pre[hIndex].func; - retVal___ = preHookFunc(src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magicdecoy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_magicdecoy_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60836,26 +67334,26 @@ int HP_skill_cleartimerskill(struct block_list *src) { } } { - retVal___ = HPMHooks.source.skill.cleartimerskill(src); + retVal___ = HPMHooks.source.skill.magicdecoy(sd, nameid); } - if( HPMHooks.count.HP_skill_cleartimerskill_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_cleartimerskill_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src); + if( HPMHooks.count.HP_skill_magicdecoy_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magicdecoy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_magicdecoy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid); } } return retVal___; } -int HP_skill_addtimerskill(struct block_list *src, int64 tick, int target, int x, int y, uint16 skill_id, uint16 skill_lv, int type, int flag) { +int HP_skill_poisoningweapon(struct map_session_data *sd, int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_addtimerskill_pre ) { - int (*preHookFunc) (struct block_list *src, int64 *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag); + if( HPMHooks.count.HP_skill_poisoningweapon_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_addtimerskill_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_addtimerskill_pre[hIndex].func; - retVal___ = preHookFunc(src, &tick, &target, &x, &y, &skill_id, &skill_lv, &type, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_poisoningweapon_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_poisoningweapon_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60863,26 +67361,26 @@ int HP_skill_addtimerskill(struct block_list *src, int64 tick, int target, int x } } { - retVal___ = HPMHooks.source.skill.addtimerskill(src, tick, target, x, y, skill_id, skill_lv, type, flag); + retVal___ = HPMHooks.source.skill.poisoningweapon(sd, nameid); } - if( HPMHooks.count.HP_skill_addtimerskill_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, int64 *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_addtimerskill_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_addtimerskill_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, &tick, &target, &x, &y, &skill_id, &skill_lv, &type, &flag); + if( HPMHooks.count.HP_skill_poisoningweapon_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_poisoningweapon_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_poisoningweapon_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid); } } return retVal___; } -int HP_skill_additional_effect(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int dmg_lv, int64 tick) { +int HP_skill_select_menu(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_additional_effect_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick); + if( HPMHooks.count.HP_skill_select_menu_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_additional_effect_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &attack_type, &dmg_lv, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_select_menu_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_select_menu_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60890,26 +67388,26 @@ int HP_skill_additional_effect(struct block_list *src, struct block_list *bl, ui } } { - retVal___ = HPMHooks.source.skill.additional_effect(src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick); + retVal___ = HPMHooks.source.skill.select_menu(sd, skill_id); } - if( HPMHooks.count.HP_skill_additional_effect_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_additional_effect_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &attack_type, &dmg_lv, &tick); + if( HPMHooks.count.HP_skill_select_menu_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_select_menu_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_select_menu_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id); } } return retVal___; } -int HP_skill_counter_additional_effect(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int64 tick) { +int HP_skill_elementalanalysis(struct map_session_data *sd, int n, uint16 skill_lv, unsigned short *item_list) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_counter_additional_effect_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick); + if( HPMHooks.count.HP_skill_elementalanalysis_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, uint16 *skill_lv, unsigned short *item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &attack_type, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_elementalanalysis_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, &skill_lv, item_list); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60917,26 +67415,26 @@ int HP_skill_counter_additional_effect(struct block_list *src, struct block_list } } { - retVal___ = HPMHooks.source.skill.counter_additional_effect(src, bl, skill_id, skill_lv, attack_type, tick); + retVal___ = HPMHooks.source.skill.elementalanalysis(sd, n, skill_lv, item_list); } - if( HPMHooks.count.HP_skill_counter_additional_effect_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &attack_type, &tick); + if( HPMHooks.count.HP_skill_elementalanalysis_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, uint16 *skill_lv, unsigned short *item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_elementalanalysis_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, &skill_lv, item_list); } } return retVal___; } -int HP_skill_blown(struct block_list *src, struct block_list *target, int count, int8 dir, int flag) { +int HP_skill_changematerial(struct map_session_data *sd, int n, unsigned short *item_list) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_blown_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *target, int *count, int8 *dir, int *flag); + if( HPMHooks.count.HP_skill_changematerial_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_blown_pre[hIndex].func; - retVal___ = preHookFunc(src, target, &count, &dir, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_changematerial_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, item_list); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60944,26 +67442,26 @@ int HP_skill_blown(struct block_list *src, struct block_list *target, int count, } } { - retVal___ = HPMHooks.source.skill.blown(src, target, count, dir, flag); + retVal___ = HPMHooks.source.skill.changematerial(sd, n, item_list); } - if( HPMHooks.count.HP_skill_blown_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int *count, int8 *dir, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_blown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, target, &count, &dir, &flag); + if( HPMHooks.count.HP_skill_changematerial_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_changematerial_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, item_list); } } return retVal___; } -int HP_skill_break_equip(struct block_list *bl, unsigned short where, int rate, int flag) { +int HP_skill_get_elemental_type(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_break_equip_pre ) { - int (*preHookFunc) (struct block_list *bl, unsigned short *where, int *rate, int *flag); + if( HPMHooks.count.HP_skill_get_elemental_type_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_break_equip_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_break_equip_pre[hIndex].func; - retVal___ = preHookFunc(bl, &where, &rate, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_elemental_type_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_elemental_type_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60971,53 +67469,52 @@ int HP_skill_break_equip(struct block_list *bl, unsigned short where, int rate, } } { - retVal___ = HPMHooks.source.skill.break_equip(bl, where, rate, flag); + retVal___ = HPMHooks.source.skill.get_elemental_type(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_break_equip_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned short *where, int *rate, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_break_equip_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_break_equip_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &where, &rate, &flag); + if( HPMHooks.count.HP_skill_get_elemental_type_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_elemental_type_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_elemental_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); } } return retVal___; } -int HP_skill_strip_equip(struct block_list *bl, unsigned short where, int rate, int lv, int time) { +void HP_skill_cooldown_save(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_strip_equip_pre ) { - int (*preHookFunc) (struct block_list *bl, unsigned short *where, int *rate, int *lv, int *time); + if( HPMHooks.count.HP_skill_cooldown_save_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_strip_equip_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_strip_equip_pre[hIndex].func; - retVal___ = preHookFunc(bl, &where, &rate, &lv, &time); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_cooldown_save_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.strip_equip(bl, where, rate, lv, time); + HPMHooks.source.skill.cooldown_save(sd); } - if( HPMHooks.count.HP_skill_strip_equip_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned short *where, int *rate, int *lv, int *time); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_strip_equip_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_strip_equip_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &where, &rate, &lv, &time); + if( HPMHooks.count.HP_skill_cooldown_save_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_cooldown_save_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -struct skill_unit_group* HP_skill_id2group(int group_id) { +int HP_skill_get_new_group_id(void) { int hIndex = 0; - struct skill_unit_group* retVal___ = NULL; - if( HPMHooks.count.HP_skill_id2group_pre ) { - struct skill_unit_group* (*preHookFunc) (int *group_id); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_get_new_group_id_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_id2group_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_id2group_pre[hIndex].func; - retVal___ = preHookFunc(&group_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_new_group_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_new_group_id_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61025,26 +67522,26 @@ struct skill_unit_group* HP_skill_id2group(int group_id) { } } { - retVal___ = HPMHooks.source.skill.id2group(group_id); + retVal___ = HPMHooks.source.skill.get_new_group_id(); } - if( HPMHooks.count.HP_skill_id2group_post ) { - struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, int *group_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_id2group_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_id2group_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &group_id); + if( HPMHooks.count.HP_skill_get_new_group_id_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_new_group_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_new_group_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -struct skill_unit_group* HP_skill_unitsetting(struct block_list *src, uint16 skill_id, uint16 skill_lv, short x, short y, int flag) { +bool HP_skill_check_shadowform(struct block_list *bl, int64 damage, int hit) { int hIndex = 0; - struct skill_unit_group* retVal___ = NULL; - if( HPMHooks.count.HP_skill_unitsetting_pre ) { - struct skill_unit_group* (*preHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *flag); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_check_shadowform_pre ) { + bool (*preHookFunc) (struct block_list *bl, int64 *damage, int *hit); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_unitsetting_pre[hIndex].func; - retVal___ = preHookFunc(src, &skill_id, &skill_lv, &x, &y, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_shadowform_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_shadowform_pre[hIndex].func; + retVal___ = preHookFunc(bl, &damage, &hit); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61052,26 +67549,26 @@ struct skill_unit_group* HP_skill_unitsetting(struct block_list *src, uint16 ski } } { - retVal___ = HPMHooks.source.skill.unitsetting(src, skill_id, skill_lv, x, y, flag); + retVal___ = HPMHooks.source.skill.check_shadowform(bl, damage, hit); } - if( HPMHooks.count.HP_skill_unitsetting_post ) { - struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, struct block_list *src, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_unitsetting_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, &skill_id, &skill_lv, &x, &y, &flag); + if( HPMHooks.count.HP_skill_check_shadowform_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *bl, int64 *damage, int *hit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_shadowform_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_shadowform_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &damage, &hit); } } return retVal___; } -struct skill_unit* HP_skill_initunit(struct skill_unit_group *group, int idx, int x, int y, int val1, int val2) { +bool HP_skill_castend_damage_id_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_data *tstatus, struct status_change *sc) { int hIndex = 0; - struct skill_unit* retVal___ = NULL; - if( HPMHooks.count.HP_skill_initunit_pre ) { - struct skill_unit* (*preHookFunc) (struct skill_unit_group *group, int *idx, int *x, int *y, int *val1, int *val2); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_castend_damage_id_unknown_pre ) { + bool (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_data *tstatus, struct status_change *sc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_initunit_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_initunit_pre[hIndex].func; - retVal___ = preHookFunc(group, &idx, &x, &y, &val1, &val2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_damage_id_unknown_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, skill_id, skill_lv, tick, flag, tstatus, sc); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61079,161 +67576,156 @@ struct skill_unit* HP_skill_initunit(struct skill_unit_group *group, int idx, in } } { - retVal___ = HPMHooks.source.skill.initunit(group, idx, x, y, val1, val2); + retVal___ = HPMHooks.source.skill.castend_damage_id_unknown(src, bl, skill_id, skill_lv, tick, flag, tstatus, sc); } - if( HPMHooks.count.HP_skill_initunit_post ) { - struct skill_unit* (*postHookFunc) (struct skill_unit* retVal___, struct skill_unit_group *group, int *idx, int *x, int *y, int *val1, int *val2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_initunit_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_initunit_post[hIndex].func; - retVal___ = postHookFunc(retVal___, group, &idx, &x, &y, &val1, &val2); + if( HPMHooks.count.HP_skill_castend_damage_id_unknown_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_data *tstatus, struct status_change *sc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_damage_id_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag, tstatus, sc); } } return retVal___; } -int HP_skill_delunit(struct skill_unit *su) { +void HP_skill_additional_effect_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_delunit_pre ) { - int (*preHookFunc) (struct skill_unit *su); + if( HPMHooks.count.HP_skill_additional_effect_unknown_pre ) { + void (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delunit_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_delunit_pre[hIndex].func; - retVal___ = preHookFunc(su); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_additional_effect_unknown_pre[hIndex].func; + preHookFunc(src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.delunit(su); + HPMHooks.source.skill.additional_effect_unknown(src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick); } - if( HPMHooks.count.HP_skill_delunit_post ) { - int (*postHookFunc) (int retVal___, struct skill_unit *su); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delunit_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_delunit_post[hIndex].func; - retVal___ = postHookFunc(retVal___, su); + if( HPMHooks.count.HP_skill_additional_effect_unknown_post ) { + void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_additional_effect_unknown_post[hIndex].func; + postHookFunc(src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick); } } - return retVal___; + return; } -struct skill_unit_group* HP_skill_init_unitgroup(struct block_list *src, int count, uint16 skill_id, uint16 skill_lv, int unit_id, int limit, int interval) { +void HP_skill_counter_additional_effect_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick) { int hIndex = 0; - struct skill_unit_group* retVal___ = NULL; - if( HPMHooks.count.HP_skill_init_unitgroup_pre ) { - struct skill_unit_group* (*preHookFunc) (struct block_list *src, int *count, uint16 *skill_id, uint16 *skill_lv, int *unit_id, int *limit, int *interval); + if( HPMHooks.count.HP_skill_counter_additional_effect_unknown_pre ) { + void (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unitgroup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_init_unitgroup_pre[hIndex].func; - retVal___ = preHookFunc(src, &count, &skill_id, &skill_lv, &unit_id, &limit, &interval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_unknown_pre[hIndex].func; + preHookFunc(src, bl, skill_id, skill_lv, attack_type, tick); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.init_unitgroup(src, count, skill_id, skill_lv, unit_id, limit, interval); + HPMHooks.source.skill.counter_additional_effect_unknown(src, bl, skill_id, skill_lv, attack_type, tick); } - if( HPMHooks.count.HP_skill_init_unitgroup_post ) { - struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, struct block_list *src, int *count, uint16 *skill_id, uint16 *skill_lv, int *unit_id, int *limit, int *interval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unitgroup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_init_unitgroup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, &count, &skill_id, &skill_lv, &unit_id, &limit, &interval); + if( HPMHooks.count.HP_skill_counter_additional_effect_unknown_post ) { + void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_unknown_post[hIndex].func; + postHookFunc(src, bl, skill_id, skill_lv, attack_type, tick); } } - return retVal___; + return; } -int HP_skill_del_unitgroup(struct skill_unit_group *group, const char *file, int line, const char *func) { +void HP_skill_attack_combo1_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_change_entry *sce, int *combo) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_del_unitgroup_pre ) { - int (*preHookFunc) (struct skill_unit_group *group, const char *file, int *line, const char *func); + if( HPMHooks.count.HP_skill_attack_combo1_unknown_pre ) { + void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_change_entry *sce, int *combo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_del_unitgroup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_del_unitgroup_pre[hIndex].func; - retVal___ = preHookFunc(group, file, &line, func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo1_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_attack_combo1_unknown_pre[hIndex].func; + preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, sce, combo); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.del_unitgroup(group, file, line, func); + HPMHooks.source.skill.attack_combo1_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, sce, combo); } - if( HPMHooks.count.HP_skill_del_unitgroup_post ) { - int (*postHookFunc) (int retVal___, struct skill_unit_group *group, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_del_unitgroup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_del_unitgroup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, group, file, &line, func); + if( HPMHooks.count.HP_skill_attack_combo1_unknown_post ) { + void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_change_entry *sce, int *combo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo1_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_attack_combo1_unknown_post[hIndex].func; + postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, sce, combo); } } - return retVal___; + return; } -int HP_skill_clear_unitgroup(struct block_list *src) { +void HP_skill_attack_combo2_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *combo) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_clear_unitgroup_pre ) { - int (*preHookFunc) (struct block_list *src); + if( HPMHooks.count.HP_skill_attack_combo2_unknown_pre ) { + void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *combo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_unitgroup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_clear_unitgroup_pre[hIndex].func; - retVal___ = preHookFunc(src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo2_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_attack_combo2_unknown_pre[hIndex].func; + preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, combo); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.clear_unitgroup(src); + HPMHooks.source.skill.attack_combo2_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, combo); } - if( HPMHooks.count.HP_skill_clear_unitgroup_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_unitgroup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_clear_unitgroup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src); + if( HPMHooks.count.HP_skill_attack_combo2_unknown_post ) { + void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *combo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo2_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_attack_combo2_unknown_post[hIndex].func; + postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, combo); } } - return retVal___; + return; } -int HP_skill_clear_group(struct block_list *bl, int flag) { +void HP_skill_attack_display_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_clear_group_pre ) { - int (*preHookFunc) (struct block_list *bl, int *flag); + if( HPMHooks.count.HP_skill_attack_display_unknown_pre ) { + void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_group_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_clear_group_pre[hIndex].func; - retVal___ = preHookFunc(bl, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_display_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_attack_display_unknown_pre[hIndex].func; + preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.clear_group(bl, flag); + HPMHooks.source.skill.attack_display_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage); } - if( HPMHooks.count.HP_skill_clear_group_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_group_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_clear_group_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &flag); + if( HPMHooks.count.HP_skill_attack_display_unknown_post ) { + void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_display_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_attack_display_unknown_post[hIndex].func; + postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage); } } - return retVal___; + return; } -int HP_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 tick) { +int HP_skill_attack_copy_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_onplace_pre ) { - int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); + if( HPMHooks.count.HP_skill_attack_copy_unknown_pre ) { + int (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_unit_onplace_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_copy_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_attack_copy_unknown_pre[hIndex].func; + retVal___ = preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61241,26 +67733,26 @@ int HP_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 t } } { - retVal___ = HPMHooks.source.skill.unit_onplace(src, bl, tick); + retVal___ = HPMHooks.source.skill.attack_copy_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_unit_onplace_post ) { - int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_unit_onplace_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, &tick); + if( HPMHooks.count.HP_skill_attack_copy_unknown_post ) { + int (*postHookFunc) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_copy_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_attack_copy_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } } return retVal___; } -int HP_skill_unit_ondamaged(struct skill_unit *src, struct block_list *bl, int64 damage, int64 tick) { +int HP_skill_attack_dir_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_ondamaged_pre ) { - int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *damage, int64 *tick); + if( HPMHooks.count.HP_skill_attack_dir_unknown_pre ) { + int (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_ondamaged_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_unit_ondamaged_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, &damage, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_dir_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_attack_dir_unknown_pre[hIndex].func; + retVal___ = preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61268,80 +67760,78 @@ int HP_skill_unit_ondamaged(struct skill_unit *src, struct block_list *bl, int64 } } { - retVal___ = HPMHooks.source.skill.unit_ondamaged(src, bl, damage, tick); + retVal___ = HPMHooks.source.skill.attack_dir_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_unit_ondamaged_post ) { - int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 *damage, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_ondamaged_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_unit_ondamaged_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, &damage, &tick); + if( HPMHooks.count.HP_skill_attack_dir_unknown_post ) { + int (*postHookFunc) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_dir_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_attack_dir_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } } return retVal___; } -int HP_skill_cast_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { +void HP_skill_attack_blow_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_cast_fix_pre ) { - int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_attack_blow_unknown_pre ) { + void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_cast_fix_pre[hIndex].func; - retVal___ = preHookFunc(bl, &skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_blow_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_attack_blow_unknown_pre[hIndex].func; + preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage, dir); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.cast_fix(bl, skill_id, skill_lv); + HPMHooks.source.skill.attack_blow_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage, dir); } - if( HPMHooks.count.HP_skill_cast_fix_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_cast_fix_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_attack_blow_unknown_post ) { + void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_blow_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_attack_blow_unknown_post[hIndex].func; + postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage, dir); } } - return retVal___; + return; } -int HP_skill_cast_fix_sc(struct block_list *bl, int time) { +void HP_skill_attack_post_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_cast_fix_sc_pre ) { - int (*preHookFunc) (struct block_list *bl, int *time); + if( HPMHooks.count.HP_skill_attack_post_unknown_pre ) { + void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_sc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_cast_fix_sc_pre[hIndex].func; - retVal___ = preHookFunc(bl, &time); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_attack_post_unknown_pre[hIndex].func; + preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.cast_fix_sc(bl, time); + HPMHooks.source.skill.attack_post_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_cast_fix_sc_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int *time); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_sc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_cast_fix_sc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &time); + if( HPMHooks.count.HP_skill_attack_post_unknown_post ) { + void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_attack_post_unknown_post[hIndex].func; + postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } } - return retVal___; + return; } -int HP_skill_vf_cast_fix(struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv) { +bool HP_skill_timerskill_dead_unknown(struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_vf_cast_fix_pre ) { - int (*preHookFunc) (struct block_list *bl, double *time, uint16 *skill_id, uint16 *skill_lv); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_timerskill_dead_unknown_pre ) { + bool (*preHookFunc) (struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_vf_cast_fix_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_vf_cast_fix_pre[hIndex].func; - retVal___ = preHookFunc(bl, &time, &skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_dead_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_timerskill_dead_unknown_pre[hIndex].func; + retVal___ = preHookFunc(src, ud, skl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61349,80 +67839,78 @@ int HP_skill_vf_cast_fix(struct block_list *bl, double time, uint16 skill_id, ui } } { - retVal___ = HPMHooks.source.skill.vf_cast_fix(bl, time, skill_id, skill_lv); + retVal___ = HPMHooks.source.skill.timerskill_dead_unknown(src, ud, skl); } - if( HPMHooks.count.HP_skill_vf_cast_fix_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, double *time, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_vf_cast_fix_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_vf_cast_fix_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &time, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_timerskill_dead_unknown_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_dead_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_timerskill_dead_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, ud, skl); } } return retVal___; } -int HP_skill_delay_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { +void HP_skill_timerskill_target_unknown(int tid, int64 tick, struct block_list *src, struct block_list *target, struct unit_data *ud, struct skill_timerskill *skl) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_delay_fix_pre ) { - int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_timerskill_target_unknown_pre ) { + void (*preHookFunc) (int *tid, int64 *tick, struct block_list *src, struct block_list *target, struct unit_data *ud, struct skill_timerskill *skl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delay_fix_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_delay_fix_pre[hIndex].func; - retVal___ = preHookFunc(bl, &skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_target_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_timerskill_target_unknown_pre[hIndex].func; + preHookFunc(&tid, &tick, src, target, ud, skl); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.delay_fix(bl, skill_id, skill_lv); + HPMHooks.source.skill.timerskill_target_unknown(tid, tick, src, target, ud, skl); } - if( HPMHooks.count.HP_skill_delay_fix_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delay_fix_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_delay_fix_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_timerskill_target_unknown_post ) { + void (*postHookFunc) (int *tid, int64 *tick, struct block_list *src, struct block_list *target, struct unit_data *ud, struct skill_timerskill *skl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_target_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_timerskill_target_unknown_post[hIndex].func; + postHookFunc(&tid, &tick, src, target, ud, skl); } } - return retVal___; + return; } -int HP_skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { +void HP_skill_timerskill_notarget_unknown(int tid, int64 tick, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castbegin_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_skill_timerskill_notarget_unknown_pre ) { + void (*preHookFunc) (int *tid, int64 *tick, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_notarget_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_timerskill_notarget_unknown_pre[hIndex].func; + preHookFunc(&tid, &tick, src, ud, skl); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.check_condition_castbegin(sd, skill_id, skill_lv); + HPMHooks.source.skill.timerskill_notarget_unknown(tid, tick, src, ud, skl); } - if( HPMHooks.count.HP_skill_check_condition_castbegin_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_timerskill_notarget_unknown_post ) { + void (*postHookFunc) (int *tid, int64 *tick, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_notarget_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_timerskill_notarget_unknown_post[hIndex].func; + postHookFunc(&tid, &tick, src, ud, skl); } } - return retVal___; + return; } -int HP_skill_check_condition_castend(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { +bool HP_skill_cleartimerskill_exception(int skill_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castend_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_cleartimerskill_exception_pre ) { + bool (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_check_condition_castend_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_exception_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_cleartimerskill_exception_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61430,26 +67918,26 @@ int HP_skill_check_condition_castend(struct map_session_data *sd, uint16 skill_i } } { - retVal___ = HPMHooks.source.skill.check_condition_castend(sd, skill_id, skill_lv); + retVal___ = HPMHooks.source.skill.cleartimerskill_exception(skill_id); } - if( HPMHooks.count.HP_skill_check_condition_castend_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_check_condition_castend_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_cleartimerskill_exception_post ) { + bool (*postHookFunc) (bool retVal___, int *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_exception_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_cleartimerskill_exception_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } return retVal___; } -int HP_skill_consume_requirement(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, short type) { +bool HP_skill_castend_id_unknown(struct unit_data *ud, struct block_list *src, struct block_list *target) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_consume_requirement_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, short *type); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_castend_id_unknown_pre ) { + bool (*preHookFunc) (struct unit_data *ud, struct block_list *src, struct block_list *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_consume_requirement_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_consume_requirement_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id, &skill_lv, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_id_unknown_pre[hIndex].func; + retVal___ = preHookFunc(ud, src, target); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61457,27 +67945,26 @@ int HP_skill_consume_requirement(struct map_session_data *sd, uint16 skill_id, u } } { - retVal___ = HPMHooks.source.skill.consume_requirement(sd, skill_id, skill_lv, type); + retVal___ = HPMHooks.source.skill.castend_id_unknown(ud, src, target); } - if( HPMHooks.count.HP_skill_consume_requirement_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, short *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_consume_requirement_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_consume_requirement_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv, &type); + if( HPMHooks.count.HP_skill_castend_id_unknown_post ) { + bool (*postHookFunc) (bool retVal___, struct unit_data *ud, struct block_list *src, struct block_list *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_id_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ud, src, target); } } return retVal___; } -struct skill_condition HP_skill_get_requirement(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { +bool HP_skill_castend_nodamage_id_dead_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; - struct skill_condition retVal___; - memset(&retVal___, '\0', sizeof(struct skill_condition)); - if( HPMHooks.count.HP_skill_get_requirement_pre ) { - struct skill_condition (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_pre ) { + bool (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_requirement_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_dead_unknown_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, skill_id, skill_lv, tick, flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61485,26 +67972,26 @@ struct skill_condition HP_skill_get_requirement(struct map_session_data *sd, uin } } { - retVal___ = HPMHooks.source.skill.get_requirement(sd, skill_id, skill_lv); + retVal___ = HPMHooks.source.skill.castend_nodamage_id_dead_unknown(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_get_requirement_post ) { - struct skill_condition (*postHookFunc) (struct skill_condition retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_requirement_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv); + if( HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_dead_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); } } return retVal___; } -int HP_skill_check_pc_partner(struct map_session_data *sd, uint16 skill_id, uint16 *skill_lv, int range, int cast_flag) { +bool HP_skill_castend_nodamage_id_undead_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_pc_partner_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, int *range, int *cast_flag); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_pre ) { + bool (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_pc_partner_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_check_pc_partner_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id, skill_lv, &range, &cast_flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_undead_unknown_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, skill_id, skill_lv, tick, flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61512,26 +67999,26 @@ int HP_skill_check_pc_partner(struct map_session_data *sd, uint16 skill_id, uint } } { - retVal___ = HPMHooks.source.skill.check_pc_partner(sd, skill_id, skill_lv, range, cast_flag); + retVal___ = HPMHooks.source.skill.castend_nodamage_id_undead_unknown(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_check_pc_partner_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, int *range, int *cast_flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_pc_partner_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_check_pc_partner_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_id, skill_lv, &range, &cast_flag); + if( HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_undead_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); } } return retVal___; } -int HP_skill_unit_move(struct block_list *bl, int64 tick, int flag) { +bool HP_skill_castend_nodamage_id_mado_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_move_pre ) { - int (*preHookFunc) (struct block_list *bl, int64 *tick, int *flag); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_pre ) { + bool (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_unit_move_pre[hIndex].func; - retVal___ = preHookFunc(bl, &tick, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_mado_unknown_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, skill_id, skill_lv, tick, flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61539,26 +68026,26 @@ int HP_skill_unit_move(struct block_list *bl, int64 tick, int flag) { } } { - retVal___ = HPMHooks.source.skill.unit_move(bl, tick, flag); + retVal___ = HPMHooks.source.skill.castend_nodamage_id_mado_unknown(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_unit_move_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_unit_move_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &tick, &flag); + if( HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_mado_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); } } return retVal___; } -int HP_skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) { +bool HP_skill_castend_nodamage_id_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_onleft_pre ) { - int (*preHookFunc) (uint16 *skill_id, struct block_list *bl, int64 *tick); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_castend_nodamage_id_unknown_pre ) { + bool (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onleft_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_unit_onleft_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, bl, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_unknown_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, skill_id, skill_lv, tick, flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61566,53 +68053,52 @@ int HP_skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) { } } { - retVal___ = HPMHooks.source.skill.unit_onleft(skill_id, bl, tick); + retVal___ = HPMHooks.source.skill.castend_nodamage_id_unknown(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_unit_onleft_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, struct block_list *bl, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onleft_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_unit_onleft_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, bl, &tick); + if( HPMHooks.count.HP_skill_castend_nodamage_id_unknown_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); } } return retVal___; } -int HP_skill_unit_onout(struct skill_unit *src, struct block_list *bl, int64 tick) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_onout_pre ) { - int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); +void HP_skill_castend_pos2_effect_unknown(struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_castend_pos2_effect_unknown_pre ) { + void (*preHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onout_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_unit_onout_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_effect_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_pos2_effect_unknown_pre[hIndex].func; + preHookFunc(src, x, y, skill_id, skill_lv, tick, flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.unit_onout(src, bl, tick); + HPMHooks.source.skill.castend_pos2_effect_unknown(src, x, y, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_unit_onout_post ) { - int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onout_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_unit_onout_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, &tick); + if( HPMHooks.count.HP_skill_castend_pos2_effect_unknown_post ) { + void (*postHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_effect_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_pos2_effect_unknown_post[hIndex].func; + postHookFunc(src, x, y, skill_id, skill_lv, tick, flag); } } - return retVal___; + return; } -int HP_skill_unit_move_unit_group(struct skill_unit_group *group, int16 m, int16 dx, int16 dy) { +bool HP_skill_castend_pos2_unknown(struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_move_unit_group_pre ) { - int (*preHookFunc) (struct skill_unit_group *group, int16 *m, int16 *dx, int16 *dy); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_castend_pos2_unknown_pre ) { + bool (*preHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_unit_group_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_unit_move_unit_group_pre[hIndex].func; - retVal___ = preHookFunc(group, &m, &dx, &dy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_pos2_unknown_pre[hIndex].func; + retVal___ = preHookFunc(src, x, y, skill_id, skill_lv, tick, flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61620,52 +68106,51 @@ int HP_skill_unit_move_unit_group(struct skill_unit_group *group, int16 m, int16 } } { - retVal___ = HPMHooks.source.skill.unit_move_unit_group(group, m, dx, dy); + retVal___ = HPMHooks.source.skill.castend_pos2_unknown(src, x, y, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_unit_move_unit_group_post ) { - int (*postHookFunc) (int retVal___, struct skill_unit_group *group, int16 *m, int16 *dx, int16 *dy); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_unit_group_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_unit_move_unit_group_post[hIndex].func; - retVal___ = postHookFunc(retVal___, group, &m, &dx, &dy); + if( HPMHooks.count.HP_skill_castend_pos2_unknown_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_pos2_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, x, y, skill_id, skill_lv, tick, flag); } } return retVal___; } -int HP_skill_sit(struct map_session_data *sd, int type) { +void HP_skill_unitsetting1_unknown(struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *val1, int *val2, int *val3) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_sit_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + if( HPMHooks.count.HP_skill_unitsetting1_unknown_pre ) { + void (*preHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *val1, int *val2, int *val3); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_sit_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting1_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unitsetting1_unknown_pre[hIndex].func; + preHookFunc(src, skill_id, skill_lv, x, y, flag, val1, val2, val3); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.sit(sd, type); + HPMHooks.source.skill.unitsetting1_unknown(src, skill_id, skill_lv, x, y, flag, val1, val2, val3); } - if( HPMHooks.count.HP_skill_sit_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_sit_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type); + if( HPMHooks.count.HP_skill_unitsetting1_unknown_post ) { + void (*postHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *val1, int *val2, int *val3); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting1_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unitsetting1_unknown_post[hIndex].func; + postHookFunc(src, skill_id, skill_lv, x, y, flag, val1, val2, val3); } } - return retVal___; + return; } -void HP_skill_brandishspear(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { +void HP_skill_unitsetting2_unknown(struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *unit_flag, int *val1, int *val2, int *val3, struct skill_unit_group *group) { int hIndex = 0; - if( HPMHooks.count.HP_skill_brandishspear_pre ) { - void (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if( HPMHooks.count.HP_skill_unitsetting2_unknown_pre ) { + void (*preHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *unit_flag, int *val1, int *val2, int *val3, struct skill_unit_group *group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_brandishspear_pre[hIndex].func; - preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting2_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unitsetting2_unknown_pre[hIndex].func; + preHookFunc(src, skill_id, skill_lv, x, y, flag, unit_flag, val1, val2, val3, group); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61673,25 +68158,25 @@ void HP_skill_brandishspear(struct block_list *src, struct block_list *bl, uint1 } } { - HPMHooks.source.skill.brandishspear(src, bl, skill_id, skill_lv, tick, flag); + HPMHooks.source.skill.unitsetting2_unknown(src, skill_id, skill_lv, x, y, flag, unit_flag, val1, val2, val3, group); } - if( HPMHooks.count.HP_skill_brandishspear_post ) { - void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_brandishspear_post[hIndex].func; - postHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag); + if( HPMHooks.count.HP_skill_unitsetting2_unknown_post ) { + void (*postHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *unit_flag, int *val1, int *val2, int *val3, struct skill_unit_group *group); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting2_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unitsetting2_unknown_post[hIndex].func; + postHookFunc(src, skill_id, skill_lv, x, y, flag, unit_flag, val1, val2, val3, group); } } return; } -void HP_skill_repairweapon(struct map_session_data *sd, int idx) { +void HP_skill_unit_onplace_unknown(struct skill_unit *src, struct block_list *bl, int64 *tick) { int hIndex = 0; - if( HPMHooks.count.HP_skill_repairweapon_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *idx); + if( HPMHooks.count.HP_skill_unit_onplace_unknown_pre ) { + void (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_repairweapon_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_repairweapon_pre[hIndex].func; - preHookFunc(sd, &idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_onplace_unknown_pre[hIndex].func; + preHookFunc(src, bl, tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61699,78 +68184,80 @@ void HP_skill_repairweapon(struct map_session_data *sd, int idx) { } } { - HPMHooks.source.skill.repairweapon(sd, idx); + HPMHooks.source.skill.unit_onplace_unknown(src, bl, tick); } - if( HPMHooks.count.HP_skill_repairweapon_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_repairweapon_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_repairweapon_post[hIndex].func; - postHookFunc(sd, &idx); + if( HPMHooks.count.HP_skill_unit_onplace_unknown_post ) { + void (*postHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_onplace_unknown_post[hIndex].func; + postHookFunc(src, bl, tick); } } return; } -void HP_skill_identify(struct map_session_data *sd, int idx) { +int HP_skill_check_condition_castbegin_off_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_skill_identify_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *idx); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_pre ) { + int (*preHookFunc) (struct status_change *sc, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_identify_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_identify_pre[hIndex].func; - preHookFunc(sd, &idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_off_unknown_pre[hIndex].func; + retVal___ = preHookFunc(sc, skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.identify(sd, idx); + retVal___ = HPMHooks.source.skill.check_condition_castbegin_off_unknown(sc, skill_id); } - if( HPMHooks.count.HP_skill_identify_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_identify_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_identify_post[hIndex].func; - postHookFunc(sd, &idx); + if( HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_post ) { + int (*postHookFunc) (int retVal___, struct status_change *sc, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_off_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sc, skill_id); } } - return; + return retVal___; } -void HP_skill_weaponrefine(struct map_session_data *sd, int idx) { +int HP_skill_check_condition_castbegin_mount_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_skill_weaponrefine_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *idx); + int retVal___ = 0; + if( HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_pre ) { + int (*preHookFunc) (struct status_change *sc, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_weaponrefine_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_weaponrefine_pre[hIndex].func; - preHookFunc(sd, &idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_mount_unknown_pre[hIndex].func; + retVal___ = preHookFunc(sc, skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.weaponrefine(sd, idx); + retVal___ = HPMHooks.source.skill.check_condition_castbegin_mount_unknown(sc, skill_id); } - if( HPMHooks.count.HP_skill_weaponrefine_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_weaponrefine_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_weaponrefine_post[hIndex].func; - postHookFunc(sd, &idx); + if( HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_post ) { + int (*postHookFunc) (int retVal___, struct status_change *sc, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_mount_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sc, skill_id); } } - return; + return retVal___; } -int HP_skill_autospell(struct map_session_data *md, uint16 skill_id) { +int HP_skill_check_condition_castbegin_madogear_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_autospell_pre ) { - int (*preHookFunc) (struct map_session_data *md, uint16 *skill_id); + if( HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_pre ) { + int (*preHookFunc) (struct status_change *sc, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_autospell_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_autospell_pre[hIndex].func; - retVal___ = preHookFunc(md, &skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_madogear_unknown_pre[hIndex].func; + retVal___ = preHookFunc(sc, skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61778,26 +68265,26 @@ int HP_skill_autospell(struct map_session_data *md, uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.autospell(md, skill_id); + retVal___ = HPMHooks.source.skill.check_condition_castbegin_madogear_unknown(sc, skill_id); } - if( HPMHooks.count.HP_skill_autospell_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *md, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_autospell_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_autospell_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &skill_id); + if( HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_post ) { + int (*postHookFunc) (int retVal___, struct status_change *sc, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_madogear_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sc, skill_id); } } return retVal___; } -int HP_skill_calc_heal(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, bool heal) { +int HP_skill_check_condition_castbegin_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_calc_heal_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, bool *heal); + if( HPMHooks.count.HP_skill_check_condition_castbegin_unknown_pre ) { + int (*preHookFunc) (struct status_change *sc, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_calc_heal_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_calc_heal_pre[hIndex].func; - retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &heal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_unknown_pre[hIndex].func; + retVal___ = preHookFunc(sc, skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61805,55 +68292,52 @@ int HP_skill_calc_heal(struct block_list *src, struct block_list *target, uint16 } } { - retVal___ = HPMHooks.source.skill.calc_heal(src, target, skill_id, skill_lv, heal); + retVal___ = HPMHooks.source.skill.check_condition_castbegin_unknown(sc, skill_id); } - if( HPMHooks.count.HP_skill_calc_heal_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, bool *heal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_calc_heal_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_calc_heal_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &heal); + if( HPMHooks.count.HP_skill_check_condition_castbegin_unknown_post ) { + int (*postHookFunc) (int retVal___, struct status_change *sc, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sc, skill_id); } } return retVal___; } -bool HP_skill_check_cloaking(struct block_list *bl, struct status_change_entry *sce) { +void HP_skill_check_condition_castend_unknown(struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_check_cloaking_pre ) { - bool (*preHookFunc) (struct block_list *bl, struct status_change_entry *sce); + if( HPMHooks.count.HP_skill_check_condition_castend_unknown_pre ) { + void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_check_cloaking_pre[hIndex].func; - retVal___ = preHookFunc(bl, sce); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_condition_castend_unknown_pre[hIndex].func; + preHookFunc(sd, skill_id, skill_lv); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.check_cloaking(bl, sce); + HPMHooks.source.skill.check_condition_castend_unknown(sd, skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_check_cloaking_post ) { - bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct status_change_entry *sce); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_check_cloaking_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sce); + if( HPMHooks.count.HP_skill_check_condition_castend_unknown_post ) { + void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_condition_castend_unknown_post[hIndex].func; + postHookFunc(sd, skill_id, skill_lv); } } - return retVal___; + return; } -int HP_skill_check_cloaking_end(struct block_list *bl, va_list ap) { +bool HP_skill_get_requirement_off_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_cloaking_end_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + bool retVal___ = false; + if( HPMHooks.count.HP_skill_get_requirement_off_unknown_pre ) { + bool (*preHookFunc) (struct status_change *sc, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_check_cloaking_end_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_off_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_requirement_off_unknown_pre[hIndex].func; + retVal___ = preHookFunc(sc, skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61861,30 +68345,26 @@ int HP_skill_check_cloaking_end(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.check_cloaking_end(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.skill.get_requirement_off_unknown(sc, skill_id); } - if( HPMHooks.count.HP_skill_check_cloaking_end_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_check_cloaking_end_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_skill_get_requirement_off_unknown_post ) { + bool (*postHookFunc) (bool retVal___, struct status_change *sc, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_off_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_requirement_off_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sc, skill_id); } } return retVal___; } -bool HP_skill_can_cloak(struct map_session_data *sd) { +bool HP_skill_get_requirement_item_unknown(struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, uint16 *idx, int *i) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_can_cloak_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_skill_get_requirement_item_unknown_pre ) { + bool (*preHookFunc) (struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, uint16 *idx, int *i); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_can_cloak_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_item_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_requirement_item_unknown_pre[hIndex].func; + retVal___ = preHookFunc(sc, sd, skill_id, skill_lv, idx, i); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61892,107 +68372,105 @@ bool HP_skill_can_cloak(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.skill.can_cloak(sd); + retVal___ = HPMHooks.source.skill.get_requirement_item_unknown(sc, sd, skill_id, skill_lv, idx, i); } - if( HPMHooks.count.HP_skill_can_cloak_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_can_cloak_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_skill_get_requirement_item_unknown_post ) { + bool (*postHookFunc) (bool retVal___, struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, uint16 *idx, int *i); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_item_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_requirement_item_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sc, sd, skill_id, skill_lv, idx, i); } } return retVal___; } -int HP_skill_enchant_elemental_end(struct block_list *bl, int type) { +void HP_skill_get_requirement_unknown(struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, struct skill_condition *req) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_enchant_elemental_end_pre ) { - int (*preHookFunc) (struct block_list *bl, int *type); + if( HPMHooks.count.HP_skill_get_requirement_unknown_pre ) { + void (*preHookFunc) (struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, struct skill_condition *req); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_enchant_elemental_end_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_enchant_elemental_end_pre[hIndex].func; - retVal___ = preHookFunc(bl, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_unknown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_requirement_unknown_pre[hIndex].func; + preHookFunc(sc, sd, skill_id, skill_lv, req); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.enchant_elemental_end(bl, type); + HPMHooks.source.skill.get_requirement_unknown(sc, sd, skill_id, skill_lv, req); } - if( HPMHooks.count.HP_skill_enchant_elemental_end_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_enchant_elemental_end_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_enchant_elemental_end_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &type); + if( HPMHooks.count.HP_skill_get_requirement_unknown_post ) { + void (*postHookFunc) (struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, struct skill_condition *req); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_unknown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_requirement_unknown_post[hIndex].func; + postHookFunc(sc, sd, skill_id, skill_lv, req); } } - return retVal___; + return; } -int HP_skill_not_ok(uint16 skill_id, struct map_session_data *sd) { +/* sockt */ +void HP_sockt_init(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_not_ok_pre ) { - int (*preHookFunc) (uint16 *skill_id, struct map_session_data *sd); + if( HPMHooks.count.HP_sockt_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_not_ok_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.not_ok(skill_id, sd); + HPMHooks.source.sockt.init(); } - if( HPMHooks.count.HP_skill_not_ok_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_not_ok_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, sd); + if( HPMHooks.count.HP_sockt_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_init_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_skill_not_ok_hom(uint16 skill_id, struct homun_data *hd) { +void HP_sockt_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_not_ok_hom_pre ) { - int (*preHookFunc) (uint16 *skill_id, struct homun_data *hd); + if( HPMHooks.count.HP_sockt_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_not_ok_hom_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.not_ok_hom(skill_id, hd); + HPMHooks.source.sockt.final(); } - if( HPMHooks.count.HP_skill_not_ok_hom_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_not_ok_hom_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, hd); + if( HPMHooks.count.HP_sockt_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_skill_not_ok_mercenary(uint16 skill_id, struct mercenary_data *md) { +int HP_sockt_perform(int next) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_not_ok_mercenary_pre ) { - int (*preHookFunc) (uint16 *skill_id, struct mercenary_data *md); + if( HPMHooks.count.HP_sockt_perform_pre ) { + int (*preHookFunc) (int *next); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_mercenary_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_not_ok_mercenary_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_perform_pre[hIndex].func; + retVal___ = preHookFunc(&next); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62000,28 +68478,52 @@ int HP_skill_not_ok_mercenary(uint16 skill_id, struct mercenary_data *md) { } } { - retVal___ = HPMHooks.source.skill.not_ok_mercenary(skill_id, md); + retVal___ = HPMHooks.source.sockt.perform(next); } - if( HPMHooks.count.HP_skill_not_ok_mercenary_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_mercenary_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_not_ok_mercenary_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, md); + if( HPMHooks.count.HP_sockt_perform_post ) { + int (*postHookFunc) (int retVal___, int *next); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_perform_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &next); } } return retVal___; } -int HP_skill_chastle_mob_changetarget(struct block_list *bl, va_list ap) { +void HP_sockt_datasync(int fd, bool send) { + int hIndex = 0; + if( HPMHooks.count.HP_sockt_datasync_pre ) { + void (*preHookFunc) (int *fd, bool *send); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_datasync_pre[hIndex].func; + preHookFunc(&fd, &send); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.datasync(fd, send); + } + if( HPMHooks.count.HP_sockt_datasync_post ) { + void (*postHookFunc) (int *fd, bool *send); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_datasync_post[hIndex].func; + postHookFunc(&fd, &send); + } + } + return; +} +int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_chastle_mob_changetarget_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_sockt_make_listen_bind_pre ) { + int (*preHookFunc) (uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chastle_mob_changetarget_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_chastle_mob_changetarget_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_pre[hIndex].func; + retVal___ = preHookFunc(&ip, &port); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62029,30 +68531,26 @@ int HP_skill_chastle_mob_changetarget(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.chastle_mob_changetarget(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.sockt.make_listen_bind(ip, port); } - if( HPMHooks.count.HP_skill_chastle_mob_changetarget_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chastle_mob_changetarget_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_chastle_mob_changetarget_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_sockt_make_listen_bind_post ) { + int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip, &port); } } return retVal___; } -int HP_skill_can_produce_mix(struct map_session_data *sd, int nameid, int trigger, int qty) { +int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_can_produce_mix_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *trigger, int *qty); + if( HPMHooks.count.HP_sockt_make_connection_pre ) { + int (*preHookFunc) (uint32 *ip, uint16 *port, struct hSockOpt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_produce_mix_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_can_produce_mix_pre[hIndex].func; - retVal___ = preHookFunc(sd, &nameid, &trigger, &qty); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_make_connection_pre[hIndex].func; + retVal___ = preHookFunc(&ip, &port, opt); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62060,26 +68558,26 @@ int HP_skill_can_produce_mix(struct map_session_data *sd, int nameid, int trigge } } { - retVal___ = HPMHooks.source.skill.can_produce_mix(sd, nameid, trigger, qty); + retVal___ = HPMHooks.source.sockt.make_connection(ip, port, opt); } - if( HPMHooks.count.HP_skill_can_produce_mix_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid, int *trigger, int *qty); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_produce_mix_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_can_produce_mix_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &nameid, &trigger, &qty); + if( HPMHooks.count.HP_sockt_make_connection_post ) { + int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port, struct hSockOpt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_make_connection_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip, &port, opt); } } return retVal___; } -int HP_skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, int slot1, int slot2, int slot3, int qty) { +int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_produce_mix_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *nameid, int *slot1, int *slot2, int *slot3, int *qty); + if( HPMHooks.count.HP_sockt_realloc_fifo_pre ) { + int (*preHookFunc) (int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_produce_mix_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_produce_mix_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id, &nameid, &slot1, &slot2, &slot3, &qty); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &rfifo_size, &wfifo_size); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62087,26 +68585,26 @@ int HP_skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int namei } } { - retVal___ = HPMHooks.source.skill.produce_mix(sd, skill_id, nameid, slot1, slot2, slot3, qty); + retVal___ = HPMHooks.source.sockt.realloc_fifo(fd, rfifo_size, wfifo_size); } - if( HPMHooks.count.HP_skill_produce_mix_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, int *nameid, int *slot1, int *slot2, int *slot3, int *qty); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_produce_mix_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_produce_mix_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_id, &nameid, &slot1, &slot2, &slot3, &qty); + if( HPMHooks.count.HP_sockt_realloc_fifo_post ) { + int (*postHookFunc) (int retVal___, int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &rfifo_size, &wfifo_size); } } return retVal___; } -int HP_skill_arrow_create(struct map_session_data *sd, int nameid) { +int HP_sockt_realloc_writefifo(int fd, size_t addition) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_arrow_create_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *nameid); + if( HPMHooks.count.HP_sockt_realloc_writefifo_pre ) { + int (*preHookFunc) (int *fd, size_t *addition); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_arrow_create_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_arrow_create_pre[hIndex].func; - retVal___ = preHookFunc(sd, &nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &addition); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62114,26 +68612,26 @@ int HP_skill_arrow_create(struct map_session_data *sd, int nameid) { } } { - retVal___ = HPMHooks.source.skill.arrow_create(sd, nameid); + retVal___ = HPMHooks.source.sockt.realloc_writefifo(fd, addition); } - if( HPMHooks.count.HP_skill_arrow_create_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_arrow_create_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_arrow_create_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &nameid); + if( HPMHooks.count.HP_sockt_realloc_writefifo_post ) { + int (*postHookFunc) (int retVal___, int *fd, size_t *addition); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &addition); } } return retVal___; } -int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { +int HP_sockt_wfifoset(int fd, size_t len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_castend_nodamage_id_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if( HPMHooks.count.HP_sockt_wfifoset_pre ) { + int (*preHookFunc) (int *fd, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_wfifoset_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &len); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62141,26 +68639,26 @@ int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, } } { - retVal___ = HPMHooks.source.skill.castend_nodamage_id(src, bl, skill_id, skill_lv, tick, flag); + retVal___ = HPMHooks.source.sockt.wfifoset(fd, len); } - if( HPMHooks.count.HP_skill_castend_nodamage_id_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &tick, &flag); + if( HPMHooks.count.HP_sockt_wfifoset_post ) { + int (*postHookFunc) (int retVal___, int *fd, size_t *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_wfifoset_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &len); } } return retVal___; } -int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { +int HP_sockt_rfifoskip(int fd, size_t len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_castend_damage_id_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if( HPMHooks.count.HP_sockt_rfifoskip_pre ) { + int (*preHookFunc) (int *fd, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_castend_damage_id_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_rfifoskip_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &len); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62168,53 +68666,52 @@ int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, ui } } { - retVal___ = HPMHooks.source.skill.castend_damage_id(src, bl, skill_id, skill_lv, tick, flag); + retVal___ = HPMHooks.source.sockt.rfifoskip(fd, len); } - if( HPMHooks.count.HP_skill_castend_damage_id_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_castend_damage_id_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &tick, &flag); + if( HPMHooks.count.HP_sockt_rfifoskip_post ) { + int (*postHookFunc) (int retVal___, int *fd, size_t *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_rfifoskip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &len); } } return retVal___; } -int HP_skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { +void HP_sockt_close(int fd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_castend_pos2_pre ) { - int (*preHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if( HPMHooks.count.HP_sockt_close_pre ) { + void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_castend_pos2_pre[hIndex].func; - retVal___ = preHookFunc(src, &x, &y, &skill_id, &skill_lv, &tick, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_close_pre[hIndex].func; + preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.castend_pos2(src, x, y, skill_id, skill_lv, tick, flag); + HPMHooks.source.sockt.close(fd); } - if( HPMHooks.count.HP_skill_castend_pos2_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_castend_pos2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, &x, &y, &skill_id, &skill_lv, &tick, &flag); + if( HPMHooks.count.HP_sockt_close_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_close_post[hIndex].func; + postHookFunc(&fd); } } - return retVal___; + return; } -int HP_skill_blockpc_start(struct map_session_data *sd, uint16 skill_id, int tick) { +bool HP_sockt_session_is_valid(int fd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockpc_start_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *tick); + bool retVal___ = false; + if( HPMHooks.count.HP_sockt_session_is_valid_pre ) { + bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_start_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_blockpc_start_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_session_is_valid_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62222,26 +68719,26 @@ int HP_skill_blockpc_start(struct map_session_data *sd, uint16 skill_id, int tic } } { - retVal___ = HPMHooks.source.skill.blockpc_start(sd, skill_id, tick); + retVal___ = HPMHooks.source.sockt.session_is_valid(fd); } - if( HPMHooks.count.HP_skill_blockpc_start_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, int *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_start_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_blockpc_start_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_id, &tick); + if( HPMHooks.count.HP_sockt_session_is_valid_post ) { + bool (*postHookFunc) (bool retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_session_is_valid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } return retVal___; } -int HP_skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { +bool HP_sockt_session_is_active(int fd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockhomun_start_pre ) { - int (*preHookFunc) (struct homun_data *hd, uint16 *skill_id, int *tick); + bool retVal___ = false; + if( HPMHooks.count.HP_sockt_session_is_active_pre ) { + bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_start_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_blockhomun_start_pre[hIndex].func; - retVal___ = preHookFunc(hd, &skill_id, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_session_is_active_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62249,146 +68746,130 @@ int HP_skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) } } { - retVal___ = HPMHooks.source.skill.blockhomun_start(hd, skill_id, tick); + retVal___ = HPMHooks.source.sockt.session_is_active(fd); } - if( HPMHooks.count.HP_skill_blockhomun_start_post ) { - int (*postHookFunc) (int retVal___, struct homun_data *hd, uint16 *skill_id, int *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_start_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_blockhomun_start_post[hIndex].func; - retVal___ = postHookFunc(retVal___, hd, &skill_id, &tick); + if( HPMHooks.count.HP_sockt_session_is_active_post ) { + bool (*postHookFunc) (bool retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_session_is_active_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); } } return retVal___; } -int HP_skill_blockmerc_start(struct mercenary_data *md, uint16 skill_id, int tick) { +void HP_sockt_flush(int fd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockmerc_start_pre ) { - int (*preHookFunc) (struct mercenary_data *md, uint16 *skill_id, int *tick); + if( HPMHooks.count.HP_sockt_flush_pre ) { + void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_start_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_blockmerc_start_pre[hIndex].func; - retVal___ = preHookFunc(md, &skill_id, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_flush_pre[hIndex].func; + preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.blockmerc_start(md, skill_id, tick); + HPMHooks.source.sockt.flush(fd); } - if( HPMHooks.count.HP_skill_blockmerc_start_post ) { - int (*postHookFunc) (int retVal___, struct mercenary_data *md, uint16 *skill_id, int *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_start_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_blockmerc_start_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &skill_id, &tick); + if( HPMHooks.count.HP_sockt_flush_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_flush_post[hIndex].func; + postHookFunc(&fd); } } - return retVal___; + return; } -int HP_skill_attack(int attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { +void HP_sockt_flush_fifos(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_attack_pre ) { - int (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if( HPMHooks.count.HP_sockt_flush_fifos_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_attack_pre[hIndex].func; - retVal___ = preHookFunc(&attack_type, src, dsrc, bl, &skill_id, &skill_lv, &tick, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_flush_fifos_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.attack(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); + HPMHooks.source.sockt.flush_fifos(); } - if( HPMHooks.count.HP_skill_attack_post ) { - int (*postHookFunc) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_attack_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &attack_type, src, dsrc, bl, &skill_id, &skill_lv, &tick, &flag); + if( HPMHooks.count.HP_sockt_flush_fifos_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_flush_fifos_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_skill_attack_area(struct block_list *bl, va_list ap) { +void HP_sockt_set_nonblocking(int fd, unsigned long yes) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_attack_area_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_sockt_set_nonblocking_pre ) { + void (*preHookFunc) (int *fd, unsigned long *yes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_area_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_attack_area_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_pre[hIndex].func; + preHookFunc(&fd, &yes); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.attack_area(bl, ap___copy); - va_end(ap___copy); + HPMHooks.source.sockt.set_nonblocking(fd, yes); } - if( HPMHooks.count.HP_skill_attack_area_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_area_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_attack_area_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_sockt_set_nonblocking_post ) { + void (*postHookFunc) (int *fd, unsigned long *yes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_post[hIndex].func; + postHookFunc(&fd, &yes); } } - return retVal___; + return; } -int HP_skill_area_sub(struct block_list *bl, va_list ap) { +void HP_sockt_set_defaultparse(ParseFunc defaultparse) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_area_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_sockt_set_defaultparse_pre ) { + void (*preHookFunc) (ParseFunc *defaultparse); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_area_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_pre[hIndex].func; + preHookFunc(&defaultparse); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.area_sub(bl, ap___copy); - va_end(ap___copy); + HPMHooks.source.sockt.set_defaultparse(defaultparse); } - if( HPMHooks.count.HP_skill_area_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_area_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_sockt_set_defaultparse_post ) { + void (*postHookFunc) (ParseFunc *defaultparse); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_post[hIndex].func; + postHookFunc(&defaultparse); } } - return retVal___; + return; } -int HP_skill_area_sub_count(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { +uint32 HP_sockt_host2ip(const char *hostname) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_area_sub_count_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + uint32 retVal___ = 0; + if( HPMHooks.count.HP_sockt_host2ip_pre ) { + uint32 (*preHookFunc) (const char *hostname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_count_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_area_sub_count_pre[hIndex].func; - retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &tick, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_host2ip_pre[hIndex].func; + retVal___ = preHookFunc(hostname); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62396,26 +68877,26 @@ int HP_skill_area_sub_count(struct block_list *src, struct block_list *target, u } } { - retVal___ = HPMHooks.source.skill.area_sub_count(src, target, skill_id, skill_lv, tick, flag); + retVal___ = HPMHooks.source.sockt.host2ip(hostname); } - if( HPMHooks.count.HP_skill_area_sub_count_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_count_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_area_sub_count_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &tick, &flag); + if( HPMHooks.count.HP_sockt_host2ip_post ) { + uint32 (*postHookFunc) (uint32 retVal___, const char *hostname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_host2ip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hostname); } } return retVal___; } -int HP_skill_check_unit_range(struct block_list *bl, int x, int y, uint16 skill_id, uint16 skill_lv) { +const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_unit_range_pre ) { - int (*preHookFunc) (struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sockt_ip2str_pre ) { + const char* (*preHookFunc) (uint32 *ip, char *ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_check_unit_range_pre[hIndex].func; - retVal___ = preHookFunc(bl, &x, &y, &skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_ip2str_pre[hIndex].func; + retVal___ = preHookFunc(&ip, ip_str); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62423,28 +68904,26 @@ int HP_skill_check_unit_range(struct block_list *bl, int x, int y, uint16 skill_ } } { - retVal___ = HPMHooks.source.skill.check_unit_range(bl, x, y, skill_id, skill_lv); + retVal___ = HPMHooks.source.sockt.ip2str(ip, ip_str); } - if( HPMHooks.count.HP_skill_check_unit_range_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_check_unit_range_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &x, &y, &skill_id, &skill_lv); + if( HPMHooks.count.HP_sockt_ip2str_post ) { + const char* (*postHookFunc) (const char* retVal___, uint32 *ip, char *ip_str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_ip2str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip, ip_str); } } return retVal___; } -int HP_skill_check_unit_range_sub(struct block_list *bl, va_list ap) { +uint32 HP_sockt_str2ip(const char *ip_str) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_unit_range_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + uint32 retVal___ = 0; + if( HPMHooks.count.HP_sockt_str2ip_pre ) { + uint32 (*preHookFunc) (const char *ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_check_unit_range_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_str2ip_pre[hIndex].func; + retVal___ = preHookFunc(ip_str); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62452,30 +68931,26 @@ int HP_skill_check_unit_range_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.check_unit_range_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.sockt.str2ip(ip_str); } - if( HPMHooks.count.HP_skill_check_unit_range_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_check_unit_range_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_sockt_str2ip_post ) { + uint32 (*postHookFunc) (uint32 retVal___, const char *ip_str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_str2ip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ip_str); } } return retVal___; } -int HP_skill_check_unit_range2(struct block_list *bl, int x, int y, uint16 skill_id, uint16 skill_lv) { +uint16 HP_sockt_ntows(uint16 netshort) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_unit_range2_pre ) { - int (*preHookFunc) (struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); + uint16 retVal___ = 0; + if( HPMHooks.count.HP_sockt_ntows_pre ) { + uint16 (*preHookFunc) (uint16 *netshort); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_check_unit_range2_pre[hIndex].func; - retVal___ = preHookFunc(bl, &x, &y, &skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_ntows_pre[hIndex].func; + retVal___ = preHookFunc(&netshort); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62483,28 +68958,26 @@ int HP_skill_check_unit_range2(struct block_list *bl, int x, int y, uint16 skill } } { - retVal___ = HPMHooks.source.skill.check_unit_range2(bl, x, y, skill_id, skill_lv); + retVal___ = HPMHooks.source.sockt.ntows(netshort); } - if( HPMHooks.count.HP_skill_check_unit_range2_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_check_unit_range2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &x, &y, &skill_id, &skill_lv); + if( HPMHooks.count.HP_sockt_ntows_post ) { + uint16 (*postHookFunc) (uint16 retVal___, uint16 *netshort); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_ntows_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &netshort); } } return retVal___; } -int HP_skill_check_unit_range2_sub(struct block_list *bl, va_list ap) { +int HP_sockt_getips(uint32 *ips, int max) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_unit_range2_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_sockt_getips_pre ) { + int (*preHookFunc) (uint32 *ips, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_check_unit_range2_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_getips_pre[hIndex].func; + retVal___ = preHookFunc(ips, &max); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62512,29 +68985,25 @@ int HP_skill_check_unit_range2_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.check_unit_range2_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.sockt.getips(ips, max); } - if( HPMHooks.count.HP_skill_check_unit_range2_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_check_unit_range2_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_sockt_getips_post ) { + int (*postHookFunc) (int retVal___, uint32 *ips, int *max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_getips_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ips, &max); } } return retVal___; } -void HP_skill_toggle_magicpower(struct block_list *bl, uint16 skill_id) { +void HP_sockt_eof(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_skill_toggle_magicpower_pre ) { - void (*preHookFunc) (struct block_list *bl, uint16 *skill_id); + if( HPMHooks.count.HP_sockt_eof_pre ) { + void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_toggle_magicpower_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_toggle_magicpower_pre[hIndex].func; - preHookFunc(bl, &skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_eof_pre[hIndex].func; + preHookFunc(&fd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62542,26 +69011,26 @@ void HP_skill_toggle_magicpower(struct block_list *bl, uint16 skill_id) { } } { - HPMHooks.source.skill.toggle_magicpower(bl, skill_id); + HPMHooks.source.sockt.eof(fd); } - if( HPMHooks.count.HP_skill_toggle_magicpower_post ) { - void (*postHookFunc) (struct block_list *bl, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_toggle_magicpower_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_toggle_magicpower_post[hIndex].func; - postHookFunc(bl, &skill_id); + if( HPMHooks.count.HP_sockt_eof_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_eof_post[hIndex].func; + postHookFunc(&fd); } } return; } -int HP_skill_magic_reflect(struct block_list *src, struct block_list *bl, int type) { +uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_magic_reflect_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *bl, int *type); + uint32 retVal___ = 0; + if( HPMHooks.count.HP_sockt_lan_subnet_check_pre ) { + uint32 (*preHookFunc) (uint32 *ip, struct s_subnet *info); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magic_reflect_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_magic_reflect_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_pre[hIndex].func; + retVal___ = preHookFunc(&ip, info); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62569,26 +69038,26 @@ int HP_skill_magic_reflect(struct block_list *src, struct block_list *bl, int ty } } { - retVal___ = HPMHooks.source.skill.magic_reflect(src, bl, type); + retVal___ = HPMHooks.source.sockt.lan_subnet_check(ip, info); } - if( HPMHooks.count.HP_skill_magic_reflect_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magic_reflect_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_magic_reflect_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, &type); + if( HPMHooks.count.HP_sockt_lan_subnet_check_post ) { + uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip, struct s_subnet *info); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip, info); } } return retVal___; } -int HP_skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint16 skill_id, int64 tick) { +bool HP_sockt_allowed_ip_check(uint32 ip) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_onskillusage_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, uint16 *skill_id, int64 *tick); + bool retVal___ = false; + if( HPMHooks.count.HP_sockt_allowed_ip_check_pre ) { + bool (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_onskillusage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_onskillusage_pre[hIndex].func; - retVal___ = preHookFunc(sd, bl, &skill_id, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_pre[hIndex].func; + retVal___ = preHookFunc(&ip); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62596,28 +69065,26 @@ int HP_skill_onskillusage(struct map_session_data *sd, struct block_list *bl, ui } } { - retVal___ = HPMHooks.source.skill.onskillusage(sd, bl, skill_id, tick); + retVal___ = HPMHooks.source.sockt.allowed_ip_check(ip); } - if( HPMHooks.count.HP_skill_onskillusage_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl, uint16 *skill_id, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_onskillusage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_onskillusage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, bl, &skill_id, &tick); + if( HPMHooks.count.HP_sockt_allowed_ip_check_post ) { + bool (*postHookFunc) (bool retVal___, uint32 *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip); } } return retVal___; } -int HP_skill_cell_overlap(struct block_list *bl, va_list ap) { +bool HP_sockt_trusted_ip_check(uint32 ip) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_cell_overlap_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + bool retVal___ = false; + if( HPMHooks.count.HP_sockt_trusted_ip_check_pre ) { + bool (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cell_overlap_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_cell_overlap_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_pre[hIndex].func; + retVal___ = preHookFunc(&ip); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62625,30 +69092,26 @@ int HP_skill_cell_overlap(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.cell_overlap(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.sockt.trusted_ip_check(ip); } - if( HPMHooks.count.HP_skill_cell_overlap_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cell_overlap_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_cell_overlap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_sockt_trusted_ip_check_post ) { + bool (*postHookFunc) (bool retVal___, uint32 *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ip); } } return retVal___; } -int HP_skill_timerskill(int tid, int64 tick, int id, intptr_t data) { +int HP_sockt_net_config_read_sub(config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_timerskill_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_sockt_net_config_read_sub_pre ) { + int (*preHookFunc) (config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_timerskill_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_pre[hIndex].func; + retVal___ = preHookFunc(t, list, count, filename, groupname); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62656,59 +69119,53 @@ int HP_skill_timerskill(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.skill.timerskill(tid, tick, id, data); + retVal___ = HPMHooks.source.sockt.net_config_read_sub(t, list, count, filename, groupname); } - if( HPMHooks.count.HP_skill_timerskill_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_timerskill_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_sockt_net_config_read_sub_post ) { + int (*postHookFunc) (int retVal___, config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, t, list, count, filename, groupname); } } return retVal___; } -int HP_skill_trap_splash(struct block_list *bl, va_list ap) { +void HP_sockt_net_config_read(const char *filename) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_trap_splash_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_sockt_net_config_read_pre ) { + void (*preHookFunc) (const char *filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_splash_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_trap_splash_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sockt_net_config_read_pre[hIndex].func; + preHookFunc(filename); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.trap_splash(bl, ap___copy); - va_end(ap___copy); + HPMHooks.source.sockt.net_config_read(filename); } - if( HPMHooks.count.HP_skill_trap_splash_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_splash_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_trap_splash_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_sockt_net_config_read_post ) { + void (*postHookFunc) (const char *filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sockt_net_config_read_post[hIndex].func; + postHookFunc(filename); } } - return retVal___; + return; } -int HP_skill_check_condition_mercenary(struct block_list *bl, int skill_id, int lv, int type) { +/* SQL */ +int HP_SQL_Connect(Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_mercenary_pre ) { - int (*preHookFunc) (struct block_list *bl, int *skill_id, int *lv, int *type); + if( HPMHooks.count.HP_SQL_Connect_pre ) { + int (*preHookFunc) (Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mercenary_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_check_condition_mercenary_pre[hIndex].func; - retVal___ = preHookFunc(bl, &skill_id, &lv, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_Connect_pre[hIndex].func; + retVal___ = preHookFunc(self, user, passwd, host, &port, db); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62716,26 +69173,26 @@ int HP_skill_check_condition_mercenary(struct block_list *bl, int skill_id, int } } { - retVal___ = HPMHooks.source.skill.check_condition_mercenary(bl, skill_id, lv, type); + retVal___ = HPMHooks.source.SQL.Connect(self, user, passwd, host, port, db); } - if( HPMHooks.count.HP_skill_check_condition_mercenary_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int *skill_id, int *lv, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mercenary_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_check_condition_mercenary_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &skill_id, &lv, &type); + if( HPMHooks.count.HP_SQL_Connect_post ) { + int (*postHookFunc) (int retVal___, Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_Connect_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, user, passwd, host, &port, db); } } return retVal___; } -struct skill_unit_group* HP_skill_locate_element_field(struct block_list *bl) { +int HP_SQL_GetTimeout(Sql *self, uint32 *out_timeout) { int hIndex = 0; - struct skill_unit_group* retVal___ = NULL; - if( HPMHooks.count.HP_skill_locate_element_field_pre ) { - struct skill_unit_group* (*preHookFunc) (struct block_list *bl); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_GetTimeout_pre ) { + int (*preHookFunc) (Sql *self, uint32 *out_timeout); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_locate_element_field_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_locate_element_field_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_GetTimeout_pre[hIndex].func; + retVal___ = preHookFunc(self, out_timeout); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62743,28 +69200,26 @@ struct skill_unit_group* HP_skill_locate_element_field(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.skill.locate_element_field(bl); + retVal___ = HPMHooks.source.SQL.GetTimeout(self, out_timeout); } - if( HPMHooks.count.HP_skill_locate_element_field_post ) { - struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_locate_element_field_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_locate_element_field_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_SQL_GetTimeout_post ) { + int (*postHookFunc) (int retVal___, Sql *self, uint32 *out_timeout); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_GetTimeout_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, out_timeout); } } return retVal___; } -int HP_skill_graffitiremover(struct block_list *bl, va_list ap) { +int HP_SQL_GetColumnNames(Sql *self, const char *table, char *out_buf, size_t buf_len, char sep) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_graffitiremover_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_SQL_GetColumnNames_pre ) { + int (*preHookFunc) (Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_graffitiremover_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_graffitiremover_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_pre[hIndex].func; + retVal___ = preHookFunc(self, table, out_buf, &buf_len, &sep); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62772,32 +69227,26 @@ int HP_skill_graffitiremover(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.graffitiremover(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.SQL.GetColumnNames(self, table, out_buf, buf_len, sep); } - if( HPMHooks.count.HP_skill_graffitiremover_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_graffitiremover_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_graffitiremover_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_SQL_GetColumnNames_post ) { + int (*postHookFunc) (int retVal___, Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, table, out_buf, &buf_len, &sep); } } return retVal___; } -int HP_skill_activate_reverberation(struct block_list *bl, va_list ap) { +int HP_SQL_SetEncoding(Sql *self, const char *encoding) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_activate_reverberation_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_SQL_SetEncoding_pre ) { + int (*preHookFunc) (Sql *self, const char *encoding); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_activate_reverberation_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_activate_reverberation_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_SetEncoding_pre[hIndex].func; + retVal___ = preHookFunc(self, encoding); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62805,32 +69254,26 @@ int HP_skill_activate_reverberation(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.activate_reverberation(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.SQL.SetEncoding(self, encoding); } - if( HPMHooks.count.HP_skill_activate_reverberation_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_activate_reverberation_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_activate_reverberation_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_SQL_SetEncoding_post ) { + int (*postHookFunc) (int retVal___, Sql *self, const char *encoding); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_SetEncoding_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, encoding); } } return retVal___; } -int HP_skill_dance_overlap_sub(struct block_list *bl, va_list ap) { +int HP_SQL_Ping(Sql *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_dance_overlap_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_SQL_Ping_pre ) { + int (*preHookFunc) (Sql *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_dance_overlap_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_Ping_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62838,30 +69281,26 @@ int HP_skill_dance_overlap_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.dance_overlap_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.SQL.Ping(self); } - if( HPMHooks.count.HP_skill_dance_overlap_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_dance_overlap_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_SQL_Ping_post ) { + int (*postHookFunc) (int retVal___, Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_Ping_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -int HP_skill_dance_overlap(struct skill_unit *su, int flag) { +size_t HP_SQL_EscapeString(Sql *self, char *out_to, const char *from) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_dance_overlap_pre ) { - int (*preHookFunc) (struct skill_unit *su, int *flag); + size_t retVal___ = 0; + if( HPMHooks.count.HP_SQL_EscapeString_pre ) { + size_t (*preHookFunc) (Sql *self, char *out_to, const char *from); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_dance_overlap_pre[hIndex].func; - retVal___ = preHookFunc(su, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_EscapeString_pre[hIndex].func; + retVal___ = preHookFunc(self, out_to, from); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62869,26 +69308,26 @@ int HP_skill_dance_overlap(struct skill_unit *su, int flag) { } } { - retVal___ = HPMHooks.source.skill.dance_overlap(su, flag); + retVal___ = HPMHooks.source.SQL.EscapeString(self, out_to, from); } - if( HPMHooks.count.HP_skill_dance_overlap_post ) { - int (*postHookFunc) (int retVal___, struct skill_unit *su, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_dance_overlap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, su, &flag); + if( HPMHooks.count.HP_SQL_EscapeString_post ) { + size_t (*postHookFunc) (size_t retVal___, Sql *self, char *out_to, const char *from); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_EscapeString_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, out_to, from); } } return retVal___; } -struct s_skill_unit_layout* HP_skill_get_unit_layout(uint16 skill_id, uint16 skill_lv, struct block_list *src, int x, int y) { +size_t HP_SQL_EscapeStringLen(Sql *self, char *out_to, const char *from, size_t from_len) { int hIndex = 0; - struct s_skill_unit_layout* retVal___ = NULL; - if( HPMHooks.count.HP_skill_get_unit_layout_pre ) { - struct s_skill_unit_layout* (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv, struct block_list *src, int *x, int *y); + size_t retVal___ = 0; + if( HPMHooks.count.HP_SQL_EscapeStringLen_pre ) { + size_t (*preHookFunc) (Sql *self, char *out_to, const char *from, size_t *from_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_unit_layout_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv, src, &x, &y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_pre[hIndex].func; + retVal___ = preHookFunc(self, out_to, from, &from_len); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62896,28 +69335,28 @@ struct s_skill_unit_layout* HP_skill_get_unit_layout(uint16 skill_id, uint16 ski } } { - retVal___ = HPMHooks.source.skill.get_unit_layout(skill_id, skill_lv, src, x, y); + retVal___ = HPMHooks.source.SQL.EscapeStringLen(self, out_to, from, from_len); } - if( HPMHooks.count.HP_skill_get_unit_layout_post ) { - struct s_skill_unit_layout* (*postHookFunc) (struct s_skill_unit_layout* retVal___, uint16 *skill_id, uint16 *skill_lv, struct block_list *src, int *x, int *y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_unit_layout_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv, src, &x, &y); + if( HPMHooks.count.HP_SQL_EscapeStringLen_post ) { + size_t (*postHookFunc) (size_t retVal___, Sql *self, char *out_to, const char *from, size_t *from_len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, out_to, from, &from_len); } } return retVal___; } -int HP_skill_frostjoke_scream(struct block_list *bl, va_list ap) { +int HP_SQL_QueryV(Sql *self, const char *query, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_frostjoke_scream_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_SQL_QueryV_pre ) { + int (*preHookFunc) (Sql *self, const char *query, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_frostjoke_scream_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_frostjoke_scream_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_SQL_QueryV_pre[hIndex].func; + retVal___ = preHookFunc(self, query, args___copy); + va_end(args___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62925,32 +69364,30 @@ int HP_skill_frostjoke_scream(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.frostjoke_scream(bl, ap___copy); - va_end(ap___copy); + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.SQL.QueryV(self, query, args___copy); + va_end(args___copy); } - if( HPMHooks.count.HP_skill_frostjoke_scream_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_frostjoke_scream_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_frostjoke_scream_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_SQL_QueryV_post ) { + int (*postHookFunc) (int retVal___, Sql *self, const char *query, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_SQL_QueryV_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, query, args___copy); + va_end(args___copy); } } return retVal___; } -int HP_skill_greed(struct block_list *bl, va_list ap) { +int HP_SQL_QueryStr(Sql *self, const char *query) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_greed_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_SQL_QueryStr_pre ) { + int (*preHookFunc) (Sql *self, const char *query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_greed_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_greed_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_QueryStr_pre[hIndex].func; + retVal___ = preHookFunc(self, query); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62958,32 +69395,26 @@ int HP_skill_greed(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.greed(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.SQL.QueryStr(self, query); } - if( HPMHooks.count.HP_skill_greed_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_greed_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_greed_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_SQL_QueryStr_post ) { + int (*postHookFunc) (int retVal___, Sql *self, const char *query); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_QueryStr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, query); } } return retVal___; } -int HP_skill_destroy_trap(struct block_list *bl, va_list ap) { +uint64 HP_SQL_LastInsertId(Sql *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_destroy_trap_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + uint64 retVal___ = 0; + if( HPMHooks.count.HP_SQL_LastInsertId_pre ) { + uint64 (*preHookFunc) (Sql *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_destroy_trap_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_destroy_trap_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_LastInsertId_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -62991,30 +69422,26 @@ int HP_skill_destroy_trap(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.destroy_trap(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.SQL.LastInsertId(self); } - if( HPMHooks.count.HP_skill_destroy_trap_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_destroy_trap_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_destroy_trap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_SQL_LastInsertId_post ) { + uint64 (*postHookFunc) (uint64 retVal___, Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_LastInsertId_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_list *bl, struct skill_unit_group *group, int64 tick) { +uint32 HP_SQL_NumColumns(Sql *self) { int hIndex = 0; - struct skill_unit_group_tickset* retVal___ = NULL; - if( HPMHooks.count.HP_skill_unitgrouptickset_search_pre ) { - struct skill_unit_group_tickset* (*preHookFunc) (struct block_list *bl, struct skill_unit_group *group, int64 *tick); + uint32 retVal___ = 0; + if( HPMHooks.count.HP_SQL_NumColumns_pre ) { + uint32 (*preHookFunc) (Sql *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitgrouptickset_search_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_unitgrouptickset_search_pre[hIndex].func; - retVal___ = preHookFunc(bl, group, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_NumColumns_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63022,26 +69449,26 @@ struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_l } } { - retVal___ = HPMHooks.source.skill.unitgrouptickset_search(bl, group, tick); + retVal___ = HPMHooks.source.SQL.NumColumns(self); } - if( HPMHooks.count.HP_skill_unitgrouptickset_search_post ) { - struct skill_unit_group_tickset* (*postHookFunc) (struct skill_unit_group_tickset* retVal___, struct block_list *bl, struct skill_unit_group *group, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitgrouptickset_search_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_unitgrouptickset_search_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, group, &tick); + if( HPMHooks.count.HP_SQL_NumColumns_post ) { + uint32 (*postHookFunc) (uint32 retVal___, Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_NumColumns_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -bool HP_skill_dance_switch(struct skill_unit *su, int flag) { +uint64 HP_SQL_NumRows(Sql *self) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_dance_switch_pre ) { - bool (*preHookFunc) (struct skill_unit *su, int *flag); + uint64 retVal___ = 0; + if( HPMHooks.count.HP_SQL_NumRows_pre ) { + uint64 (*preHookFunc) (Sql *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_switch_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_dance_switch_pre[hIndex].func; - retVal___ = preHookFunc(su, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_NumRows_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63049,28 +69476,26 @@ bool HP_skill_dance_switch(struct skill_unit *su, int flag) { } } { - retVal___ = HPMHooks.source.skill.dance_switch(su, flag); + retVal___ = HPMHooks.source.SQL.NumRows(self); } - if( HPMHooks.count.HP_skill_dance_switch_post ) { - bool (*postHookFunc) (bool retVal___, struct skill_unit *su, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_switch_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_dance_switch_post[hIndex].func; - retVal___ = postHookFunc(retVal___, su, &flag); + if( HPMHooks.count.HP_SQL_NumRows_post ) { + uint64 (*postHookFunc) (uint64 retVal___, Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_NumRows_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -int HP_skill_check_condition_char_sub(struct block_list *bl, va_list ap) { +int HP_SQL_NextRow(Sql *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_char_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_char_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_check_condition_char_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_NextRow_pre ) { + int (*preHookFunc) (Sql *self); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_NextRow_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63078,32 +69503,26 @@ int HP_skill_check_condition_char_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.check_condition_char_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.SQL.NextRow(self); } - if( HPMHooks.count.HP_skill_check_condition_char_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_char_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_check_condition_char_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_SQL_NextRow_post ) { + int (*postHookFunc) (int retVal___, Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_NextRow_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -int HP_skill_check_condition_mob_master_sub(struct block_list *bl, va_list ap) { +int HP_SQL_GetData(Sql *self, size_t col, char **out_buf, size_t *out_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_mob_master_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_SQL_GetData_pre ) { + int (*preHookFunc) (Sql *self, size_t *col, char **out_buf, size_t *out_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mob_master_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_check_condition_mob_master_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_GetData_pre[hIndex].func; + retVal___ = preHookFunc(self, &col, out_buf, out_len); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63111,29 +69530,25 @@ int HP_skill_check_condition_mob_master_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.check_condition_mob_master_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.SQL.GetData(self, col, out_buf, out_len); } - if( HPMHooks.count.HP_skill_check_condition_mob_master_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mob_master_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_check_condition_mob_master_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_SQL_GetData_post ) { + int (*postHookFunc) (int retVal___, Sql *self, size_t *col, char **out_buf, size_t *out_len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_GetData_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, &col, out_buf, out_len); } } return retVal___; } -void HP_skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y) { +void HP_SQL_FreeResult(Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_skill_brandishspear_first_pre ) { - void (*preHookFunc) (struct square *tc, uint8 *dir, int16 *x, int16 *y); + if( HPMHooks.count.HP_SQL_FreeResult_pre ) { + void (*preHookFunc) (Sql *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_first_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_brandishspear_first_pre[hIndex].func; - preHookFunc(tc, &dir, &x, &y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_FreeResult_pre[hIndex].func; + preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63141,25 +69556,25 @@ void HP_skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y } } { - HPMHooks.source.skill.brandishspear_first(tc, dir, x, y); + HPMHooks.source.SQL.FreeResult(self); } - if( HPMHooks.count.HP_skill_brandishspear_first_post ) { - void (*postHookFunc) (struct square *tc, uint8 *dir, int16 *x, int16 *y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_first_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_brandishspear_first_post[hIndex].func; - postHookFunc(tc, &dir, &x, &y); + if( HPMHooks.count.HP_SQL_FreeResult_post ) { + void (*postHookFunc) (Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_FreeResult_post[hIndex].func; + postHookFunc(self); } } return; } -void HP_skill_brandishspear_dir(struct square *tc, uint8 dir, int are) { +void HP_SQL_ShowDebug_(Sql *self, const char *debug_file, const unsigned long debug_line) { int hIndex = 0; - if( HPMHooks.count.HP_skill_brandishspear_dir_pre ) { - void (*preHookFunc) (struct square *tc, uint8 *dir, int *are); + if( HPMHooks.count.HP_SQL_ShowDebug__pre ) { + void (*preHookFunc) (Sql *self, const char *debug_file, const unsigned long *debug_line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_dir_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_brandishspear_dir_pre[hIndex].func; - preHookFunc(tc, &dir, &are); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_ShowDebug__pre[hIndex].func; + preHookFunc(self, debug_file, &debug_line); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63167,55 +69582,52 @@ void HP_skill_brandishspear_dir(struct square *tc, uint8 dir, int are) { } } { - HPMHooks.source.skill.brandishspear_dir(tc, dir, are); + HPMHooks.source.SQL.ShowDebug_(self, debug_file, debug_line); } - if( HPMHooks.count.HP_skill_brandishspear_dir_post ) { - void (*postHookFunc) (struct square *tc, uint8 *dir, int *are); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_dir_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_brandishspear_dir_post[hIndex].func; - postHookFunc(tc, &dir, &are); + if( HPMHooks.count.HP_SQL_ShowDebug__post ) { + void (*postHookFunc) (Sql *self, const char *debug_file, const unsigned long *debug_line); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_ShowDebug__post[hIndex].func; + postHookFunc(self, debug_file, &debug_line); } } return; } -int HP_skill_get_fixed_cast(uint16 skill_id, uint16 skill_lv) { +void HP_SQL_Free(Sql *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_fixed_cast_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if( HPMHooks.count.HP_SQL_Free_pre ) { + void (*preHookFunc) (Sql *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_fixed_cast_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_fixed_cast_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_Free_pre[hIndex].func; + preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.get_fixed_cast(skill_id, skill_lv); + HPMHooks.source.SQL.Free(self); } - if( HPMHooks.count.HP_skill_get_fixed_cast_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_fixed_cast_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_fixed_cast_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_SQL_Free_post ) { + void (*postHookFunc) (Sql *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_Free_post[hIndex].func; + postHookFunc(self); } } - return retVal___; + return; } -int HP_skill_sit_count(struct block_list *bl, va_list ap) { +struct Sql* HP_SQL_Malloc(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_sit_count_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + struct Sql* retVal___ = NULL; + if( HPMHooks.count.HP_SQL_Malloc_pre ) { + struct Sql* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_count_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_sit_count_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_Malloc_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63223,32 +69635,26 @@ int HP_skill_sit_count(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.sit_count(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.SQL.Malloc(); } - if( HPMHooks.count.HP_skill_sit_count_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_count_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_sit_count_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_SQL_Malloc_post ) { + struct Sql* (*postHookFunc) (struct Sql* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_Malloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_skill_sit_in(struct block_list *bl, va_list ap) { +struct SqlStmt* HP_SQL_StmtMalloc(Sql *sql) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_sit_in_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + struct SqlStmt* retVal___ = NULL; + if( HPMHooks.count.HP_SQL_StmtMalloc_pre ) { + struct SqlStmt* (*preHookFunc) (Sql *sql); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_in_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_sit_in_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_pre[hIndex].func; + retVal___ = preHookFunc(sql); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63256,32 +69662,28 @@ int HP_skill_sit_in(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.sit_in(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.SQL.StmtMalloc(sql); } - if( HPMHooks.count.HP_skill_sit_in_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_in_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_sit_in_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_SQL_StmtMalloc_post ) { + struct SqlStmt* (*postHookFunc) (struct SqlStmt* retVal___, Sql *sql); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sql); } } return retVal___; } -int HP_skill_sit_out(struct block_list *bl, va_list ap) { +int HP_SQL_StmtPrepareV(SqlStmt *self, const char *query, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_sit_out_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_SQL_StmtPrepareV_pre ) { + int (*preHookFunc) (SqlStmt *self, const char *query, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_out_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_sit_out_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_pre[hIndex].func; + retVal___ = preHookFunc(self, query, args___copy); + va_end(args___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63289,56 +69691,57 @@ int HP_skill_sit_out(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.sit_out(bl, ap___copy); - va_end(ap___copy); + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.SQL.StmtPrepareV(self, query, args___copy); + va_end(args___copy); } - if( HPMHooks.count.HP_skill_sit_out_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_out_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_sit_out_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_SQL_StmtPrepareV_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self, const char *query, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, query, args___copy); + va_end(args___copy); } } return retVal___; } -void HP_skill_unitsetmapcell(struct skill_unit *src, uint16 skill_id, uint16 skill_lv, cell_t cell, bool flag) { +int HP_SQL_StmtPrepareStr(SqlStmt *self, const char *query) { int hIndex = 0; - if( HPMHooks.count.HP_skill_unitsetmapcell_pre ) { - void (*preHookFunc) (struct skill_unit *src, uint16 *skill_id, uint16 *skill_lv, cell_t *cell, bool *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtPrepareStr_pre ) { + int (*preHookFunc) (SqlStmt *self, const char *query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetmapcell_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_unitsetmapcell_pre[hIndex].func; - preHookFunc(src, &skill_id, &skill_lv, &cell, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_pre[hIndex].func; + retVal___ = preHookFunc(self, query); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.unitsetmapcell(src, skill_id, skill_lv, cell, flag); + retVal___ = HPMHooks.source.SQL.StmtPrepareStr(self, query); } - if( HPMHooks.count.HP_skill_unitsetmapcell_post ) { - void (*postHookFunc) (struct skill_unit *src, uint16 *skill_id, uint16 *skill_lv, cell_t *cell, bool *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetmapcell_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_unitsetmapcell_post[hIndex].func; - postHookFunc(src, &skill_id, &skill_lv, &cell, &flag); + if( HPMHooks.count.HP_SQL_StmtPrepareStr_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self, const char *query); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, query); } } - return; + return retVal___; } -int HP_skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int64 tick) { +size_t HP_SQL_StmtNumParams(SqlStmt *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_onplace_timer_pre ) { - int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); + size_t retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtNumParams_pre ) { + size_t (*preHookFunc) (SqlStmt *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_unit_onplace_timer_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, &tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63346,28 +69749,26 @@ int HP_skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, i } } { - retVal___ = HPMHooks.source.skill.unit_onplace_timer(src, bl, tick); + retVal___ = HPMHooks.source.SQL.StmtNumParams(self); } - if( HPMHooks.count.HP_skill_unit_onplace_timer_post ) { - int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_unit_onplace_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, &tick); + if( HPMHooks.count.HP_SQL_StmtNumParams_post ) { + size_t (*postHookFunc) (size_t retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -int HP_skill_unit_effect(struct block_list *bl, va_list ap) { +int HP_SQL_StmtBindParam(SqlStmt *self, size_t idx, SqlDataType buffer_type, void *buffer, size_t buffer_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_effect_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_SQL_StmtBindParam_pre ) { + int (*preHookFunc) (SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_effect_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_unit_effect_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_pre[hIndex].func; + retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63375,32 +69776,26 @@ int HP_skill_unit_effect(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.unit_effect(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.SQL.StmtBindParam(self, idx, buffer_type, buffer, buffer_len); } - if( HPMHooks.count.HP_skill_unit_effect_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_effect_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_unit_effect_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_SQL_StmtBindParam_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len); } } return retVal___; } -int HP_skill_unit_timer_sub_onplace(struct block_list *bl, va_list ap) { +int HP_SQL_StmtExecute(SqlStmt *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_timer_sub_onplace_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if( HPMHooks.count.HP_SQL_StmtExecute_pre ) { + int (*preHookFunc) (SqlStmt *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_onplace_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_onplace_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtExecute_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63408,32 +69803,26 @@ int HP_skill_unit_timer_sub_onplace(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.unit_timer_sub_onplace(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.SQL.StmtExecute(self); } - if( HPMHooks.count.HP_skill_unit_timer_sub_onplace_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_onplace_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_onplace_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_SQL_StmtExecute_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtExecute_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -int HP_skill_unit_move_sub(struct block_list *bl, va_list ap) { +uint64 HP_SQL_StmtLastInsertId(SqlStmt *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_move_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + uint64 retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtLastInsertId_pre ) { + uint64 (*preHookFunc) (SqlStmt *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_unit_move_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63441,30 +69830,26 @@ int HP_skill_unit_move_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.unit_move_sub(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.SQL.StmtLastInsertId(self); } - if( HPMHooks.count.HP_skill_unit_move_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_unit_move_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_SQL_StmtLastInsertId_post ) { + uint64 (*postHookFunc) (uint64 retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -int HP_skill_blockpc_end(int tid, int64 tick, int id, intptr_t data) { +size_t HP_SQL_StmtNumColumns(SqlStmt *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockpc_end_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + size_t retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtNumColumns_pre ) { + size_t (*preHookFunc) (SqlStmt *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_end_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_blockpc_end_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63472,26 +69857,26 @@ int HP_skill_blockpc_end(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.skill.blockpc_end(tid, tick, id, data); + retVal___ = HPMHooks.source.SQL.StmtNumColumns(self); } - if( HPMHooks.count.HP_skill_blockpc_end_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_end_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_blockpc_end_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_SQL_StmtNumColumns_post ) { + size_t (*postHookFunc) (size_t retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -int HP_skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { +int HP_SQL_StmtBindColumn(SqlStmt *self, size_t idx, SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockhomun_end_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_SQL_StmtBindColumn_pre ) { + int (*preHookFunc) (SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_end_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_blockhomun_end_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_pre[hIndex].func; + retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63499,26 +69884,26 @@ int HP_skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.skill.blockhomun_end(tid, tick, id, data); + retVal___ = HPMHooks.source.SQL.StmtBindColumn(self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null); } - if( HPMHooks.count.HP_skill_blockhomun_end_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_end_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_blockhomun_end_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_SQL_StmtBindColumn_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null); } } return retVal___; } -int HP_skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) { +uint64 HP_SQL_StmtNumRows(SqlStmt *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockmerc_end_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + uint64 retVal___ = 0; + if( HPMHooks.count.HP_SQL_StmtNumRows_pre ) { + uint64 (*preHookFunc) (SqlStmt *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_end_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_blockmerc_end_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63526,26 +69911,26 @@ int HP_skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.skill.blockmerc_end(tid, tick, id, data); + retVal___ = HPMHooks.source.SQL.StmtNumRows(self); } - if( HPMHooks.count.HP_skill_blockmerc_end_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_end_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_blockmerc_end_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_SQL_StmtNumRows_post ) { + uint64 (*postHookFunc) (uint64 retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -int HP_skill_split_atoi(char *str, int *val) { +int HP_SQL_StmtNextRow(SqlStmt *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_split_atoi_pre ) { - int (*preHookFunc) (char *str, int *val); + if( HPMHooks.count.HP_SQL_StmtNextRow_pre ) { + int (*preHookFunc) (SqlStmt *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_split_atoi_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_split_atoi_pre[hIndex].func; - retVal___ = preHookFunc(str, val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63553,85 +69938,77 @@ int HP_skill_split_atoi(char *str, int *val) { } } { - retVal___ = HPMHooks.source.skill.split_atoi(str, val); + retVal___ = HPMHooks.source.SQL.StmtNextRow(self); } - if( HPMHooks.count.HP_skill_split_atoi_post ) { - int (*postHookFunc) (int retVal___, char *str, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_split_atoi_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_split_atoi_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, val); + if( HPMHooks.count.HP_SQL_StmtNextRow_post ) { + int (*postHookFunc) (int retVal___, SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -int HP_skill_unit_timer(int tid, int64 tick, int id, intptr_t data) { +void HP_SQL_StmtFreeResult(SqlStmt *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_SQL_StmtFreeResult_pre ) { + void (*preHookFunc) (SqlStmt *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_unit_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_pre[hIndex].func; + preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.unit_timer(tid, tick, id, data); + HPMHooks.source.SQL.StmtFreeResult(self); } - if( HPMHooks.count.HP_skill_unit_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_unit_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_SQL_StmtFreeResult_post ) { + void (*postHookFunc) (SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_post[hIndex].func; + postHookFunc(self); } } - return retVal___; + return; } -int HP_skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { +void HP_SQL_StmtFree(SqlStmt *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_timer_sub_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + if( HPMHooks.count.HP_SQL_StmtFree_pre ) { + void (*preHookFunc) (SqlStmt *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtFree_pre[hIndex].func; + preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.unit_timer_sub(key, data, ap___copy); - va_end(ap___copy); + HPMHooks.source.SQL.StmtFree(self); } - if( HPMHooks.count.HP_skill_unit_timer_sub_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_SQL_StmtFree_post ) { + void (*postHookFunc) (SqlStmt *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtFree_post[hIndex].func; + postHookFunc(self); } } - return retVal___; + return; } -void HP_skill_init_unit_layout(void) { +void HP_SQL_StmtShowDebug_(SqlStmt *self, const char *debug_file, const unsigned long debug_line) { int hIndex = 0; - if( HPMHooks.count.HP_skill_init_unit_layout_pre ) { - void (*preHookFunc) (void); + if( HPMHooks.count.HP_SQL_StmtShowDebug__pre ) { + void (*preHookFunc) (SqlStmt *self, const char *debug_file, const unsigned long *debug_line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_init_unit_layout_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__pre[hIndex].func; + preHookFunc(self, debug_file, &debug_line); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63639,26 +70016,27 @@ void HP_skill_init_unit_layout(void) { } } { - HPMHooks.source.skill.init_unit_layout(); + HPMHooks.source.SQL.StmtShowDebug_(self, debug_file, debug_line); } - if( HPMHooks.count.HP_skill_init_unit_layout_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_init_unit_layout_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_SQL_StmtShowDebug__post ) { + void (*postHookFunc) (SqlStmt *self, const char *debug_file, const unsigned long *debug_line); + for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__post[hIndex].func; + postHookFunc(self, debug_file, &debug_line); } } return; } -bool HP_skill_parse_row_skilldb(char *split[], int columns, int current) { +/* status */ +int HP_status_init(bool minimal) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_skilldb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + int retVal___ = 0; + if( HPMHooks.count.HP_status_init_pre ) { + int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_skilldb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_parse_row_skilldb_pre[hIndex].func; - retVal___ = preHookFunc(split, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_init_pre[hIndex].func; + retVal___ = preHookFunc(&minimal); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63666,26 +70044,52 @@ bool HP_skill_parse_row_skilldb(char *split[], int columns, int current) { } } { - retVal___ = HPMHooks.source.skill.parse_row_skilldb(split, columns, current); + retVal___ = HPMHooks.source.status.init(minimal); } - if( HPMHooks.count.HP_skill_parse_row_skilldb_post ) { - bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_skilldb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_parse_row_skilldb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + if( HPMHooks.count.HP_status_init_post ) { + int (*postHookFunc) (int retVal___, bool *minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &minimal); } } return retVal___; } -bool HP_skill_parse_row_requiredb(char *split[], int columns, int current) { +void HP_status_final(void) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_requiredb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + if( HPMHooks.count.HP_status_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_requiredb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_parse_row_requiredb_pre[hIndex].func; - retVal___ = preHookFunc(split, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.final(); + } + if( HPMHooks.count.HP_status_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_status_get_refine_chance(enum refine_type wlv, int refine) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_status_get_refine_chance_pre ) { + int (*preHookFunc) (enum refine_type *wlv, int *refine); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_refine_chance_pre[hIndex].func; + retVal___ = preHookFunc(&wlv, &refine); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63693,26 +70097,26 @@ bool HP_skill_parse_row_requiredb(char *split[], int columns, int current) { } } { - retVal___ = HPMHooks.source.skill.parse_row_requiredb(split, columns, current); + retVal___ = HPMHooks.source.status.get_refine_chance(wlv, refine); } - if( HPMHooks.count.HP_skill_parse_row_requiredb_post ) { - bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_requiredb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_parse_row_requiredb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + if( HPMHooks.count.HP_status_get_refine_chance_post ) { + int (*postHookFunc) (int retVal___, enum refine_type *wlv, int *refine); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_refine_chance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &wlv, &refine); } } return retVal___; } -bool HP_skill_parse_row_castdb(char *split[], int columns, int current) { +sc_type HP_status_skill2sc(int skill_id) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_castdb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + sc_type retVal___ = SC_NONE; + if( HPMHooks.count.HP_status_skill2sc_pre ) { + sc_type (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_parse_row_castdb_pre[hIndex].func; - retVal___ = preHookFunc(split, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_skill2sc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_skill2sc_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63720,26 +70124,26 @@ bool HP_skill_parse_row_castdb(char *split[], int columns, int current) { } } { - retVal___ = HPMHooks.source.skill.parse_row_castdb(split, columns, current); + retVal___ = HPMHooks.source.status.skill2sc(skill_id); } - if( HPMHooks.count.HP_skill_parse_row_castdb_post ) { - bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_parse_row_castdb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + if( HPMHooks.count.HP_status_skill2sc_post ) { + sc_type (*postHookFunc) (sc_type retVal___, int *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_skill2sc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_skill2sc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); } } return retVal___; } -bool HP_skill_parse_row_castnodexdb(char *split[], int columns, int current) { +int HP_status_sc2skill(sc_type sc) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_castnodexdb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + int retVal___ = 0; + if( HPMHooks.count.HP_status_sc2skill_pre ) { + int (*preHookFunc) (sc_type *sc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castnodexdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_parse_row_castnodexdb_pre[hIndex].func; - retVal___ = preHookFunc(split, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2skill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_sc2skill_pre[hIndex].func; + retVal___ = preHookFunc(&sc); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63747,26 +70151,26 @@ bool HP_skill_parse_row_castnodexdb(char *split[], int columns, int current) { } } { - retVal___ = HPMHooks.source.skill.parse_row_castnodexdb(split, columns, current); + retVal___ = HPMHooks.source.status.sc2skill(sc); } - if( HPMHooks.count.HP_skill_parse_row_castnodexdb_post ) { - bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castnodexdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_parse_row_castnodexdb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + if( HPMHooks.count.HP_status_sc2skill_post ) { + int (*postHookFunc) (int retVal___, sc_type *sc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2skill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_sc2skill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &sc); } } return retVal___; } -bool HP_skill_parse_row_unitdb(char *split[], int columns, int current) { +unsigned int HP_status_sc2scb_flag(sc_type sc) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_unitdb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_status_sc2scb_flag_pre ) { + unsigned int (*preHookFunc) (sc_type *sc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_unitdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_parse_row_unitdb_pre[hIndex].func; - retVal___ = preHookFunc(split, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2scb_flag_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_sc2scb_flag_pre[hIndex].func; + retVal___ = preHookFunc(&sc); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63774,26 +70178,26 @@ bool HP_skill_parse_row_unitdb(char *split[], int columns, int current) { } } { - retVal___ = HPMHooks.source.skill.parse_row_unitdb(split, columns, current); + retVal___ = HPMHooks.source.status.sc2scb_flag(sc); } - if( HPMHooks.count.HP_skill_parse_row_unitdb_post ) { - bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_unitdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_parse_row_unitdb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + if( HPMHooks.count.HP_status_sc2scb_flag_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, sc_type *sc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2scb_flag_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_sc2scb_flag_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &sc); } } return retVal___; } -bool HP_skill_parse_row_producedb(char *split[], int columns, int current) { +int HP_status_type2relevant_bl_types(int type) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_producedb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + int retVal___ = 0; + if( HPMHooks.count.HP_status_type2relevant_bl_types_pre ) { + int (*preHookFunc) (int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_producedb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_parse_row_producedb_pre[hIndex].func; - retVal___ = preHookFunc(split, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_type2relevant_bl_types_pre[hIndex].func; + retVal___ = preHookFunc(&type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63801,26 +70205,26 @@ bool HP_skill_parse_row_producedb(char *split[], int columns, int current) { } } { - retVal___ = HPMHooks.source.skill.parse_row_producedb(split, columns, current); + retVal___ = HPMHooks.source.status.type2relevant_bl_types(type); } - if( HPMHooks.count.HP_skill_parse_row_producedb_post ) { - bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_producedb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_parse_row_producedb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + if( HPMHooks.count.HP_status_type2relevant_bl_types_post ) { + int (*postHookFunc) (int retVal___, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_type2relevant_bl_types_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type); } } return retVal___; } -bool HP_skill_parse_row_createarrowdb(char *split[], int columns, int current) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_createarrowdb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); +int HP_status_get_sc_type(sc_type idx) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_status_get_sc_type_pre ) { + int (*preHookFunc) (sc_type *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_createarrowdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_parse_row_createarrowdb_pre[hIndex].func; - retVal___ = preHookFunc(split, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_type_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_sc_type_pre[hIndex].func; + retVal___ = preHookFunc(&idx); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63828,26 +70232,26 @@ bool HP_skill_parse_row_createarrowdb(char *split[], int columns, int current) { } } { - retVal___ = HPMHooks.source.skill.parse_row_createarrowdb(split, columns, current); + retVal___ = HPMHooks.source.status.get_sc_type(idx); } - if( HPMHooks.count.HP_skill_parse_row_createarrowdb_post ) { - bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_createarrowdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_parse_row_createarrowdb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + if( HPMHooks.count.HP_status_get_sc_type_post ) { + int (*postHookFunc) (int retVal___, sc_type *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_type_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_sc_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &idx); } } return retVal___; } -bool HP_skill_parse_row_abradb(char *split[], int columns, int current) { +int HP_status_damage(struct block_list *src, struct block_list *target, int64 hp, int64 sp, int walkdelay, int flag) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_abradb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + int retVal___ = 0; + if( HPMHooks.count.HP_status_damage_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target, int64 *hp, int64 *sp, int *walkdelay, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_abradb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_parse_row_abradb_pre[hIndex].func; - retVal___ = preHookFunc(split, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_damage_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &hp, &sp, &walkdelay, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63855,26 +70259,26 @@ bool HP_skill_parse_row_abradb(char *split[], int columns, int current) { } } { - retVal___ = HPMHooks.source.skill.parse_row_abradb(split, columns, current); + retVal___ = HPMHooks.source.status.damage(src, target, hp, sp, walkdelay, flag); } - if( HPMHooks.count.HP_skill_parse_row_abradb_post ) { - bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_abradb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_parse_row_abradb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + if( HPMHooks.count.HP_status_damage_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int64 *hp, int64 *sp, int *walkdelay, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_damage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &hp, &sp, &walkdelay, &flag); } } return retVal___; } -bool HP_skill_parse_row_spellbookdb(char *split[], int columns, int current) { +int HP_status_charge(struct block_list *bl, int64 hp, int64 sp) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_spellbookdb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + int retVal___ = 0; + if( HPMHooks.count.HP_status_charge_pre ) { + int (*preHookFunc) (struct block_list *bl, int64 *hp, int64 *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_spellbookdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_parse_row_spellbookdb_pre[hIndex].func; - retVal___ = preHookFunc(split, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_charge_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_charge_pre[hIndex].func; + retVal___ = preHookFunc(bl, &hp, &sp); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63882,26 +70286,26 @@ bool HP_skill_parse_row_spellbookdb(char *split[], int columns, int current) { } } { - retVal___ = HPMHooks.source.skill.parse_row_spellbookdb(split, columns, current); + retVal___ = HPMHooks.source.status.charge(bl, hp, sp); } - if( HPMHooks.count.HP_skill_parse_row_spellbookdb_post ) { - bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_spellbookdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_parse_row_spellbookdb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + if( HPMHooks.count.HP_status_charge_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int64 *hp, int64 *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_charge_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_charge_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &hp, &sp); } } return retVal___; } -bool HP_skill_parse_row_magicmushroomdb(char *split[], int column, int current) { +int HP_status_percent_change(struct block_list *src, struct block_list *target, signed char hp_rate, signed char sp_rate, int flag) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_magicmushroomdb_pre ) { - bool (*preHookFunc) (char *split[], int *column, int *current); + int retVal___ = 0; + if( HPMHooks.count.HP_status_percent_change_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target, signed char *hp_rate, signed char *sp_rate, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_magicmushroomdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_parse_row_magicmushroomdb_pre[hIndex].func; - retVal___ = preHookFunc(split, &column, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_percent_change_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_percent_change_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &hp_rate, &sp_rate, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63909,26 +70313,26 @@ bool HP_skill_parse_row_magicmushroomdb(char *split[], int column, int current) } } { - retVal___ = HPMHooks.source.skill.parse_row_magicmushroomdb(split, column, current); + retVal___ = HPMHooks.source.status.percent_change(src, target, hp_rate, sp_rate, flag); } - if( HPMHooks.count.HP_skill_parse_row_magicmushroomdb_post ) { - bool (*postHookFunc) (bool retVal___, char *split[], int *column, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_magicmushroomdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_parse_row_magicmushroomdb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, split, &column, ¤t); + if( HPMHooks.count.HP_status_percent_change_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, signed char *hp_rate, signed char *sp_rate, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_percent_change_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_percent_change_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &hp_rate, &sp_rate, &flag); } } return retVal___; } -bool HP_skill_parse_row_reproducedb(char *split[], int column, int current) { +int HP_status_set_hp(struct block_list *bl, unsigned int hp, int flag) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_reproducedb_pre ) { - bool (*preHookFunc) (char *split[], int *column, int *current); + int retVal___ = 0; + if( HPMHooks.count.HP_status_set_hp_pre ) { + int (*preHookFunc) (struct block_list *bl, unsigned int *hp, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_reproducedb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_parse_row_reproducedb_pre[hIndex].func; - retVal___ = preHookFunc(split, &column, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_hp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_set_hp_pre[hIndex].func; + retVal___ = preHookFunc(bl, &hp, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63936,26 +70340,26 @@ bool HP_skill_parse_row_reproducedb(char *split[], int column, int current) { } } { - retVal___ = HPMHooks.source.skill.parse_row_reproducedb(split, column, current); + retVal___ = HPMHooks.source.status.set_hp(bl, hp, flag); } - if( HPMHooks.count.HP_skill_parse_row_reproducedb_post ) { - bool (*postHookFunc) (bool retVal___, char *split[], int *column, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_reproducedb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_parse_row_reproducedb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, split, &column, ¤t); + if( HPMHooks.count.HP_status_set_hp_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *hp, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_hp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_set_hp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &hp, &flag); } } return retVal___; } -bool HP_skill_parse_row_improvisedb(char *split[], int columns, int current) { +int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_improvisedb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + int retVal___ = 0; + if( HPMHooks.count.HP_status_set_sp_pre ) { + int (*preHookFunc) (struct block_list *bl, unsigned int *sp, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_improvisedb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_parse_row_improvisedb_pre[hIndex].func; - retVal___ = preHookFunc(split, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_set_sp_pre[hIndex].func; + retVal___ = preHookFunc(bl, &sp, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63963,26 +70367,26 @@ bool HP_skill_parse_row_improvisedb(char *split[], int columns, int current) { } } { - retVal___ = HPMHooks.source.skill.parse_row_improvisedb(split, columns, current); + retVal___ = HPMHooks.source.status.set_sp(bl, sp, flag); } - if( HPMHooks.count.HP_skill_parse_row_improvisedb_post ) { - bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_improvisedb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_parse_row_improvisedb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + if( HPMHooks.count.HP_status_set_sp_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *sp, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_set_sp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &sp, &flag); } } return retVal___; } -bool HP_skill_parse_row_changematerialdb(char *split[], int columns, int current) { +int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, int flag) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_changematerialdb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + int retVal___ = 0; + if( HPMHooks.count.HP_status_heal_pre ) { + int (*preHookFunc) (struct block_list *bl, int64 *hp, int64 *sp, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_changematerialdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_parse_row_changematerialdb_pre[hIndex].func; - retVal___ = preHookFunc(split, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_heal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_heal_pre[hIndex].func; + retVal___ = preHookFunc(bl, &hp, &sp, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -63990,104 +70394,107 @@ bool HP_skill_parse_row_changematerialdb(char *split[], int columns, int current } } { - retVal___ = HPMHooks.source.skill.parse_row_changematerialdb(split, columns, current); + retVal___ = HPMHooks.source.status.heal(bl, hp, sp, flag); } - if( HPMHooks.count.HP_skill_parse_row_changematerialdb_post ) { - bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_changematerialdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_parse_row_changematerialdb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + if( HPMHooks.count.HP_status_heal_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int64 *hp, int64 *sp, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_heal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_heal_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &hp, &sp, &flag); } } return retVal___; } -void HP_skill_usave_add(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { +int HP_status_revive(struct block_list *bl, unsigned char per_hp, unsigned char per_sp) { int hIndex = 0; - if( HPMHooks.count.HP_skill_usave_add_pre ) { - void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + int retVal___ = 0; + if( HPMHooks.count.HP_status_revive_pre ) { + int (*preHookFunc) (struct block_list *bl, unsigned char *per_hp, unsigned char *per_sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_add_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_usave_add_pre[hIndex].func; - preHookFunc(sd, &skill_id, &skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_revive_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_revive_pre[hIndex].func; + retVal___ = preHookFunc(bl, &per_hp, &per_sp); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.usave_add(sd, skill_id, skill_lv); + retVal___ = HPMHooks.source.status.revive(bl, per_hp, per_sp); } - if( HPMHooks.count.HP_skill_usave_add_post ) { - void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_add_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_usave_add_post[hIndex].func; - postHookFunc(sd, &skill_id, &skill_lv); + if( HPMHooks.count.HP_status_revive_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned char *per_hp, unsigned char *per_sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_revive_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_revive_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &per_hp, &per_sp); } } - return; + return retVal___; } -void HP_skill_usave_trigger(struct map_session_data *sd) { +int HP_status_fixed_revive(struct block_list *bl, unsigned int per_hp, unsigned int per_sp) { int hIndex = 0; - if( HPMHooks.count.HP_skill_usave_trigger_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_status_fixed_revive_pre ) { + int (*preHookFunc) (struct block_list *bl, unsigned int *per_hp, unsigned int *per_sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_trigger_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_usave_trigger_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_fixed_revive_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_fixed_revive_pre[hIndex].func; + retVal___ = preHookFunc(bl, &per_hp, &per_sp); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.usave_trigger(sd); + retVal___ = HPMHooks.source.status.fixed_revive(bl, per_hp, per_sp); } - if( HPMHooks.count.HP_skill_usave_trigger_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_trigger_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_usave_trigger_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_status_fixed_revive_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *per_hp, unsigned int *per_sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_fixed_revive_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_fixed_revive_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &per_hp, &per_sp); } } - return; + return retVal___; } -void HP_skill_cooldown_load(struct map_session_data *sd) { +struct regen_data* HP_status_get_regen_data(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_skill_cooldown_load_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + struct regen_data* retVal___ = NULL; + if( HPMHooks.count.HP_status_get_regen_data_pre ) { + struct regen_data* (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_load_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_cooldown_load_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_regen_data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_regen_data_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.cooldown_load(sd); + retVal___ = HPMHooks.source.status.get_regen_data(bl); } - if( HPMHooks.count.HP_skill_cooldown_load_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_load_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_cooldown_load_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_status_get_regen_data_post ) { + struct regen_data* (*postHookFunc) (struct regen_data* retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_regen_data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_regen_data_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } - return; + return retVal___; } -int HP_skill_spellbook(struct map_session_data *sd, int nameid) { +struct status_data* HP_status_get_status_data(struct block_list *bl) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_spellbook_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *nameid); + struct status_data* retVal___ = NULL; + if( HPMHooks.count.HP_status_get_status_data_pre ) { + struct status_data* (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_spellbook_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_spellbook_pre[hIndex].func; - retVal___ = preHookFunc(sd, &nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_status_data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_status_data_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64095,26 +70502,26 @@ int HP_skill_spellbook(struct map_session_data *sd, int nameid) { } } { - retVal___ = HPMHooks.source.skill.spellbook(sd, nameid); + retVal___ = HPMHooks.source.status.get_status_data(bl); } - if( HPMHooks.count.HP_skill_spellbook_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_spellbook_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_spellbook_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &nameid); + if( HPMHooks.count.HP_status_get_status_data_post ) { + struct status_data* (*postHookFunc) (struct status_data* retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_status_data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_status_data_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -int HP_skill_block_check(struct block_list *bl, enum sc_type type, uint16 skill_id) { +struct status_data* HP_status_get_base_status(struct block_list *bl) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_block_check_pre ) { - int (*preHookFunc) (struct block_list *bl, enum sc_type *type, uint16 *skill_id); + struct status_data* retVal___ = NULL; + if( HPMHooks.count.HP_status_get_base_status_pre ) { + struct status_data* (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_block_check_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_block_check_pre[hIndex].func; - retVal___ = preHookFunc(bl, &type, &skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_status_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_base_status_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64122,28 +70529,26 @@ int HP_skill_block_check(struct block_list *bl, enum sc_type type, uint16 skill_ } } { - retVal___ = HPMHooks.source.skill.block_check(bl, type, skill_id); + retVal___ = HPMHooks.source.status.get_base_status(bl); } - if( HPMHooks.count.HP_skill_block_check_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, enum sc_type *type, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_block_check_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_block_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &type, &skill_id); + if( HPMHooks.count.HP_status_get_base_status_post ) { + struct status_data* (*postHookFunc) (struct status_data* retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_status_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_base_status_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -int HP_skill_detonator(struct block_list *bl, va_list ap) { +const char* HP_status_get_name(struct block_list *bl) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_detonator_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_status_get_name_pre ) { + const char* (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_detonator_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_detonator_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_name_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64151,30 +70556,26 @@ int HP_skill_detonator(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.detonator(bl, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.status.get_name(bl); } - if( HPMHooks.count.HP_skill_detonator_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_detonator_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_detonator_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_status_get_name_post ) { + const char* (*postHookFunc) (const char* retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -bool HP_skill_check_camouflage(struct block_list *bl, struct status_change_entry *sce) { +int HP_status_get_class(struct block_list *bl) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_check_camouflage_pre ) { - bool (*preHookFunc) (struct block_list *bl, struct status_change_entry *sce); + int retVal___ = 0; + if( HPMHooks.count.HP_status_get_class_pre ) { + int (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_camouflage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_check_camouflage_pre[hIndex].func; - retVal___ = preHookFunc(bl, sce); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_class_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_class_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64182,26 +70583,26 @@ bool HP_skill_check_camouflage(struct block_list *bl, struct status_change_entry } } { - retVal___ = HPMHooks.source.skill.check_camouflage(bl, sce); + retVal___ = HPMHooks.source.status.get_class(bl); } - if( HPMHooks.count.HP_skill_check_camouflage_post ) { - bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct status_change_entry *sce); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_camouflage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_check_camouflage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sce); + if( HPMHooks.count.HP_status_get_class_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_class_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_class_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -int HP_skill_magicdecoy(struct map_session_data *sd, int nameid) { +int HP_status_get_lv(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_magicdecoy_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *nameid); + if( HPMHooks.count.HP_status_get_lv_pre ) { + int (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magicdecoy_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_magicdecoy_pre[hIndex].func; - retVal___ = preHookFunc(sd, &nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_lv_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_lv_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64209,26 +70610,26 @@ int HP_skill_magicdecoy(struct map_session_data *sd, int nameid) { } } { - retVal___ = HPMHooks.source.skill.magicdecoy(sd, nameid); + retVal___ = HPMHooks.source.status.get_lv(bl); } - if( HPMHooks.count.HP_skill_magicdecoy_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magicdecoy_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_magicdecoy_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &nameid); + if( HPMHooks.count.HP_status_get_lv_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_lv_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_lv_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -int HP_skill_poisoningweapon(struct map_session_data *sd, int nameid) { +defType HP_status_get_def(struct block_list *bl) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_poisoningweapon_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *nameid); + defType retVal___ = 0; + if( HPMHooks.count.HP_status_get_def_pre ) { + defType (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_poisoningweapon_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_poisoningweapon_pre[hIndex].func; - retVal___ = preHookFunc(sd, &nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_def_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_def_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64236,26 +70637,26 @@ int HP_skill_poisoningweapon(struct map_session_data *sd, int nameid) { } } { - retVal___ = HPMHooks.source.skill.poisoningweapon(sd, nameid); + retVal___ = HPMHooks.source.status.get_def(bl); } - if( HPMHooks.count.HP_skill_poisoningweapon_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_poisoningweapon_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_poisoningweapon_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &nameid); + if( HPMHooks.count.HP_status_get_def_post ) { + defType (*postHookFunc) (defType retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_def_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_def_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -int HP_skill_select_menu(struct map_session_data *sd, uint16 skill_id) { +unsigned short HP_status_get_speed(struct block_list *bl) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_select_menu_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_get_speed_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_select_menu_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_select_menu_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_speed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_speed_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64263,26 +70664,26 @@ int HP_skill_select_menu(struct map_session_data *sd, uint16 skill_id) { } } { - retVal___ = HPMHooks.source.skill.select_menu(sd, skill_id); + retVal___ = HPMHooks.source.status.get_speed(bl); } - if( HPMHooks.count.HP_skill_select_menu_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_select_menu_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_select_menu_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &skill_id); + if( HPMHooks.count.HP_status_get_speed_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_speed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_speed_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -int HP_skill_elementalanalysis(struct map_session_data *sd, int n, uint16 skill_lv, unsigned short *item_list) { +unsigned char HP_status_calc_attack_element(struct block_list *bl, struct status_change *sc, int element) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_elementalanalysis_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n, uint16 *skill_lv, unsigned short *item_list); + unsigned char retVal___ = 0; + if( HPMHooks.count.HP_status_calc_attack_element_pre ) { + unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *element); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_elementalanalysis_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n, &skill_lv, item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_attack_element_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_attack_element_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &element); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64290,26 +70691,26 @@ int HP_skill_elementalanalysis(struct map_session_data *sd, int n, uint16 skill_ } } { - retVal___ = HPMHooks.source.skill.elementalanalysis(sd, n, skill_lv, item_list); + retVal___ = HPMHooks.source.status.calc_attack_element(bl, sc, element); } - if( HPMHooks.count.HP_skill_elementalanalysis_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, uint16 *skill_lv, unsigned short *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_elementalanalysis_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &n, &skill_lv, item_list); + if( HPMHooks.count.HP_status_calc_attack_element_post ) { + unsigned char (*postHookFunc) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int *element); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_attack_element_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_attack_element_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &element); } } return retVal___; } -int HP_skill_changematerial(struct map_session_data *sd, int n, unsigned short *item_list) { +int HP_status_get_party_id(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_changematerial_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list); + if( HPMHooks.count.HP_status_get_party_id_pre ) { + int (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_changematerial_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n, item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_party_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_party_id_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64317,26 +70718,26 @@ int HP_skill_changematerial(struct map_session_data *sd, int n, unsigned short * } } { - retVal___ = HPMHooks.source.skill.changematerial(sd, n, item_list); + retVal___ = HPMHooks.source.status.get_party_id(bl); } - if( HPMHooks.count.HP_skill_changematerial_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_changematerial_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &n, item_list); + if( HPMHooks.count.HP_status_get_party_id_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_party_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_party_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -int HP_skill_get_elemental_type(uint16 skill_id, uint16 skill_lv) { +int HP_status_get_guild_id(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_elemental_type_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_elemental_type_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_elemental_type_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id, &skill_lv); + if( HPMHooks.count.HP_status_get_guild_id_pre ) { + int (*preHookFunc) (struct block_list *bl); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_guild_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_guild_id_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64344,52 +70745,53 @@ int HP_skill_get_elemental_type(uint16 skill_id, uint16 skill_lv) { } } { - retVal___ = HPMHooks.source.skill.get_elemental_type(skill_id, skill_lv); + retVal___ = HPMHooks.source.status.get_guild_id(bl); } - if( HPMHooks.count.HP_skill_get_elemental_type_post ) { - int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_elemental_type_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_elemental_type_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + if( HPMHooks.count.HP_status_get_guild_id_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_guild_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_guild_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -void HP_skill_cooldown_save(struct map_session_data *sd) { +int HP_status_get_emblem_id(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_skill_cooldown_save_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_status_get_emblem_id_pre ) { + int (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_save_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_cooldown_save_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_emblem_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_emblem_id_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.cooldown_save(sd); + retVal___ = HPMHooks.source.status.get_emblem_id(bl); } - if( HPMHooks.count.HP_skill_cooldown_save_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_save_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_cooldown_save_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_status_get_emblem_id_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_emblem_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_emblem_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } - return; + return retVal___; } -int HP_skill_get_new_group_id(void) { +int HP_status_get_mexp(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_new_group_id_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_status_get_mexp_pre ) { + int (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_new_group_id_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_new_group_id_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_mexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_mexp_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64397,26 +70799,26 @@ int HP_skill_get_new_group_id(void) { } } { - retVal___ = HPMHooks.source.skill.get_new_group_id(); + retVal___ = HPMHooks.source.status.get_mexp(bl); } - if( HPMHooks.count.HP_skill_get_new_group_id_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_new_group_id_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_new_group_id_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_status_get_mexp_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_mexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_mexp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -bool HP_skill_check_shadowform(struct block_list *bl, int64 damage, int hit) { +int HP_status_get_race2(struct block_list *bl) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_check_shadowform_pre ) { - bool (*preHookFunc) (struct block_list *bl, int64 *damage, int *hit); + int retVal___ = 0; + if( HPMHooks.count.HP_status_get_race2_pre ) { + int (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_shadowform_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_check_shadowform_pre[hIndex].func; - retVal___ = preHookFunc(bl, &damage, &hit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_race2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_race2_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64424,26 +70826,26 @@ bool HP_skill_check_shadowform(struct block_list *bl, int64 damage, int hit) { } } { - retVal___ = HPMHooks.source.skill.check_shadowform(bl, damage, hit); + retVal___ = HPMHooks.source.status.get_race2(bl); } - if( HPMHooks.count.HP_skill_check_shadowform_post ) { - bool (*postHookFunc) (bool retVal___, struct block_list *bl, int64 *damage, int *hit); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_shadowform_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_check_shadowform_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &damage, &hit); + if( HPMHooks.count.HP_status_get_race2_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_race2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_race2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -bool HP_skill_castend_damage_id_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_data *tstatus, struct status_change *sc) { +struct view_data* HP_status_get_viewdata(struct block_list *bl) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_damage_id_unknown_pre ) { - bool (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_data *tstatus, struct status_change *sc); + struct view_data* retVal___ = NULL; + if( HPMHooks.count.HP_status_get_viewdata_pre ) { + struct view_data* (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_castend_damage_id_unknown_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, skill_id, skill_lv, tick, flag, tstatus, sc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_viewdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_viewdata_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64451,25 +70853,25 @@ bool HP_skill_castend_damage_id_unknown(struct block_list *src, struct block_lis } } { - retVal___ = HPMHooks.source.skill.castend_damage_id_unknown(src, bl, skill_id, skill_lv, tick, flag, tstatus, sc); + retVal___ = HPMHooks.source.status.get_viewdata(bl); } - if( HPMHooks.count.HP_skill_castend_damage_id_unknown_post ) { - bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_data *tstatus, struct status_change *sc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_castend_damage_id_unknown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag, tstatus, sc); + if( HPMHooks.count.HP_status_get_viewdata_post ) { + struct view_data* (*postHookFunc) (struct view_data* retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_viewdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_viewdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -void HP_skill_additional_effect_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick) { +void HP_status_set_viewdata(struct block_list *bl, int class_) { int hIndex = 0; - if( HPMHooks.count.HP_skill_additional_effect_unknown_pre ) { - void (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick); + if( HPMHooks.count.HP_status_set_viewdata_pre ) { + void (*preHookFunc) (struct block_list *bl, int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_additional_effect_unknown_pre[hIndex].func; - preHookFunc(src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_viewdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_set_viewdata_pre[hIndex].func; + preHookFunc(bl, &class_); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64477,25 +70879,25 @@ void HP_skill_additional_effect_unknown(struct block_list *src, struct block_lis } } { - HPMHooks.source.skill.additional_effect_unknown(src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick); + HPMHooks.source.status.set_viewdata(bl, class_); } - if( HPMHooks.count.HP_skill_additional_effect_unknown_post ) { - void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_additional_effect_unknown_post[hIndex].func; - postHookFunc(src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick); + if( HPMHooks.count.HP_status_set_viewdata_post ) { + void (*postHookFunc) (struct block_list *bl, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_viewdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_set_viewdata_post[hIndex].func; + postHookFunc(bl, &class_); } } return; } -void HP_skill_counter_additional_effect_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick) { +void HP_status_change_init(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_skill_counter_additional_effect_unknown_pre ) { - void (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick); + if( HPMHooks.count.HP_status_change_init_pre ) { + void (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_unknown_pre[hIndex].func; - preHookFunc(src, bl, skill_id, skill_lv, attack_type, tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_change_init_pre[hIndex].func; + preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64503,104 +70905,107 @@ void HP_skill_counter_additional_effect_unknown(struct block_list *src, struct b } } { - HPMHooks.source.skill.counter_additional_effect_unknown(src, bl, skill_id, skill_lv, attack_type, tick); + HPMHooks.source.status.change_init(bl); } - if( HPMHooks.count.HP_skill_counter_additional_effect_unknown_post ) { - void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_unknown_post[hIndex].func; - postHookFunc(src, bl, skill_id, skill_lv, attack_type, tick); + if( HPMHooks.count.HP_status_change_init_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_change_init_post[hIndex].func; + postHookFunc(bl); } } return; } -void HP_skill_attack_combo1_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_change_entry *sce, int *combo) { +struct status_change* HP_status_get_sc(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_skill_attack_combo1_unknown_pre ) { - void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_change_entry *sce, int *combo); + struct status_change* retVal___ = NULL; + if( HPMHooks.count.HP_status_get_sc_pre ) { + struct status_change* (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo1_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_attack_combo1_unknown_pre[hIndex].func; - preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, sce, combo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_sc_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.attack_combo1_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, sce, combo); + retVal___ = HPMHooks.source.status.get_sc(bl); } - if( HPMHooks.count.HP_skill_attack_combo1_unknown_post ) { - void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_change_entry *sce, int *combo); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo1_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_attack_combo1_unknown_post[hIndex].func; - postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, sce, combo); + if( HPMHooks.count.HP_status_get_sc_post ) { + struct status_change* (*postHookFunc) (struct status_change* retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_sc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } - return; + return retVal___; } -void HP_skill_attack_combo2_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *combo) { +int HP_status_isdead(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_skill_attack_combo2_unknown_pre ) { - void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *combo); + int retVal___ = 0; + if( HPMHooks.count.HP_status_isdead_pre ) { + int (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo2_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_attack_combo2_unknown_pre[hIndex].func; - preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, combo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isdead_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_isdead_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.attack_combo2_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, combo); + retVal___ = HPMHooks.source.status.isdead(bl); } - if( HPMHooks.count.HP_skill_attack_combo2_unknown_post ) { - void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *combo); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo2_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_attack_combo2_unknown_post[hIndex].func; - postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, combo); + if( HPMHooks.count.HP_status_isdead_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isdead_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_isdead_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } - return; + return retVal___; } -void HP_skill_attack_display_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage) { +int HP_status_isimmune(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_skill_attack_display_unknown_pre ) { - void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage); + int retVal___ = 0; + if( HPMHooks.count.HP_status_isimmune_pre ) { + int (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_display_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_attack_display_unknown_pre[hIndex].func; - preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isimmune_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_isimmune_pre[hIndex].func; + retVal___ = preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.attack_display_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage); + retVal___ = HPMHooks.source.status.isimmune(bl); } - if( HPMHooks.count.HP_skill_attack_display_unknown_post ) { - void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_display_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_attack_display_unknown_post[hIndex].func; - postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage); + if( HPMHooks.count.HP_status_isimmune_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isimmune_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_isimmune_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); } } - return; + return retVal___; } -int HP_skill_attack_copy_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { +int HP_status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int tick, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_attack_copy_unknown_pre ) { - int (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if( HPMHooks.count.HP_status_get_sc_def_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *bl, enum sc_type *type, int *rate, int *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_copy_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_attack_copy_unknown_pre[hIndex].func; - retVal___ = preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_def_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_sc_def_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &type, &rate, &tick, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64608,26 +71013,26 @@ int HP_skill_attack_copy_unknown(int *attack_type, struct block_list *src, struc } } { - retVal___ = HPMHooks.source.skill.attack_copy_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); + retVal___ = HPMHooks.source.status.get_sc_def(src, bl, type, rate, tick, flag); } - if( HPMHooks.count.HP_skill_attack_copy_unknown_post ) { - int (*postHookFunc) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_copy_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_attack_copy_unknown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); + if( HPMHooks.count.HP_status_get_sc_def_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, enum sc_type *type, int *rate, int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_def_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_sc_def_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &type, &rate, &tick, &flag); } } return retVal___; } -int HP_skill_attack_dir_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { +int HP_status_change_start(struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_attack_dir_unknown_pre ) { - int (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if( HPMHooks.count.HP_status_change_start_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_dir_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_attack_dir_unknown_pre[hIndex].func; - retVal___ = preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_change_start_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64635,78 +71040,80 @@ int HP_skill_attack_dir_unknown(int *attack_type, struct block_list *src, struct } } { - retVal___ = HPMHooks.source.skill.attack_dir_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); + retVal___ = HPMHooks.source.status.change_start(src, bl, type, rate, val1, val2, val3, val4, tick, flag); } - if( HPMHooks.count.HP_skill_attack_dir_unknown_post ) { - int (*postHookFunc) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_dir_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_attack_dir_unknown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); + if( HPMHooks.count.HP_status_change_start_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_change_start_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag); } } return retVal___; } -void HP_skill_attack_blow_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir) { +int HP_status_change_end_(struct block_list *bl, enum sc_type type, int tid, const char *file, int line) { int hIndex = 0; - if( HPMHooks.count.HP_skill_attack_blow_unknown_pre ) { - void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir); + int retVal___ = 0; + if( HPMHooks.count.HP_status_change_end__pre ) { + int (*preHookFunc) (struct block_list *bl, enum sc_type *type, int *tid, const char *file, int *line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_blow_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_attack_blow_unknown_pre[hIndex].func; - preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage, dir); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_end__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_change_end__pre[hIndex].func; + retVal___ = preHookFunc(bl, &type, &tid, file, &line); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.attack_blow_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage, dir); + retVal___ = HPMHooks.source.status.change_end_(bl, type, tid, file, line); } - if( HPMHooks.count.HP_skill_attack_blow_unknown_post ) { - void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_blow_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_attack_blow_unknown_post[hIndex].func; - postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage, dir); + if( HPMHooks.count.HP_status_change_end__post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, enum sc_type *type, int *tid, const char *file, int *line); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_end__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_change_end__post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &type, &tid, file, &line); } } - return; + return retVal___; } -void HP_skill_attack_post_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { +int HP_status_kaahi_heal_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - if( HPMHooks.count.HP_skill_attack_post_unknown_pre ) { - void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_status_kaahi_heal_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_attack_post_unknown_pre[hIndex].func; - preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_kaahi_heal_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_kaahi_heal_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.attack_post_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); + retVal___ = HPMHooks.source.status.kaahi_heal_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_attack_post_unknown_post ) { - void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_attack_post_unknown_post[hIndex].func; - postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); + if( HPMHooks.count.HP_status_kaahi_heal_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_kaahi_heal_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_kaahi_heal_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } - return; + return retVal___; } -bool HP_skill_timerskill_dead_unknown(struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl) { +int HP_status_change_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_timerskill_dead_unknown_pre ) { - bool (*preHookFunc) (struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); + int retVal___ = 0; + if( HPMHooks.count.HP_status_change_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_dead_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_timerskill_dead_unknown_pre[hIndex].func; - retVal___ = preHookFunc(src, ud, skl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_change_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64714,78 +71121,86 @@ bool HP_skill_timerskill_dead_unknown(struct block_list *src, struct unit_data * } } { - retVal___ = HPMHooks.source.skill.timerskill_dead_unknown(src, ud, skl); + retVal___ = HPMHooks.source.status.change_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_timerskill_dead_unknown_post ) { - bool (*postHookFunc) (bool retVal___, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_dead_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_timerskill_dead_unknown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, ud, skl); + if( HPMHooks.count.HP_status_change_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_change_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -void HP_skill_timerskill_target_unknown(int tid, int64 tick, struct block_list *src, struct block_list *target, struct unit_data *ud, struct skill_timerskill *skl) { +int HP_status_change_timer_sub(struct block_list *bl, va_list ap) { int hIndex = 0; - if( HPMHooks.count.HP_skill_timerskill_target_unknown_pre ) { - void (*preHookFunc) (int *tid, int64 *tick, struct block_list *src, struct block_list *target, struct unit_data *ud, struct skill_timerskill *skl); + int retVal___ = 0; + if( HPMHooks.count.HP_status_change_timer_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_target_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_timerskill_target_unknown_pre[hIndex].func; - preHookFunc(&tid, &tick, src, target, ud, skl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_status_change_timer_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.timerskill_target_unknown(tid, tick, src, target, ud, skl); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.status.change_timer_sub(bl, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_skill_timerskill_target_unknown_post ) { - void (*postHookFunc) (int *tid, int64 *tick, struct block_list *src, struct block_list *target, struct unit_data *ud, struct skill_timerskill *skl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_target_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_timerskill_target_unknown_post[hIndex].func; - postHookFunc(&tid, &tick, src, target, ud, skl); + if( HPMHooks.count.HP_status_change_timer_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_status_change_timer_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } - return; + return retVal___; } -void HP_skill_timerskill_notarget_unknown(int tid, int64 tick, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl) { +int HP_status_change_clear(struct block_list *bl, int type) { int hIndex = 0; - if( HPMHooks.count.HP_skill_timerskill_notarget_unknown_pre ) { - void (*preHookFunc) (int *tid, int64 *tick, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); + int retVal___ = 0; + if( HPMHooks.count.HP_status_change_clear_pre ) { + int (*preHookFunc) (struct block_list *bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_notarget_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_timerskill_notarget_unknown_pre[hIndex].func; - preHookFunc(&tid, &tick, src, ud, skl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_change_clear_pre[hIndex].func; + retVal___ = preHookFunc(bl, &type); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.timerskill_notarget_unknown(tid, tick, src, ud, skl); + retVal___ = HPMHooks.source.status.change_clear(bl, type); } - if( HPMHooks.count.HP_skill_timerskill_notarget_unknown_post ) { - void (*postHookFunc) (int *tid, int64 *tick, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_notarget_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_timerskill_notarget_unknown_post[hIndex].func; - postHookFunc(&tid, &tick, src, ud, skl); + if( HPMHooks.count.HP_status_change_clear_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_change_clear_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &type); } } - return; + return retVal___; } -bool HP_skill_cleartimerskill_exception(int skill_id) { +int HP_status_change_clear_buffs(struct block_list *bl, int type) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_cleartimerskill_exception_pre ) { - bool (*preHookFunc) (int *skill_id); + int retVal___ = 0; + if( HPMHooks.count.HP_status_change_clear_buffs_pre ) { + int (*preHookFunc) (struct block_list *bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_exception_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_cleartimerskill_exception_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_buffs_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_change_clear_buffs_pre[hIndex].func; + retVal___ = preHookFunc(bl, &type); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64793,53 +71208,52 @@ bool HP_skill_cleartimerskill_exception(int skill_id) { } } { - retVal___ = HPMHooks.source.skill.cleartimerskill_exception(skill_id); + retVal___ = HPMHooks.source.status.change_clear_buffs(bl, type); } - if( HPMHooks.count.HP_skill_cleartimerskill_exception_post ) { - bool (*postHookFunc) (bool retVal___, int *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_exception_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_cleartimerskill_exception_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_status_change_clear_buffs_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_buffs_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_change_clear_buffs_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &type); } } return retVal___; } -bool HP_skill_castend_id_unknown(struct unit_data *ud, struct block_list *src, struct block_list *target) { +void HP_status_calc_bl_(struct block_list *bl, enum scb_flag flag, enum e_status_calc_opt opt) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_id_unknown_pre ) { - bool (*preHookFunc) (struct unit_data *ud, struct block_list *src, struct block_list *target); + if( HPMHooks.count.HP_status_calc_bl__pre ) { + void (*preHookFunc) (struct block_list *bl, enum scb_flag *flag, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_castend_id_unknown_pre[hIndex].func; - retVal___ = preHookFunc(ud, src, target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_bl__pre[hIndex].func; + preHookFunc(bl, &flag, &opt); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.castend_id_unknown(ud, src, target); + HPMHooks.source.status.calc_bl_(bl, flag, opt); } - if( HPMHooks.count.HP_skill_castend_id_unknown_post ) { - bool (*postHookFunc) (bool retVal___, struct unit_data *ud, struct block_list *src, struct block_list *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_castend_id_unknown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, ud, src, target); + if( HPMHooks.count.HP_status_calc_bl__post ) { + void (*postHookFunc) (struct block_list *bl, enum scb_flag *flag, enum e_status_calc_opt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_bl__post[hIndex].func; + postHookFunc(bl, &flag, &opt); } } - return retVal___; + return; } -bool HP_skill_castend_nodamage_id_dead_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_pre ) { - bool (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +int HP_status_calc_mob_(struct mob_data *md, enum e_status_calc_opt opt) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_status_calc_mob__pre ) { + int (*preHookFunc) (struct mob_data *md, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_dead_unknown_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, skill_id, skill_lv, tick, flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mob__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_mob__pre[hIndex].func; + retVal___ = preHookFunc(md, &opt); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64847,26 +71261,26 @@ bool HP_skill_castend_nodamage_id_dead_unknown(struct block_list *src, struct bl } } { - retVal___ = HPMHooks.source.skill.castend_nodamage_id_dead_unknown(src, bl, skill_id, skill_lv, tick, flag); + retVal___ = HPMHooks.source.status.calc_mob_(md, opt); } - if( HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_post ) { - bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_dead_unknown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); + if( HPMHooks.count.HP_status_calc_mob__post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, enum e_status_calc_opt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mob__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_mob__post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &opt); } } return retVal___; } -bool HP_skill_castend_nodamage_id_undead_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { +int HP_status_calc_pet_(struct pet_data *pd, enum e_status_calc_opt opt) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_pre ) { - bool (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_status_calc_pet__pre ) { + int (*preHookFunc) (struct pet_data *pd, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_undead_unknown_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, skill_id, skill_lv, tick, flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pet__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_pet__pre[hIndex].func; + retVal___ = preHookFunc(pd, &opt); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64874,26 +71288,26 @@ bool HP_skill_castend_nodamage_id_undead_unknown(struct block_list *src, struct } } { - retVal___ = HPMHooks.source.skill.castend_nodamage_id_undead_unknown(src, bl, skill_id, skill_lv, tick, flag); + retVal___ = HPMHooks.source.status.calc_pet_(pd, opt); } - if( HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_post ) { - bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_undead_unknown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); + if( HPMHooks.count.HP_status_calc_pet__post ) { + int (*postHookFunc) (int retVal___, struct pet_data *pd, enum e_status_calc_opt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pet__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_pet__post[hIndex].func; + retVal___ = postHookFunc(retVal___, pd, &opt); } } return retVal___; } -bool HP_skill_castend_nodamage_id_mado_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { +int HP_status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt opt) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_pre ) { - bool (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_status_calc_pc__pre ) { + int (*preHookFunc) (struct map_session_data *sd, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_mado_unknown_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, skill_id, skill_lv, tick, flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_pc__pre[hIndex].func; + retVal___ = preHookFunc(sd, &opt); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64901,79 +71315,79 @@ bool HP_skill_castend_nodamage_id_mado_unknown(struct block_list *src, struct bl } } { - retVal___ = HPMHooks.source.skill.castend_nodamage_id_mado_unknown(src, bl, skill_id, skill_lv, tick, flag); + retVal___ = HPMHooks.source.status.calc_pc_(sd, opt); } - if( HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_post ) { - bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_mado_unknown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); + if( HPMHooks.count.HP_status_calc_pc__post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum e_status_calc_opt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_pc__post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &opt); } } return retVal___; } -bool HP_skill_castend_nodamage_id_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { +void HP_status_calc_pc_additional(struct map_session_data *sd, enum e_status_calc_opt opt) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_nodamage_id_unknown_pre ) { - bool (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if( HPMHooks.count.HP_status_calc_pc_additional_pre ) { + void (*preHookFunc) (struct map_session_data *sd, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_unknown_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, skill_id, skill_lv, tick, flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_additional_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_pc_additional_pre[hIndex].func; + preHookFunc(sd, &opt); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.castend_nodamage_id_unknown(src, bl, skill_id, skill_lv, tick, flag); + HPMHooks.source.status.calc_pc_additional(sd, opt); } - if( HPMHooks.count.HP_skill_castend_nodamage_id_unknown_post ) { - bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_unknown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); + if( HPMHooks.count.HP_status_calc_pc_additional_post ) { + void (*postHookFunc) (struct map_session_data *sd, enum e_status_calc_opt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_additional_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_pc_additional_post[hIndex].func; + postHookFunc(sd, &opt); } } - return retVal___; + return; } -void HP_skill_castend_pos2_effect_unknown(struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { +int HP_status_calc_homunculus_(struct homun_data *hd, enum e_status_calc_opt opt) { int hIndex = 0; - if( HPMHooks.count.HP_skill_castend_pos2_effect_unknown_pre ) { - void (*preHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_status_calc_homunculus__pre ) { + int (*preHookFunc) (struct homun_data *hd, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_effect_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_castend_pos2_effect_unknown_pre[hIndex].func; - preHookFunc(src, x, y, skill_id, skill_lv, tick, flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_homunculus__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_homunculus__pre[hIndex].func; + retVal___ = preHookFunc(hd, &opt); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.castend_pos2_effect_unknown(src, x, y, skill_id, skill_lv, tick, flag); + retVal___ = HPMHooks.source.status.calc_homunculus_(hd, opt); } - if( HPMHooks.count.HP_skill_castend_pos2_effect_unknown_post ) { - void (*postHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_effect_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_castend_pos2_effect_unknown_post[hIndex].func; - postHookFunc(src, x, y, skill_id, skill_lv, tick, flag); + if( HPMHooks.count.HP_status_calc_homunculus__post ) { + int (*postHookFunc) (int retVal___, struct homun_data *hd, enum e_status_calc_opt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_homunculus__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_homunculus__post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd, &opt); } } - return; + return retVal___; } -bool HP_skill_castend_pos2_unknown(struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { +int HP_status_calc_mercenary_(struct mercenary_data *md, enum e_status_calc_opt opt) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_pos2_unknown_pre ) { - bool (*preHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + int retVal___ = 0; + if( HPMHooks.count.HP_status_calc_mercenary__pre ) { + int (*preHookFunc) (struct mercenary_data *md, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_castend_pos2_unknown_pre[hIndex].func; - retVal___ = preHookFunc(src, x, y, skill_id, skill_lv, tick, flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mercenary__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_mercenary__pre[hIndex].func; + retVal___ = preHookFunc(md, &opt); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -64981,51 +71395,52 @@ bool HP_skill_castend_pos2_unknown(struct block_list *src, int *x, int *y, uint1 } } { - retVal___ = HPMHooks.source.skill.castend_pos2_unknown(src, x, y, skill_id, skill_lv, tick, flag); + retVal___ = HPMHooks.source.status.calc_mercenary_(md, opt); } - if( HPMHooks.count.HP_skill_castend_pos2_unknown_post ) { - bool (*postHookFunc) (bool retVal___, struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_castend_pos2_unknown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, x, y, skill_id, skill_lv, tick, flag); + if( HPMHooks.count.HP_status_calc_mercenary__post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md, enum e_status_calc_opt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mercenary__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_mercenary__post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &opt); } } return retVal___; } -void HP_skill_unitsetting1_unknown(struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *val1, int *val2, int *val3) { +int HP_status_calc_elemental_(struct elemental_data *ed, enum e_status_calc_opt opt) { int hIndex = 0; - if( HPMHooks.count.HP_skill_unitsetting1_unknown_pre ) { - void (*preHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *val1, int *val2, int *val3); + int retVal___ = 0; + if( HPMHooks.count.HP_status_calc_elemental__pre ) { + int (*preHookFunc) (struct elemental_data *ed, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting1_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_unitsetting1_unknown_pre[hIndex].func; - preHookFunc(src, skill_id, skill_lv, x, y, flag, val1, val2, val3); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_elemental__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_elemental__pre[hIndex].func; + retVal___ = preHookFunc(ed, &opt); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.unitsetting1_unknown(src, skill_id, skill_lv, x, y, flag, val1, val2, val3); + retVal___ = HPMHooks.source.status.calc_elemental_(ed, opt); } - if( HPMHooks.count.HP_skill_unitsetting1_unknown_post ) { - void (*postHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *val1, int *val2, int *val3); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting1_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_unitsetting1_unknown_post[hIndex].func; - postHookFunc(src, skill_id, skill_lv, x, y, flag, val1, val2, val3); + if( HPMHooks.count.HP_status_calc_elemental__post ) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed, enum e_status_calc_opt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_elemental__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_elemental__post[hIndex].func; + retVal___ = postHookFunc(retVal___, ed, &opt); } } - return; + return retVal___; } -void HP_skill_unitsetting2_unknown(struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *unit_flag, int *val1, int *val2, int *val3, struct skill_unit_group *group) { +void HP_status_calc_misc(struct block_list *bl, struct status_data *st, int level) { int hIndex = 0; - if( HPMHooks.count.HP_skill_unitsetting2_unknown_pre ) { - void (*preHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *unit_flag, int *val1, int *val2, int *val3, struct skill_unit_group *group); + if( HPMHooks.count.HP_status_calc_misc_pre ) { + void (*preHookFunc) (struct block_list *bl, struct status_data *st, int *level); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting2_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_unitsetting2_unknown_pre[hIndex].func; - preHookFunc(src, skill_id, skill_lv, x, y, flag, unit_flag, val1, val2, val3, group); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_misc_pre[hIndex].func; + preHookFunc(bl, st, &level); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65033,25 +71448,25 @@ void HP_skill_unitsetting2_unknown(struct block_list *src, uint16 *skill_id, uin } } { - HPMHooks.source.skill.unitsetting2_unknown(src, skill_id, skill_lv, x, y, flag, unit_flag, val1, val2, val3, group); + HPMHooks.source.status.calc_misc(bl, st, level); } - if( HPMHooks.count.HP_skill_unitsetting2_unknown_post ) { - void (*postHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *unit_flag, int *val1, int *val2, int *val3, struct skill_unit_group *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting2_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_unitsetting2_unknown_post[hIndex].func; - postHookFunc(src, skill_id, skill_lv, x, y, flag, unit_flag, val1, val2, val3, group); + if( HPMHooks.count.HP_status_calc_misc_post ) { + void (*postHookFunc) (struct block_list *bl, struct status_data *st, int *level); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_misc_post[hIndex].func; + postHookFunc(bl, st, &level); } } return; } -void HP_skill_unit_onplace_unknown(struct skill_unit *src, struct block_list *bl, int64 *tick) { +void HP_status_calc_regen(struct block_list *bl, struct status_data *st, struct regen_data *regen) { int hIndex = 0; - if( HPMHooks.count.HP_skill_unit_onplace_unknown_pre ) { - void (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); + if( HPMHooks.count.HP_status_calc_regen_pre ) { + void (*preHookFunc) (struct block_list *bl, struct status_data *st, struct regen_data *regen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_unit_onplace_unknown_pre[hIndex].func; - preHookFunc(src, bl, tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_regen_pre[hIndex].func; + preHookFunc(bl, st, regen); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65059,53 +71474,52 @@ void HP_skill_unit_onplace_unknown(struct skill_unit *src, struct block_list *bl } } { - HPMHooks.source.skill.unit_onplace_unknown(src, bl, tick); + HPMHooks.source.status.calc_regen(bl, st, regen); } - if( HPMHooks.count.HP_skill_unit_onplace_unknown_post ) { - void (*postHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_unit_onplace_unknown_post[hIndex].func; - postHookFunc(src, bl, tick); + if( HPMHooks.count.HP_status_calc_regen_post ) { + void (*postHookFunc) (struct block_list *bl, struct status_data *st, struct regen_data *regen); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_regen_post[hIndex].func; + postHookFunc(bl, st, regen); } } return; } -int HP_skill_check_condition_castbegin_off_unknown(struct status_change *sc, uint16 *skill_id) { +void HP_status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, struct status_change *sc) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_pre ) { - int (*preHookFunc) (struct status_change *sc, uint16 *skill_id); + if( HPMHooks.count.HP_status_calc_regen_rate_pre ) { + void (*preHookFunc) (struct block_list *bl, struct regen_data *regen, struct status_change *sc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_off_unknown_pre[hIndex].func; - retVal___ = preHookFunc(sc, skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_rate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_regen_rate_pre[hIndex].func; + preHookFunc(bl, regen, sc); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.skill.check_condition_castbegin_off_unknown(sc, skill_id); + HPMHooks.source.status.calc_regen_rate(bl, regen, sc); } - if( HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_post ) { - int (*postHookFunc) (int retVal___, struct status_change *sc, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_off_unknown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sc, skill_id); + if( HPMHooks.count.HP_status_calc_regen_rate_post ) { + void (*postHookFunc) (struct block_list *bl, struct regen_data *regen, struct status_change *sc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_rate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_regen_rate_post[hIndex].func; + postHookFunc(bl, regen, sc); } } - return retVal___; + return; } -int HP_skill_check_condition_castbegin_mount_unknown(struct status_change *sc, uint16 *skill_id) { +int HP_status_check_skilluse(struct block_list *src, struct block_list *target, uint16 skill_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_pre ) { - int (*preHookFunc) (struct status_change *sc, uint16 *skill_id); + if( HPMHooks.count.HP_status_check_skilluse_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_mount_unknown_pre[hIndex].func; - retVal___ = preHookFunc(sc, skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_skilluse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_check_skilluse_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &skill_id, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65113,26 +71527,26 @@ int HP_skill_check_condition_castbegin_mount_unknown(struct status_change *sc, u } } { - retVal___ = HPMHooks.source.skill.check_condition_castbegin_mount_unknown(sc, skill_id); + retVal___ = HPMHooks.source.status.check_skilluse(src, target, skill_id, flag); } - if( HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_post ) { - int (*postHookFunc) (int retVal___, struct status_change *sc, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_mount_unknown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sc, skill_id); + if( HPMHooks.count.HP_status_check_skilluse_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_skilluse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_check_skilluse_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &skill_id, &flag); } } return retVal___; } -int HP_skill_check_condition_castbegin_madogear_unknown(struct status_change *sc, uint16 *skill_id) { +int HP_status_check_visibility(struct block_list *src, struct block_list *target) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_pre ) { - int (*preHookFunc) (struct status_change *sc, uint16 *skill_id); + if( HPMHooks.count.HP_status_check_visibility_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_madogear_unknown_pre[hIndex].func; - retVal___ = preHookFunc(sc, skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_visibility_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_check_visibility_pre[hIndex].func; + retVal___ = preHookFunc(src, target); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65140,26 +71554,26 @@ int HP_skill_check_condition_castbegin_madogear_unknown(struct status_change *sc } } { - retVal___ = HPMHooks.source.skill.check_condition_castbegin_madogear_unknown(sc, skill_id); + retVal___ = HPMHooks.source.status.check_visibility(src, target); } - if( HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_post ) { - int (*postHookFunc) (int retVal___, struct status_change *sc, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_madogear_unknown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sc, skill_id); + if( HPMHooks.count.HP_status_check_visibility_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_visibility_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_check_visibility_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target); } } return retVal___; } -int HP_skill_check_condition_castbegin_unknown(struct status_change *sc, uint16 *skill_id) { +int HP_status_change_spread(struct block_list *src, struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castbegin_unknown_pre ) { - int (*preHookFunc) (struct status_change *sc, uint16 *skill_id); + if( HPMHooks.count.HP_status_change_spread_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_unknown_pre[hIndex].func; - retVal___ = preHookFunc(sc, skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_spread_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_change_spread_pre[hIndex].func; + retVal___ = preHookFunc(src, bl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65167,52 +71581,53 @@ int HP_skill_check_condition_castbegin_unknown(struct status_change *sc, uint16 } } { - retVal___ = HPMHooks.source.skill.check_condition_castbegin_unknown(sc, skill_id); + retVal___ = HPMHooks.source.status.change_spread(src, bl); } - if( HPMHooks.count.HP_skill_check_condition_castbegin_unknown_post ) { - int (*postHookFunc) (int retVal___, struct status_change *sc, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_unknown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sc, skill_id); + if( HPMHooks.count.HP_status_change_spread_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_spread_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_change_spread_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl); } } return retVal___; } -void HP_skill_check_condition_castend_unknown(struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv) { +defType HP_status_calc_def(struct block_list *bl, struct status_change *sc, int def, bool viewable) { int hIndex = 0; - if( HPMHooks.count.HP_skill_check_condition_castend_unknown_pre ) { - void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + defType retVal___ = 0; + if( HPMHooks.count.HP_status_calc_def_pre ) { + defType (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *def, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_check_condition_castend_unknown_pre[hIndex].func; - preHookFunc(sd, skill_id, skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_def_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &def, &viewable); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.check_condition_castend_unknown(sd, skill_id, skill_lv); + retVal___ = HPMHooks.source.status.calc_def(bl, sc, def, viewable); } - if( HPMHooks.count.HP_skill_check_condition_castend_unknown_post ) { - void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_check_condition_castend_unknown_post[hIndex].func; - postHookFunc(sd, skill_id, skill_lv); + if( HPMHooks.count.HP_status_calc_def_post ) { + defType (*postHookFunc) (defType retVal___, struct block_list *bl, struct status_change *sc, int *def, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_def_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &def, &viewable); } } - return; + return retVal___; } -bool HP_skill_get_requirement_off_unknown(struct status_change *sc, uint16 *skill_id) { +short HP_status_calc_def2(struct block_list *bl, struct status_change *sc, int def2, bool viewable) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_get_requirement_off_unknown_pre ) { - bool (*preHookFunc) (struct status_change *sc, uint16 *skill_id); + short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_def2_pre ) { + short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *def2, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_off_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_requirement_off_unknown_pre[hIndex].func; - retVal___ = preHookFunc(sc, skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_def2_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &def2, &viewable); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65220,26 +71635,26 @@ bool HP_skill_get_requirement_off_unknown(struct status_change *sc, uint16 *skil } } { - retVal___ = HPMHooks.source.skill.get_requirement_off_unknown(sc, skill_id); + retVal___ = HPMHooks.source.status.calc_def2(bl, sc, def2, viewable); } - if( HPMHooks.count.HP_skill_get_requirement_off_unknown_post ) { - bool (*postHookFunc) (bool retVal___, struct status_change *sc, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_off_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_requirement_off_unknown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sc, skill_id); + if( HPMHooks.count.HP_status_calc_def2_post ) { + short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, int *def2, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_def2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &def2, &viewable); } } return retVal___; } -bool HP_skill_get_requirement_item_unknown(struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, uint16 *idx, int *i) { +defType HP_status_calc_mdef(struct block_list *bl, struct status_change *sc, int mdef, bool viewable) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_get_requirement_item_unknown_pre ) { - bool (*preHookFunc) (struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, uint16 *idx, int *i); + defType retVal___ = 0; + if( HPMHooks.count.HP_status_calc_mdef_pre ) { + defType (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mdef, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_item_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_requirement_item_unknown_pre[hIndex].func; - retVal___ = preHookFunc(sc, sd, skill_id, skill_lv, idx, i); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_mdef_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &mdef, &viewable); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65247,53 +71662,53 @@ bool HP_skill_get_requirement_item_unknown(struct status_change *sc, struct map_ } } { - retVal___ = HPMHooks.source.skill.get_requirement_item_unknown(sc, sd, skill_id, skill_lv, idx, i); + retVal___ = HPMHooks.source.status.calc_mdef(bl, sc, mdef, viewable); } - if( HPMHooks.count.HP_skill_get_requirement_item_unknown_post ) { - bool (*postHookFunc) (bool retVal___, struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, uint16 *idx, int *i); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_item_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_requirement_item_unknown_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sc, sd, skill_id, skill_lv, idx, i); + if( HPMHooks.count.HP_status_calc_mdef_post ) { + defType (*postHookFunc) (defType retVal___, struct block_list *bl, struct status_change *sc, int *mdef, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_mdef_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &mdef, &viewable); } } return retVal___; } -void HP_skill_get_requirement_unknown(struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, struct skill_condition *req) { +short HP_status_calc_mdef2(struct block_list *bl, struct status_change *sc, int mdef2, bool viewable) { int hIndex = 0; - if( HPMHooks.count.HP_skill_get_requirement_unknown_pre ) { - void (*preHookFunc) (struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, struct skill_condition *req); + short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_mdef2_pre ) { + short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mdef2, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_unknown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_skill_get_requirement_unknown_pre[hIndex].func; - preHookFunc(sc, sd, skill_id, skill_lv, req); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_mdef2_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &mdef2, &viewable); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.get_requirement_unknown(sc, sd, skill_id, skill_lv, req); + retVal___ = HPMHooks.source.status.calc_mdef2(bl, sc, mdef2, viewable); } - if( HPMHooks.count.HP_skill_get_requirement_unknown_post ) { - void (*postHookFunc) (struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, struct skill_condition *req); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_unknown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_skill_get_requirement_unknown_post[hIndex].func; - postHookFunc(sc, sd, skill_id, skill_lv, req); + if( HPMHooks.count.HP_status_calc_mdef2_post ) { + short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, int *mdef2, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_mdef2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &mdef2, &viewable); } } - return; + return retVal___; } -/* status */ -int HP_status_init(bool minimal) { +unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_init_pre ) { - int (*preHookFunc) (bool *minimal); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_batk_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *batk, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_init_pre[hIndex].func; - retVal___ = preHookFunc(&minimal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_batk_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &batk, &viewable); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65301,52 +71716,53 @@ int HP_status_init(bool minimal) { } } { - retVal___ = HPMHooks.source.status.init(minimal); + retVal___ = HPMHooks.source.status.calc_batk(bl, sc, batk, viewable); } - if( HPMHooks.count.HP_status_init_post ) { - int (*postHookFunc) (int retVal___, bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &minimal); + if( HPMHooks.count.HP_status_calc_batk_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *batk, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_batk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &batk, &viewable); } } return retVal___; } -void HP_status_final(void) { +unsigned short HP_status_base_matk(struct block_list *bl, const struct status_data *st, int level) { int hIndex = 0; - if( HPMHooks.count.HP_status_final_pre ) { - void (*preHookFunc) (void); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_base_matk_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, const struct status_data *st, int *level); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_final_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_base_matk_pre[hIndex].func; + retVal___ = preHookFunc(bl, st, &level); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.status.final(); + retVal___ = HPMHooks.source.status.base_matk(bl, st, level); } - if( HPMHooks.count.HP_status_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_final_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_status_base_matk_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, const struct status_data *st, int *level); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_base_matk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, st, &level); } } - return; + return retVal___; } -int HP_status_get_refine_chance(enum refine_type wlv, int refine) { +int HP_status_get_weapon_atk(struct block_list *src, struct weapon_atk *watk, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_refine_chance_pre ) { - int (*preHookFunc) (enum refine_type *wlv, int *refine); + if( HPMHooks.count.HP_status_get_weapon_atk_pre ) { + int (*preHookFunc) (struct block_list *src, struct weapon_atk *watk, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_refine_chance_pre[hIndex].func; - retVal___ = preHookFunc(&wlv, &refine); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_weapon_atk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_weapon_atk_pre[hIndex].func; + retVal___ = preHookFunc(src, watk, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65354,26 +71770,26 @@ int HP_status_get_refine_chance(enum refine_type wlv, int refine) { } } { - retVal___ = HPMHooks.source.status.get_refine_chance(wlv, refine); + retVal___ = HPMHooks.source.status.get_weapon_atk(src, watk, flag); } - if( HPMHooks.count.HP_status_get_refine_chance_post ) { - int (*postHookFunc) (int retVal___, enum refine_type *wlv, int *refine); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_refine_chance_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &wlv, &refine); + if( HPMHooks.count.HP_status_get_weapon_atk_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct weapon_atk *watk, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_weapon_atk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_weapon_atk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, watk, &flag); } } return retVal___; } -sc_type HP_status_skill2sc(int skill_id) { +int HP_status_get_total_mdef(struct block_list *src) { int hIndex = 0; - sc_type retVal___ = SC_NONE; - if( HPMHooks.count.HP_status_skill2sc_pre ) { - sc_type (*preHookFunc) (int *skill_id); + int retVal___ = 0; + if( HPMHooks.count.HP_status_get_total_mdef_pre ) { + int (*preHookFunc) (struct block_list *src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_skill2sc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_skill2sc_pre[hIndex].func; - retVal___ = preHookFunc(&skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_mdef_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_total_mdef_pre[hIndex].func; + retVal___ = preHookFunc(src); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65381,26 +71797,26 @@ sc_type HP_status_skill2sc(int skill_id) { } } { - retVal___ = HPMHooks.source.status.skill2sc(skill_id); + retVal___ = HPMHooks.source.status.get_total_mdef(src); } - if( HPMHooks.count.HP_status_skill2sc_post ) { - sc_type (*postHookFunc) (sc_type retVal___, int *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_skill2sc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_skill2sc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + if( HPMHooks.count.HP_status_get_total_mdef_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_mdef_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_total_mdef_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src); } } return retVal___; } -int HP_status_sc2skill(sc_type sc) { +int HP_status_get_total_def(struct block_list *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_sc2skill_pre ) { - int (*preHookFunc) (sc_type *sc); + if( HPMHooks.count.HP_status_get_total_def_pre ) { + int (*preHookFunc) (struct block_list *src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2skill_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_sc2skill_pre[hIndex].func; - retVal___ = preHookFunc(&sc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_def_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_total_def_pre[hIndex].func; + retVal___ = preHookFunc(src); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65408,26 +71824,26 @@ int HP_status_sc2skill(sc_type sc) { } } { - retVal___ = HPMHooks.source.status.sc2skill(sc); + retVal___ = HPMHooks.source.status.get_total_def(src); } - if( HPMHooks.count.HP_status_sc2skill_post ) { - int (*postHookFunc) (int retVal___, sc_type *sc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2skill_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_sc2skill_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &sc); + if( HPMHooks.count.HP_status_get_total_def_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_def_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_total_def_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src); } } return retVal___; } -unsigned int HP_status_sc2scb_flag(sc_type sc) { +int HP_status_get_matk(struct block_list *src, int flag) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_sc2scb_flag_pre ) { - unsigned int (*preHookFunc) (sc_type *sc); + int retVal___ = 0; + if( HPMHooks.count.HP_status_get_matk_pre ) { + int (*preHookFunc) (struct block_list *src, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2scb_flag_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_sc2scb_flag_pre[hIndex].func; - retVal___ = preHookFunc(&sc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_matk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_matk_pre[hIndex].func; + retVal___ = preHookFunc(src, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65435,53 +71851,52 @@ unsigned int HP_status_sc2scb_flag(sc_type sc) { } } { - retVal___ = HPMHooks.source.status.sc2scb_flag(sc); + retVal___ = HPMHooks.source.status.get_matk(src, flag); } - if( HPMHooks.count.HP_status_sc2scb_flag_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, sc_type *sc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2scb_flag_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_sc2scb_flag_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &sc); + if( HPMHooks.count.HP_status_get_matk_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_matk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_matk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &flag); } } return retVal___; } -int HP_status_type2relevant_bl_types(int type) { +void HP_status_update_matk(struct block_list *bl) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_type2relevant_bl_types_pre ) { - int (*preHookFunc) (int *type); + if( HPMHooks.count.HP_status_update_matk_pre ) { + void (*preHookFunc) (struct block_list *bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_type2relevant_bl_types_pre[hIndex].func; - retVal___ = preHookFunc(&type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_update_matk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_update_matk_pre[hIndex].func; + preHookFunc(bl); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.status.type2relevant_bl_types(type); + HPMHooks.source.status.update_matk(bl); } - if( HPMHooks.count.HP_status_type2relevant_bl_types_post ) { - int (*postHookFunc) (int retVal___, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_type2relevant_bl_types_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type); + if( HPMHooks.count.HP_status_update_matk_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_update_matk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_update_matk_post[hIndex].func; + postHookFunc(bl); } } - return retVal___; + return; } -int HP_status_get_sc_type(sc_type idx) { +int HP_status_readdb(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_sc_type_pre ) { - int (*preHookFunc) (sc_type *idx); + if( HPMHooks.count.HP_status_readdb_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_type_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_sc_type_pre[hIndex].func; - retVal___ = preHookFunc(&idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_readdb_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65489,80 +71904,78 @@ int HP_status_get_sc_type(sc_type idx) { } } { - retVal___ = HPMHooks.source.status.get_sc_type(idx); + retVal___ = HPMHooks.source.status.readdb(); } - if( HPMHooks.count.HP_status_get_sc_type_post ) { - int (*postHookFunc) (int retVal___, sc_type *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_type_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_sc_type_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &idx); + if( HPMHooks.count.HP_status_readdb_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_readdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_status_damage(struct block_list *src, struct block_list *target, int64 hp, int64 sp, int walkdelay, int flag) { +void HP_status_initChangeTables(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_damage_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *target, int64 *hp, int64 *sp, int *walkdelay, int *flag); + if( HPMHooks.count.HP_status_initChangeTables_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_damage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_damage_pre[hIndex].func; - retVal___ = preHookFunc(src, target, &hp, &sp, &walkdelay, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_initChangeTables_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.status.damage(src, target, hp, sp, walkdelay, flag); + HPMHooks.source.status.initChangeTables(); } - if( HPMHooks.count.HP_status_damage_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int64 *hp, int64 *sp, int *walkdelay, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_damage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_damage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, target, &hp, &sp, &walkdelay, &flag); + if( HPMHooks.count.HP_status_initChangeTables_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_initChangeTables_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_status_charge(struct block_list *bl, int64 hp, int64 sp) { +void HP_status_initDummyData(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_charge_pre ) { - int (*preHookFunc) (struct block_list *bl, int64 *hp, int64 *sp); + if( HPMHooks.count.HP_status_initDummyData_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_charge_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_charge_pre[hIndex].func; - retVal___ = preHookFunc(bl, &hp, &sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_initDummyData_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.status.charge(bl, hp, sp); + HPMHooks.source.status.initDummyData(); } - if( HPMHooks.count.HP_status_charge_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int64 *hp, int64 *sp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_charge_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_charge_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &hp, &sp); + if( HPMHooks.count.HP_status_initDummyData_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_initDummyData_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_status_percent_change(struct block_list *src, struct block_list *target, signed char hp_rate, signed char sp_rate, int flag) { +int HP_status_base_amotion_pc(struct map_session_data *sd, struct status_data *st) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_percent_change_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *target, signed char *hp_rate, signed char *sp_rate, int *flag); + if( HPMHooks.count.HP_status_base_amotion_pc_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct status_data *st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_percent_change_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_percent_change_pre[hIndex].func; - retVal___ = preHookFunc(src, target, &hp_rate, &sp_rate, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_amotion_pc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_base_amotion_pc_pre[hIndex].func; + retVal___ = preHookFunc(sd, st); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65570,26 +71983,26 @@ int HP_status_percent_change(struct block_list *src, struct block_list *target, } } { - retVal___ = HPMHooks.source.status.percent_change(src, target, hp_rate, sp_rate, flag); + retVal___ = HPMHooks.source.status.base_amotion_pc(sd, st); } - if( HPMHooks.count.HP_status_percent_change_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, signed char *hp_rate, signed char *sp_rate, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_percent_change_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_percent_change_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, target, &hp_rate, &sp_rate, &flag); + if( HPMHooks.count.HP_status_base_amotion_pc_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct status_data *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_amotion_pc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_base_amotion_pc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, st); } } return retVal___; } -int HP_status_set_hp(struct block_list *bl, unsigned int hp, int flag) { +unsigned short HP_status_base_atk(const struct block_list *bl, const struct status_data *st) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_set_hp_pre ) { - int (*preHookFunc) (struct block_list *bl, unsigned int *hp, int *flag); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_base_atk_pre ) { + unsigned short (*preHookFunc) (const struct block_list *bl, const struct status_data *st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_hp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_set_hp_pre[hIndex].func; - retVal___ = preHookFunc(bl, &hp, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_base_atk_pre[hIndex].func; + retVal___ = preHookFunc(bl, st); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65597,26 +72010,26 @@ int HP_status_set_hp(struct block_list *bl, unsigned int hp, int flag) { } } { - retVal___ = HPMHooks.source.status.set_hp(bl, hp, flag); + retVal___ = HPMHooks.source.status.base_atk(bl, st); } - if( HPMHooks.count.HP_status_set_hp_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *hp, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_hp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_set_hp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &hp, &flag); + if( HPMHooks.count.HP_status_base_atk_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, const struct block_list *bl, const struct status_data *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_base_atk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, st); } } return retVal___; } -int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) { +unsigned int HP_status_get_base_maxhp(struct map_session_data *sd, struct status_data *st) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_set_sp_pre ) { - int (*preHookFunc) (struct block_list *bl, unsigned int *sp, int *flag); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_status_get_base_maxhp_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd, struct status_data *st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_set_sp_pre[hIndex].func; - retVal___ = preHookFunc(bl, &sp, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxhp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_base_maxhp_pre[hIndex].func; + retVal___ = preHookFunc(sd, st); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65624,26 +72037,26 @@ int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) { } } { - retVal___ = HPMHooks.source.status.set_sp(bl, sp, flag); + retVal___ = HPMHooks.source.status.get_base_maxhp(sd, st); } - if( HPMHooks.count.HP_status_set_sp_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *sp, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_set_sp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &sp, &flag); + if( HPMHooks.count.HP_status_get_base_maxhp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd, struct status_data *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxhp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_base_maxhp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, st); } } return retVal___; } -int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, int flag) { +unsigned int HP_status_get_base_maxsp(struct map_session_data *sd, struct status_data *st) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_heal_pre ) { - int (*preHookFunc) (struct block_list *bl, int64 *hp, int64 *sp, int *flag); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_status_get_base_maxsp_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd, struct status_data *st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_heal_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_heal_pre[hIndex].func; - retVal___ = preHookFunc(bl, &hp, &sp, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxsp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_base_maxsp_pre[hIndex].func; + retVal___ = preHookFunc(sd, st); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65651,26 +72064,26 @@ int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, int flag) { } } { - retVal___ = HPMHooks.source.status.heal(bl, hp, sp, flag); + retVal___ = HPMHooks.source.status.get_base_maxsp(sd, st); } - if( HPMHooks.count.HP_status_heal_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int64 *hp, int64 *sp, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_heal_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_heal_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &hp, &sp, &flag); + if( HPMHooks.count.HP_status_get_base_maxsp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd, struct status_data *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxsp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_base_maxsp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, st); } } return retVal___; } -int HP_status_revive(struct block_list *bl, unsigned char per_hp, unsigned char per_sp) { +int HP_status_calc_npc_(struct npc_data *nd, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_revive_pre ) { - int (*preHookFunc) (struct block_list *bl, unsigned char *per_hp, unsigned char *per_sp); + if( HPMHooks.count.HP_status_calc_npc__pre ) { + int (*preHookFunc) (struct npc_data *nd, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_revive_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_revive_pre[hIndex].func; - retVal___ = preHookFunc(bl, &per_hp, &per_sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_npc__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_npc__pre[hIndex].func; + retVal___ = preHookFunc(nd, &opt); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65678,26 +72091,26 @@ int HP_status_revive(struct block_list *bl, unsigned char per_hp, unsigned char } } { - retVal___ = HPMHooks.source.status.revive(bl, per_hp, per_sp); + retVal___ = HPMHooks.source.status.calc_npc_(nd, opt); } - if( HPMHooks.count.HP_status_revive_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned char *per_hp, unsigned char *per_sp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_revive_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_revive_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &per_hp, &per_sp); + if( HPMHooks.count.HP_status_calc_npc__post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, enum e_status_calc_opt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_npc__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_npc__post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, &opt); } } return retVal___; } -int HP_status_fixed_revive(struct block_list *bl, unsigned int per_hp, unsigned int per_sp) { +unsigned short HP_status_calc_str(struct block_list *bl, struct status_change *sc, int str) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_fixed_revive_pre ) { - int (*preHookFunc) (struct block_list *bl, unsigned int *per_hp, unsigned int *per_sp); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_str_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_fixed_revive_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_fixed_revive_pre[hIndex].func; - retVal___ = preHookFunc(bl, &per_hp, &per_sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_str_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &str); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65705,26 +72118,26 @@ int HP_status_fixed_revive(struct block_list *bl, unsigned int per_hp, unsigned } } { - retVal___ = HPMHooks.source.status.fixed_revive(bl, per_hp, per_sp); + retVal___ = HPMHooks.source.status.calc_str(bl, sc, str); } - if( HPMHooks.count.HP_status_fixed_revive_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *per_hp, unsigned int *per_sp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_fixed_revive_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_fixed_revive_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &per_hp, &per_sp); + if( HPMHooks.count.HP_status_calc_str_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &str); } } return retVal___; } -struct regen_data* HP_status_get_regen_data(struct block_list *bl) { +unsigned short HP_status_calc_agi(struct block_list *bl, struct status_change *sc, int agi) { int hIndex = 0; - struct regen_data* retVal___ = NULL; - if( HPMHooks.count.HP_status_get_regen_data_pre ) { - struct regen_data* (*preHookFunc) (struct block_list *bl); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_agi_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *agi); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_regen_data_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_regen_data_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_agi_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_agi_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &agi); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65732,26 +72145,26 @@ struct regen_data* HP_status_get_regen_data(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.get_regen_data(bl); + retVal___ = HPMHooks.source.status.calc_agi(bl, sc, agi); } - if( HPMHooks.count.HP_status_get_regen_data_post ) { - struct regen_data* (*postHookFunc) (struct regen_data* retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_regen_data_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_regen_data_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_agi_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *agi); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_agi_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_agi_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &agi); } } return retVal___; } -struct status_data* HP_status_get_status_data(struct block_list *bl) { +unsigned short HP_status_calc_vit(struct block_list *bl, struct status_change *sc, int vit) { int hIndex = 0; - struct status_data* retVal___ = NULL; - if( HPMHooks.count.HP_status_get_status_data_pre ) { - struct status_data* (*preHookFunc) (struct block_list *bl); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_vit_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *vit); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_status_data_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_status_data_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_vit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_vit_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &vit); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65759,26 +72172,26 @@ struct status_data* HP_status_get_status_data(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.get_status_data(bl); + retVal___ = HPMHooks.source.status.calc_vit(bl, sc, vit); } - if( HPMHooks.count.HP_status_get_status_data_post ) { - struct status_data* (*postHookFunc) (struct status_data* retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_status_data_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_status_data_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_vit_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *vit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_vit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_vit_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &vit); } } return retVal___; } -struct status_data* HP_status_get_base_status(struct block_list *bl) { +unsigned short HP_status_calc_int(struct block_list *bl, struct status_change *sc, int int_) { int hIndex = 0; - struct status_data* retVal___ = NULL; - if( HPMHooks.count.HP_status_get_base_status_pre ) { - struct status_data* (*preHookFunc) (struct block_list *bl); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_int_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *int_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_status_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_base_status_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_int_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_int_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &int_); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65786,26 +72199,26 @@ struct status_data* HP_status_get_base_status(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.get_base_status(bl); + retVal___ = HPMHooks.source.status.calc_int(bl, sc, int_); } - if( HPMHooks.count.HP_status_get_base_status_post ) { - struct status_data* (*postHookFunc) (struct status_data* retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_status_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_base_status_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_int_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *int_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_int_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_int_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &int_); } } return retVal___; } -const char* HP_status_get_name(struct block_list *bl) { +unsigned short HP_status_calc_dex(struct block_list *bl, struct status_change *sc, int dex) { int hIndex = 0; - const char* retVal___ = NULL; - if( HPMHooks.count.HP_status_get_name_pre ) { - const char* (*preHookFunc) (struct block_list *bl); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_dex_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *dex); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_name_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_name_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dex_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_dex_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &dex); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65813,26 +72226,26 @@ const char* HP_status_get_name(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.get_name(bl); + retVal___ = HPMHooks.source.status.calc_dex(bl, sc, dex); } - if( HPMHooks.count.HP_status_get_name_post ) { - const char* (*postHookFunc) (const char* retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_name_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_name_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_dex_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *dex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dex_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_dex_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &dex); } } return retVal___; } -int HP_status_get_class(struct block_list *bl) { +unsigned short HP_status_calc_luk(struct block_list *bl, struct status_change *sc, int luk) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_get_class_pre ) { - int (*preHookFunc) (struct block_list *bl); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_luk_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *luk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_class_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_class_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_luk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_luk_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &luk); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65840,26 +72253,26 @@ int HP_status_get_class(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.get_class(bl); + retVal___ = HPMHooks.source.status.calc_luk(bl, sc, luk); } - if( HPMHooks.count.HP_status_get_class_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_class_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_class_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_luk_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *luk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_luk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_luk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &luk); } } return retVal___; } -int HP_status_get_lv(struct block_list *bl) { +unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_get_lv_pre ) { - int (*preHookFunc) (struct block_list *bl); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_watk_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *watk, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_lv_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_lv_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_watk_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &watk, &viewable); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65867,26 +72280,26 @@ int HP_status_get_lv(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.get_lv(bl); + retVal___ = HPMHooks.source.status.calc_watk(bl, sc, watk, viewable); } - if( HPMHooks.count.HP_status_get_lv_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_lv_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_lv_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_watk_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *watk, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_watk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &watk, &viewable); } } return retVal___; } -defType HP_status_get_def(struct block_list *bl) { +unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable) { int hIndex = 0; - defType retVal___ = 0; - if( HPMHooks.count.HP_status_get_def_pre ) { - defType (*preHookFunc) (struct block_list *bl); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_matk_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *matk, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_def_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_def_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_matk_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &matk, &viewable); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65894,26 +72307,26 @@ defType HP_status_get_def(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.get_def(bl); + retVal___ = HPMHooks.source.status.calc_matk(bl, sc, matk, viewable); } - if( HPMHooks.count.HP_status_get_def_post ) { - defType (*postHookFunc) (defType retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_def_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_def_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_matk_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *matk, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_matk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &matk, &viewable); } } return retVal___; } -unsigned short HP_status_get_speed(struct block_list *bl) { +signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc, int hit, bool viewable) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_get_speed_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl); + signed short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_hit_pre ) { + signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *hit, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_speed_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_speed_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_hit_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &hit, &viewable); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65921,26 +72334,26 @@ unsigned short HP_status_get_speed(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.get_speed(bl); + retVal___ = HPMHooks.source.status.calc_hit(bl, sc, hit, viewable); } - if( HPMHooks.count.HP_status_get_speed_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_speed_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_speed_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_hit_post ) { + signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int *hit, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_hit_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &hit, &viewable); } } return retVal___; } -unsigned char HP_status_calc_attack_element(struct block_list *bl, struct status_change *sc, int element) { +signed short HP_status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable) { int hIndex = 0; - unsigned char retVal___ = 0; - if( HPMHooks.count.HP_status_calc_attack_element_pre ) { - unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *element); + signed short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_critical_pre ) { + signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *critical, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_attack_element_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_attack_element_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &element); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_critical_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &critical, &viewable); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65948,26 +72361,26 @@ unsigned char HP_status_calc_attack_element(struct block_list *bl, struct status } } { - retVal___ = HPMHooks.source.status.calc_attack_element(bl, sc, element); + retVal___ = HPMHooks.source.status.calc_critical(bl, sc, critical, viewable); } - if( HPMHooks.count.HP_status_calc_attack_element_post ) { - unsigned char (*postHookFunc) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int *element); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_attack_element_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_attack_element_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &element); + if( HPMHooks.count.HP_status_calc_critical_post ) { + signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int *critical, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_critical_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &critical, &viewable); } } return retVal___; } -int HP_status_get_party_id(struct block_list *bl) { +signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_get_party_id_pre ) { - int (*preHookFunc) (struct block_list *bl); + signed short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_flee_pre ) { + signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *flee, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_party_id_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_party_id_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_flee_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &flee, &viewable); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -65975,26 +72388,26 @@ int HP_status_get_party_id(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.get_party_id(bl); + retVal___ = HPMHooks.source.status.calc_flee(bl, sc, flee, viewable); } - if( HPMHooks.count.HP_status_get_party_id_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_party_id_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_party_id_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_flee_post ) { + signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int *flee, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_flee_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &flee, &viewable); } } return retVal___; } -int HP_status_get_guild_id(struct block_list *bl) { +signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_get_guild_id_pre ) { - int (*preHookFunc) (struct block_list *bl); + signed short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_flee2_pre ) { + signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *flee2, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_guild_id_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_guild_id_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_flee2_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &flee2, &viewable); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66002,26 +72415,26 @@ int HP_status_get_guild_id(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.get_guild_id(bl); + retVal___ = HPMHooks.source.status.calc_flee2(bl, sc, flee2, viewable); } - if( HPMHooks.count.HP_status_get_guild_id_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_guild_id_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_guild_id_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_flee2_post ) { + signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int *flee2, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_flee2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &flee2, &viewable); } } return retVal___; } -int HP_status_get_emblem_id(struct block_list *bl) { +unsigned short HP_status_calc_speed(struct block_list *bl, struct status_change *sc, int speed) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_get_emblem_id_pre ) { - int (*preHookFunc) (struct block_list *bl); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_speed_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *speed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_emblem_id_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_emblem_id_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_speed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_speed_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &speed); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66029,26 +72442,26 @@ int HP_status_get_emblem_id(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.get_emblem_id(bl); + retVal___ = HPMHooks.source.status.calc_speed(bl, sc, speed); } - if( HPMHooks.count.HP_status_get_emblem_id_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_emblem_id_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_emblem_id_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_speed_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *speed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_speed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_speed_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &speed); } } return retVal___; } -int HP_status_get_mexp(struct block_list *bl) { +short HP_status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, int aspd_rate) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_get_mexp_pre ) { - int (*preHookFunc) (struct block_list *bl); + short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_aspd_rate_pre ) { + short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *aspd_rate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_mexp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_mexp_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_rate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_aspd_rate_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &aspd_rate); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66056,26 +72469,26 @@ int HP_status_get_mexp(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.get_mexp(bl); + retVal___ = HPMHooks.source.status.calc_aspd_rate(bl, sc, aspd_rate); } - if( HPMHooks.count.HP_status_get_mexp_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_mexp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_mexp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_aspd_rate_post ) { + short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, int *aspd_rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_rate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_aspd_rate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &aspd_rate); } } return retVal___; } -int HP_status_get_race2(struct block_list *bl) { +unsigned short HP_status_calc_dmotion(struct block_list *bl, struct status_change *sc, int dmotion) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_get_race2_pre ) { - int (*preHookFunc) (struct block_list *bl); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_dmotion_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *dmotion); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_race2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_race2_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dmotion_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_dmotion_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &dmotion); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66083,26 +72496,26 @@ int HP_status_get_race2(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.get_race2(bl); + retVal___ = HPMHooks.source.status.calc_dmotion(bl, sc, dmotion); } - if( HPMHooks.count.HP_status_get_race2_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_race2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_race2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_dmotion_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *dmotion); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dmotion_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_dmotion_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &dmotion); } } return retVal___; } -struct view_data* HP_status_get_viewdata(struct block_list *bl) { +short HP_status_calc_aspd(struct block_list *bl, struct status_change *sc, short flag) { int hIndex = 0; - struct view_data* retVal___ = NULL; - if( HPMHooks.count.HP_status_get_viewdata_pre ) { - struct view_data* (*preHookFunc) (struct block_list *bl); + short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_aspd_pre ) { + short (*preHookFunc) (struct block_list *bl, struct status_change *sc, short *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_viewdata_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_viewdata_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_aspd_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66110,78 +72523,80 @@ struct view_data* HP_status_get_viewdata(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.get_viewdata(bl); + retVal___ = HPMHooks.source.status.calc_aspd(bl, sc, flag); } - if( HPMHooks.count.HP_status_get_viewdata_post ) { - struct view_data* (*postHookFunc) (struct view_data* retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_viewdata_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_viewdata_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_aspd_post ) { + short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, short *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_aspd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &flag); } } return retVal___; } -void HP_status_set_viewdata(struct block_list *bl, int class_) { +short HP_status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, int aspd) { int hIndex = 0; - if( HPMHooks.count.HP_status_set_viewdata_pre ) { - void (*preHookFunc) (struct block_list *bl, int *class_); + short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_fix_aspd_pre ) { + short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *aspd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_viewdata_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_set_viewdata_pre[hIndex].func; - preHookFunc(bl, &class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_fix_aspd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_fix_aspd_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &aspd); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.status.set_viewdata(bl, class_); + retVal___ = HPMHooks.source.status.calc_fix_aspd(bl, sc, aspd); } - if( HPMHooks.count.HP_status_set_viewdata_post ) { - void (*postHookFunc) (struct block_list *bl, int *class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_viewdata_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_set_viewdata_post[hIndex].func; - postHookFunc(bl, &class_); + if( HPMHooks.count.HP_status_calc_fix_aspd_post ) { + short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, int *aspd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_fix_aspd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_fix_aspd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &aspd); } } - return; + return retVal___; } -void HP_status_change_init(struct block_list *bl) { +unsigned int HP_status_calc_maxhp(struct block_list *bl, struct status_change *sc, uint64 maxhp) { int hIndex = 0; - if( HPMHooks.count.HP_status_change_init_pre ) { - void (*preHookFunc) (struct block_list *bl); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_status_calc_maxhp_pre ) { + unsigned int (*preHookFunc) (struct block_list *bl, struct status_change *sc, uint64 *maxhp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_change_init_pre[hIndex].func; - preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxhp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_maxhp_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &maxhp); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.status.change_init(bl); + retVal___ = HPMHooks.source.status.calc_maxhp(bl, sc, maxhp); } - if( HPMHooks.count.HP_status_change_init_post ) { - void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_change_init_post[hIndex].func; - postHookFunc(bl); + if( HPMHooks.count.HP_status_calc_maxhp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct block_list *bl, struct status_change *sc, uint64 *maxhp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxhp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_maxhp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &maxhp); } } - return; + return retVal___; } -struct status_change* HP_status_get_sc(struct block_list *bl) { +unsigned int HP_status_calc_maxsp(struct block_list *bl, struct status_change *sc, unsigned int maxsp) { int hIndex = 0; - struct status_change* retVal___ = NULL; - if( HPMHooks.count.HP_status_get_sc_pre ) { - struct status_change* (*preHookFunc) (struct block_list *bl); + unsigned int retVal___ = 0; + if( HPMHooks.count.HP_status_calc_maxsp_pre ) { + unsigned int (*preHookFunc) (struct block_list *bl, struct status_change *sc, unsigned int *maxsp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_sc_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxsp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_maxsp_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &maxsp); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66189,26 +72604,26 @@ struct status_change* HP_status_get_sc(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.get_sc(bl); + retVal___ = HPMHooks.source.status.calc_maxsp(bl, sc, maxsp); } - if( HPMHooks.count.HP_status_get_sc_post ) { - struct status_change* (*postHookFunc) (struct status_change* retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_sc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_maxsp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct block_list *bl, struct status_change *sc, unsigned int *maxsp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxsp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_maxsp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &maxsp); } } return retVal___; } -int HP_status_isdead(struct block_list *bl) { +unsigned char HP_status_calc_element(struct block_list *bl, struct status_change *sc, int element) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_isdead_pre ) { - int (*preHookFunc) (struct block_list *bl); + unsigned char retVal___ = 0; + if( HPMHooks.count.HP_status_calc_element_pre ) { + unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *element); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isdead_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_isdead_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_element_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &element); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66216,26 +72631,26 @@ int HP_status_isdead(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.isdead(bl); + retVal___ = HPMHooks.source.status.calc_element(bl, sc, element); } - if( HPMHooks.count.HP_status_isdead_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isdead_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_isdead_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_element_post ) { + unsigned char (*postHookFunc) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int *element); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_element_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &element); } } return retVal___; } -int HP_status_isimmune(struct block_list *bl) { +unsigned char HP_status_calc_element_lv(struct block_list *bl, struct status_change *sc, int lv) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_isimmune_pre ) { - int (*preHookFunc) (struct block_list *bl); + unsigned char retVal___ = 0; + if( HPMHooks.count.HP_status_calc_element_lv_pre ) { + unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isimmune_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_isimmune_pre[hIndex].func; - retVal___ = preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_lv_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_element_lv_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &lv); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66243,26 +72658,26 @@ int HP_status_isimmune(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.status.isimmune(bl); + retVal___ = HPMHooks.source.status.calc_element_lv(bl, sc, lv); } - if( HPMHooks.count.HP_status_isimmune_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isimmune_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_isimmune_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl); + if( HPMHooks.count.HP_status_calc_element_lv_post ) { + unsigned char (*postHookFunc) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int *lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_lv_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_element_lv_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &lv); } } return retVal___; } -int HP_status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int tick, int flag) { +unsigned short HP_status_calc_mode(struct block_list *bl, struct status_change *sc, int mode) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_get_sc_def_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *bl, enum sc_type *type, int *rate, int *tick, int *flag); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_mode_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mode); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_def_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_sc_def_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, &type, &rate, &tick, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mode_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_mode_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &mode); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66270,26 +72685,26 @@ int HP_status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_ } } { - retVal___ = HPMHooks.source.status.get_sc_def(src, bl, type, rate, tick, flag); + retVal___ = HPMHooks.source.status.calc_mode(bl, sc, mode); } - if( HPMHooks.count.HP_status_get_sc_def_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, enum sc_type *type, int *rate, int *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_def_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_sc_def_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, &type, &rate, &tick, &flag); + if( HPMHooks.count.HP_status_calc_mode_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *mode); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mode_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_mode_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &mode); } } return retVal___; } -int HP_status_change_start(struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int flag) { +unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_change_start_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); + unsigned short retVal___ = 0; + if( HPMHooks.count.HP_status_calc_ematk_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *matk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_change_start_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_ematk_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &matk); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66297,109 +72712,106 @@ int HP_status_change_start(struct block_list *src, struct block_list *bl, enum s } } { - retVal___ = HPMHooks.source.status.change_start(src, bl, type, rate, val1, val2, val3, val4, tick, flag); + retVal___ = HPMHooks.source.status.calc_ematk(bl, sc, matk); } - if( HPMHooks.count.HP_status_change_start_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_change_start_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag); + if( HPMHooks.count.HP_status_calc_ematk_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *matk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_ematk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &matk); } } return retVal___; } -int HP_status_change_end_(struct block_list *bl, enum sc_type type, int tid, const char *file, int line) { +void HP_status_calc_bl_main(struct block_list *bl, int flag) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_change_end__pre ) { - int (*preHookFunc) (struct block_list *bl, enum sc_type *type, int *tid, const char *file, int *line); + if( HPMHooks.count.HP_status_calc_bl_main_pre ) { + void (*preHookFunc) (struct block_list *bl, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_end__pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_change_end__pre[hIndex].func; - retVal___ = preHookFunc(bl, &type, &tid, file, &line); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl_main_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_bl_main_pre[hIndex].func; + preHookFunc(bl, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.status.change_end_(bl, type, tid, file, line); + HPMHooks.source.status.calc_bl_main(bl, flag); } - if( HPMHooks.count.HP_status_change_end__post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, enum sc_type *type, int *tid, const char *file, int *line); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_end__post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_change_end__post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &type, &tid, file, &line); + if( HPMHooks.count.HP_status_calc_bl_main_post ) { + void (*postHookFunc) (struct block_list *bl, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl_main_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_bl_main_post[hIndex].func; + postHookFunc(bl, &flag); } } - return retVal___; + return; } -int HP_status_kaahi_heal_timer(int tid, int64 tick, int id, intptr_t data) { +void HP_status_display_add(struct map_session_data *sd, enum sc_type type, int dval1, int dval2, int dval3) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_kaahi_heal_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_status_display_add_pre ) { + void (*preHookFunc) (struct map_session_data *sd, enum sc_type *type, int *dval1, int *dval2, int *dval3); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_kaahi_heal_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_kaahi_heal_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_display_add_pre[hIndex].func; + preHookFunc(sd, &type, &dval1, &dval2, &dval3); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.status.kaahi_heal_timer(tid, tick, id, data); + HPMHooks.source.status.display_add(sd, type, dval1, dval2, dval3); } - if( HPMHooks.count.HP_status_kaahi_heal_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_kaahi_heal_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_kaahi_heal_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_status_display_add_post ) { + void (*postHookFunc) (struct map_session_data *sd, enum sc_type *type, int *dval1, int *dval2, int *dval3); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_display_add_post[hIndex].func; + postHookFunc(sd, &type, &dval1, &dval2, &dval3); } } - return retVal___; + return; } -int HP_status_change_timer(int tid, int64 tick, int id, intptr_t data) { +void HP_status_display_remove(struct map_session_data *sd, enum sc_type type) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_change_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_status_display_remove_pre ) { + void (*preHookFunc) (struct map_session_data *sd, enum sc_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_change_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_display_remove_pre[hIndex].func; + preHookFunc(sd, &type); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.status.change_timer(tid, tick, id, data); + HPMHooks.source.status.display_remove(sd, type); } - if( HPMHooks.count.HP_status_change_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_change_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_status_display_remove_post ) { + void (*postHookFunc) (struct map_session_data *sd, enum sc_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_display_remove_post[hIndex].func; + postHookFunc(sd, &type); } } - return retVal___; + return; } -int HP_status_change_timer_sub(struct block_list *bl, va_list ap) { +int HP_status_natural_heal(struct block_list *bl, va_list args) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_change_timer_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + int retVal___ = 0; + if( HPMHooks.count.HP_status_natural_heal_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_status_change_timer_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_status_natural_heal_pre[hIndex].func; + retVal___ = preHookFunc(bl, args___copy); + va_end(args___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66407,30 +72819,30 @@ int HP_status_change_timer_sub(struct block_list *bl, va_list ap) { } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.status.change_timer_sub(bl, ap___copy); - va_end(ap___copy); + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.status.natural_heal(bl, args___copy); + va_end(args___copy); } - if( HPMHooks.count.HP_status_change_timer_sub_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_status_change_timer_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_status_natural_heal_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_status_natural_heal_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, args___copy); + va_end(args___copy); } } return retVal___; } -int HP_status_change_clear(struct block_list *bl, int type) { +int HP_status_natural_heal_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_change_clear_pre ) { - int (*preHookFunc) (struct block_list *bl, int *type); + if( HPMHooks.count.HP_status_natural_heal_timer_pre ) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_change_clear_pre[hIndex].func; - retVal___ = preHookFunc(bl, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_natural_heal_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66438,26 +72850,26 @@ int HP_status_change_clear(struct block_list *bl, int type) { } } { - retVal___ = HPMHooks.source.status.change_clear(bl, type); + retVal___ = HPMHooks.source.status.natural_heal_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_status_change_clear_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_change_clear_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &type); + if( HPMHooks.count.HP_status_natural_heal_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_natural_heal_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); } } return retVal___; } -int HP_status_change_clear_buffs(struct block_list *bl, int type) { +bool HP_status_readdb_job2(char *fields[], int columns, int current) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_change_clear_buffs_pre ) { - int (*preHookFunc) (struct block_list *bl, int *type); + bool retVal___ = false; + if( HPMHooks.count.HP_status_readdb_job2_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_buffs_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_change_clear_buffs_pre[hIndex].func; - retVal___ = preHookFunc(bl, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_readdb_job2_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66465,52 +72877,53 @@ int HP_status_change_clear_buffs(struct block_list *bl, int type) { } } { - retVal___ = HPMHooks.source.status.change_clear_buffs(bl, type); + retVal___ = HPMHooks.source.status.readdb_job2(fields, columns, current); } - if( HPMHooks.count.HP_status_change_clear_buffs_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_buffs_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_change_clear_buffs_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &type); + if( HPMHooks.count.HP_status_readdb_job2_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_readdb_job2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); } } return retVal___; } -void HP_status_calc_bl_(struct block_list *bl, enum scb_flag flag, enum e_status_calc_opt opt) { +bool HP_status_readdb_sizefix(char *fields[], int columns, int current) { int hIndex = 0; - if( HPMHooks.count.HP_status_calc_bl__pre ) { - void (*preHookFunc) (struct block_list *bl, enum scb_flag *flag, enum e_status_calc_opt *opt); + bool retVal___ = false; + if( HPMHooks.count.HP_status_readdb_sizefix_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl__pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_bl__pre[hIndex].func; - preHookFunc(bl, &flag, &opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_sizefix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_readdb_sizefix_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.status.calc_bl_(bl, flag, opt); + retVal___ = HPMHooks.source.status.readdb_sizefix(fields, columns, current); } - if( HPMHooks.count.HP_status_calc_bl__post ) { - void (*postHookFunc) (struct block_list *bl, enum scb_flag *flag, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl__post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_bl__post[hIndex].func; - postHookFunc(bl, &flag, &opt); + if( HPMHooks.count.HP_status_readdb_sizefix_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_sizefix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_readdb_sizefix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); } } - return; + return retVal___; } -int HP_status_calc_mob_(struct mob_data *md, enum e_status_calc_opt opt) { +bool HP_status_readdb_refine(char *fields[], int columns, int current) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_mob__pre ) { - int (*preHookFunc) (struct mob_data *md, enum e_status_calc_opt *opt); + bool retVal___ = false; + if( HPMHooks.count.HP_status_readdb_refine_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mob__pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_mob__pre[hIndex].func; - retVal___ = preHookFunc(md, &opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_readdb_refine_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66518,26 +72931,26 @@ int HP_status_calc_mob_(struct mob_data *md, enum e_status_calc_opt opt) { } } { - retVal___ = HPMHooks.source.status.calc_mob_(md, opt); + retVal___ = HPMHooks.source.status.readdb_refine(fields, columns, current); } - if( HPMHooks.count.HP_status_calc_mob__post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mob__post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_mob__post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &opt); + if( HPMHooks.count.HP_status_readdb_refine_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_readdb_refine_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); } } return retVal___; } -int HP_status_calc_pet_(struct pet_data *pd, enum e_status_calc_opt opt) { +bool HP_status_readdb_scconfig(char *fields[], int columns, int current) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_pet__pre ) { - int (*preHookFunc) (struct pet_data *pd, enum e_status_calc_opt *opt); + bool retVal___ = false; + if( HPMHooks.count.HP_status_readdb_scconfig_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pet__pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_pet__pre[hIndex].func; - retVal___ = preHookFunc(pd, &opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_scconfig_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_readdb_scconfig_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66545,52 +72958,51 @@ int HP_status_calc_pet_(struct pet_data *pd, enum e_status_calc_opt opt) { } } { - retVal___ = HPMHooks.source.status.calc_pet_(pd, opt); + retVal___ = HPMHooks.source.status.readdb_scconfig(fields, columns, current); } - if( HPMHooks.count.HP_status_calc_pet__post ) { - int (*postHookFunc) (int retVal___, struct pet_data *pd, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pet__post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_pet__post[hIndex].func; - retVal___ = postHookFunc(retVal___, pd, &opt); + if( HPMHooks.count.HP_status_readdb_scconfig_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_scconfig_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_readdb_scconfig_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); } } return retVal___; } -int HP_status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt opt) { +void HP_status_read_job_db(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_pc__pre ) { - int (*preHookFunc) (struct map_session_data *sd, enum e_status_calc_opt *opt); + if( HPMHooks.count.HP_status_read_job_db_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc__pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_pc__pre[hIndex].func; - retVal___ = preHookFunc(sd, &opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_read_job_db_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.status.calc_pc_(sd, opt); + HPMHooks.source.status.read_job_db(); } - if( HPMHooks.count.HP_status_calc_pc__post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc__post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_pc__post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &opt); + if( HPMHooks.count.HP_status_read_job_db_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_read_job_db_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -void HP_status_calc_pc_additional(struct map_session_data *sd, enum e_status_calc_opt opt) { +void HP_status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb) { int hIndex = 0; - if( HPMHooks.count.HP_status_calc_pc_additional_pre ) { - void (*preHookFunc) (struct map_session_data *sd, enum e_status_calc_opt *opt); + if( HPMHooks.count.HP_status_read_job_db_sub_pre ) { + void (*preHookFunc) (int *idx, const char *name, config_setting_t *jdb); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_additional_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_pc_additional_pre[hIndex].func; - preHookFunc(sd, &opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_read_job_db_sub_pre[hIndex].func; + preHookFunc(&idx, name, jdb); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66598,53 +73010,53 @@ void HP_status_calc_pc_additional(struct map_session_data *sd, enum e_status_cal } } { - HPMHooks.source.status.calc_pc_additional(sd, opt); + HPMHooks.source.status.read_job_db_sub(idx, name, jdb); } - if( HPMHooks.count.HP_status_calc_pc_additional_post ) { - void (*postHookFunc) (struct map_session_data *sd, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_additional_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_pc_additional_post[hIndex].func; - postHookFunc(sd, &opt); + if( HPMHooks.count.HP_status_read_job_db_sub_post ) { + void (*postHookFunc) (int *idx, const char *name, config_setting_t *jdb); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_read_job_db_sub_post[hIndex].func; + postHookFunc(&idx, name, jdb); } } return; } -int HP_status_calc_homunculus_(struct homun_data *hd, enum e_status_calc_opt opt) { +/* storage */ +void HP_storage_reconnect(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_homunculus__pre ) { - int (*preHookFunc) (struct homun_data *hd, enum e_status_calc_opt *opt); + if( HPMHooks.count.HP_storage_reconnect_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_homunculus__pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_homunculus__pre[hIndex].func; - retVal___ = preHookFunc(hd, &opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_reconnect_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.status.calc_homunculus_(hd, opt); + HPMHooks.source.storage.reconnect(); } - if( HPMHooks.count.HP_status_calc_homunculus__post ) { - int (*postHookFunc) (int retVal___, struct homun_data *hd, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_homunculus__post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_homunculus__post[hIndex].func; - retVal___ = postHookFunc(retVal___, hd, &opt); + if( HPMHooks.count.HP_storage_reconnect_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_reconnect_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -int HP_status_calc_mercenary_(struct mercenary_data *md, enum e_status_calc_opt opt) { +int HP_storage_delitem(struct map_session_data *sd, int n, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_mercenary__pre ) { - int (*preHookFunc) (struct mercenary_data *md, enum e_status_calc_opt *opt); + if( HPMHooks.count.HP_storage_delitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mercenary__pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_mercenary__pre[hIndex].func; - retVal___ = preHookFunc(md, &opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_delitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_delitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, &amount); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66652,26 +73064,26 @@ int HP_status_calc_mercenary_(struct mercenary_data *md, enum e_status_calc_opt } } { - retVal___ = HPMHooks.source.status.calc_mercenary_(md, opt); + retVal___ = HPMHooks.source.storage.delitem(sd, n, amount); } - if( HPMHooks.count.HP_status_calc_mercenary__post ) { - int (*postHookFunc) (int retVal___, struct mercenary_data *md, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mercenary__post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_mercenary__post[hIndex].func; - retVal___ = postHookFunc(retVal___, md, &opt); + if( HPMHooks.count.HP_storage_delitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_delitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_delitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, &amount); } } return retVal___; } -int HP_status_calc_elemental_(struct elemental_data *ed, enum e_status_calc_opt opt) { +int HP_storage_open(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_elemental__pre ) { - int (*preHookFunc) (struct elemental_data *ed, enum e_status_calc_opt *opt); + if( HPMHooks.count.HP_storage_open_pre ) { + int (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_elemental__pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_elemental__pre[hIndex].func; - retVal___ = preHookFunc(ed, &opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_open_pre[hIndex].func; + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66679,104 +73091,107 @@ int HP_status_calc_elemental_(struct elemental_data *ed, enum e_status_calc_opt } } { - retVal___ = HPMHooks.source.status.calc_elemental_(ed, opt); + retVal___ = HPMHooks.source.storage.open(sd); } - if( HPMHooks.count.HP_status_calc_elemental__post ) { - int (*postHookFunc) (int retVal___, struct elemental_data *ed, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_elemental__post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_elemental__post[hIndex].func; - retVal___ = postHookFunc(retVal___, ed, &opt); + if( HPMHooks.count.HP_storage_open_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_open_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -void HP_status_calc_misc(struct block_list *bl, struct status_data *st, int level) { +int HP_storage_add(struct map_session_data *sd, int index, int amount) { int hIndex = 0; - if( HPMHooks.count.HP_status_calc_misc_pre ) { - void (*preHookFunc) (struct block_list *bl, struct status_data *st, int *level); + int retVal___ = 0; + if( HPMHooks.count.HP_storage_add_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_misc_pre[hIndex].func; - preHookFunc(bl, st, &level); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_add_pre[hIndex].func; + retVal___ = preHookFunc(sd, &index, &amount); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.status.calc_misc(bl, st, level); + retVal___ = HPMHooks.source.storage.add(sd, index, amount); } - if( HPMHooks.count.HP_status_calc_misc_post ) { - void (*postHookFunc) (struct block_list *bl, struct status_data *st, int *level); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_misc_post[hIndex].func; - postHookFunc(bl, st, &level); + if( HPMHooks.count.HP_storage_add_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &index, &amount); } } - return; + return retVal___; } -void HP_status_calc_regen(struct block_list *bl, struct status_data *st, struct regen_data *regen) { +int HP_storage_get(struct map_session_data *sd, int index, int amount) { int hIndex = 0; - if( HPMHooks.count.HP_status_calc_regen_pre ) { - void (*preHookFunc) (struct block_list *bl, struct status_data *st, struct regen_data *regen); + int retVal___ = 0; + if( HPMHooks.count.HP_storage_get_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_regen_pre[hIndex].func; - preHookFunc(bl, st, regen); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_get_pre[hIndex].func; + retVal___ = preHookFunc(sd, &index, &amount); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.status.calc_regen(bl, st, regen); + retVal___ = HPMHooks.source.storage.get(sd, index, amount); } - if( HPMHooks.count.HP_status_calc_regen_post ) { - void (*postHookFunc) (struct block_list *bl, struct status_data *st, struct regen_data *regen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_regen_post[hIndex].func; - postHookFunc(bl, st, regen); + if( HPMHooks.count.HP_storage_get_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_get_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &index, &amount); } } - return; + return retVal___; } -void HP_status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, struct status_change *sc) { +int HP_storage_additem(struct map_session_data *sd, struct item *item_data, int amount) { int hIndex = 0; - if( HPMHooks.count.HP_status_calc_regen_rate_pre ) { - void (*preHookFunc) (struct block_list *bl, struct regen_data *regen, struct status_change *sc); + int retVal___ = 0; + if( HPMHooks.count.HP_storage_additem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct item *item_data, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_rate_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_regen_rate_pre[hIndex].func; - preHookFunc(bl, regen, sc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_additem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_additem_pre[hIndex].func; + retVal___ = preHookFunc(sd, item_data, &amount); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.status.calc_regen_rate(bl, regen, sc); + retVal___ = HPMHooks.source.storage.additem(sd, item_data, amount); } - if( HPMHooks.count.HP_status_calc_regen_rate_post ) { - void (*postHookFunc) (struct block_list *bl, struct regen_data *regen, struct status_change *sc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_rate_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_regen_rate_post[hIndex].func; - postHookFunc(bl, regen, sc); + if( HPMHooks.count.HP_storage_additem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item_data, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_additem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_additem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item_data, &amount); } } - return; + return retVal___; } -int HP_status_check_skilluse(struct block_list *src, struct block_list *target, uint16 skill_id, int flag) { +int HP_storage_addfromcart(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_check_skilluse_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, int *flag); + if( HPMHooks.count.HP_storage_addfromcart_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_skilluse_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_check_skilluse_pre[hIndex].func; - retVal___ = preHookFunc(src, target, &skill_id, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_addfromcart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_addfromcart_pre[hIndex].func; + retVal___ = preHookFunc(sd, &index, &amount); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66784,26 +73199,26 @@ int HP_status_check_skilluse(struct block_list *src, struct block_list *target, } } { - retVal___ = HPMHooks.source.status.check_skilluse(src, target, skill_id, flag); + retVal___ = HPMHooks.source.storage.addfromcart(sd, index, amount); } - if( HPMHooks.count.HP_status_check_skilluse_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_skilluse_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_check_skilluse_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, target, &skill_id, &flag); + if( HPMHooks.count.HP_storage_addfromcart_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_addfromcart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_addfromcart_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &index, &amount); } } return retVal___; } -int HP_status_check_visibility(struct block_list *src, struct block_list *target) { +int HP_storage_gettocart(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_check_visibility_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *target); + if( HPMHooks.count.HP_storage_gettocart_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_visibility_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_check_visibility_pre[hIndex].func; - retVal___ = preHookFunc(src, target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_gettocart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_gettocart_pre[hIndex].func; + retVal___ = preHookFunc(sd, &index, &amount); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66811,80 +73226,78 @@ int HP_status_check_visibility(struct block_list *src, struct block_list *target } } { - retVal___ = HPMHooks.source.status.check_visibility(src, target); + retVal___ = HPMHooks.source.storage.gettocart(sd, index, amount); } - if( HPMHooks.count.HP_status_check_visibility_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_visibility_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_check_visibility_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, target); + if( HPMHooks.count.HP_storage_gettocart_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_gettocart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_gettocart_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &index, &amount); } } return retVal___; } -int HP_status_change_spread(struct block_list *src, struct block_list *bl) { +void HP_storage_close(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_change_spread_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *bl); + if( HPMHooks.count.HP_storage_close_pre ) { + void (*preHookFunc) (struct map_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_spread_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_change_spread_pre[hIndex].func; - retVal___ = preHookFunc(src, bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_close_pre[hIndex].func; + preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.status.change_spread(src, bl); + HPMHooks.source.storage.close(sd); } - if( HPMHooks.count.HP_status_change_spread_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_spread_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_change_spread_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl); + if( HPMHooks.count.HP_storage_close_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_close_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -defType HP_status_calc_def(struct block_list *bl, struct status_change *sc, int def, bool viewable) { +void HP_storage_pc_quit(struct map_session_data *sd, int flag) { int hIndex = 0; - defType retVal___ = 0; - if( HPMHooks.count.HP_status_calc_def_pre ) { - defType (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *def, bool *viewable); + if( HPMHooks.count.HP_storage_pc_quit_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_def_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &def, &viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_pc_quit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_pc_quit_pre[hIndex].func; + preHookFunc(sd, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.status.calc_def(bl, sc, def, viewable); + HPMHooks.source.storage.pc_quit(sd, flag); } - if( HPMHooks.count.HP_status_calc_def_post ) { - defType (*postHookFunc) (defType retVal___, struct block_list *bl, struct status_change *sc, int *def, bool *viewable); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_def_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &def, &viewable); + if( HPMHooks.count.HP_storage_pc_quit_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_pc_quit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_pc_quit_post[hIndex].func; + postHookFunc(sd, &flag); } } - return retVal___; + return; } -short HP_status_calc_def2(struct block_list *bl, struct status_change *sc, int def2, bool viewable) { +int HP_storage_comp_item(const void *i1_, const void *i2_) { int hIndex = 0; - short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_def2_pre ) { - short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *def2, bool *viewable); + int retVal___ = 0; + if( HPMHooks.count.HP_storage_comp_item_pre ) { + int (*preHookFunc) (const void *i1_, const void *i2_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_def2_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &def2, &viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_comp_item_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_comp_item_pre[hIndex].func; + retVal___ = preHookFunc(i1_, i2_); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66892,53 +73305,54 @@ short HP_status_calc_def2(struct block_list *bl, struct status_change *sc, int d } } { - retVal___ = HPMHooks.source.status.calc_def2(bl, sc, def2, viewable); + retVal___ = HPMHooks.source.storage.comp_item(i1_, i2_); } - if( HPMHooks.count.HP_status_calc_def2_post ) { - short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, int *def2, bool *viewable); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_def2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &def2, &viewable); + if( HPMHooks.count.HP_storage_comp_item_post ) { + int (*postHookFunc) (int retVal___, const void *i1_, const void *i2_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_comp_item_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_comp_item_post[hIndex].func; + retVal___ = postHookFunc(retVal___, i1_, i2_); } } return retVal___; } -defType HP_status_calc_mdef(struct block_list *bl, struct status_change *sc, int mdef, bool viewable) { +void HP_storage_sortitem(struct item *items, unsigned int size) { int hIndex = 0; - defType retVal___ = 0; - if( HPMHooks.count.HP_status_calc_mdef_pre ) { - defType (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mdef, bool *viewable); + if( HPMHooks.count.HP_storage_sortitem_pre ) { + void (*preHookFunc) (struct item *items, unsigned int *size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_mdef_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &mdef, &viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_sortitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_sortitem_pre[hIndex].func; + preHookFunc(items, &size); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.status.calc_mdef(bl, sc, mdef, viewable); + HPMHooks.source.storage.sortitem(items, size); } - if( HPMHooks.count.HP_status_calc_mdef_post ) { - defType (*postHookFunc) (defType retVal___, struct block_list *bl, struct status_change *sc, int *mdef, bool *viewable); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_mdef_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &mdef, &viewable); + if( HPMHooks.count.HP_storage_sortitem_post ) { + void (*postHookFunc) (struct item *items, unsigned int *size); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_sortitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_sortitem_post[hIndex].func; + postHookFunc(items, &size); } } - return retVal___; + return; } -short HP_status_calc_mdef2(struct block_list *bl, struct status_change *sc, int mdef2, bool viewable) { +int HP_storage_reconnect_sub(DBKey key, DBData *data, va_list ap) { int hIndex = 0; - short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_mdef2_pre ) { - short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mdef2, bool *viewable); + int retVal___ = 0; + if( HPMHooks.count.HP_storage_reconnect_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_mdef2_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &mdef2, &viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_storage_reconnect_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66946,26 +73360,31 @@ short HP_status_calc_mdef2(struct block_list *bl, struct status_change *sc, int } } { - retVal___ = HPMHooks.source.status.calc_mdef2(bl, sc, mdef2, viewable); + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.storage.reconnect_sub(key, data, ap___copy); + va_end(ap___copy); } - if( HPMHooks.count.HP_status_calc_mdef2_post ) { - short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, int *mdef2, bool *viewable); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_mdef2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &mdef2, &viewable); + if( HPMHooks.count.HP_storage_reconnect_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_storage_reconnect_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); } } return retVal___; } -unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable) { +/* StrBuf */ +StringBuf* HP_StrBuf_Malloc(void) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_batk_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *batk, bool *viewable); + StringBuf* retVal___ = NULL; + if( HPMHooks.count.HP_StrBuf_Malloc_pre ) { + StringBuf* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_batk_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &batk, &viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Malloc_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -66973,53 +73392,54 @@ unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change * } } { - retVal___ = HPMHooks.source.status.calc_batk(bl, sc, batk, viewable); + retVal___ = HPMHooks.source.StrBuf.Malloc(); } - if( HPMHooks.count.HP_status_calc_batk_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *batk, bool *viewable); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_batk_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &batk, &viewable); + if( HPMHooks.count.HP_StrBuf_Malloc_post ) { + StringBuf* (*postHookFunc) (StringBuf* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Malloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -unsigned short HP_status_base_matk(struct block_list *bl, const struct status_data *st, int level) { +void HP_StrBuf_Init(StringBuf *self) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_base_matk_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, const struct status_data *st, int *level); + if( HPMHooks.count.HP_StrBuf_Init_pre ) { + void (*preHookFunc) (StringBuf *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_base_matk_pre[hIndex].func; - retVal___ = preHookFunc(bl, st, &level); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Init_pre[hIndex].func; + preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.status.base_matk(bl, st, level); + HPMHooks.source.StrBuf.Init(self); } - if( HPMHooks.count.HP_status_base_matk_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, const struct status_data *st, int *level); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_base_matk_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, st, &level); + if( HPMHooks.count.HP_StrBuf_Init_post ) { + void (*postHookFunc) (StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Init_post[hIndex].func; + postHookFunc(self); } } - return retVal___; + return; } -int HP_status_get_weapon_atk(struct block_list *src, struct weapon_atk *watk, int flag) { +int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_weapon_atk_pre ) { - int (*preHookFunc) (struct block_list *src, struct weapon_atk *watk, int *flag); + if( HPMHooks.count.HP_StrBuf_Vprintf_pre ) { + int (*preHookFunc) (StringBuf *self, const char *fmt, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_weapon_atk_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_weapon_atk_pre[hIndex].func; - retVal___ = preHookFunc(src, watk, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_pre[hIndex].func; + retVal___ = preHookFunc(self, fmt, args___copy); + va_end(args___copy); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67027,26 +73447,30 @@ int HP_status_get_weapon_atk(struct block_list *src, struct weapon_atk *watk, in } } { - retVal___ = HPMHooks.source.status.get_weapon_atk(src, watk, flag); + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.StrBuf.Vprintf(self, fmt, args___copy); + va_end(args___copy); } - if( HPMHooks.count.HP_status_get_weapon_atk_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct weapon_atk *watk, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_weapon_atk_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_weapon_atk_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, watk, &flag); + if( HPMHooks.count.HP_StrBuf_Vprintf_post ) { + int (*postHookFunc) (int retVal___, StringBuf *self, const char *fmt, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, fmt, args___copy); + va_end(args___copy); } } return retVal___; } -int HP_status_get_total_mdef(struct block_list *src) { +int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_total_mdef_pre ) { - int (*preHookFunc) (struct block_list *src); + if( HPMHooks.count.HP_StrBuf_Append_pre ) { + int (*preHookFunc) (StringBuf *self, const StringBuf *sbuf); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_mdef_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_total_mdef_pre[hIndex].func; - retVal___ = preHookFunc(src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Append_pre[hIndex].func; + retVal___ = preHookFunc(self, sbuf); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67054,26 +73478,26 @@ int HP_status_get_total_mdef(struct block_list *src) { } } { - retVal___ = HPMHooks.source.status.get_total_mdef(src); + retVal___ = HPMHooks.source.StrBuf.Append(self, sbuf); } - if( HPMHooks.count.HP_status_get_total_mdef_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_mdef_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_total_mdef_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src); + if( HPMHooks.count.HP_StrBuf_Append_post ) { + int (*postHookFunc) (int retVal___, StringBuf *self, const StringBuf *sbuf); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Append_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, sbuf); } } return retVal___; } -int HP_status_get_total_def(struct block_list *src) { +int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_total_def_pre ) { - int (*preHookFunc) (struct block_list *src); + if( HPMHooks.count.HP_StrBuf_AppendStr_pre ) { + int (*preHookFunc) (StringBuf *self, const char *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_def_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_total_def_pre[hIndex].func; - retVal___ = preHookFunc(src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_pre[hIndex].func; + retVal___ = preHookFunc(self, str); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67081,26 +73505,26 @@ int HP_status_get_total_def(struct block_list *src) { } } { - retVal___ = HPMHooks.source.status.get_total_def(src); + retVal___ = HPMHooks.source.StrBuf.AppendStr(self, str); } - if( HPMHooks.count.HP_status_get_total_def_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_def_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_total_def_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src); + if( HPMHooks.count.HP_StrBuf_AppendStr_post ) { + int (*postHookFunc) (int retVal___, StringBuf *self, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, str); } } return retVal___; } -int HP_status_get_matk(struct block_list *src, int flag) { +int HP_StrBuf_Length(StringBuf *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_matk_pre ) { - int (*preHookFunc) (struct block_list *src, int *flag); + if( HPMHooks.count.HP_StrBuf_Length_pre ) { + int (*preHookFunc) (StringBuf *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_matk_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_matk_pre[hIndex].func; - retVal___ = preHookFunc(src, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Length_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67108,78 +73532,78 @@ int HP_status_get_matk(struct block_list *src, int flag) { } } { - retVal___ = HPMHooks.source.status.get_matk(src, flag); + retVal___ = HPMHooks.source.StrBuf.Length(self); } - if( HPMHooks.count.HP_status_get_matk_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_matk_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_matk_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, &flag); + if( HPMHooks.count.HP_StrBuf_Length_post ) { + int (*postHookFunc) (int retVal___, StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Length_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } return retVal___; } -void HP_status_update_matk(struct block_list *bl) { +char* HP_StrBuf_Value(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_status_update_matk_pre ) { - void (*preHookFunc) (struct block_list *bl); + char* retVal___ = NULL; + if( HPMHooks.count.HP_StrBuf_Value_pre ) { + char* (*preHookFunc) (StringBuf *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_update_matk_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_update_matk_pre[hIndex].func; - preHookFunc(bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Value_pre[hIndex].func; + retVal___ = preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.status.update_matk(bl); + retVal___ = HPMHooks.source.StrBuf.Value(self); } - if( HPMHooks.count.HP_status_update_matk_post ) { - void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_update_matk_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_update_matk_post[hIndex].func; - postHookFunc(bl); + if( HPMHooks.count.HP_StrBuf_Value_post ) { + char* (*postHookFunc) (char* retVal___, StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Value_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); } } - return; + return retVal___; } -int HP_status_readdb(void) { +void HP_StrBuf_Clear(StringBuf *self) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_readdb_pre ) { - int (*preHookFunc) (void); + if( HPMHooks.count.HP_StrBuf_Clear_pre ) { + void (*preHookFunc) (StringBuf *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_readdb_pre[hIndex].func; - retVal___ = preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Clear_pre[hIndex].func; + preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.status.readdb(); + HPMHooks.source.StrBuf.Clear(self); } - if( HPMHooks.count.HP_status_readdb_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_readdb_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_StrBuf_Clear_post ) { + void (*postHookFunc) (StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Clear_post[hIndex].func; + postHookFunc(self); } } - return retVal___; + return; } -void HP_status_initChangeTables(void) { +void HP_StrBuf_Destroy(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_status_initChangeTables_pre ) { - void (*preHookFunc) (void); + if( HPMHooks.count.HP_StrBuf_Destroy_pre ) { + void (*preHookFunc) (StringBuf *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_initChangeTables_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Destroy_pre[hIndex].func; + preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67187,25 +73611,25 @@ void HP_status_initChangeTables(void) { } } { - HPMHooks.source.status.initChangeTables(); + HPMHooks.source.StrBuf.Destroy(self); } - if( HPMHooks.count.HP_status_initChangeTables_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_initChangeTables_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_StrBuf_Destroy_post ) { + void (*postHookFunc) (StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Destroy_post[hIndex].func; + postHookFunc(self); } } return; } -void HP_status_initDummyData(void) { +void HP_StrBuf_Free(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_status_initDummyData_pre ) { - void (*preHookFunc) (void); + if( HPMHooks.count.HP_StrBuf_Free_pre ) { + void (*preHookFunc) (StringBuf *self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_initDummyData_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_StrBuf_Free_pre[hIndex].func; + preHookFunc(self); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67213,26 +73637,27 @@ void HP_status_initDummyData(void) { } } { - HPMHooks.source.status.initDummyData(); + HPMHooks.source.StrBuf.Free(self); } - if( HPMHooks.count.HP_status_initDummyData_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_initDummyData_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_StrBuf_Free_post ) { + void (*postHookFunc) (StringBuf *self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_StrBuf_Free_post[hIndex].func; + postHookFunc(self); } } return; } -int HP_status_base_amotion_pc(struct map_session_data *sd, struct status_data *st) { +/* strlib */ +char* HP_strlib_jstrescape(char *pt) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_base_amotion_pc_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct status_data *st); + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_jstrescape_pre ) { + char* (*preHookFunc) (char *pt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_amotion_pc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_base_amotion_pc_pre[hIndex].func; - retVal___ = preHookFunc(sd, st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_jstrescape_pre[hIndex].func; + retVal___ = preHookFunc(pt); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67240,26 +73665,26 @@ int HP_status_base_amotion_pc(struct map_session_data *sd, struct status_data *s } } { - retVal___ = HPMHooks.source.status.base_amotion_pc(sd, st); + retVal___ = HPMHooks.source.strlib.jstrescape(pt); } - if( HPMHooks.count.HP_status_base_amotion_pc_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct status_data *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_amotion_pc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_base_amotion_pc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, st); + if( HPMHooks.count.HP_strlib_jstrescape_post ) { + char* (*postHookFunc) (char* retVal___, char *pt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_jstrescape_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pt); } } return retVal___; } -unsigned short HP_status_base_atk(const struct block_list *bl, const struct status_data *st) { +char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_base_atk_pre ) { - unsigned short (*preHookFunc) (const struct block_list *bl, const struct status_data *st); + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_jstrescapecpy_pre ) { + char* (*preHookFunc) (char *pt, const char *spt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_base_atk_pre[hIndex].func; - retVal___ = preHookFunc(bl, st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_pre[hIndex].func; + retVal___ = preHookFunc(pt, spt); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67267,26 +73692,26 @@ unsigned short HP_status_base_atk(const struct block_list *bl, const struct stat } } { - retVal___ = HPMHooks.source.status.base_atk(bl, st); + retVal___ = HPMHooks.source.strlib.jstrescapecpy(pt, spt); } - if( HPMHooks.count.HP_status_base_atk_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, const struct block_list *bl, const struct status_data *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_base_atk_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, st); + if( HPMHooks.count.HP_strlib_jstrescapecpy_post ) { + char* (*postHookFunc) (char* retVal___, char *pt, const char *spt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pt, spt); } } return retVal___; } -unsigned int HP_status_get_base_maxhp(struct map_session_data *sd, struct status_data *st) { +int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_get_base_maxhp_pre ) { - unsigned int (*preHookFunc) (struct map_session_data *sd, struct status_data *st); + int retVal___ = 0; + if( HPMHooks.count.HP_strlib_jmemescapecpy_pre ) { + int (*preHookFunc) (char *pt, const char *spt, int *size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxhp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_base_maxhp_pre[hIndex].func; - retVal___ = preHookFunc(sd, st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_pre[hIndex].func; + retVal___ = preHookFunc(pt, spt, &size); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67294,26 +73719,26 @@ unsigned int HP_status_get_base_maxhp(struct map_session_data *sd, struct status } } { - retVal___ = HPMHooks.source.status.get_base_maxhp(sd, st); + retVal___ = HPMHooks.source.strlib.jmemescapecpy(pt, spt, size); } - if( HPMHooks.count.HP_status_get_base_maxhp_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd, struct status_data *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxhp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_base_maxhp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, st); + if( HPMHooks.count.HP_strlib_jmemescapecpy_post ) { + int (*postHookFunc) (int retVal___, char *pt, const char *spt, int *size); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pt, spt, &size); } } return retVal___; } -unsigned int HP_status_get_base_maxsp(struct map_session_data *sd, struct status_data *st) { +int HP_strlib_remove_control_chars_(char *str) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_get_base_maxsp_pre ) { - unsigned int (*preHookFunc) (struct map_session_data *sd, struct status_data *st); + int retVal___ = 0; + if( HPMHooks.count.HP_strlib_remove_control_chars__pre ) { + int (*preHookFunc) (char *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxsp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_get_base_maxsp_pre[hIndex].func; - retVal___ = preHookFunc(sd, st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__pre[hIndex].func; + retVal___ = preHookFunc(str); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67321,26 +73746,26 @@ unsigned int HP_status_get_base_maxsp(struct map_session_data *sd, struct status } } { - retVal___ = HPMHooks.source.status.get_base_maxsp(sd, st); + retVal___ = HPMHooks.source.strlib.remove_control_chars_(str); } - if( HPMHooks.count.HP_status_get_base_maxsp_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd, struct status_data *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxsp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_get_base_maxsp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, st); + if( HPMHooks.count.HP_strlib_remove_control_chars__post ) { + int (*postHookFunc) (int retVal___, char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); } } return retVal___; } -int HP_status_calc_npc_(struct npc_data *nd, enum e_status_calc_opt opt) { +char* HP_strlib_trim_(char *str) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_npc__pre ) { - int (*preHookFunc) (struct npc_data *nd, enum e_status_calc_opt *opt); + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_trim__pre ) { + char* (*preHookFunc) (char *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_npc__pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_npc__pre[hIndex].func; - retVal___ = preHookFunc(nd, &opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_trim__pre[hIndex].func; + retVal___ = preHookFunc(str); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67348,26 +73773,26 @@ int HP_status_calc_npc_(struct npc_data *nd, enum e_status_calc_opt opt) { } } { - retVal___ = HPMHooks.source.status.calc_npc_(nd, opt); + retVal___ = HPMHooks.source.strlib.trim_(str); } - if( HPMHooks.count.HP_status_calc_npc__post ) { - int (*postHookFunc) (int retVal___, struct npc_data *nd, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_npc__post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_npc__post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd, &opt); + if( HPMHooks.count.HP_strlib_trim__post ) { + char* (*postHookFunc) (char* retVal___, char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_trim__post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); } } return retVal___; } -unsigned short HP_status_calc_str(struct block_list *bl, struct status_change *sc, int str) { +char* HP_strlib_normalize_name_(char *str, const char *delims) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_str_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *str); + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_normalize_name__pre ) { + char* (*preHookFunc) (char *str, const char *delims); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_str_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_str_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_normalize_name__pre[hIndex].func; + retVal___ = preHookFunc(str, delims); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67375,26 +73800,26 @@ unsigned short HP_status_calc_str(struct block_list *bl, struct status_change *s } } { - retVal___ = HPMHooks.source.status.calc_str(bl, sc, str); + retVal___ = HPMHooks.source.strlib.normalize_name_(str, delims); } - if( HPMHooks.count.HP_status_calc_str_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_str_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_str_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &str); + if( HPMHooks.count.HP_strlib_normalize_name__post ) { + char* (*postHookFunc) (char* retVal___, char *str, const char *delims); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_normalize_name__post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, delims); } } return retVal___; } -unsigned short HP_status_calc_agi(struct block_list *bl, struct status_change *sc, int agi) { +const char* HP_strlib_stristr_(const char *haystack, const char *needle) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_agi_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *agi); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_stristr__pre ) { + const char* (*preHookFunc) (const char *haystack, const char *needle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_agi_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_agi_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &agi); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_stristr__pre[hIndex].func; + retVal___ = preHookFunc(haystack, needle); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67402,26 +73827,26 @@ unsigned short HP_status_calc_agi(struct block_list *bl, struct status_change *s } } { - retVal___ = HPMHooks.source.status.calc_agi(bl, sc, agi); + retVal___ = HPMHooks.source.strlib.stristr_(haystack, needle); } - if( HPMHooks.count.HP_status_calc_agi_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *agi); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_agi_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_agi_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &agi); + if( HPMHooks.count.HP_strlib_stristr__post ) { + const char* (*postHookFunc) (const char* retVal___, const char *haystack, const char *needle); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_stristr__post[hIndex].func; + retVal___ = postHookFunc(retVal___, haystack, needle); } } return retVal___; } -unsigned short HP_status_calc_vit(struct block_list *bl, struct status_change *sc, int vit) { +size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_vit_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *vit); + size_t retVal___ = 0; + if( HPMHooks.count.HP_strlib_strnlen__pre ) { + size_t (*preHookFunc) (const char *string, size_t *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_vit_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_vit_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &vit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_strnlen__pre[hIndex].func; + retVal___ = preHookFunc(string, &maxlen); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67429,26 +73854,26 @@ unsigned short HP_status_calc_vit(struct block_list *bl, struct status_change *s } } { - retVal___ = HPMHooks.source.status.calc_vit(bl, sc, vit); + retVal___ = HPMHooks.source.strlib.strnlen_(string, maxlen); } - if( HPMHooks.count.HP_status_calc_vit_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *vit); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_vit_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_vit_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &vit); + if( HPMHooks.count.HP_strlib_strnlen__post ) { + size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_strnlen__post[hIndex].func; + retVal___ = postHookFunc(retVal___, string, &maxlen); } } return retVal___; } -unsigned short HP_status_calc_int(struct block_list *bl, struct status_change *sc, int int_) { +char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_int_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *int_); + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_strtok_r__pre ) { + char* (*preHookFunc) (char *s1, const char *s2, char **lasts); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_int_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_int_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &int_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_strtok_r__pre[hIndex].func; + retVal___ = preHookFunc(s1, s2, lasts); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67456,26 +73881,26 @@ unsigned short HP_status_calc_int(struct block_list *bl, struct status_change *s } } { - retVal___ = HPMHooks.source.status.calc_int(bl, sc, int_); + retVal___ = HPMHooks.source.strlib.strtok_r_(s1, s2, lasts); } - if( HPMHooks.count.HP_status_calc_int_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *int_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_int_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_int_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &int_); + if( HPMHooks.count.HP_strlib_strtok_r__post ) { + char* (*postHookFunc) (char* retVal___, char *s1, const char *s2, char **lasts); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_strtok_r__post[hIndex].func; + retVal___ = postHookFunc(retVal___, s1, s2, lasts); } } return retVal___; } -unsigned short HP_status_calc_dex(struct block_list *bl, struct status_change *sc, int dex) { +int HP_strlib_e_mail_check_(char *email) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_dex_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *dex); + int retVal___ = 0; + if( HPMHooks.count.HP_strlib_e_mail_check__pre ) { + int (*preHookFunc) (char *email); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dex_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_dex_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &dex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_e_mail_check__pre[hIndex].func; + retVal___ = preHookFunc(email); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67483,26 +73908,26 @@ unsigned short HP_status_calc_dex(struct block_list *bl, struct status_change *s } } { - retVal___ = HPMHooks.source.status.calc_dex(bl, sc, dex); + retVal___ = HPMHooks.source.strlib.e_mail_check_(email); } - if( HPMHooks.count.HP_status_calc_dex_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *dex); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dex_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_dex_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &dex); + if( HPMHooks.count.HP_strlib_e_mail_check__post ) { + int (*postHookFunc) (int retVal___, char *email); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_e_mail_check__post[hIndex].func; + retVal___ = postHookFunc(retVal___, email); } } return retVal___; } -unsigned short HP_status_calc_luk(struct block_list *bl, struct status_change *sc, int luk) { +int HP_strlib_config_switch_(const char *str) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_luk_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *luk); + int retVal___ = 0; + if( HPMHooks.count.HP_strlib_config_switch__pre ) { + int (*preHookFunc) (const char *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_luk_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_luk_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &luk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_config_switch__pre[hIndex].func; + retVal___ = preHookFunc(str); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67510,26 +73935,26 @@ unsigned short HP_status_calc_luk(struct block_list *bl, struct status_change *s } } { - retVal___ = HPMHooks.source.status.calc_luk(bl, sc, luk); + retVal___ = HPMHooks.source.strlib.config_switch_(str); } - if( HPMHooks.count.HP_status_calc_luk_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *luk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_luk_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_luk_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &luk); + if( HPMHooks.count.HP_strlib_config_switch__post ) { + int (*postHookFunc) (int retVal___, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_config_switch__post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); } } return retVal___; } -unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable) { +char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_watk_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *watk, bool *viewable); + char* retVal___ = NULL; + if( HPMHooks.count.HP_strlib_safestrncpy__pre ) { + char* (*preHookFunc) (char *dst, const char *src, size_t *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_watk_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &watk, &viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_safestrncpy__pre[hIndex].func; + retVal___ = preHookFunc(dst, src, &n); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67537,26 +73962,26 @@ unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change * } } { - retVal___ = HPMHooks.source.status.calc_watk(bl, sc, watk, viewable); + retVal___ = HPMHooks.source.strlib.safestrncpy_(dst, src, n); } - if( HPMHooks.count.HP_status_calc_watk_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *watk, bool *viewable); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_watk_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &watk, &viewable); + if( HPMHooks.count.HP_strlib_safestrncpy__post ) { + char* (*postHookFunc) (char* retVal___, char *dst, const char *src, size_t *n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_safestrncpy__post[hIndex].func; + retVal___ = postHookFunc(retVal___, dst, src, &n); } } return retVal___; } -unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable) { +size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_matk_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *matk, bool *viewable); + size_t retVal___ = 0; + if( HPMHooks.count.HP_strlib_safestrnlen__pre ) { + size_t (*preHookFunc) (const char *string, size_t *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_matk_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &matk, &viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_safestrnlen__pre[hIndex].func; + retVal___ = preHookFunc(string, &maxlen); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67564,26 +73989,26 @@ unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change * } } { - retVal___ = HPMHooks.source.status.calc_matk(bl, sc, matk, viewable); + retVal___ = HPMHooks.source.strlib.safestrnlen_(string, maxlen); } - if( HPMHooks.count.HP_status_calc_matk_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *matk, bool *viewable); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_matk_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &matk, &viewable); + if( HPMHooks.count.HP_strlib_safestrnlen__post ) { + size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_safestrnlen__post[hIndex].func; + retVal___ = postHookFunc(retVal___, string, &maxlen); } } return retVal___; } -signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc, int hit, bool viewable) { +int HP_strlib_strline_(const char *str, size_t pos) { int hIndex = 0; - signed short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_hit_pre ) { - signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *hit, bool *viewable); + int retVal___ = 0; + if( HPMHooks.count.HP_strlib_strline__pre ) { + int (*preHookFunc) (const char *str, size_t *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_hit_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &hit, &viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_strline__pre[hIndex].func; + retVal___ = preHookFunc(str, &pos); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67591,26 +74016,26 @@ signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc, } } { - retVal___ = HPMHooks.source.status.calc_hit(bl, sc, hit, viewable); + retVal___ = HPMHooks.source.strlib.strline_(str, pos); } - if( HPMHooks.count.HP_status_calc_hit_post ) { - signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int *hit, bool *viewable); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_hit_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &hit, &viewable); + if( HPMHooks.count.HP_strlib_strline__post ) { + int (*postHookFunc) (int retVal___, const char *str, size_t *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_strline__post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &pos); } } return retVal___; } -signed short HP_status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable) { +bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { int hIndex = 0; - signed short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_critical_pre ) { - signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *critical, bool *viewable); + bool retVal___ = false; + if( HPMHooks.count.HP_strlib_bin2hex__pre ) { + bool (*preHookFunc) (char *output, unsigned char *input, size_t *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_critical_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &critical, &viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_strlib_bin2hex__pre[hIndex].func; + retVal___ = preHookFunc(output, input, &count); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67618,26 +74043,27 @@ signed short HP_status_calc_critical(struct block_list *bl, struct status_change } } { - retVal___ = HPMHooks.source.status.calc_critical(bl, sc, critical, viewable); + retVal___ = HPMHooks.source.strlib.bin2hex_(output, input, count); } - if( HPMHooks.count.HP_status_calc_critical_post ) { - signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int *critical, bool *viewable); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_critical_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &critical, &viewable); + if( HPMHooks.count.HP_strlib_bin2hex__post ) { + bool (*postHookFunc) (bool retVal___, char *output, unsigned char *input, size_t *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_strlib_bin2hex__post[hIndex].func; + retVal___ = postHookFunc(retVal___, output, input, &count); } } return retVal___; } -signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable) { +/* sv */ +int HP_sv_parse_next(struct s_svstate *svstate) { int hIndex = 0; - signed short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_flee_pre ) { - signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *flee, bool *viewable); + int retVal___ = 0; + if( HPMHooks.count.HP_sv_parse_next_pre ) { + int (*preHookFunc) (struct s_svstate *svstate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_flee_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &flee, &viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_parse_next_pre[hIndex].func; + retVal___ = preHookFunc(svstate); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67645,26 +74071,26 @@ signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc } } { - retVal___ = HPMHooks.source.status.calc_flee(bl, sc, flee, viewable); + retVal___ = HPMHooks.source.sv.parse_next(svstate); } - if( HPMHooks.count.HP_status_calc_flee_post ) { - signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int *flee, bool *viewable); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_flee_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &flee, &viewable); + if( HPMHooks.count.HP_sv_parse_next_post ) { + int (*postHookFunc) (int retVal___, struct s_svstate *svstate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_parse_next_post[hIndex].func; + retVal___ = postHookFunc(retVal___, svstate); } } return retVal___; } -signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable) { +int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt) { int hIndex = 0; - signed short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_flee2_pre ) { - signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *flee2, bool *viewable); + int retVal___ = 0; + if( HPMHooks.count.HP_sv_parse_pre ) { + int (*preHookFunc) (const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_flee2_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &flee2, &viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_parse_pre[hIndex].func; + retVal___ = preHookFunc(str, &len, &startoff, &delim, out_pos, &npos, &opt); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67672,26 +74098,26 @@ signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *s } } { - retVal___ = HPMHooks.source.status.calc_flee2(bl, sc, flee2, viewable); + retVal___ = HPMHooks.source.sv.parse(str, len, startoff, delim, out_pos, npos, opt); } - if( HPMHooks.count.HP_status_calc_flee2_post ) { - signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int *flee2, bool *viewable); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_flee2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &flee2, &viewable); + if( HPMHooks.count.HP_sv_parse_post ) { + int (*postHookFunc) (int retVal___, const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_parse_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_pos, &npos, &opt); } } return retVal___; } -unsigned short HP_status_calc_speed(struct block_list *bl, struct status_change *sc, int speed) { +int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_speed_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *speed); + int retVal___ = 0; + if( HPMHooks.count.HP_sv_split_pre ) { + int (*preHookFunc) (char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_speed_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_speed_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &speed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_split_pre[hIndex].func; + retVal___ = preHookFunc(str, &len, &startoff, &delim, out_fields, &nfields, &opt); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67699,26 +74125,26 @@ unsigned short HP_status_calc_speed(struct block_list *bl, struct status_change } } { - retVal___ = HPMHooks.source.status.calc_speed(bl, sc, speed); + retVal___ = HPMHooks.source.sv.split(str, len, startoff, delim, out_fields, nfields, opt); } - if( HPMHooks.count.HP_status_calc_speed_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *speed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_speed_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_speed_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &speed); + if( HPMHooks.count.HP_sv_split_post ) { + int (*postHookFunc) (int retVal___, char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_split_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_fields, &nfields, &opt); } } return retVal___; } -short HP_status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, int aspd_rate) { +size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *escapes) { int hIndex = 0; - short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_aspd_rate_pre ) { - short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *aspd_rate); + size_t retVal___ = 0; + if( HPMHooks.count.HP_sv_escape_c_pre ) { + size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len, const char *escapes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_rate_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_aspd_rate_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &aspd_rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_escape_c_pre[hIndex].func; + retVal___ = preHookFunc(out_dest, src, &len, escapes); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67726,26 +74152,26 @@ short HP_status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, } } { - retVal___ = HPMHooks.source.status.calc_aspd_rate(bl, sc, aspd_rate); + retVal___ = HPMHooks.source.sv.escape_c(out_dest, src, len, escapes); } - if( HPMHooks.count.HP_status_calc_aspd_rate_post ) { - short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, int *aspd_rate); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_rate_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_aspd_rate_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &aspd_rate); + if( HPMHooks.count.HP_sv_escape_c_post ) { + size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len, const char *escapes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_escape_c_post[hIndex].func; + retVal___ = postHookFunc(retVal___, out_dest, src, &len, escapes); } } return retVal___; } -unsigned short HP_status_calc_dmotion(struct block_list *bl, struct status_change *sc, int dmotion) { +size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_dmotion_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *dmotion); + size_t retVal___ = 0; + if( HPMHooks.count.HP_sv_unescape_c_pre ) { + size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dmotion_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_dmotion_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &dmotion); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_unescape_c_pre[hIndex].func; + retVal___ = preHookFunc(out_dest, src, &len); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67753,53 +74179,53 @@ unsigned short HP_status_calc_dmotion(struct block_list *bl, struct status_chang } } { - retVal___ = HPMHooks.source.status.calc_dmotion(bl, sc, dmotion); + retVal___ = HPMHooks.source.sv.unescape_c(out_dest, src, len); } - if( HPMHooks.count.HP_status_calc_dmotion_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *dmotion); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dmotion_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_dmotion_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &dmotion); + if( HPMHooks.count.HP_sv_unescape_c_post ) { + size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_unescape_c_post[hIndex].func; + retVal___ = postHookFunc(retVal___, out_dest, src, &len); } } return retVal___; } -short HP_status_calc_aspd(struct block_list *bl, struct status_change *sc, short flag) { +const char* HP_sv_skip_escaped_c(const char *p) { int hIndex = 0; - short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_aspd_pre ) { - short (*preHookFunc) (struct block_list *bl, struct status_change *sc, short *flag); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sv_skip_escaped_c_pre ) { + const char* (*preHookFunc) (const char *p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_aspd_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_pre[hIndex].func; + retVal___ = preHookFunc(p); } if( *HPMforce_return ) { *HPMforce_return = false; return retVal___; } - } - { - retVal___ = HPMHooks.source.status.calc_aspd(bl, sc, flag); - } - if( HPMHooks.count.HP_status_calc_aspd_post ) { - short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, short *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_aspd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &flag); + } + { + retVal___ = HPMHooks.source.sv.skip_escaped_c(p); + } + if( HPMHooks.count.HP_sv_skip_escaped_c_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); } } return retVal___; } -short HP_status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, int aspd) { +bool HP_sv_readdb(const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)) { int hIndex = 0; - short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_fix_aspd_pre ) { - short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *aspd); + bool retVal___ = false; + if( HPMHooks.count.HP_sv_readdb_pre ) { + bool (*preHookFunc) (const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_fix_aspd_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_fix_aspd_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &aspd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sv_readdb_pre[hIndex].func; + retVal___ = preHookFunc(directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67807,26 +74233,27 @@ short HP_status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, i } } { - retVal___ = HPMHooks.source.status.calc_fix_aspd(bl, sc, aspd); + retVal___ = HPMHooks.source.sv.readdb(directory, filename, delim, mincols, maxcols, maxrows, parseproc); } - if( HPMHooks.count.HP_status_calc_fix_aspd_post ) { - short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, int *aspd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_fix_aspd_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_fix_aspd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &aspd); + if( HPMHooks.count.HP_sv_readdb_post ) { + bool (*postHookFunc) (bool retVal___, const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sv_readdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc); } } return retVal___; } -unsigned int HP_status_calc_maxhp(struct block_list *bl, struct status_change *sc, uint64 maxhp) { +/* sysinfo */ +int HP_sysinfo_getpagesize(void) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_maxhp_pre ) { - unsigned int (*preHookFunc) (struct block_list *bl, struct status_change *sc, uint64 *maxhp); + int retVal___ = 0; + if( HPMHooks.count.HP_sysinfo_getpagesize_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxhp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_maxhp_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &maxhp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67834,26 +74261,26 @@ unsigned int HP_status_calc_maxhp(struct block_list *bl, struct status_change *s } } { - retVal___ = HPMHooks.source.status.calc_maxhp(bl, sc, maxhp); + retVal___ = HPMHooks.source.sysinfo.getpagesize(); } - if( HPMHooks.count.HP_status_calc_maxhp_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, struct block_list *bl, struct status_change *sc, uint64 *maxhp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxhp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_maxhp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &maxhp); + if( HPMHooks.count.HP_sysinfo_getpagesize_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -unsigned int HP_status_calc_maxsp(struct block_list *bl, struct status_change *sc, unsigned int maxsp) { +const char* HP_sysinfo_platform(void) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_maxsp_pre ) { - unsigned int (*preHookFunc) (struct block_list *bl, struct status_change *sc, unsigned int *maxsp); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_platform_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxsp_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_maxsp_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &maxsp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_platform_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67861,26 +74288,26 @@ unsigned int HP_status_calc_maxsp(struct block_list *bl, struct status_change *s } } { - retVal___ = HPMHooks.source.status.calc_maxsp(bl, sc, maxsp); + retVal___ = HPMHooks.source.sysinfo.platform(); } - if( HPMHooks.count.HP_status_calc_maxsp_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, struct block_list *bl, struct status_change *sc, unsigned int *maxsp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxsp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_maxsp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &maxsp); + if( HPMHooks.count.HP_sysinfo_platform_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_platform_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -unsigned char HP_status_calc_element(struct block_list *bl, struct status_change *sc, int element) { +const char* HP_sysinfo_osversion(void) { int hIndex = 0; - unsigned char retVal___ = 0; - if( HPMHooks.count.HP_status_calc_element_pre ) { - unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *element); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_osversion_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_element_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &element); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_osversion_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67888,26 +74315,26 @@ unsigned char HP_status_calc_element(struct block_list *bl, struct status_change } } { - retVal___ = HPMHooks.source.status.calc_element(bl, sc, element); + retVal___ = HPMHooks.source.sysinfo.osversion(); } - if( HPMHooks.count.HP_status_calc_element_post ) { - unsigned char (*postHookFunc) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int *element); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_element_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &element); + if( HPMHooks.count.HP_sysinfo_osversion_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_osversion_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -unsigned char HP_status_calc_element_lv(struct block_list *bl, struct status_change *sc, int lv) { +const char* HP_sysinfo_cpu(void) { int hIndex = 0; - unsigned char retVal___ = 0; - if( HPMHooks.count.HP_status_calc_element_lv_pre ) { - unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *lv); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_cpu_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_lv_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_element_lv_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_cpu_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67915,26 +74342,26 @@ unsigned char HP_status_calc_element_lv(struct block_list *bl, struct status_cha } } { - retVal___ = HPMHooks.source.status.calc_element_lv(bl, sc, lv); + retVal___ = HPMHooks.source.sysinfo.cpu(); } - if( HPMHooks.count.HP_status_calc_element_lv_post ) { - unsigned char (*postHookFunc) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int *lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_lv_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_element_lv_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &lv); + if( HPMHooks.count.HP_sysinfo_cpu_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_cpu_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -unsigned short HP_status_calc_mode(struct block_list *bl, struct status_change *sc, int mode) { +int HP_sysinfo_cpucores(void) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_mode_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mode); + int retVal___ = 0; + if( HPMHooks.count.HP_sysinfo_cpucores_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mode_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_mode_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &mode); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_cpucores_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67942,26 +74369,26 @@ unsigned short HP_status_calc_mode(struct block_list *bl, struct status_change * } } { - retVal___ = HPMHooks.source.status.calc_mode(bl, sc, mode); + retVal___ = HPMHooks.source.sysinfo.cpucores(); } - if( HPMHooks.count.HP_status_calc_mode_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *mode); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mode_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_mode_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &mode); + if( HPMHooks.count.HP_sysinfo_cpucores_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_cpucores_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk) { +const char* HP_sysinfo_arch(void) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_ematk_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *matk); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_arch_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_ematk_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &matk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_arch_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -67969,106 +74396,107 @@ unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change } } { - retVal___ = HPMHooks.source.status.calc_ematk(bl, sc, matk); + retVal___ = HPMHooks.source.sysinfo.arch(); } - if( HPMHooks.count.HP_status_calc_ematk_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *matk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_ematk_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &matk); + if( HPMHooks.count.HP_sysinfo_arch_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_arch_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -void HP_status_calc_bl_main(struct block_list *bl, int flag) { +bool HP_sysinfo_is64bit(void) { int hIndex = 0; - if( HPMHooks.count.HP_status_calc_bl_main_pre ) { - void (*preHookFunc) (struct block_list *bl, int *flag); + bool retVal___ = false; + if( HPMHooks.count.HP_sysinfo_is64bit_pre ) { + bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl_main_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_calc_bl_main_pre[hIndex].func; - preHookFunc(bl, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_is64bit_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.status.calc_bl_main(bl, flag); + retVal___ = HPMHooks.source.sysinfo.is64bit(); } - if( HPMHooks.count.HP_status_calc_bl_main_post ) { - void (*postHookFunc) (struct block_list *bl, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl_main_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_bl_main_post[hIndex].func; - postHookFunc(bl, &flag); + if( HPMHooks.count.HP_sysinfo_is64bit_post ) { + bool (*postHookFunc) (bool retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_is64bit_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -void HP_status_display_add(struct map_session_data *sd, enum sc_type type, int dval1, int dval2, int dval3) { +const char* HP_sysinfo_compiler(void) { int hIndex = 0; - if( HPMHooks.count.HP_status_display_add_pre ) { - void (*preHookFunc) (struct map_session_data *sd, enum sc_type *type, int *dval1, int *dval2, int *dval3); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_compiler_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_add_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_display_add_pre[hIndex].func; - preHookFunc(sd, &type, &dval1, &dval2, &dval3); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_compiler_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.status.display_add(sd, type, dval1, dval2, dval3); + retVal___ = HPMHooks.source.sysinfo.compiler(); } - if( HPMHooks.count.HP_status_display_add_post ) { - void (*postHookFunc) (struct map_session_data *sd, enum sc_type *type, int *dval1, int *dval2, int *dval3); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_add_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_display_add_post[hIndex].func; - postHookFunc(sd, &type, &dval1, &dval2, &dval3); + if( HPMHooks.count.HP_sysinfo_compiler_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_compiler_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -void HP_status_display_remove(struct map_session_data *sd, enum sc_type type) { +const char* HP_sysinfo_cflags(void) { int hIndex = 0; - if( HPMHooks.count.HP_status_display_remove_pre ) { - void (*preHookFunc) (struct map_session_data *sd, enum sc_type *type); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_cflags_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_remove_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_display_remove_pre[hIndex].func; - preHookFunc(sd, &type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_cflags_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.status.display_remove(sd, type); + retVal___ = HPMHooks.source.sysinfo.cflags(); } - if( HPMHooks.count.HP_status_display_remove_post ) { - void (*postHookFunc) (struct map_session_data *sd, enum sc_type *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_remove_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_display_remove_post[hIndex].func; - postHookFunc(sd, &type); + if( HPMHooks.count.HP_sysinfo_cflags_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_cflags_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -int HP_status_natural_heal(struct block_list *bl, va_list args) { +const char* HP_sysinfo_vcstype(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_natural_heal_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list args); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_vcstype_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_pre; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - preHookFunc = HPMHooks.list.HP_status_natural_heal_pre[hIndex].func; - retVal___ = preHookFunc(bl, args___copy); - va_end(args___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_vcstype_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -68076,30 +74504,26 @@ int HP_status_natural_heal(struct block_list *bl, va_list args) { } } { - va_list args___copy; va_copy(args___copy, args); - retVal___ = HPMHooks.source.status.natural_heal(bl, args___copy); - va_end(args___copy); + retVal___ = HPMHooks.source.sysinfo.vcstype(); } - if( HPMHooks.count.HP_status_natural_heal_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_post; hIndex++ ) { - va_list args___copy; va_copy(args___copy, args); - postHookFunc = HPMHooks.list.HP_status_natural_heal_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, args___copy); - va_end(args___copy); + if( HPMHooks.count.HP_sysinfo_vcstype_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_vcstype_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_status_natural_heal_timer(int tid, int64 tick, int id, intptr_t data) { +int HP_sysinfo_vcstypeid(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_natural_heal_timer_pre ) { - int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + if( HPMHooks.count.HP_sysinfo_vcstypeid_pre ) { + int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_natural_heal_timer_pre[hIndex].func; - retVal___ = preHookFunc(&tid, &tick, &id, &data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -68107,26 +74531,26 @@ int HP_status_natural_heal_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.status.natural_heal_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.sysinfo.vcstypeid(); } - if( HPMHooks.count.HP_status_natural_heal_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_natural_heal_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if( HPMHooks.count.HP_sysinfo_vcstypeid_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -bool HP_status_readdb_job2(char *fields[], int columns, int current) { +const char* HP_sysinfo_vcsrevision_src(void) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_status_readdb_job2_pre ) { - bool (*preHookFunc) (char *fields[], int *columns, int *current); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_vcsrevision_src_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_readdb_job2_pre[hIndex].func; - retVal___ = preHookFunc(fields, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -68134,26 +74558,26 @@ bool HP_status_readdb_job2(char *fields[], int columns, int current) { } } { - retVal___ = HPMHooks.source.status.readdb_job2(fields, columns, current); + retVal___ = HPMHooks.source.sysinfo.vcsrevision_src(); } - if( HPMHooks.count.HP_status_readdb_job2_post ) { - bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_readdb_job2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + if( HPMHooks.count.HP_sysinfo_vcsrevision_src_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -bool HP_status_readdb_sizefix(char *fields[], int columns, int current) { +const char* HP_sysinfo_vcsrevision_scripts(void) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_status_readdb_sizefix_pre ) { - bool (*preHookFunc) (char *fields[], int *columns, int *current); + const char* retVal___ = NULL; + if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre ) { + const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_sizefix_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_readdb_sizefix_pre[hIndex].func; - retVal___ = preHookFunc(fields, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -68161,53 +74585,52 @@ bool HP_status_readdb_sizefix(char *fields[], int columns, int current) { } } { - retVal___ = HPMHooks.source.status.readdb_sizefix(fields, columns, current); + retVal___ = HPMHooks.source.sysinfo.vcsrevision_scripts(); } - if( HPMHooks.count.HP_status_readdb_sizefix_post ) { - bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_sizefix_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_readdb_sizefix_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post ) { + const char* (*postHookFunc) (const char* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -bool HP_status_readdb_refine(char *fields[], int columns, int current) { +void HP_sysinfo_vcsrevision_reload(void) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_status_readdb_refine_pre ) { - bool (*preHookFunc) (char *fields[], int *columns, int *current); + if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_readdb_refine_pre[hIndex].func; - retVal___ = preHookFunc(fields, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.status.readdb_refine(fields, columns, current); + HPMHooks.source.sysinfo.vcsrevision_reload(); } - if( HPMHooks.count.HP_status_readdb_refine_post ) { - bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_readdb_refine_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -bool HP_status_readdb_scconfig(char *fields[], int columns, int current) { +bool HP_sysinfo_is_superuser(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_status_readdb_scconfig_pre ) { - bool (*preHookFunc) (char *fields[], int *columns, int *current); + if( HPMHooks.count.HP_sysinfo_is_superuser_pre ) { + bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_scconfig_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_readdb_scconfig_pre[hIndex].func; - retVal___ = preHookFunc(fields, &columns, ¤t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -68215,24 +74638,24 @@ bool HP_status_readdb_scconfig(char *fields[], int columns, int current) { } } { - retVal___ = HPMHooks.source.status.readdb_scconfig(fields, columns, current); + retVal___ = HPMHooks.source.sysinfo.is_superuser(); } - if( HPMHooks.count.HP_status_readdb_scconfig_post ) { - bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_scconfig_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_readdb_scconfig_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + if( HPMHooks.count.HP_sysinfo_is_superuser_post ) { + bool (*postHookFunc) (bool retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -void HP_status_read_job_db(void) { +void HP_sysinfo_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_status_read_job_db_pre ) { + if( HPMHooks.count.HP_sysinfo_init_pre ) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_read_job_db_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_init_pre[hIndex].func; preHookFunc(); } if( *HPMforce_return ) { @@ -68241,25 +74664,25 @@ void HP_status_read_job_db(void) { } } { - HPMHooks.source.status.read_job_db(); + HPMHooks.source.sysinfo.init(); } - if( HPMHooks.count.HP_status_read_job_db_post ) { + if( HPMHooks.count.HP_sysinfo_init_post ) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_read_job_db_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_init_post[hIndex].func; postHookFunc(); } } return; } -void HP_status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb) { +void HP_sysinfo_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_status_read_job_db_sub_pre ) { - void (*preHookFunc) (int *idx, const char *name, config_setting_t *jdb); + if( HPMHooks.count.HP_sysinfo_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_read_job_db_sub_pre[hIndex].func; - preHookFunc(&idx, name, jdb); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_sysinfo_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -68267,53 +74690,54 @@ void HP_status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb) } } { - HPMHooks.source.status.read_job_db_sub(idx, name, jdb); + HPMHooks.source.sysinfo.final(); } - if( HPMHooks.count.HP_status_read_job_db_sub_post ) { - void (*postHookFunc) (int *idx, const char *name, config_setting_t *jdb); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_read_job_db_sub_post[hIndex].func; - postHookFunc(&idx, name, jdb); + if( HPMHooks.count.HP_sysinfo_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_sysinfo_final_post[hIndex].func; + postHookFunc(); } } return; } -/* storage */ -void HP_storage_reconnect(void) { +/* timer */ +int64 HP_timer_gettick(void) { int hIndex = 0; - if( HPMHooks.count.HP_storage_reconnect_pre ) { - void (*preHookFunc) (void); + int64 retVal___ = 0; + if( HPMHooks.count.HP_timer_gettick_pre ) { + int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_storage_reconnect_pre[hIndex].func; - preHookFunc(); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_gettick_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.storage.reconnect(); + retVal___ = HPMHooks.source.timer.gettick(); } - if( HPMHooks.count.HP_storage_reconnect_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_storage_reconnect_post[hIndex].func; - postHookFunc(); + if( HPMHooks.count.HP_timer_gettick_post ) { + int64 (*postHookFunc) (int64 retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_gettick_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -int HP_storage_delitem(struct map_session_data *sd, int n, int amount) { +int64 HP_timer_gettick_nocache(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_storage_delitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount); + int64 retVal___ = 0; + if( HPMHooks.count.HP_timer_gettick_nocache_pre ) { + int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_delitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_storage_delitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n, &amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_gettick_nocache_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -68321,26 +74745,26 @@ int HP_storage_delitem(struct map_session_data *sd, int n, int amount) { } } { - retVal___ = HPMHooks.source.storage.delitem(sd, n, amount); + retVal___ = HPMHooks.source.timer.gettick_nocache(); } - if( HPMHooks.count.HP_storage_delitem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_delitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_storage_delitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &n, &amount); + if( HPMHooks.count.HP_timer_gettick_nocache_post ) { + int64 (*postHookFunc) (int64 retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_gettick_nocache_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_storage_open(struct map_session_data *sd) { +int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_open_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if( HPMHooks.count.HP_timer_add_pre ) { + int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_storage_open_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_add_pre[hIndex].func; + retVal___ = preHookFunc(&tick, &func, &id, &data); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -68348,26 +74772,26 @@ int HP_storage_open(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.storage.open(sd); + retVal___ = HPMHooks.source.timer.add(tick, func, id, data); } - if( HPMHooks.count.HP_storage_open_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_storage_open_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if( HPMHooks.count.HP_timer_add_post ) { + int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data); } } return retVal___; } -int HP_storage_add(struct map_session_data *sd, int index, int amount) { +int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int interval) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_add_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + if( HPMHooks.count.HP_timer_add_interval_pre ) { + int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_add_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_storage_add_pre[hIndex].func; - retVal___ = preHookFunc(sd, &index, &amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_add_interval_pre[hIndex].func; + retVal___ = preHookFunc(&tick, &func, &id, &data, &interval); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -68375,26 +74799,26 @@ int HP_storage_add(struct map_session_data *sd, int index, int amount) { } } { - retVal___ = HPMHooks.source.storage.add(sd, index, amount); + retVal___ = HPMHooks.source.timer.add_interval(tick, func, id, data, interval); } - if( HPMHooks.count.HP_storage_add_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_add_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_storage_add_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &index, &amount); + if( HPMHooks.count.HP_timer_add_interval_post ) { + int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_add_interval_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data, &interval); } } return retVal___; } -int HP_storage_get(struct map_session_data *sd, int index, int amount) { +const struct TimerData* HP_timer_get(int tid) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_storage_get_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + const struct TimerData* retVal___ = NULL; + if( HPMHooks.count.HP_timer_get_pre ) { + const struct TimerData* (*preHookFunc) (int *tid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_storage_get_pre[hIndex].func; - retVal___ = preHookFunc(sd, &index, &amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_get_pre[hIndex].func; + retVal___ = preHookFunc(&tid); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -68402,26 +74826,26 @@ int HP_storage_get(struct map_session_data *sd, int index, int amount) { } } { - retVal___ = HPMHooks.source.storage.get(sd, index, amount); + retVal___ = HPMHooks.source.timer.get(tid); } - if( HPMHooks.count.HP_storage_get_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_storage_get_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &index, &amount); + if( HPMHooks.count.HP_timer_get_post ) { + const struct TimerData* (*postHookFunc) (const struct TimerData* retVal___, int *tid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_get_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid); } } return retVal___; } -int HP_storage_additem(struct map_session_data *sd, struct item *item_data, int amount) { +int HP_timer_delete(int tid, TimerFunc func) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_additem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct item *item_data, int *amount); + if( HPMHooks.count.HP_timer_delete_pre ) { + int (*preHookFunc) (int *tid, TimerFunc *func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_additem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_storage_additem_pre[hIndex].func; - retVal___ = preHookFunc(sd, item_data, &amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_delete_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &func); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -68429,26 +74853,26 @@ int HP_storage_additem(struct map_session_data *sd, struct item *item_data, int } } { - retVal___ = HPMHooks.source.storage.additem(sd, item_data, amount); + retVal___ = HPMHooks.source.timer.delete(tid, func); } - if( HPMHooks.count.HP_storage_additem_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item_data, int *amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_additem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_storage_additem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, item_data, &amount); + if( HPMHooks.count.HP_timer_delete_post ) { + int (*postHookFunc) (int retVal___, int *tid, TimerFunc *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &func); } } return retVal___; } -int HP_storage_addfromcart(struct map_session_data *sd, int index, int amount) { +int64 HP_timer_addtick(int tid, int64 tick) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_storage_addfromcart_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + int64 retVal___ = 0; + if( HPMHooks.count.HP_timer_addtick_pre ) { + int64 (*preHookFunc) (int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_addfromcart_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_storage_addfromcart_pre[hIndex].func; - retVal___ = preHookFunc(sd, &index, &amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_addtick_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -68456,26 +74880,26 @@ int HP_storage_addfromcart(struct map_session_data *sd, int index, int amount) { } } { - retVal___ = HPMHooks.source.storage.addfromcart(sd, index, amount); + retVal___ = HPMHooks.source.timer.addtick(tid, tick); } - if( HPMHooks.count.HP_storage_addfromcart_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_addfromcart_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_storage_addfromcart_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &index, &amount); + if( HPMHooks.count.HP_timer_addtick_post ) { + int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_addtick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick); } } return retVal___; } -int HP_storage_gettocart(struct map_session_data *sd, int index, int amount) { +int64 HP_timer_settick(int tid, int64 tick) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_storage_gettocart_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + int64 retVal___ = 0; + if( HPMHooks.count.HP_timer_settick_pre ) { + int64 (*preHookFunc) (int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_gettocart_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_storage_gettocart_pre[hIndex].func; - retVal___ = preHookFunc(sd, &index, &amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_settick_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -68483,78 +74907,80 @@ int HP_storage_gettocart(struct map_session_data *sd, int index, int amount) { } } { - retVal___ = HPMHooks.source.storage.gettocart(sd, index, amount); + retVal___ = HPMHooks.source.timer.settick(tid, tick); } - if( HPMHooks.count.HP_storage_gettocart_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_gettocart_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_storage_gettocart_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &index, &amount); + if( HPMHooks.count.HP_timer_settick_post ) { + int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_settick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick); } } return retVal___; } -void HP_storage_close(struct map_session_data *sd) { +int HP_timer_add_func_list(TimerFunc func, char *name) { int hIndex = 0; - if( HPMHooks.count.HP_storage_close_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if( HPMHooks.count.HP_timer_add_func_list_pre ) { + int (*preHookFunc) (TimerFunc *func, char *name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_close_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_storage_close_pre[hIndex].func; - preHookFunc(sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_add_func_list_pre[hIndex].func; + retVal___ = preHookFunc(&func, name); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.storage.close(sd); + retVal___ = HPMHooks.source.timer.add_func_list(func, name); } - if( HPMHooks.count.HP_storage_close_post ) { - void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_close_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_storage_close_post[hIndex].func; - postHookFunc(sd); + if( HPMHooks.count.HP_timer_add_func_list_post ) { + int (*postHookFunc) (int retVal___, TimerFunc *func, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_add_func_list_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &func, name); } } - return; + return retVal___; } -void HP_storage_pc_quit(struct map_session_data *sd, int flag) { +unsigned long HP_timer_get_uptime(void) { int hIndex = 0; - if( HPMHooks.count.HP_storage_pc_quit_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *flag); + unsigned long retVal___ = 0; + if( HPMHooks.count.HP_timer_get_uptime_pre ) { + unsigned long (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_pc_quit_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_storage_pc_quit_pre[hIndex].func; - preHookFunc(sd, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_get_uptime_pre[hIndex].func; + retVal___ = preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.storage.pc_quit(sd, flag); + retVal___ = HPMHooks.source.timer.get_uptime(); } - if( HPMHooks.count.HP_storage_pc_quit_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_pc_quit_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_storage_pc_quit_post[hIndex].func; - postHookFunc(sd, &flag); + if( HPMHooks.count.HP_timer_get_uptime_post ) { + unsigned long (*postHookFunc) (unsigned long retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_get_uptime_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } - return; + return retVal___; } -int HP_storage_comp_item(const void *i1_, const void *i2_) { +int HP_timer_perform(int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_comp_item_pre ) { - int (*preHookFunc) (const void *i1_, const void *i2_); + if( HPMHooks.count.HP_timer_perform_pre ) { + int (*preHookFunc) (int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_comp_item_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_storage_comp_item_pre[hIndex].func; - retVal___ = preHookFunc(i1_, i2_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_perform_pre[hIndex].func; + retVal___ = preHookFunc(&tick); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -68562,25 +74988,25 @@ int HP_storage_comp_item(const void *i1_, const void *i2_) { } } { - retVal___ = HPMHooks.source.storage.comp_item(i1_, i2_); + retVal___ = HPMHooks.source.timer.perform(tick); } - if( HPMHooks.count.HP_storage_comp_item_post ) { - int (*postHookFunc) (int retVal___, const void *i1_, const void *i2_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_comp_item_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_storage_comp_item_post[hIndex].func; - retVal___ = postHookFunc(retVal___, i1_, i2_); + if( HPMHooks.count.HP_timer_perform_post ) { + int (*postHookFunc) (int retVal___, int64 *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_perform_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tick); } } return retVal___; } -void HP_storage_sortitem(struct item *items, unsigned int size) { +void HP_timer_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_storage_sortitem_pre ) { - void (*preHookFunc) (struct item *items, unsigned int *size); + if( HPMHooks.count.HP_timer_init_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_sortitem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_storage_sortitem_pre[hIndex].func; - preHookFunc(items, &size); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_init_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -68588,49 +75014,42 @@ void HP_storage_sortitem(struct item *items, unsigned int size) { } } { - HPMHooks.source.storage.sortitem(items, size); + HPMHooks.source.timer.init(); } - if( HPMHooks.count.HP_storage_sortitem_post ) { - void (*postHookFunc) (struct item *items, unsigned int *size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_sortitem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_storage_sortitem_post[hIndex].func; - postHookFunc(items, &size); + if( HPMHooks.count.HP_timer_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_init_post[hIndex].func; + postHookFunc(); } } return; } -int HP_storage_reconnect_sub(DBKey key, DBData *data, va_list ap) { +void HP_timer_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_storage_reconnect_sub_pre ) { - int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + if( HPMHooks.count.HP_timer_final_pre ) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_storage_reconnect_sub_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); - va_end(ap___copy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_timer_final_pre[hIndex].func; + preHookFunc(); } if( *HPMforce_return ) { *HPMforce_return = false; - return retVal___; + return; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.storage.reconnect_sub(key, data, ap___copy); - va_end(ap___copy); + HPMHooks.source.timer.final(); } - if( HPMHooks.count.HP_storage_reconnect_sub_post ) { - int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_storage_reconnect_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); - va_end(ap___copy); + if( HPMHooks.count.HP_timer_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_timer_final_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } /* trade */ void HP_trade_request(struct map_session_data *sd, struct map_session_data *target_sd) { diff --git a/src/plugins/HPMHooking/HPMHooking_map.sources.inc b/src/plugins/HPMHooking/HPMHooking_map.sources.inc index d7d7ac1ac..53905a9d9 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.sources.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.sources.inc @@ -4,6 +4,7 @@ // NOTE: This file was auto-generated and should never be manually edited, // as it will get overwritten. +memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface)); memcpy(&HPMHooks.source.atcommand, atcommand, sizeof(struct atcommand_interface)); memcpy(&HPMHooks.source.battle, battle, sizeof(struct battle_interface)); memcpy(&HPMHooks.source.bg, bg, sizeof(struct battleground_interface)); @@ -12,6 +13,9 @@ memcpy(&HPMHooks.source.channel, channel, sizeof(struct channel_interface)); memcpy(&HPMHooks.source.chat, chat, sizeof(struct chat_interface)); memcpy(&HPMHooks.source.chrif, chrif, sizeof(struct chrif_interface)); memcpy(&HPMHooks.source.clif, clif, sizeof(struct clif_interface)); +memcpy(&HPMHooks.source.cmdline, cmdline, sizeof(struct cmdline_interface)); +memcpy(&HPMHooks.source.console, console, sizeof(struct console_interface)); +memcpy(&HPMHooks.source.DB, DB, sizeof(struct db_interface)); memcpy(&HPMHooks.source.duel, duel, sizeof(struct duel_interface)); memcpy(&HPMHooks.source.elemental, elemental, sizeof(struct elemental_interface)); memcpy(&HPMHooks.source.guild, guild, sizeof(struct guild_interface)); @@ -21,14 +25,18 @@ memcpy(&HPMHooks.source.instance, instance, sizeof(struct instance_interface)); memcpy(&HPMHooks.source.intif, intif, sizeof(struct intif_interface)); memcpy(&HPMHooks.source.ircbot, ircbot, sizeof(struct irc_bot_interface)); memcpy(&HPMHooks.source.itemdb, itemdb, sizeof(struct itemdb_interface)); +memcpy(&HPMHooks.source.libconfig, libconfig, sizeof(struct libconfig_interface)); memcpy(&HPMHooks.source.logs, logs, sizeof(struct log_interface)); memcpy(&HPMHooks.source.mail, mail, sizeof(struct mail_interface)); +memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface)); memcpy(&HPMHooks.source.map, map, sizeof(struct map_interface)); +memcpy(&HPMHooks.source.mapindex, mapindex, sizeof(struct mapindex_interface)); memcpy(&HPMHooks.source.mapit, mapit, sizeof(struct mapit_interface)); memcpy(&HPMHooks.source.mapreg, mapreg, sizeof(struct mapreg_interface)); memcpy(&HPMHooks.source.mercenary, mercenary, sizeof(struct mercenary_interface)); memcpy(&HPMHooks.source.mob, mob, sizeof(struct mob_interface)); memcpy(&HPMHooks.source.npc, npc, sizeof(struct npc_interface)); +memcpy(&HPMHooks.source.nullpo, nullpo, sizeof(struct nullpo_interface)); memcpy(&HPMHooks.source.party, party, sizeof(struct party_interface)); memcpy(&HPMHooks.source.path, path, sizeof(struct path_interface)); memcpy(&HPMHooks.source.pcg, pcg, sizeof(struct pc_groups_interface)); @@ -37,9 +45,17 @@ memcpy(&HPMHooks.source.pet, pet, sizeof(struct pet_interface)); memcpy(&HPMHooks.source.quest, quest, sizeof(struct quest_interface)); memcpy(&HPMHooks.source.script, script, sizeof(struct script_interface)); memcpy(&HPMHooks.source.searchstore, searchstore, sizeof(struct searchstore_interface)); +memcpy(&HPMHooks.source.showmsg, showmsg, sizeof(struct showmsg_interface)); memcpy(&HPMHooks.source.skill, skill, sizeof(struct skill_interface)); +memcpy(&HPMHooks.source.sockt, sockt, sizeof(struct socket_interface)); +memcpy(&HPMHooks.source.SQL, SQL, sizeof(struct sql_interface)); memcpy(&HPMHooks.source.status, status, sizeof(struct status_interface)); memcpy(&HPMHooks.source.storage, storage, sizeof(struct storage_interface)); +memcpy(&HPMHooks.source.StrBuf, StrBuf, sizeof(struct stringbuf_interface)); +memcpy(&HPMHooks.source.strlib, strlib, sizeof(struct strlib_interface)); +memcpy(&HPMHooks.source.sv, sv, sizeof(struct sv_interface)); +memcpy(&HPMHooks.source.sysinfo, sysinfo, sizeof(struct sysinfo_interface)); +memcpy(&HPMHooks.source.timer, timer, sizeof(struct timer_interface)); memcpy(&HPMHooks.source.trade, trade, sizeof(struct trade_interface)); memcpy(&HPMHooks.source.unit, unit, sizeof(struct unit_interface)); memcpy(&HPMHooks.source.vending, vending, sizeof(struct vending_interface)); -- cgit v1.2.3-60-g2f50