using System; using System.Collections; using System.Collections.Generic; using System.Linq; using Cute; using LitJson; using UnityEngine; namespace Wizard; public class Master { public interface ReadFromCsv { void ReadCsvColumns(string[] columns); } private List _twoPickBattleInfo; private List _chaosBattleInfo; private List _roomChaosBattleInfo; private List _colosseumChaosBattleInfo; private List> _chaosBattleInfoList; private Dictionary> _classInfomationOrder; private Dictionary> _roomClassInfomationOrder; private Dictionary> _colosseumClassInfomationOrder; private List>> _classInfomationOrderList; private List Paths = new List(); private const string AI_DECK_FILELIST_NAME = "ai_deck_filelist"; private const string AI_EMOTE_FILELIST_NAME = "ai_emote_filelist"; private const string AI_STYLE_COMMON_NAME = "ai_style_common"; private const string AI_STYLE_FILELIST_NAME = "ai_style_filelist"; private const string AI_COMMON_FILELIST_NAME = "ai_common_list"; private const string AI_ALLY_COMMON_FILELIST_NAME = "ai_ally_common_list"; private const string AI_BASIC_MASTER_FILENAME = "ai_basic"; private const int BATTLE_INFO_CHAOS_NUM = 5; public bool isMasterDataLoaded; public List ClassCharacterList { get; private set; } public Dictionary PackRarityEffectOverrideDic { get; private set; } public Dictionary GachaMaskDarkDic { get; private set; } public Dictionary SleeveSeriesIdDic { get; set; } public Dictionary SleeveCategoryIdDic { get; set; } public Dictionary LeaderSkinSeriesIdDic { get; set; } public Dictionary BuildDeckSeriesIdDic { get; set; } public Dictionary EmblemCategoryIdDic { get; set; } public Dictionary DegreeCategoryIdDic { get; set; } public Dictionary> BuildDeckCardListDic { get; set; } public Dictionary> HighRankEffect { get; set; } public List RankList { get; set; } public SleeveMgr SleeveMgr { get; private set; } public EmblemMgr EmblemMgr { get; private set; } public DegreeMgr DegreeMgr { get; private set; } public List CountryList { get; set; } public List ItemList { get; set; } public List GiftTransitionList { get; set; } public List RotationBattleInfo { get; set; } public List UnlimitedBattleInfo { get; set; } public List AvatarBattleInfo { get; set; } public Dictionary> ClassInfomationOrder { get { switch (GameMgr.GetIns().GetDataMgr().m_BattleType) { case DataMgr.BattleType.RoomTwoPick: case DataMgr.BattleType.TwoPickBackdraft: return _roomClassInfomationOrder; case DataMgr.BattleType.ColosseumTwoPick: return _colosseumClassInfomationOrder; default: return _classInfomationOrder; } } } private Dictionary _crossOverClassInfomationOrder { get; set; } public Dictionary> AvatarClassInformationOrder { get; set; } public List FusionBattleInfo { get; set; } public List WhenPlayEffectKeywordMaster { get; set; } public List PuzzleQuestDataList { get; private set; } public List PuzzleBattleMasterList { get; private set; } public Dictionary> TutorialDictionary { get; set; } public List TutorialAreaSelectList { get; set; } public AICardDataAssetSet AIBasicDataList { get; set; } public AICardDataAssetSet AICommonDataList { get; set; } public AICardDataAssetSet AIAllyCommonDataList { get; set; } public Dictionary AIDeckDic { get; set; } public List AIStyleCommonDataList { get; set; } public Dictionary> AIStyleDic { get; set; } public Dictionary> AIEmoteDic { get; set; } public Dictionary> _emotionDic { get; set; } public PracticeAISettingDataSet PracticeAISettingList { get; set; } public StoryAISettingDataSet StoryAISettingList { get; set; } public StoryAISettingDataSet QuestAISettingList { get; set; } public RankMatchAISettingDataSet RankMatchAISettingList { get; set; } public List AICommonFileNameList { get; set; } public List AIAllyCommonFileNameList { get; set; } public AIDeckFileNameList AIDeckFileNameList { get; set; } public AIEmoteFileNameList AIEmoteFileNameList { get; set; } public AIStyleFileNameList AIStyleFileNameList { get; set; } private IDictionary TutorialDic { get; set; } public IDictionary BattleKeyWordDic { get; private set; } public IDictionary BattleKeywordReplaceDic { get; private set; } public IDictionary CardFilterKeywordReplaceDic { get; private set; } public IDictionary BattleKeyWordTitleDic { get; private set; } private IDictionary EmoteWordDic { get; set; } private IDictionary CardNameDic { get; set; } private IDictionary TribeNameDic { get; set; } private IDictionary SkillDescDic { get; set; } private IDictionary FlavourTextDic { get; set; } private IDictionary ItemTextDic { get; set; } private IDictionary ArenaTextDic { get; set; } public IDictionary SleeveTextDic { get; private set; } private IDictionary SleeveSeriesTextDic { get; set; } private IDictionary SleeveCategoryTextDic { get; set; } private IDictionary SleeveProductTextDic { get; set; } private IDictionary LeaderSkinProductTextDic { get; set; } private IDictionary LeaderSkinSeriesTextDic { get; set; } private IDictionary BuildDeckProductTextDic { get; set; } private IDictionary BuildDeckSeriesTextDic { get; set; } public IDictionary ClassCharaTextDic { get; private set; } public IDictionary EmblemTextDic { get; private set; } private IDictionary EmblemCategoryTextDic { get; set; } public IDictionary DegreeTextDic { get; private set; } private IDictionary DegreeCategoryTextDic { get; set; } private IDictionary DegreeAchievementTextDic { get; set; } private IDictionary MasterRankingSeasonTextDic { get; set; } private Dictionary MyPageBGTextDic { get; set; } public CardSetNameMgr CardSetNameMgr { get; private set; } private IDictionary CardVoiceTextDic { get; set; } public List CardDetailVoiceIgnoreList { get; private set; } private IDictionary PracticeTextDic { get; set; } private IDictionary StorySectionTitleTextDic { get; set; } public IDictionary> RelationCardSortDic { get; private set; } public CardFilterKeyWordMaster CardFilterKeyWord { get; private set; } public Dictionary> GleamingGemListMaster { get; set; } public Dictionary MyPageCustomBGMaster { get; private set; } public List MyPageCustomBGMasterList { get; private set; } public Dictionary> RadiantCrystalListMaster { get; set; } public Dictionary> GleamingGemListV2Master { get; set; } public Dictionary> RadiantCrystalListV2Master { get; set; } public List GetGleamingGemList(int classId) { if (GleamingGemListMaster.ContainsKey(classId)) { return GleamingGemListMaster[classId]; } return null; } public List GetRadiantCrystalList(int classId) { if (RadiantCrystalListMaster.ContainsKey(classId)) { return RadiantCrystalListMaster[classId]; } return null; } public List GetGleamingGemListV2Master(int classId) { if (GleamingGemListV2Master.ContainsKey(classId)) { return GleamingGemListV2Master[classId]; } return null; } public List GetRadiantCrystalListV2Master(int classId) { if (RadiantCrystalListV2Master.ContainsKey(classId)) { return RadiantCrystalListV2Master[classId]; } return null; } public void Refresh(AICsvLoadingInfo aiLoadInfo) { Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("tutorialtext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("tutorial_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("tutorial_areaselect_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("story_tutorial_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("cardnametext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("tribenametext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("skilldesctext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("flavourtext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("sleevenametext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("sleeveseriestext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("sleevecategorytext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("builddeckproducttext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("builddeckseriestext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("sleeveproducttext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("leaderskinproducttext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("leaderskinseriestext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("classcharanametext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("emblemtext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("emblemcategorytext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("degreetext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("degreecategorytext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("degreeachievementtext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("masterrankingseasontext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("battlekeyword", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("battlekeywordreplace", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("cardfilterkeywordreplace", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("emotetext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("itemtext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("arenatext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("cardsetnametext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("cardvoicetext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("practicetext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("countrytext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("storysectiontitletext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("mypagebgtext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("redethercampaign", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("card_detail_voice_ignore_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("relationcardsort", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("class_chara_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("pack_rarity_effect_override", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("gacha_mask_dark", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("build_deck_package_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("build_deck_series_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("sleeve_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("sleeve_series_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("sleeve_category_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("leader_skin_series_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("emblem_data", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("emblem_category_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("degree_data", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("degree_category_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("country_data", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("rank_data", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("item_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("gift_transition", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("battle_info_ts_rotation_" + Data.Load.data.RotationLatestCardPackId, ResourcesManager.AssetLoadPathType.Master)); if (Data.ArenaData.TwoPickData.ChallengeData.LatestCardPackId > 0) { Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("battle_info_ts_rotation_" + Data.ArenaData.TwoPickData.ChallengeData.LatestCardPackId, ResourcesManager.AssetLoadPathType.Master)); } Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("battle_info_unlimited", ResourcesManager.AssetLoadPathType.Master)); for (int i = 1; i < 6; i++) { Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("battle_info_chaos_" + i, ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("class_info_list_" + i, ResourcesManager.AssetLoadPathType.Master)); } Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("battle_info_avatar", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("fusion_info", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("puzzle_data", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("puzzle_battle_data", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("crossover_class_info_list", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("class_info_list_avatar", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("color_code", ResourcesManager.AssetLoadPathType.MasterEtc)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("card_filter_keyword_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("when_play_effect_keyword_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("high_rank_effect", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("mypage_custom_bg_master", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("gleaming_gem_list", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("radiant_crystal_list", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("gleaming_gem_list_v2", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("radiant_crystal_list_v2", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("battlelogtext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("battlekeywordcategory", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("battleinfotext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("fusioninfotext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("arenatext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("firsttipstext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("chaostext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("puzzletext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("questtext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("bingotext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("popularityvotetext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("storyroottext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("bossrushtext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("treasureboxcptext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("roombattletext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("beyondhandovertext", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("ai_style_common", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("practice_ai_setting", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("story_ai_setting", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("quest_ai_setting", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("rm_ai_setting", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("ai_deck_filelist", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("ai_common_list", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("ai_ally_common_list", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("ai_emote_filelist", ResourcesManager.AssetLoadPathType.Master)); Paths.Add(Toolbox.ResourcesManager.GetAssetTypePath("ai_style_filelist", ResourcesManager.AssetLoadPathType.Master)); Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupSync(Paths, delegate { LoadCardData(aiLoadInfo); DeckListUtility.SetDeckListDataWithLodeIndex(); }); } private void LoadCardData(AICsvLoadingInfo aiLoadInfo) { StartLoadTutorialText(Toolbox.ResourcesManager.GetAssetTypePath("text/tutorialtext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadTutorial(Toolbox.ResourcesManager.GetAssetTypePath("tutorial/tutorial_master", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadTutorialAreaSelect(Toolbox.ResourcesManager.GetAssetTypePath("tutorial/tutorial_areaselect_master", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadTutorial(Toolbox.ResourcesManager.GetAssetTypePath("tutorial/story_tutorial_master", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadCardNameText(Toolbox.ResourcesManager.GetAssetTypePath("text/cardnametext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadTribeNameText(Toolbox.ResourcesManager.GetAssetTypePath("text/tribenametext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSkillDescText(Toolbox.ResourcesManager.GetAssetTypePath("text/skilldesctext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadFlavourText(Toolbox.ResourcesManager.GetAssetTypePath("text/flavourtext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSleeveText(Toolbox.ResourcesManager.GetAssetTypePath("text/sleevenametext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSleeveSeriesText(Toolbox.ResourcesManager.GetAssetTypePath("text/sleeveseriestext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSleeveCategoryText(Toolbox.ResourcesManager.GetAssetTypePath("text/sleevecategorytext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSleeveProductText(Toolbox.ResourcesManager.GetAssetTypePath("text/sleeveproducttext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadLeaderSkinProductText(Toolbox.ResourcesManager.GetAssetTypePath("text/leaderskinproducttext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadLeaderSkinSeriesText(Toolbox.ResourcesManager.GetAssetTypePath("text/leaderskinseriestext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadBuildDeckProductText(Toolbox.ResourcesManager.GetAssetTypePath("text/builddeckproducttext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadBuildDeckSeriesText(Toolbox.ResourcesManager.GetAssetTypePath("text/builddeckseriestext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadClassCharaText(Toolbox.ResourcesManager.GetAssetTypePath("text/classcharanametext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadEmblemText(Toolbox.ResourcesManager.GetAssetTypePath("text/emblemtext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadEmblemCategoryText(Toolbox.ResourcesManager.GetAssetTypePath("text/emblemcategorytext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadDegreeText(Toolbox.ResourcesManager.GetAssetTypePath("text/degreetext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadDegreeCategoryText(Toolbox.ResourcesManager.GetAssetTypePath("text/degreecategorytext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadDegreeAchievementText(Toolbox.ResourcesManager.GetAssetTypePath("text/degreeachievementtext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadMasterRankingSeazonText(Toolbox.ResourcesManager.GetAssetTypePath("text/masterrankingseasontext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadBattleKeyWordText(Toolbox.ResourcesManager.GetAssetTypePath("text/battlekeyword", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadBattleKeyWordReplaceText(Toolbox.ResourcesManager.GetAssetTypePath("text/battlekeywordreplace", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadCardFilterKeyWordReplaceText(Toolbox.ResourcesManager.GetAssetTypePath("text/cardfilterkeywordreplace", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadEmoteMasterText(Toolbox.ResourcesManager.GetAssetTypePath("text/emotetext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadItemMasterText(Toolbox.ResourcesManager.GetAssetTypePath("text/itemtext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadArenaMasterText(Toolbox.ResourcesManager.GetAssetTypePath("text/arenatext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadCardSetNameText(Toolbox.ResourcesManager.GetAssetTypePath("text/cardsetnametext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadCardVoiceText(Toolbox.ResourcesManager.GetAssetTypePath("text/cardvoicetext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadPracticeText(Toolbox.ResourcesManager.GetAssetTypePath("text/practicetext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadStorySectionTitleText(Toolbox.ResourcesManager.GetAssetTypePath("text/storysectiontitletext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadMyPageBGText(Toolbox.ResourcesManager.GetAssetTypePath("text/mypagebgtext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/battlelogtext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/battlekeywordcategory", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/battleinfotext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/fusioninfotext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/arenatext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/firsttipstext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/chaostext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/puzzletext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/questtext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/bingotext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/popularityvotetext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/storyroottext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/bossrushtext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/treasureboxcptext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/redethercampaign", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/roombattletext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSystemText(Toolbox.ResourcesManager.GetAssetTypePath("text/beyondhandovertext", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadCardDetailVoiceIgnoreData(Toolbox.ResourcesManager.GetAssetTypePath("card/card_detail_voice_ignore_master", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadRelationCardSort(Toolbox.ResourcesManager.GetAssetTypePath("card/relationcardsort", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadClassCharacter(Toolbox.ResourcesManager.GetAssetTypePath("chara/class_chara_master", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadPackRarityEffectOverride(Toolbox.ResourcesManager.GetAssetTypePath("pack/pack_rarity_effect_override", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadGachaMaskDark(Toolbox.ResourcesManager.GetAssetTypePath("pack/gacha_mask_dark", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadBuildDeckCards(Toolbox.ResourcesManager.GetAssetTypePath("builddeck/build_deck_package_master", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadBuildDeckSeries(Toolbox.ResourcesManager.GetAssetTypePath("builddeck/build_deck_series_master", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSleeve(Toolbox.ResourcesManager.GetAssetTypePath("sleeve/sleeve_master", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSleeveSeries(Toolbox.ResourcesManager.GetAssetTypePath("sleeve/sleeve_series_master", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSleeveCategory(Toolbox.ResourcesManager.GetAssetTypePath("sleeve/sleeve_category_master", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadSkinSeries(Toolbox.ResourcesManager.GetAssetTypePath("skin/leader_skin_series_master", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadEmblem(Toolbox.ResourcesManager.GetAssetTypePath("emblem/emblem_data", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadEmblemCategory(Toolbox.ResourcesManager.GetAssetTypePath("emblem/emblem_category_master", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadDegree(Toolbox.ResourcesManager.GetAssetTypePath("degree/degree_data", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadDegreeCategory(Toolbox.ResourcesManager.GetAssetTypePath("degree/degree_category_master", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadCountry(Toolbox.ResourcesManager.GetAssetTypePath("etc/country_data", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadRank(Toolbox.ResourcesManager.GetAssetTypePath("rank/rank_data", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadItem(Toolbox.ResourcesManager.GetAssetTypePath("item/item_master", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); GiftTransitionList = LoadList(GetFilename("item/gift_transition")); StartLoadBattleInfos(); LoadClassInfoList(); LoadCrossOverClassInfoList(); LoadAvatarClassInfoList(); FusionBattleInfo = LoadList(GetFilename("battle/fusion_info")); WhenPlayEffectKeywordMaster = LoadStringList(GetFilename("battle/when_play_effect_keyword_master")); PuzzleQuestDataList = LoadList(GetFilename("battle/puzzle_data")); PuzzleBattleMasterList = LoadList(GetFilename("battle/puzzle_battle_data")); StartLoadCardFilterKeyword(Toolbox.ResourcesManager.GetAssetTypePath("card/card_filter_keyword_master", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); ColorCode.BuildData(); StartLoadAIStyleCommonParam(Toolbox.ResourcesManager.GetAssetTypePath("ai/ai_style_common", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadPracticeAISettingData(Toolbox.ResourcesManager.GetAssetTypePath("ai/practice_ai_setting", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadStoryAISettingData(Toolbox.ResourcesManager.GetAssetTypePath("ai/story_ai_setting", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadQuestAISettingData(Toolbox.ResourcesManager.GetAssetTypePath("ai/quest_ai_setting", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadRankMatchAISettingData(Toolbox.ResourcesManager.GetAssetTypePath("ai/rm_ai_setting", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadHighRankEffect(Toolbox.ResourcesManager.GetAssetTypePath("chara/high_rank_effect", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadMyPageCustomBG(Toolbox.ResourcesManager.GetAssetTypePath("etc/mypage_custom_bg_master", ResourcesManager.AssetLoadPathType.Master, isfetch: true)); StartLoadAICommonFileNameList(); StartLoadAIAllyCommonFileNameList(); StargLoadAIDeckFileNameList(); StartLoadAIStyleFileNameList(); StartLoadAIEmoteFileNameList(); foreach (PuzzleQuestData puzzleQuestData in PuzzleQuestDataList) { puzzleQuestData.InitializeBattleMasterData(PuzzleBattleMasterList); } GleamingGemListMaster = StartLoadGofCards(GetFilename("battle/gleaming_gem_list")); RadiantCrystalListMaster = StartLoadGofCards(GetFilename("battle/radiant_crystal_list")); GleamingGemListV2Master = StartLoadGofCards(GetFilename("battle/gleaming_gem_list_v2")); RadiantCrystalListV2Master = StartLoadGofCards(GetFilename("battle/radiant_crystal_list_v2")); if (aiLoadInfo != null) { LoadAICsv(aiLoadInfo, delegate { LoadEmoteData(); }); } else { LoadEmoteData(); } Data.Load.data.InitializeAfterMasterLoading(); } private void StartLoadBattleInfos() { UnlimitedBattleInfo = LoadBattleInfo("battle/battle_info_unlimited"); RotationBattleInfo = LoadBattleInfo("battle/battle_info_ts_rotation_" + Data.Load.data.RotationLatestCardPackId); if (Data.ArenaData.TwoPickData.ChallengeData.LatestCardPackId > 0) { _twoPickBattleInfo = LoadBattleInfo("battle/battle_info_ts_rotation_" + Data.ArenaData.TwoPickData.ChallengeData.LatestCardPackId); } AvatarBattleInfo = LoadBattleInfo("battle/battle_info_avatar"); _chaosBattleInfoList = new List>(); for (int i = 1; i < 6; i++) { _chaosBattleInfoList.Add(LoadBattleInfo("battle/battle_info_chaos_" + i)); } if (Data.ArenaData.TwoPickData.ChallengeData.ChaosNum > 0) { _chaosBattleInfo = _chaosBattleInfoList[Data.ArenaData.TwoPickData.ChallengeData.ChaosNum - 1]; } if (Data.MyPageNotifications.data.RoomRule.RoomChaosNum > 0) { _roomChaosBattleInfo = _chaosBattleInfoList[Data.MyPageNotifications.data.RoomRule.RoomChaosNum - 1]; } if (Data.ArenaData.ColosseumData.ChaosNum > 0) { _colosseumChaosBattleInfo = _chaosBattleInfoList[Data.ArenaData.ColosseumData.ChaosNum - 1]; } } public void LoadRoomChaosBattleInfo(int num) { if (num > 0 && _chaosBattleInfoList != null) { _roomChaosBattleInfo = _chaosBattleInfoList[num - 1]; } } public void LoadColosseumChaosBattleInfo(int num) { if (num > 0 && _chaosBattleInfoList != null) { _colosseumChaosBattleInfo = _chaosBattleInfoList[num - 1]; } } private List LoadBattleInfo(string data) { List source = LoadList(GetFilename(data)); List validatedBattleInfo = source.Where((BattleInformation x) => x.Priority != -1).ToList(); validatedBattleInfo = validatedBattleInfo.Where((BattleInformation x) => validatedBattleInfo.Where((BattleInformation y) => x.Priority == y.Priority).Count() == 1).ToList(); return validatedBattleInfo.OrderBy((BattleInformation x) => x.Priority).ToList(); } public List GetBattleInfo(bool isPlayer) { DataMgr.BattleType battleType = GameMgr.GetIns().GetDataMgr().m_BattleType; switch (battleType) { case DataMgr.BattleType.Story: case DataMgr.BattleType.Practice: case DataMgr.BattleType.Quest: case DataMgr.BattleType.BossRushQuest: case DataMgr.BattleType.SecretBossQuest: if (isPlayer && (Data.CurrentFormat == Format.Rotation || Data.CurrentFormat == Format.Crossover)) { return RotationBattleInfo; } if (isPlayer && Data.CurrentFormat == Format.Avatar) { return AvatarBattleInfo; } return UnlimitedBattleInfo; case DataMgr.BattleType.Sealed: return RotationBattleInfo; default: switch (Data.CurrentFormat) { case Format.Rotation: case Format.Crossover: return RotationBattleInfo; case Format.TwoPick: switch (GameMgr.GetIns().GetDataMgr().TwoPickFormat) { case TwoPickFormat.Cube: case TwoPickFormat.BackdraftCube: return UnlimitedBattleInfo; case TwoPickFormat.Chaos: case TwoPickFormat.BackdraftChaos: switch (battleType) { case DataMgr.BattleType.RoomTwoPick: case DataMgr.BattleType.TwoPickBackdraft: return _roomChaosBattleInfo; case DataMgr.BattleType.ColosseumTwoPick: return _colosseumChaosBattleInfo; default: return _chaosBattleInfo; } default: return _twoPickBattleInfo; } case Format.Unlimited: case Format.Max: case Format.Hof: case Format.Windfall: return UnlimitedBattleInfo; case Format.Avatar: return AvatarBattleInfo; default: return UnlimitedBattleInfo; } } } private void LoadClassInfoList() { _classInfomationOrderList = new List>>(); for (int i = 1; i < 6; i++) { List list = LoadList(GetFilename("battle/class_info_list_" + i)); Dictionary> dictionary = new Dictionary>(); for (int j = 0; j < list.Count; j++) { dictionary.Add(list[j].ChaosId, list[j].ClassIds); } _classInfomationOrderList.Add(dictionary); } if (Data.ArenaData.TwoPickData.ChallengeData.ChaosNum > 0) { _classInfomationOrder = _classInfomationOrderList[Data.ArenaData.TwoPickData.ChallengeData.ChaosNum - 1]; } if (Data.MyPageNotifications.data.RoomRule.RoomChaosNum > 0) { _roomClassInfomationOrder = _classInfomationOrderList[Data.MyPageNotifications.data.RoomRule.RoomChaosNum - 1]; } if (Data.ArenaData.ColosseumData.ChaosNum > 0) { _colosseumClassInfomationOrder = _classInfomationOrderList[Data.ArenaData.ColosseumData.ChaosNum - 1]; } } public void SetRoomClassInfomationOrder(int num) { if (num > 0 && _classInfomationOrderList != null) { _roomClassInfomationOrder = _classInfomationOrderList[num - 1]; } } public void SetColosseumClassInfomationOrder(int num) { if (num > 0 && _classInfomationOrderList != null) { _colosseumClassInfomationOrder = _classInfomationOrderList[num - 1]; } } private void LoadCrossOverClassInfoList() { _crossOverClassInfomationOrder = new Dictionary(); List list = LoadList(GetFilename("battle/crossover_class_info_list")); for (int i = 0; i < list.Count; i++) { _crossOverClassInfomationOrder.Add(list[i].KeyClassIds, list[i].ValueClassIds); } } public List GetCrossOverClassInfoListOrNull(int mainClass, int subClass) { return _crossOverClassInfomationOrder.GetValueOrDefault(mainClass + "|" + subClass, null)?.Split('|').Select(int.Parse).ToList(); } private void LoadAvatarClassInfoList() { AvatarClassInformationOrder = new Dictionary>(); List list = LoadList(GetFilename("battle/class_info_list_avatar")); for (int i = 0; i < list.Count; i++) { AvatarClassInformationOrder.Add(list[i].ChaosId, list[i].ClassIds); } } public void LoadEmoteData() { List emotionCsvDownLoadPath = new List(); List emotionCsvLoadPath = new List(); List skinidList = new List(); for (int i = 0; i < ClassCharacterList.Count; i++) { int skin_id = ClassCharacterList[i].skin_id; string text = $"emote_chara_{skin_id}"; string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(text, ResourcesManager.AssetLoadPathType.CharaMaster); if (Toolbox.ResourcesManager.CheckBeforeFileRequeset(assetTypePath)) { emotionCsvDownLoadPath.Add(assetTypePath); emotionCsvLoadPath.Add(text); skinidList.Add(skin_id); } } Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupSync(emotionCsvDownLoadPath, delegate { StartLoadEmoteData(emotionCsvLoadPath, skinidList); Toolbox.ResourcesManager.RemoveAssetGroup(emotionCsvDownLoadPath); Toolbox.ResourcesManager.RemoveAssetGroup(Paths); isMasterDataLoaded = true; }); } public void StartLoadCardDetailVoiceIgnoreData(string fileName) { CardDetailVoiceIgnoreList = new List(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { CardDetailVoiceIgnoreList.Add(item[0]); } } public void StartLoadRelationCardSort(string fileName) { RelationCardSortDic = new Dictionary>(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { int key = int.Parse(item[0]); List sortList = new List(); item[1].Split(':').ToList().ForEach(delegate(string c) { sortList.Add(int.Parse(c)); }); RelationCardSortDic.Add(key, sortList); } } public void StartLoadTutorialText(string fileName) { TutorialDic = new Dictionary(); LoadLocalizeJsonAndParse(TutorialDic, fileName); } public void StartLoadCardNameText(string fileName) { CardNameDic = new Dictionary(); LoadLocalizeJsonAndParse(CardNameDic, fileName); } public void StartLoadBattleKeyWordText(string fileName) { Dictionary dictionary = new Dictionary(); LoadLocalizeJsonAndParse(dictionary, fileName); BattleKeyWordTitleDic = new Dictionary(); BattleKeyWordDic = new Dictionary(StringComparer.OrdinalIgnoreCase); foreach (KeyValuePair item in dictionary) { string text = item.Key.Replace("Battle_keyword_Title_", "Battle_keyword_"); if (text == item.Key) { break; } string value = item.Value; string value2 = dictionary[text]; if (!BattleKeyWordDic.ContainsKey(value)) { BattleKeyWordDic.Add(value, value2); BattleKeyWordTitleDic.Add(item.Key, value); } } } public void StartLoadBattleKeyWordReplaceText(string filename) { Dictionary dictionary = new Dictionary(); LoadLocalizeJsonAndParse(dictionary, filename); char[] separator = new char[1] { ',' }; BattleKeywordReplaceDic = new Dictionary(dictionary.Count); foreach (string value in dictionary.Values) { if (!string.IsNullOrEmpty(value)) { string[] array = value.Split(separator); BattleKeywordReplaceDic.Add(array[0], array[1]); } } } public void StartLoadCardFilterKeyWordReplaceText(string filename) { Dictionary dictionary = new Dictionary(); LoadLocalizeJsonAndParse(dictionary, filename); char[] separator = new char[1] { ',' }; CardFilterKeywordReplaceDic = new Dictionary(dictionary.Count); foreach (string value in dictionary.Values) { if (!string.IsNullOrEmpty(value)) { string[] array = value.Split(separator); CardFilterKeywordReplaceDic.Add(array[0], array[1]); } } } public void StartLoadEmoteMasterText(string fileName) { EmoteWordDic = new Dictionary(); LoadLocalizeJsonAndParse(EmoteWordDic, fileName); } public void StartLoadItemMasterText(string fileName) { ItemTextDic = new Dictionary(); LoadLocalizeJsonAndParse(ItemTextDic, fileName); } public void StartLoadArenaMasterText(string fileName) { ArenaTextDic = new Dictionary(); LoadLocalizeJsonAndParse(ArenaTextDic, fileName); } public void StartLoadTribeNameText(string fileName) { TribeNameDic = new Dictionary(); LoadLocalizeJsonAndParse(TribeNameDic, fileName); } public void StartLoadSkillDescText(string fileName) { SkillDescDic = new Dictionary(); LoadLocalizeJsonAndParse(SkillDescDic, fileName); } public void StartLoadFlavourText(string fileName) { FlavourTextDic = new Dictionary(); LoadLocalizeJsonAndParse(FlavourTextDic, fileName); } public void StartLoadSleeveText(string fileName) { SleeveTextDic = new Dictionary(); LoadLocalizeJsonAndParse(SleeveTextDic, fileName); } public void StartLoadSleeveSeriesText(string fileName) { SleeveSeriesTextDic = new Dictionary(); LoadLocalizeJsonAndParse(SleeveSeriesTextDic, fileName); } public void StartLoadSleeveCategoryText(string fileName) { SleeveCategoryTextDic = new Dictionary(); LoadLocalizeJsonAndParse(SleeveCategoryTextDic, fileName); } public void StartLoadSleeveProductText(string fileName) { SleeveProductTextDic = new Dictionary(); LoadLocalizeJsonAndParse(SleeveProductTextDic, fileName); } public void StartLoadLeaderSkinProductText(string fileName) { LeaderSkinProductTextDic = new Dictionary(); LoadLocalizeJsonAndParse(LeaderSkinProductTextDic, fileName); } public void StartLoadLeaderSkinSeriesText(string fileName) { LeaderSkinSeriesTextDic = new Dictionary(); LoadLocalizeJsonAndParse(LeaderSkinSeriesTextDic, fileName); } public void StartLoadBuildDeckSeriesText(string fileName) { BuildDeckSeriesTextDic = new Dictionary(); LoadLocalizeJsonAndParse(BuildDeckSeriesTextDic, fileName); } public void StartLoadBuildDeckProductText(string fileName) { BuildDeckProductTextDic = new Dictionary(); LoadLocalizeJsonAndParse(BuildDeckProductTextDic, fileName); } public void StartLoadClassCharaText(string fileName) { ClassCharaTextDic = new Dictionary(); LoadLocalizeJsonAndParse(ClassCharaTextDic, fileName); } private void StartLoadEmblemText(string fileName) { EmblemTextDic = new Dictionary(); LoadLocalizeJsonAndParse(EmblemTextDic, fileName, isTrimKey: true); } public void StartLoadEmblemCategoryText(string fileName) { EmblemCategoryTextDic = new Dictionary(); LoadLocalizeJsonAndParse(EmblemCategoryTextDic, fileName); } private void StartLoadDegreeText(string fileName) { DegreeTextDic = new Dictionary(); LoadLocalizeJsonAndParse(DegreeTextDic, fileName, isTrimKey: true); } public void StartLoadDegreeCategoryText(string fileName) { DegreeCategoryTextDic = new Dictionary(); LoadLocalizeJsonAndParse(DegreeCategoryTextDic, fileName); } public void StartLoadDegreeAchievementText(string fileName) { DegreeAchievementTextDic = new Dictionary(); LoadLocalizeJsonAndParse(DegreeAchievementTextDic, fileName); } public void StartLoadMyPageBGText(string fileName) { MyPageBGTextDic = new Dictionary(); LoadLocalizeJsonAndParse(MyPageBGTextDic, fileName); } private void StartLoadMasterRankingSeazonText(string fileName) { MasterRankingSeasonTextDic = new Dictionary(); IDictionary dictionary = new Dictionary(); LoadLocalizeJsonAndParse(dictionary, fileName, isTrimKey: true); foreach (KeyValuePair item in dictionary) { MasterRankingSeasonTextDic.Add(int.Parse(item.Key), item.Value); } } private void StartLoadCardSetNameText(string fileName) { Dictionary dictionary = new Dictionary(); LoadLocalizeJsonAndParse(dictionary, fileName, isTrimKey: true); string text = "_long"; string text2 = "_short"; Dictionary dictionary2 = new Dictionary(); Dictionary dictionary3 = new Dictionary(); foreach (KeyValuePair item in dictionary) { string key = item.Key; string empty = string.Empty; Dictionary dictionary4 = null; if (key.EndsWith(text)) { empty = text; dictionary4 = dictionary2; } else { if (!key.EndsWith(text2)) { Data.SystemText.TextDictionary.Add(item.Key, item.Value); continue; } empty = text2; dictionary4 = dictionary3; } dictionary4.Add(key.Remove(key.Length - empty.Length), item.Value); } CardSetNameMgr = new CardSetNameMgr(); foreach (string key2 in dictionary2.Keys) { CardSetNameMgr.Add(new CardSetName(key2, dictionary2[key2], dictionary3[key2])); } CardSetNameMgr.Setup(); } public void StartLoadCardVoiceText(string fileName) { CardVoiceTextDic = new Dictionary(); LoadLocalizeJsonAndParse(CardVoiceTextDic, fileName); } public void StartLoadPracticeText(string fileName) { PracticeTextDic = new Dictionary(); LoadLocalizeJsonAndParse(PracticeTextDic, fileName); } public void StartLoadStorySectionTitleText(string fileName) { StorySectionTitleTextDic = new Dictionary(); LoadLocalizeJsonAndParse(StorySectionTitleTextDic, fileName); } private void StartLoadSystemText(string fileName) { LoadLocalizeJsonAndParseWithRegion(Data.SystemText.TextDictionary, Data.SystemText.RegionCode, fileName); } public void LoadLocalizeJsonAndParse(IDictionary dic, string fileName, bool isTrimKey = false) { LoadLocalizeJsonAndParseWithRegion(dic, Data.SystemText.RegionCode, fileName, isTrimKey); } public void LoadLocalizeJsonAndParseWithRegion(IDictionary dic, string region, string fileName, bool isTrimKey = false) { TextAsset textAsset = Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset; if (textAsset != null) { LocalizeJson.Parse(dic, region, textAsset.ToString(), isTrimKey); } } public string GetText(Type key, IDictionary dic) { if (!dic.TryGetValue(key, out var value)) { return key.ToString(); } return value; } public string GetTutorialText(string key) { return GetText(key, TutorialDic); } public string GetEmoteWordText(string key) { return GetText(key, EmoteWordDic); } public string GetCardNameText(string key) { return GetText(key, CardNameDic); } public string GetTribeNameText(string key) { return GetText(key, TribeNameDic); } public string GetSkillDescText(string key) { return GetText(key, SkillDescDic); } public string GetFlavourText(string key) { return GetText(key, FlavourTextDic); } public string GetItemText(string key) { return GetText(key, ItemTextDic); } public string GetArenaText(string key) { return GetText(key, ArenaTextDic); } public string GetSleeveText(string key) { return GetText(key, SleeveTextDic); } public string GetSleeveSeriesText(string key) { return GetText(key, SleeveSeriesTextDic); } public string GetSleeveCategoryText(string key) { return GetText(key, SleeveCategoryTextDic); } public string GetSleeveProductText(string key) { return GetText(key, SleeveProductTextDic); } public string GetLeaderSkinProductText(string key) { return GetText(key, LeaderSkinProductTextDic); } public string GetLeaderSkinSeriesText(string key) { return GetText(key, LeaderSkinSeriesTextDic); } public string GetBuildDeckProductText(string key) { return GetText(key, BuildDeckProductTextDic); } public string GetBuildDeckSeriesText(string key) { return GetText(key, BuildDeckSeriesTextDic); } public string GetClassCharaText(string key) { return GetText(key, ClassCharaTextDic); } public string GetEmblemText(string key) { return GetText(key, EmblemTextDic); } public string GetEmblemCategoryText(string key) { return GetText(key, EmblemCategoryTextDic); } public string GetDegreeText(string key) { return GetText(key, DegreeTextDic); } public string GetDegreeCategoryText(string key) { return GetText(key, DegreeCategoryTextDic); } public string GetDegreeAchievementText(string key) { return GetText(key, DegreeAchievementTextDic); } public string GetMasterRankingSeasonText(int key) { return GetText(key, MasterRankingSeasonTextDic); } public string GetCardVoiceText(string key) { return GetText(key, CardVoiceTextDic); } public string GetPracticeText(string key) { return GetText(key, PracticeTextDic); } public string GetStorySectionTitleText(string key) { return GetText(key, StorySectionTitleTextDic); } public string GetMyPageBGText(string key) { return GetText(key, MyPageBGTextDic); } public List GetAllTribeNameList() { List list = new List(TribeNameDic.Count); foreach (KeyValuePair item in TribeNameDic) { list.Add(item.Value); } return list; } public void StartLoadTutorial(string fileName) { List list = new List(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { list.Add(new TutorialData(item)); } if (TutorialDictionary == null) { TutorialDictionary = new Dictionary>(); } for (int i = 0; i < list.Count; i++) { int tutorial_id = list[i].tutorial_id; if (!TutorialDictionary.ContainsKey(tutorial_id)) { TutorialDictionary.Add(tutorial_id, new List()); } if (!string.IsNullOrEmpty(list[i].popup_title)) { list[i].popup_title = GetTutorialText(list[i].popup_title); } if (!string.IsNullOrEmpty(list[i].text1)) { list[i].text1 = GetTutorialText(list[i].text1); } if (!string.IsNullOrEmpty(list[i].text2)) { list[i].text2 = GetTutorialText(list[i].text2); } if (!string.IsNullOrEmpty(list[i].text3)) { list[i].text3 = GetTutorialText(list[i].text3); } TutorialDictionary[tutorial_id].Add(list[i]); } } public void StartLoadTutorialAreaSelect(string fileName) { List list = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString()); if (TutorialAreaSelectList == null) { TutorialAreaSelectList = new List(); } foreach (string[] item in list) { TutorialAreaSelectList.Add(new TutorialAreaSelect(item)); } } public void StartLoadClassCharacter(string fileName) { ClassCharacterList = new List(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { ClassCharacterList.Add(new ClassCharacterMasterData(item)); } foreach (int acquiredSkin in Data.Load.data.AcquiredSkinList) { ClassCharacterMasterData charaPrmBySkinId = GameMgr.GetIns().GetDataMgr().GetCharaPrmBySkinId(acquiredSkin); if (charaPrmBySkinId != null) { charaPrmBySkinId.Acquired(); charaPrmBySkinId.UnsetNew(); } } } public void StartLoadPackRarityEffectOverride(string fileName) { List list = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString()); PackRarityEffectOverrideDic = new Dictionary(); foreach (string[] item in list) { int key = int.Parse(item[0]); int value = int.Parse(item[1]); PackRarityEffectOverrideDic.Add(key, value); } } public void StartLoadGachaMaskDark(string filename) { List list = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(filename) as TextAsset).ToString()); GachaMaskDarkDic = new Dictionary(list.Count); foreach (string[] item in list) { int key = int.Parse(item[0]); CardPackManager.GachaMaskDark value = new CardPackManager.GachaMaskDark(item); GachaMaskDarkDic.Add(key, value); } } public void StartLoadBuildDeckCards(string fileName) { List list = new List(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { list.Add(new BuildDeckCard(item)); } BuildDeckCardListDic = new Dictionary>(); for (int i = 0; i < list.Count; i++) { int id = list[i]._id; List list2 = null; if (!BuildDeckCardListDic.ContainsKey(id)) { list2 = new List(); BuildDeckCardListDic.Add(id, list2); } else { list2 = BuildDeckCardListDic[id]; } list2.Add(list[i]); } } public void StartLoadBuildDeckSeries(string fileName) { List list = new List(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { list.Add(new BuildDeckSeries(item)); } BuildDeckSeriesIdDic = new Dictionary(list.Count); for (int i = 0; i < list.Count; i++) { BuildDeckSeriesIdDic.Add(list[i].Id, list[i]); } } public void StartLoadSleeve(string fileName) { SleeveMgr = new SleeveMgr(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { SleeveMgr.Add(new Sleeve(item)); } } public void StartLoadSleeveSeries(string fileName) { List list = new List(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { list.Add(new SleeveSeries(item)); } SleeveSeriesIdDic = new Dictionary(list.Count); for (int i = 0; i < list.Count; i++) { SleeveSeriesIdDic.Add(list[i].Id, list[i]); } } public void StartLoadSleeveCategory(string fileName) { List list = new List(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { list.Add(new SleeveCategory(item)); } SleeveCategoryIdDic = new Dictionary(list.Count); for (int i = 0; i < list.Count; i++) { SleeveCategoryIdDic.Add(list[i].Id, list[i]); } } public void StartLoadSkinSeries(string fileName) { List list = new List(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { list.Add(new LeaderSkinSeries(item)); } LeaderSkinSeriesIdDic = new Dictionary(list.Count); for (int i = 0; i < list.Count; i++) { LeaderSkinSeriesIdDic.Add(list[i].Id, list[i]); } } public void StartLoadEmblem(string fileName) { EmblemMgr = new EmblemMgr(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { EmblemMgr.Add(new Emblem(item)); } } public void StartLoadEmblemCategory(string fileName) { List list = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString()); List list2 = new List(list.Count); foreach (string[] item in list) { list2.Add(new EmblemCategory(item)); } EmblemCategoryIdDic = new Dictionary(list2.Count); int i = 0; for (int count = list2.Count; i < count; i++) { EmblemCategoryIdDic.Add(list2[i].Id, list2[i]); } } public void StartLoadDegree(string fileName) { DegreeMgr = new DegreeMgr(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { DegreeMgr.Add(new Degree(item)); } } public void StartLoadDegreeCategory(string fileName) { List list = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString()); List list2 = new List(list.Count); foreach (string[] item in list) { list2.Add(new DegreeCategory(item)); } DegreeCategoryIdDic = new Dictionary(list2.Count); int i = 0; for (int count = list2.Count; i < count; i++) { DegreeCategoryIdDic.Add(list2[i].Id, list2[i]); } } public void StartLoadCountry(string fileName) { string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath("text/countrytext", ResourcesManager.AssetLoadPathType.Master, isfetch: true); Dictionary dictionary = new Dictionary(); LoadLocalizeJsonAndParse(dictionary, assetTypePath); CountryList = new List(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { CountryList.Add(new Country(item, dictionary)); } } public void StartLoadEmoteData(List fileNameList, List skinidList) { _emotionDic = new Dictionary>(); for (int i = 0; i < skinidList.Count; i++) { int num = skinidList[i]; string path = fileNameList[i]; if (_emotionDic.ContainsKey(num.ToString())) { continue; } TextAsset textAsset = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(path, ResourcesManager.AssetLoadPathType.CharaMaster, isfetch: true)) as TextAsset; if (!(textAsset != null)) { continue; } List list = Utility.ConvertCSV_Array(textAsset.ToString()); Dictionary dictionary = new Dictionary(); foreach (string[] item in list) { Emotion emotion = new Emotion(item); ClassCharaPrm.EmotionType emotion_id = (ClassCharaPrm.EmotionType)emotion.emotion_id; if (!dictionary.ContainsKey(emotion_id)) { dictionary.Add(emotion_id, emotion); } } _emotionDic.Add(num.ToString(), dictionary); textAsset = null; } } public void DynamicLoadEmoteData(List loadPathList, List keyList) { for (int i = 0; i < loadPathList.Count; i++) { if (_emotionDic.ContainsKey(keyList[i])) { continue; } TextAsset textAsset = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(loadPathList[i], ResourcesManager.AssetLoadPathType.CharaMaster, isfetch: true)) as TextAsset; if (!(textAsset != null)) { continue; } List list = Utility.ConvertCSV_Array(textAsset.ToString()); Dictionary dictionary = new Dictionary(); foreach (string[] item in list) { Emotion emotion = new Emotion(item); ClassCharaPrm.EmotionType emotion_id = (ClassCharaPrm.EmotionType)emotion.emotion_id; if (!dictionary.ContainsKey(emotion_id)) { dictionary.Add(emotion_id, emotion); } } _emotionDic.Add(keyList[i], dictionary); textAsset = null; } } public string GetEmotionTypePath(string emotionId, ref List emotionCsvLoadPath) { string text = $"emote_chara_{emotionId}"; string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(text, ResourcesManager.AssetLoadPathType.CharaMaster); emotionCsvLoadPath.Add(text); return assetTypePath; } public void StartLoadItem(string fileName) { ItemList = new List(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { ItemList.Add(new Item(item)); } } private string GetFilename(string data) { return Toolbox.ResourcesManager.GetAssetTypePath(data, ResourcesManager.AssetLoadPathType.Master, isfetch: true); } private List LoadList(string filename) where T : ReadFromCsv, new() { List list = new List(); TextAsset textAsset = Toolbox.ResourcesManager.LoadObject(filename) as TextAsset; if (textAsset == null) { return list; } foreach (string[] item2 in Utility.ConvertCSV_Array(textAsset.ToString())) { T item = new T(); item.ReadCsvColumns(item2); list.Add(item); } textAsset = null; return list; } private List LoadStringList(string filename) { List list = new List(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(filename) as TextAsset).ToString())) { list.Add(item[0]); } return list; } public void StartLoadRank(string fileName) { RankList = new List(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { RankList.Add(new Rank(item)); } } public void StartLoadCardFilterKeyword(string fileName) { CardFilterKeyWord = new CardFilterKeyWordMaster(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { CardFilterKeyWord.Add(item); } } public void StartLoadAIBasicData() { AIBasicDataList = new AICardDataAssetSet(); string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath("ai/ai_basic", ResourcesManager.AssetLoadPathType.Master, isfetch: true); List csv = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(assetTypePath) as TextAsset).ToString()); AIBasicDataList.ConvertCsvTextToAsset(csv); } public void StartLoadHighRankEffect(string fileName) { HighRankEffect = new Dictionary>(); TextAsset textAsset = Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset; if (textAsset == null) { return; } JsonData jsonData = JsonMapper.ToObject(textAsset.text); foreach (string key in jsonData.Keys) { JsonData jsonData2 = jsonData[key]; List list = new List(); for (int i = 0; i < jsonData2.Count; i++) { HighRankEffectInfo highRankEffectInfo = new HighRankEffectInfo(); highRankEffectInfo.Prefab = jsonData2[i]["effect"].ToString(); highRankEffectInfo.Delay = jsonData2[i]["delay"].ToInt(); highRankEffectInfo.Layer = jsonData2[i]["layer"].ToInt(); highRankEffectInfo.TargetBoneName = jsonData2[i]["bone"].ToString(); list.Add(highRankEffectInfo); } HighRankEffect.Add(key, list); } } public void StartLoadMyPageCustomBG(string fileName) { MyPageCustomBGMaster = new Dictionary(); MyPageCustomBGMasterList = new List(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { MyPageCustomBGMasterData myPageCustomBGMasterData = new MyPageCustomBGMasterData(item); MyPageCustomBGMasterList.Add(myPageCustomBGMasterData); MyPageCustomBGMaster.Add(myPageCustomBGMasterData.Id, myPageCustomBGMasterData); } } public void StartLoadAICommonData(List fileList) { AICommonDataList = new AICardDataAssetSet(); for (int i = 0; i < fileList.Count; i++) { string path = "ai/" + fileList[i]; string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(path, ResourcesManager.AssetLoadPathType.Master, isfetch: true); List csv = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(assetTypePath) as TextAsset).ToString()); AICommonDataList.ConvertCsvTextToAsset(csv); } } public void StartLoadAIAllyCommonData(List fileList) { AIAllyCommonDataList = new AICardDataAssetSet(); for (int i = 0; i < fileList.Count; i++) { string path = "ai/" + fileList[i]; string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(path, ResourcesManager.AssetLoadPathType.Master, isfetch: true); List csv = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(assetTypePath) as TextAsset).ToString()); AIAllyCommonDataList.ConvertCsvTextToAsset(csv); } } public void StartLoadAIDeckData(int deckID) { if (AIDeckDic == null) { AIDeckDic = new Dictionary(); } string text = "ai/" + AIDeckFileNameList.GetFileName(deckID); if (!AIDeckDic.ContainsKey(text)) { LoadAIDeckData(text); } } private void LoadAIDeckData(string fileName) { string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(fileName, ResourcesManager.AssetLoadPathType.Master, isfetch: true); AICardDataAssetSet aICardDataAssetSet = new AICardDataAssetSet(); List csv = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(assetTypePath) as TextAsset).ToString()); aICardDataAssetSet.ConvertCsvTextToAsset(csv); AIDeckDic.Add(fileName, aICardDataAssetSet); } public void StartLoadAIStyleCommonParam(string fileName) { AIStyleCommonDataList = new List(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { AIStyleCommonDataList.Add(new AIPolicyDataAsset(item)); } } public void StartLoadAIStyleData(int styleID) { if (AIStyleDic == null) { AIStyleDic = new Dictionary>(); } string fileName = AIStyleFileNameList.GetFileName(styleID); if (fileName != null && !(fileName == "")) { string text = "ai/" + fileName; if (!AIStyleDic.ContainsKey(text)) { LoadAIStyleData(text); } } } private void LoadAIStyleData(string fileName) { string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(fileName, ResourcesManager.AssetLoadPathType.Master, isfetch: true); List list = new List(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(assetTypePath) as TextAsset).ToString())) { list.Add(new AIPolicyDataAsset(item)); } AIStyleDic.Add(fileName, list); } public void StartLoadPracticeAISettingData(string fileName) { PracticeAISettingList = new PracticeAISettingDataSet(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { PracticeAISettingList.AddData(new PracticeAISettingData(item)); } } public void StartLoadStoryAISettingData(string fileName) { StoryAISettingList = new StoryAISettingDataSet(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { StoryAISettingList.AddData(new StoryAISettingData(item)); } } public void StartLoadQuestAISettingData(string fileName) { QuestAISettingList = new StoryAISettingDataSet(); foreach (ArrayList item in Utility.ConvertCSV((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { string[] columns = (string[])item.ToArray(typeof(string)); QuestAISettingList.AddData(new StoryAISettingData(columns)); } } public void StartLoadRankMatchAISettingData(string fileName) { RankMatchAISettingList = new RankMatchAISettingDataSet(); foreach (ArrayList item in Utility.ConvertCSV((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString())) { string[] columns = (string[])item.ToArray(typeof(string)); RankMatchAISettingList.AddData(new RankMatchAISettingData(columns)); } } public void StartLoadAIEmoteData(int emoteID) { if (AIEmoteDic == null) { AIEmoteDic = new Dictionary>(); } string fileName = AIEmoteFileNameList.GetFileName(emoteID); if (fileName != null && !(fileName == "")) { string text = "ai/" + fileName; if (!AIEmoteDic.ContainsKey(text)) { LoadAIEmoteData(text); } } } private void LoadAIEmoteData(string fileName) { string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(fileName, ResourcesManager.AssetLoadPathType.Master, isfetch: true); List list = new List(); foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(assetTypePath) as TextAsset).ToString())) { list.Add(new AIEmoteDataAsset(item)); } AIEmoteDic.Add(fileName, list); } private void StargLoadAIDeckFileNameList() { string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath("ai/ai_deck_filelist", ResourcesManager.AssetLoadPathType.Master, isfetch: true); TextAsset textAsset = Toolbox.ResourcesManager.LoadObject(assetTypePath) as TextAsset; AIDeckFileNameList = new AIDeckFileNameList(Utility.ConvertCSV_Array(textAsset.ToString())); } private void RegisterAIDeckCsvFilePath(List aiPaths, int deckID) { string fileName = AIDeckFileNameList.GetFileName(deckID); if (AIDeckDic == null || !AIDeckDic.ContainsKey(fileName)) { aiPaths.Add(Toolbox.ResourcesManager.GetAssetTypePath(fileName, ResourcesManager.AssetLoadPathType.Master)); } } private void StartLoadAICommonFileNameList() { string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath("ai/ai_common_list", ResourcesManager.AssetLoadPathType.Master, isfetch: true); List list = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(assetTypePath) as TextAsset).ToString()); AICommonFileNameList = new List(); foreach (string[] item2 in list) { string item = item2[0]; AICommonFileNameList.Add(item); } } private void RegisterAICommonCsvFilePaths(List aiPaths) { for (int i = 0; i < AICommonFileNameList.Count; i++) { aiPaths.Add(Toolbox.ResourcesManager.GetAssetTypePath(AICommonFileNameList[i], ResourcesManager.AssetLoadPathType.Master)); } } private void StartLoadAIAllyCommonFileNameList() { string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath("ai/ai_ally_common_list", ResourcesManager.AssetLoadPathType.Master, isfetch: true); List list = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(assetTypePath) as TextAsset).ToString()); AIAllyCommonFileNameList = new List(); foreach (string[] item2 in list) { string item = item2[0]; AIAllyCommonFileNameList.Add(item); } } private void RegisterAIAllyCommonCsvFilePaths(List aiPaths) { for (int i = 0; i < AIAllyCommonFileNameList.Count; i++) { aiPaths.Add(Toolbox.ResourcesManager.GetAssetTypePath(AIAllyCommonFileNameList[i], ResourcesManager.AssetLoadPathType.Master)); } } private void StartLoadAIEmoteFileNameList() { string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath("ai/ai_emote_filelist", ResourcesManager.AssetLoadPathType.Master, isfetch: true); TextAsset textAsset = Toolbox.ResourcesManager.LoadObject(assetTypePath) as TextAsset; AIEmoteFileNameList = new AIEmoteFileNameList(Utility.ConvertCSV_Array(textAsset.ToString())); } private void RegisterAIEmoteCsvFilePath(List aiPaths, int emoteID) { string fileName = AIEmoteFileNameList.GetFileName(emoteID); if (fileName != null && !(fileName == "") && (AIEmoteDic == null || !AIEmoteDic.ContainsKey(fileName))) { aiPaths.Add(Toolbox.ResourcesManager.GetAssetTypePath(fileName, ResourcesManager.AssetLoadPathType.Master)); } } private void StartLoadAIStyleFileNameList() { string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath("ai/ai_style_filelist", ResourcesManager.AssetLoadPathType.Master, isfetch: true); TextAsset textAsset = Toolbox.ResourcesManager.LoadObject(assetTypePath) as TextAsset; AIStyleFileNameList = new AIStyleFileNameList(Utility.ConvertCSV_Array(textAsset.ToString())); } private void RegisterAIStyleCsvFilePath(List aiPaths, int styleID) { string fileName = AIStyleFileNameList.GetFileName(styleID); if (fileName != null && !(fileName == "") && (AIStyleDic == null || !AIStyleDic.ContainsKey(fileName))) { aiPaths.Add(Toolbox.ResourcesManager.GetAssetTypePath(fileName, ResourcesManager.AssetLoadPathType.Master)); } } public void LoadAICsv(AICsvLoadingInfo info, Action callBack) { List aiPaths = new List(); RegisterAICommonCsvPath(aiPaths); RegisterAIIndividualCsvPath(aiPaths, info); Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupSync(aiPaths, delegate { StartLoadAIBasicAndCommonData(); StartLoadAIIndividualData(info); GameMgr.GetIns().GetDataMgr().RegisterAllAIData(); Toolbox.ResourcesManager.RemoveAssetGroup(aiPaths); callBack.Call(); }); } public void LoadAICsvList(List infoList, Action callBack) { List aiPaths = new List(); RegisterAICommonCsvPath(aiPaths); for (int i = 0; i < infoList.Count; i++) { AICsvLoadingInfo info = infoList[i]; RegisterAIIndividualCsvPath(aiPaths, info); } Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupSync(aiPaths, delegate { StartLoadAIBasicAndCommonData(); for (int j = 0; j < infoList.Count; j++) { AICsvLoadingInfo info2 = infoList[j]; StartLoadAIIndividualData(info2); } GameMgr.GetIns().GetDataMgr().RegisterAllAIData(); Toolbox.ResourcesManager.RemoveAssetGroup(aiPaths); callBack.Call(); }); } private void RegisterAICommonCsvPath(List aiPaths) { aiPaths.Add(Toolbox.ResourcesManager.GetAssetTypePath("ai_basic", ResourcesManager.AssetLoadPathType.Master)); if (AICommonDataList == null) { RegisterAICommonCsvFilePaths(aiPaths); } if (AIAllyCommonDataList == null) { RegisterAIAllyCommonCsvFilePaths(aiPaths); } } private void RegisterAIIndividualCsvPath(List aiPaths, AICsvLoadingInfo info) { if (info.DeckId >= 0) { RegisterAIDeckCsvFilePath(aiPaths, info.DeckId); } RegisterAIStyleCsvFilePath(aiPaths, info.StyleId); RegisterAIEmoteCsvFilePath(aiPaths, info.EmoteId); } private void StartLoadAIBasicAndCommonData() { if (AIBasicDataList == null) { StartLoadAIBasicData(); } if (AICommonDataList == null) { StartLoadAICommonData(AICommonFileNameList); } if (AIAllyCommonDataList == null) { StartLoadAIAllyCommonData(AIAllyCommonFileNameList); } } private void StartLoadAIIndividualData(AICsvLoadingInfo info) { if (info.DeckId >= 0) { StartLoadAIDeckData(info.DeckId); } StartLoadAIEmoteData(info.EmoteId); StartLoadAIStyleData(info.StyleId); } public Dictionary> StartLoadGofCards(string fileName) { Dictionary> dictionary = new Dictionary>(); TextAsset textAsset = Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset; if (textAsset == null) { return dictionary; } foreach (string[] item in Utility.ConvertCSV_Array(textAsset.ToString())) { int result = 0; if (int.TryParse(item[0], out result)) { string[] source = item[1].Split(':'); dictionary[result] = source.Select((string str) => int.Parse(str)).ToList(); } } textAsset = null; return dictionary; } }