using System.Collections.Generic; using System.IO; using System.Text; using BrewMonster; namespace ModelRenderer.Scripts.GameData { public class elementdataman { private static elementdataman instance; public static elementdataman Instance { get { if (instance == null) { instance = new elementdataman(); } return instance; } } public Dictionary essence_id_data_type_map = new Dictionary(); public Dictionary essence_id_data_map = new Dictionary(); public EQUIPMENT_ADDON[] equipment_addon_array = new EQUIPMENT_ADDON[0]; public WEAPON_MAJOR_TYPE[] weapon_major_type_array = new WEAPON_MAJOR_TYPE[0]; public WEAPON_SUB_TYPE[] weapon_sub_type_array = new WEAPON_SUB_TYPE[0]; public WEAPON_ESSENCE[] weapon_essence_array = new WEAPON_ESSENCE[0]; public ARMOR_MAJOR_TYPE[] armor_major_type_array = new ARMOR_MAJOR_TYPE[0]; public ARMOR_SUB_TYPE[] armor_sub_type_array = new ARMOR_SUB_TYPE[0]; public ARMOR_ESSENCE[] armor_essence_array = new ARMOR_ESSENCE[0]; public DECORATION_MAJOR_TYPE[] decoration_major_type_array = new DECORATION_MAJOR_TYPE[0]; public DECORATION_SUB_TYPE[] decoration_sub_type_array = new DECORATION_SUB_TYPE[0]; public DECORATION_ESSENCE[] decoration_essence_array = new DECORATION_ESSENCE[0]; public MEDICINE_MAJOR_TYPE[] medicine_major_type_array = new MEDICINE_MAJOR_TYPE[0]; public MEDICINE_SUB_TYPE[] medicine_sub_type_array = new MEDICINE_SUB_TYPE[0]; public MEDICINE_ESSENCE[] medicine_essence_array = new MEDICINE_ESSENCE[0]; public MATERIAL_MAJOR_TYPE[] material_major_type_array = new MATERIAL_MAJOR_TYPE[0]; public MATERIAL_SUB_TYPE[] material_sub_type_array = new MATERIAL_SUB_TYPE[0]; public MATERIAL_ESSENCE[] material_essence_array = new MATERIAL_ESSENCE[0]; public DAMAGERUNE_SUB_TYPE[] damagerune_sub_type_array = new DAMAGERUNE_SUB_TYPE[0]; public DAMAGERUNE_ESSENCE[] damagerune_essence_array = new DAMAGERUNE_ESSENCE[0]; public ARMORRUNE_SUB_TYPE[] armorrune_sub_type_array = new ARMORRUNE_SUB_TYPE[0]; public ARMORRUNE_ESSENCE[] armorrune_essence_array = new ARMORRUNE_ESSENCE[0]; public SKILLTOME_SUB_TYPE[] skilltome_sub_type_array = new SKILLTOME_SUB_TYPE[0]; public SKILLTOME_ESSENCE[] skilltome_essence_array = new SKILLTOME_ESSENCE[0]; public FLYSWORD_ESSENCE[] flysword_essence_array = new FLYSWORD_ESSENCE[0]; public WINGMANWING_ESSENCE[] wingmanwing_essence_array = new WINGMANWING_ESSENCE[0]; public TOWNSCROLL_ESSENCE[] townscroll_essence_array = new TOWNSCROLL_ESSENCE[0]; public UNIONSCROLL_ESSENCE[] unionscroll_essence_array = new UNIONSCROLL_ESSENCE[0]; public REVIVESCROLL_ESSENCE[] revivescroll_essence_array = new REVIVESCROLL_ESSENCE[0]; public ELEMENT_ESSENCE[] element_essence_array = new ELEMENT_ESSENCE[0]; public TASKMATTER_ESSENCE[] taskmatter_essence_array = new TASKMATTER_ESSENCE[0]; public TOSSMATTER_ESSENCE[] tossmatter_essence_array = new TOSSMATTER_ESSENCE[0]; public PROJECTILE_TYPE[] projectile_type_array = new PROJECTILE_TYPE[0]; public PROJECTILE_ESSENCE[] projectile_essence_array = new PROJECTILE_ESSENCE[0]; public QUIVER_SUB_TYPE[] quiver_sub_type_array = new QUIVER_SUB_TYPE[0]; public QUIVER_ESSENCE[] quiver_essence_array = new QUIVER_ESSENCE[0]; public STONE_SUB_TYPE[] stone_sub_type_array = new STONE_SUB_TYPE[0]; public STONE_ESSENCE[] stone_essence_array = new STONE_ESSENCE[0]; public MONSTER_ADDON[] monster_addon_array = new MONSTER_ADDON[0]; public MONSTER_TYPE[] monster_type_array = new MONSTER_TYPE[0]; public MONSTER_ESSENCE[] monster_essence_array = new MONSTER_ESSENCE[0]; public NPC_TALK_SERVICE[] npc_talk_service_array = new NPC_TALK_SERVICE[0]; public NPC_SELL_SERVICE[] npc_sell_service_array = new NPC_SELL_SERVICE[0]; public NPC_BUY_SERVICE[] npc_buy_service_array = new NPC_BUY_SERVICE[0]; public NPC_REPAIR_SERVICE[] npc_repair_service_array = new NPC_REPAIR_SERVICE[0]; public NPC_INSTALL_SERVICE[] npc_install_service_array = new NPC_INSTALL_SERVICE[0]; public NPC_UNINSTALL_SERVICE[] npc_uninstall_service_array = new NPC_UNINSTALL_SERVICE[0]; public NPC_TASK_IN_SERVICE[] npc_task_in_service_array = new NPC_TASK_IN_SERVICE[0]; public NPC_TASK_OUT_SERVICE[] npc_task_out_service_array = new NPC_TASK_OUT_SERVICE[0]; public NPC_TASK_MATTER_SERVICE[] npc_task_matter_service_array = new NPC_TASK_MATTER_SERVICE[0]; public NPC_SKILL_SERVICE[] npc_skill_service_array = new NPC_SKILL_SERVICE[0]; public NPC_HEAL_SERVICE[] npc_heal_service_array = new NPC_HEAL_SERVICE[0]; public NPC_TRANSMIT_SERVICE[] npc_transmit_service_array = new NPC_TRANSMIT_SERVICE[0]; public NPC_TRANSPORT_SERVICE[] npc_transport_service_array = new NPC_TRANSPORT_SERVICE[0]; public NPC_PROXY_SERVICE[] npc_proxy_service_array = new NPC_PROXY_SERVICE[0]; public NPC_STORAGE_SERVICE[] npc_storage_service_array = new NPC_STORAGE_SERVICE[0]; public NPC_MAKE_SERVICE[] npc_make_service_array = new NPC_MAKE_SERVICE[0]; public NPC_DECOMPOSE_SERVICE[] npc_decompose_service_array = new NPC_DECOMPOSE_SERVICE[0]; public NPC_TYPE[] npc_type_array = new NPC_TYPE[0]; public NPC_ESSENCE[] npc_essence_array = new NPC_ESSENCE[0]; public talk_proc[] talk_proc_array = new talk_proc[0]; public FACE_TEXTURE_ESSENCE[] face_texture_essence_array = new FACE_TEXTURE_ESSENCE[0]; public FACE_SHAPE_ESSENCE[] face_shape_essence_array = new FACE_SHAPE_ESSENCE[0]; public FACE_EMOTION_TYPE[] face_emotion_type_array = new FACE_EMOTION_TYPE[0]; public FACE_EXPRESSION_ESSENCE[] face_expression_essence_array = new FACE_EXPRESSION_ESSENCE[0]; public FACE_HAIR_ESSENCE[] face_hair_essence_array = new FACE_HAIR_ESSENCE[0]; public FACE_MOUSTACHE_ESSENCE[] face_moustache_essence_array = new FACE_MOUSTACHE_ESSENCE[0]; public COLORPICKER_ESSENCE[] colorpicker_essence_array = new COLORPICKER_ESSENCE[0]; public CUSTOMIZEDATA_ESSENCE[] customizedata_essence_array = new CUSTOMIZEDATA_ESSENCE[0]; public RECIPE_MAJOR_TYPE[] recipe_major_type_array = new RECIPE_MAJOR_TYPE[0]; public RECIPE_SUB_TYPE[] recipe_sub_type_array = new RECIPE_SUB_TYPE[0]; public RECIPE_ESSENCE[] recipe_essence_array = new RECIPE_ESSENCE[0]; public ENEMY_FACTION_CONFIG[] enemy_faction_config_array = new ENEMY_FACTION_CONFIG[0]; public CHARACTER_CLASS_CONFIG[] character_class_config_array = new CHARACTER_CLASS_CONFIG[0]; public PARAM_ADJUST_CONFIG[] param_adjust_config_array = new PARAM_ADJUST_CONFIG[0]; public PLAYER_ACTION_INFO_CONFIG[] player_action_info_config_array = new PLAYER_ACTION_INFO_CONFIG[0]; public TASKDICE_ESSENCE[] taskdice_essence_array = new TASKDICE_ESSENCE[0]; public TASKNORMALMATTER_ESSENCE[] tasknormalmatter_essence_array = new TASKNORMALMATTER_ESSENCE[0]; public FACE_FALING_ESSENCE[] face_faling_essence_array = new FACE_FALING_ESSENCE[0]; public PLAYER_LEVELEXP_CONFIG[] player_levelexp_config_array = new PLAYER_LEVELEXP_CONFIG[0]; public MINE_TYPE[] mine_type_array = new MINE_TYPE[0]; public MINE_ESSENCE[] mine_essence_array = new MINE_ESSENCE[0]; public NPC_IDENTIFY_SERVICE[] npc_identify_service_array = new NPC_IDENTIFY_SERVICE[0]; public FASHION_MAJOR_TYPE[] fashion_major_type_array = new FASHION_MAJOR_TYPE[0]; public FASHION_SUB_TYPE[] fashion_sub_type_array = new FASHION_SUB_TYPE[0]; public FASHION_ESSENCE[] fashion_essence_array = new FASHION_ESSENCE[0]; public FACETICKET_MAJOR_TYPE[] faceticket_major_type_array = new FACETICKET_MAJOR_TYPE[0]; public FACETICKET_SUB_TYPE[] faceticket_sub_type_array = new FACETICKET_SUB_TYPE[0]; public FACETICKET_ESSENCE[] faceticket_essence_array = new FACETICKET_ESSENCE[0]; public FACEPILL_MAJOR_TYPE[] facepill_major_type_array = new FACEPILL_MAJOR_TYPE[0]; public FACEPILL_SUB_TYPE[] facepill_sub_type_array = new FACEPILL_SUB_TYPE[0]; public FACEPILL_ESSENCE[] facepill_essence_array = new FACEPILL_ESSENCE[0]; public SUITE_ESSENCE[] suite_essence_array = new SUITE_ESSENCE[0]; public GM_GENERATOR_TYPE[] gm_generator_type_array = new GM_GENERATOR_TYPE[0]; public GM_GENERATOR_ESSENCE[] gm_generator_essence_array = new GM_GENERATOR_ESSENCE[0]; public PET_TYPE[] pet_type_array = new PET_TYPE[0]; public PET_ESSENCE[] pet_essence_array = new PET_ESSENCE[0]; public PET_EGG_ESSENCE[] pet_egg_essence_array = new PET_EGG_ESSENCE[0]; public PET_FOOD_ESSENCE[] pet_food_essence_array = new PET_FOOD_ESSENCE[0]; public PET_FACETICKET_ESSENCE[] pet_faceticket_essence_array = new PET_FACETICKET_ESSENCE[0]; public FIREWORKS_ESSENCE[] fireworks_essence_array = new FIREWORKS_ESSENCE[0]; public WAR_TANKCALLIN_ESSENCE[] war_tankcallin_essence_array = new WAR_TANKCALLIN_ESSENCE[0]; public NPC_WAR_TOWERBUILD_SERVICE[] npc_war_towerbuild_service_array = new NPC_WAR_TOWERBUILD_SERVICE[0]; public PLAYER_SECONDLEVEL_CONFIG[] player_secondlevel_config_array = new PLAYER_SECONDLEVEL_CONFIG[0]; public NPC_RESETPROP_SERVICE[] npc_resetprop_service_array = new NPC_RESETPROP_SERVICE[0]; public NPC_PETNAME_SERVICE[] npc_petname_service_array = new NPC_PETNAME_SERVICE[0]; public NPC_PETLEARNSKILL_SERVICE[] npc_petlearnskill_service_array = new NPC_PETLEARNSKILL_SERVICE[0]; public NPC_PETFORGETSKILL_SERVICE[] npc_petforgetskill_service_array = new NPC_PETFORGETSKILL_SERVICE[0]; public SKILLMATTER_ESSENCE[] skillmatter_essence_array = new SKILLMATTER_ESSENCE[0]; public REFINE_TICKET_ESSENCE[] refine_ticket_essence_array = new REFINE_TICKET_ESSENCE[0]; public DESTROYING_ESSENCE[] destroying_essence_array = new DESTROYING_ESSENCE[0]; public NPC_EQUIPBIND_SERVICE[] npc_equipbind_service_array = new NPC_EQUIPBIND_SERVICE[0]; public NPC_EQUIPDESTROY_SERVICE[] npc_equipdestroy_service_array = new NPC_EQUIPDESTROY_SERVICE[0]; public NPC_EQUIPUNDESTROY_SERVICE[] npc_equipundestroy_service_array = new NPC_EQUIPUNDESTROY_SERVICE[0]; public BIBLE_ESSENCE[] bible_essence_array = new BIBLE_ESSENCE[0]; public SPEAKER_ESSENCE[] speaker_essence_array = new SPEAKER_ESSENCE[0]; public AUTOMP_ESSENCE[] automp_essence_array = new AUTOMP_ESSENCE[0]; public AUTOHP_ESSENCE[] autohp_essence_array = new AUTOHP_ESSENCE[0]; public DOUBLE_EXP_ESSENCE[] double_exp_essence_array = new DOUBLE_EXP_ESSENCE[0]; public TRANSMITSCROLL_ESSENCE[] transmitscroll_essence_array = new TRANSMITSCROLL_ESSENCE[0]; public DYE_TICKET_ESSENCE[] dye_ticket_essence_array = new DYE_TICKET_ESSENCE[0]; public GOBLIN_ESSENCE[] goblin_essence_array = new GOBLIN_ESSENCE[0]; public GOBLIN_EQUIP_TYPE[] goblin_equip_type_array = new GOBLIN_EQUIP_TYPE[0]; public GOBLIN_EQUIP_ESSENCE[] goblin_equip_essence_array = new GOBLIN_EQUIP_ESSENCE[0]; public GOBLIN_EXPPILL_ESSENCE[] goblin_exppill_essence_array = new GOBLIN_EXPPILL_ESSENCE[0]; public SELL_CERTIFICATE_ESSENCE[] sell_certificate_essence_array = new SELL_CERTIFICATE_ESSENCE[0]; public TARGET_ITEM_ESSENCE[] target_item_essence_array = new TARGET_ITEM_ESSENCE[0]; public LOOK_INFO_ESSENCE[] look_info_essence_array = new LOOK_INFO_ESSENCE[0]; public UPGRADE_PRODUCTION_CONFIG[] upgrade_production_config_array = new UPGRADE_PRODUCTION_CONFIG[0]; public ACC_STORAGE_BLACKLIST_CONFIG[] acc_storage_blacklist_config_array = new ACC_STORAGE_BLACKLIST_CONFIG[0]; public FACE_HAIR_TEXTURE_MAP[] face_hair_texture_map_array = new FACE_HAIR_TEXTURE_MAP[0]; public MULTI_EXP_CONFIG[] multi_exp_config_array = new MULTI_EXP_CONFIG[0]; public INC_SKILL_ABILITY_ESSENCE[] inc_skill_ability_essence_array = new INC_SKILL_ABILITY_ESSENCE[0]; public GOD_EVIL_CONVERT_CONFIG[] god_evil_convert_config_array = new GOD_EVIL_CONVERT_CONFIG[0]; public WEDDING_CONFIG[] wedding_config_array = new WEDDING_CONFIG[0]; public WEDDING_BOOKCARD_ESSENCE[] wedding_bookcard_essence_array = new WEDDING_BOOKCARD_ESSENCE[0]; public WEDDING_INVITECARD_ESSENCE[] wedding_invitecard_essence_array = new WEDDING_INVITECARD_ESSENCE[0]; public SHARPENER_ESSENCE[] sharpener_essence_array = new SHARPENER_ESSENCE[0]; public FACE_THIRDEYE_ESSENCE[] face_thirdeye_essence_array = new FACE_THIRDEYE_ESSENCE[0]; public FACTION_FORTRESS_CONFIG[] faction_fortress_config_array = new FACTION_FORTRESS_CONFIG[0]; public FACTION_BUILDING_SUB_TYPE[] faction_building_sub_type_array = new FACTION_BUILDING_SUB_TYPE[0]; public FACTION_BUILDING_ESSENCE[] faction_building_essence_array = new FACTION_BUILDING_ESSENCE[0]; public FACTION_MATERIAL_ESSENCE[] faction_material_essence_array = new FACTION_MATERIAL_ESSENCE[0]; public CONGREGATE_ESSENCE[] congregate_essence_array = new CONGREGATE_ESSENCE[0]; public ENGRAVE_MAJOR_TYPE[] engrave_major_type_array = new ENGRAVE_MAJOR_TYPE[0]; public ENGRAVE_SUB_TYPE[] engrave_sub_type_array = new ENGRAVE_SUB_TYPE[0]; public ENGRAVE_ESSENCE[] engrave_essence_array = new ENGRAVE_ESSENCE[0]; public NPC_ENGRAVE_SERVICE[] npc_engrave_service_array = new NPC_ENGRAVE_SERVICE[0]; public NPC_RANDPROP_SERVICE[] npc_randprop_service_array = new NPC_RANDPROP_SERVICE[0]; public RANDPROP_TYPE[] randprop_type_array = new RANDPROP_TYPE[0]; public RANDPROP_ESSENCE[] randprop_essence_array = new RANDPROP_ESSENCE[0]; public WIKI_TABOO_CONFIG[] wiki_taboo_config_array = new WIKI_TABOO_CONFIG[0]; public FORCE_CONFIG[] force_config_array = new FORCE_CONFIG[0]; public FORCE_TOKEN_ESSENCE[] force_token_essence_array = new FORCE_TOKEN_ESSENCE[0]; public NPC_FORCE_SERVICE[] npc_force_service_array = new NPC_FORCE_SERVICE[0]; public PLAYER_DEATH_DROP_CONFIG[] player_death_drop_config_array = new PLAYER_DEATH_DROP_CONFIG[0]; public DYNSKILLEQUIP_ESSENCE[] dynskillequip_essence_array = new DYNSKILLEQUIP_ESSENCE[0]; public CONSUME_POINTS_CONFIG[] consume_points_config_array = new CONSUME_POINTS_CONFIG[0]; public ONLINE_AWARDS_CONFIG[] online_awards_config_array = new ONLINE_AWARDS_CONFIG[0]; public COUNTRY_CONFIG[] country_config_array = new COUNTRY_CONFIG[0]; public GM_ACTIVITY_CONFIG[] gm_activity_config_array = new GM_ACTIVITY_CONFIG[0]; public FASHION_WEAPON_CONFIG[] fashion_weapon_config_array = new FASHION_WEAPON_CONFIG[0]; public PET_EVOLVE_CONFIG[] pet_evolve_config_array = new PET_EVOLVE_CONFIG[0]; public PET_EVOLVED_SKILL_CONFIG[] pet_evolved_skill_config_array = new PET_EVOLVED_SKILL_CONFIG[0]; public MONEY_CONVERTIBLE_ESSENCE[] money_convertible_essence_array = new MONEY_CONVERTIBLE_ESSENCE[0]; public STONE_CHANGE_RECIPE_TYPE[] stone_change_recipe_type_array = new STONE_CHANGE_RECIPE_TYPE[0]; public STONE_CHANGE_RECIPE[] stone_change_recipe_array = new STONE_CHANGE_RECIPE[0]; public MERIDIAN_CONFIG[] meridian_config_array = new MERIDIAN_CONFIG[0]; public PET_EVOLVED_SKILL_RAND_CONFIG[] pet_evolved_skill_rand_config_array = new PET_EVOLVED_SKILL_RAND_CONFIG[0]; public AUTOTASK_DISPLAY_CONFIG[] autotask_display_config_array = new AUTOTASK_DISPLAY_CONFIG[0]; public TOUCH_SHOP_CONFIG[] touch_shop_config_array = new TOUCH_SHOP_CONFIG[0]; public TITLE_CONFIG[] title_config_array = new TITLE_CONFIG[0]; public COMPLEX_TITLE_CONFIG[] complex_title_config_array = new COMPLEX_TITLE_CONFIG[0]; public MONSTER_SPIRIT_ESSENCE[] monster_spirit_essence_array = new MONSTER_SPIRIT_ESSENCE[0]; public PLAYER_SPIRIT_CONFIG[] player_spirit_config_array = new PLAYER_SPIRIT_CONFIG[0]; public PLAYER_REINCARNATION_CONFIG[] player_reincarnation_config_array = new PLAYER_REINCARNATION_CONFIG[0]; public HISTORY_STAGE_CONFIG[] history_stage_config_array = new HISTORY_STAGE_CONFIG[0]; public HISTORY_ADVANCE_CONFIG[] history_advance_config_array = new HISTORY_ADVANCE_CONFIG[0]; public AUTOTEAM_CONFIG[] autoteam_config_array = new AUTOTEAM_CONFIG[0]; public PLAYER_REALM_CONFIG[] player_realm_config_array = new PLAYER_REALM_CONFIG[0]; public CHARIOT_CONFIG[] chariot_config_array = new CHARIOT_CONFIG[0]; public CHARIOT_WAR_CONFIG[] chariot_war_config_array = new CHARIOT_WAR_CONFIG[0]; public POKER_LEVELEXP_CONFIG[] poker_levelexp_config_array = new POKER_LEVELEXP_CONFIG[0]; public POKER_SUITE_ESSENCE[] poker_suite_essence_array = new POKER_SUITE_ESSENCE[0]; public POKER_DICE_ESSENCE[] poker_dice_essence_array = new POKER_DICE_ESSENCE[0]; public POKER_SUB_TYPE[] poker_sub_type_array = new POKER_SUB_TYPE[0]; public POKER_ESSENCE[] poker_essence_array = new POKER_ESSENCE[0]; public TOKEN_SHOP_CONFIG[] token_shop_config_array = new TOKEN_SHOP_CONFIG[0]; public SHOP_TOKEN_ESSENCE[] shop_token_essence_array = new SHOP_TOKEN_ESSENCE[0]; public GT_CONFIG[] gt_config_array = new GT_CONFIG[0]; public RAND_SHOP_CONFIG[] rand_shop_config_array = new RAND_SHOP_CONFIG[0]; public PROFIT_TIME_CONFIG[] profit_time_config_array = new PROFIT_TIME_CONFIG[0]; public FACTION_PVP_CONFIG[] faction_pvp_config_array = new FACTION_PVP_CONFIG[0]; public UNIVERSAL_TOKEN_ESSENCE[] universal_token_essence_array = new UNIVERSAL_TOKEN_ESSENCE[0]; public TASK_LIST_CONFIG[] task_list_config_array = new TASK_LIST_CONFIG[0]; public TASK_DICE_BY_WEIGHT_CONFIG[] task_dice_by_weight_config_array = new TASK_DICE_BY_WEIGHT_CONFIG[0]; public FASHION_SUITE_ESSENCE[] fashion_suite_essence_array = new FASHION_SUITE_ESSENCE[0]; public FASHION_BEST_COLOR_CONFIG[] fashion_best_color_config_array = new FASHION_BEST_COLOR_CONFIG[0]; public SIGN_AWARD_CONFIG[] sign_award_config_array = new SIGN_AWARD_CONFIG[0]; public int load_data(string pathname = "") { if (string.IsNullOrEmpty(pathname)) { pathname = Path.Combine(UnityEngine.Application.streamingAssetsPath, "elements.data"); } if (!File.Exists(pathname)) return -1; using (var file = new FileStream(pathname, FileMode.Open, FileAccess.Read)) { long dwRead = 0; int version = AAssit.GetIntFromFileStream(file, ref dwRead); if (version != 805306495) { Logger.LogError("ERROR:: File version mismatch"); return -1; } //time_t long t = AAssit.GetIntFromFileStream(file, ref dwRead); // if(equipment_addon_array.load(file) != 0) return -1; equipment_addon_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // if(weapon_major_type_array.load(file) != 0) return -1; weapon_major_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // if(weapon_sub_type_array.load(file) != 0) return -1; weapon_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // if(weapon_essence_array.load(file) != 0) return -1; weapon_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // if(armor_major_type_array.load(file) != 0) return -1; armor_major_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // if(armor_sub_type_array.load(file) != 0) return -1; armor_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // if(armor_essence_array.load(file) != 0) return -1; armor_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // if(decoration_major_type_array.load(file) != 0) return -1; decoration_major_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // if(decoration_sub_type_array.load(file) != 0) return -1; decoration_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // if(decoration_essence_array.load(file) != 0) return -1; decoration_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); medicine_major_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); medicine_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); medicine_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); material_major_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); material_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); material_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); damagerune_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); damagerune_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); armorrune_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); armorrune_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // skip the computer's name of the exporter int tag = AAssit.GetIntFromFileStream(file, ref dwRead); AAssit.ReadString(file, ref dwRead, out var result); t = AAssit.GetIntFromFileStream(file, ref dwRead); skilltome_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); skilltome_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); flysword_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); wingmanwing_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); townscroll_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); unionscroll_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); revivescroll_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); element_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); taskmatter_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); tossmatter_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); projectile_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); projectile_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); quiver_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); quiver_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); stone_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); stone_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); monster_addon_array = AAssit.ReadArrayFromBinary(file, ref dwRead); monster_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); monster_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_talk_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_sell_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_buy_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_repair_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_install_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_uninstall_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_task_in_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_task_out_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_task_matter_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_skill_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_heal_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_transmit_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_transport_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_proxy_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_storage_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_make_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_decompose_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); uint sz = AAssit.GetUIntFromFileStream(file, ref dwRead); if (sz <= 0) return -1; talk_proc_array = new talk_proc[sz]; for (int i = 0; i < sz; i++) { talk_proc tp = new talk_proc(); tp.Read(file); talk_proc_array[i] = tp; } face_texture_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); face_shape_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); face_emotion_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); face_expression_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); face_hair_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); face_moustache_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); colorpicker_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); customizedata_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); recipe_major_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); recipe_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); recipe_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); enemy_faction_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); character_class_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); param_adjust_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); player_action_info_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); taskdice_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); tasknormalmatter_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); face_faling_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); player_levelexp_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); mine_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); mine_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_identify_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); fashion_major_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); fashion_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); fashion_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); faceticket_major_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); faceticket_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); faceticket_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); facepill_major_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); facepill_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); facepill_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); suite_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); gm_generator_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); gm_generator_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); pet_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); pet_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); pet_egg_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); pet_food_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); pet_faceticket_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); fireworks_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); war_tankcallin_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); tag = AAssit.GetIntFromFileStream(file, ref dwRead); AAssit.ReadString(file, ref dwRead, out result); npc_war_towerbuild_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); player_secondlevel_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_resetprop_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_petname_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_petlearnskill_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_petforgetskill_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); skillmatter_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); refine_ticket_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); destroying_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_equipbind_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_equipdestroy_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); npc_equipundestroy_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); bible_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); speaker_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); autohp_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); automp_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); double_exp_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); transmitscroll_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); dye_ticket_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); goblin_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); goblin_equip_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); goblin_equip_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); goblin_exppill_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); sell_certificate_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // target_item_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // look_info_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // upgrade_production_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // acc_storage_blacklist_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // face_hair_texture_map_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // multi_exp_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // inc_skill_ability_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // god_evil_convert_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // wedding_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // wedding_bookcard_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // wedding_invitecard_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // sharpener_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // face_thirdeye_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // faction_fortress_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // faction_building_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // faction_building_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // faction_material_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // congregate_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // engrave_major_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // engrave_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // engrave_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // npc_engrave_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // npc_randprop_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // randprop_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // randprop_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // wiki_taboo_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // force_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // force_token_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // npc_force_service_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // player_death_drop_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // dynskillequip_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // consume_points_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // online_awards_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // country_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // gm_activity_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // fashion_weapon_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // pet_evolve_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // pet_evolved_skill_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // money_convertible_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // stone_change_recipe_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // stone_change_recipe_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // meridian_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // pet_evolved_skill_rand_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // autotask_display_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // touch_shop_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // title_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // complex_title_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // monster_spirit_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // player_spirit_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // player_reincarnation_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // history_stage_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // history_advance_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // autoteam_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // player_realm_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // chariot_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // chariot_war_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // poker_levelexp_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // poker_suite_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // poker_dice_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // poker_sub_type_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // poker_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // token_shop_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // shop_token_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // gt_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // rand_shop_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // profit_time_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // faction_pvp_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // universal_token_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // task_list_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // task_dice_by_weight_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // fashion_suite_essence_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // fashion_best_color_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); // sign_award_config_array = AAssit.ReadArrayFromBinary(file, ref dwRead); } SetupDataMap(); return 0; } public void SetupDataMap() { foreach (var item in equipment_addon_array) { add_id_index(ID_SPACE.ID_SPACE_ADDON, item.id, DATA_TYPE.DT_EQUIPMENT_ADDON); add_id_data(ID_SPACE.ID_SPACE_ADDON, item.id, item); } foreach (var item in weapon_major_type_array) { add_id_index(ID_SPACE.ID_SPACE_ESSENCE, item.id, DATA_TYPE.DT_WEAPON_MAJOR_TYPE); add_id_data(ID_SPACE.ID_SPACE_ESSENCE, item.id, item); } foreach (var item in weapon_sub_type_array) { add_id_index(ID_SPACE.ID_SPACE_ESSENCE, item.id, DATA_TYPE.DT_WEAPON_SUB_TYPE); add_id_data(ID_SPACE.ID_SPACE_ESSENCE, item.id, item); } foreach (var item in npc_essence_array) { add_id_index(ID_SPACE.ID_SPACE_ESSENCE, item.id, DATA_TYPE.DT_NPC_ESSENCE); add_id_data(ID_SPACE.ID_SPACE_ESSENCE, item.id, item); } foreach (var item in weapon_essence_array) { add_id_index(ID_SPACE.ID_SPACE_ESSENCE, item.id, DATA_TYPE.DT_WEAPON_ESSENCE); add_id_data(ID_SPACE.ID_SPACE_ESSENCE, item.id, item); } /*foreach (var item in unionscroll_essence_array) { add_id_index(ID_SPACE.ID_SPACE_ESSENCE, item.id, DATA_TYPE.DT_UNIONSCROLL_ESSENCE); add_id_data(ID_SPACE.ID_SPACE_ESSENCE, item.id, item); }*/ } public void SaveDataToTextFile() { StringBuilder sb = new(); // foreach (var weaponEssence in weapon_essence_array) // { // sb.AppendLine(weaponEssence.ToString()); // } // Write the StringBuilder content to a text file // string filePath = " weapon_names.txt"; // using (StreamWriter writer = new StreamWriter(filePath)) // { // writer.Write(sb.ToString()); // writer.Close(); // } // foreach (var item in npc_type_array) // { // sb.AppendLine(item.ToString()); // } // string filePath = " NPC_INFO.txt"; // using (StreamWriter writer = new StreamWriter(filePath)) // { // writer.Write(sb.ToString()); // writer.Close(); // } // foreach (var item in npc_essence_array) // { // sb.AppendLine($"NPC {item.Name} FILE: {item.FileModel} MSG: {item.HelloMsg}"); // } // string filePath = "npc_essence_hello.txt"; // using (StreamWriter writer = new StreamWriter(filePath)) // { // writer.Write(sb.ToString()); // writer.Close(); // } // foreach (var item in face_hair_essence_array) // { // sb.AppendLine(item.ToString()); // } // string filePath = " face_hair_essence_array.txt"; // using (StreamWriter writer = new StreamWriter(filePath)) // { // writer.Write(sb.ToString()); // writer.Close(); // } // save player_action_info_config_array to text file sb.Clear(); foreach (var item in player_action_info_config_array) { sb.AppendLine(item.ToString()); } string filePath = "player_action_info_config_array.txt"; using (StreamWriter writer = new StreamWriter(filePath)) { writer.Write(sb.ToString()); writer.Close(); } } void add_id_index(ID_SPACE idSpace, uint id, DATA_TYPE type) { switch (idSpace) { case ID_SPACE.ID_SPACE_ESSENCE: essence_id_data_type_map[id] = type; break; default: break; } } void add_id_data(ID_SPACE idSpace, uint id, object data) { switch (idSpace) { case ID_SPACE.ID_SPACE_ESSENCE: essence_id_data_map[id] = data; break; default: break; } } public DATA_TYPE get_data_type(uint id, ID_SPACE idspace) { switch (idspace) { case ID_SPACE.ID_SPACE_ESSENCE: if (essence_id_data_type_map.TryGetValue(id, out DATA_TYPE type)) { return type; } break; default: break; } return DATA_TYPE.DT_INVALID; } public object get_data_ptr(uint id, ID_SPACE idspace) { switch (idspace) { case ID_SPACE.ID_SPACE_ESSENCE: if (essence_id_data_map.TryGetValue(id, out object data)) { return data; } break; default: return null; } return null; } } }