Compile-driven bulk-copy loop (tools/engine-port/m1_copy_loop.py) pulled the precise reference closure of the battle-core roots, stopping at the classify god-object/View-VFX-UI boundary. 782 files; no re-explosion (M0 had estimated ~order 1000). Residual frontier = 52 shim-classified + 80 external (Unity/BCL) types to author next.
1944 lines
80 KiB
C#
1944 lines
80 KiB
C#
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<BattleInformation> _twoPickBattleInfo;
|
|
|
|
private List<BattleInformation> _chaosBattleInfo;
|
|
|
|
private List<BattleInformation> _roomChaosBattleInfo;
|
|
|
|
private List<BattleInformation> _colosseumChaosBattleInfo;
|
|
|
|
private List<List<BattleInformation>> _chaosBattleInfoList;
|
|
|
|
private Dictionary<int, List<int>> _classInfomationOrder;
|
|
|
|
private Dictionary<int, List<int>> _roomClassInfomationOrder;
|
|
|
|
private Dictionary<int, List<int>> _colosseumClassInfomationOrder;
|
|
|
|
private List<Dictionary<int, List<int>>> _classInfomationOrderList;
|
|
|
|
private List<string> Paths = new List<string>();
|
|
|
|
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<ClassCharacterMasterData> ClassCharacterList { get; private set; }
|
|
|
|
public Dictionary<int, int> PackRarityEffectOverrideDic { get; private set; }
|
|
|
|
public Dictionary<int, CardPackManager.GachaMaskDark> GachaMaskDarkDic { get; private set; }
|
|
|
|
public Dictionary<int, SleeveSeries> SleeveSeriesIdDic { get; set; }
|
|
|
|
public Dictionary<int, SleeveCategory> SleeveCategoryIdDic { get; set; }
|
|
|
|
public Dictionary<int, LeaderSkinSeries> LeaderSkinSeriesIdDic { get; set; }
|
|
|
|
public Dictionary<int, BuildDeckSeries> BuildDeckSeriesIdDic { get; set; }
|
|
|
|
public Dictionary<int, EmblemCategory> EmblemCategoryIdDic { get; set; }
|
|
|
|
public Dictionary<int, DegreeCategory> DegreeCategoryIdDic { get; set; }
|
|
|
|
public Dictionary<int, List<BuildDeckCard>> BuildDeckCardListDic { get; set; }
|
|
|
|
public Dictionary<string, List<HighRankEffectInfo>> HighRankEffect { get; set; }
|
|
|
|
public List<Rank> RankList { get; set; }
|
|
|
|
public SleeveMgr SleeveMgr { get; private set; }
|
|
|
|
public EmblemMgr EmblemMgr { get; private set; }
|
|
|
|
public DegreeMgr DegreeMgr { get; private set; }
|
|
|
|
public List<Country> CountryList { get; set; }
|
|
|
|
public List<Item> ItemList { get; set; }
|
|
|
|
public List<GiftTransition> GiftTransitionList { get; set; }
|
|
|
|
public List<BattleInformation> RotationBattleInfo { get; set; }
|
|
|
|
public List<BattleInformation> UnlimitedBattleInfo { get; set; }
|
|
|
|
public List<BattleInformation> AvatarBattleInfo { get; set; }
|
|
|
|
public Dictionary<int, List<int>> 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<string, string> _crossOverClassInfomationOrder { get; set; }
|
|
|
|
public Dictionary<int, List<int>> AvatarClassInformationOrder { get; set; }
|
|
|
|
public List<BattleInformation> FusionBattleInfo { get; set; }
|
|
|
|
public List<string> WhenPlayEffectKeywordMaster { get; set; }
|
|
|
|
public List<PuzzleQuestData> PuzzleQuestDataList { get; private set; }
|
|
|
|
public List<PuzzleBattleMasterData> PuzzleBattleMasterList { get; private set; }
|
|
|
|
public Dictionary<int, List<TutorialData>> TutorialDictionary { get; set; }
|
|
|
|
public List<TutorialAreaSelect> TutorialAreaSelectList { get; set; }
|
|
|
|
public AICardDataAssetSet AIBasicDataList { get; set; }
|
|
|
|
public AICardDataAssetSet AICommonDataList { get; set; }
|
|
|
|
public AICardDataAssetSet AIAllyCommonDataList { get; set; }
|
|
|
|
public Dictionary<string, AICardDataAssetSet> AIDeckDic { get; set; }
|
|
|
|
public List<AIPolicyDataAsset> AIStyleCommonDataList { get; set; }
|
|
|
|
public Dictionary<string, List<AIPolicyDataAsset>> AIStyleDic { get; set; }
|
|
|
|
public Dictionary<string, List<AIEmoteDataAsset>> AIEmoteDic { get; set; }
|
|
|
|
public Dictionary<string, Dictionary<ClassCharaPrm.EmotionType, Emotion>> _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<string> AICommonFileNameList { get; set; }
|
|
|
|
public List<string> AIAllyCommonFileNameList { get; set; }
|
|
|
|
public AIDeckFileNameList AIDeckFileNameList { get; set; }
|
|
|
|
public AIEmoteFileNameList AIEmoteFileNameList { get; set; }
|
|
|
|
public AIStyleFileNameList AIStyleFileNameList { get; set; }
|
|
|
|
private IDictionary<string, string> TutorialDic { get; set; }
|
|
|
|
public IDictionary<string, string> BattleKeyWordDic { get; private set; }
|
|
|
|
public IDictionary<string, string> BattleKeywordReplaceDic { get; private set; }
|
|
|
|
public IDictionary<string, string> CardFilterKeywordReplaceDic { get; private set; }
|
|
|
|
public IDictionary<string, string> BattleKeyWordTitleDic { get; private set; }
|
|
|
|
private IDictionary<string, string> EmoteWordDic { get; set; }
|
|
|
|
private IDictionary<string, string> CardNameDic { get; set; }
|
|
|
|
private IDictionary<string, string> TribeNameDic { get; set; }
|
|
|
|
private IDictionary<string, string> SkillDescDic { get; set; }
|
|
|
|
private IDictionary<string, string> FlavourTextDic { get; set; }
|
|
|
|
private IDictionary<string, string> ItemTextDic { get; set; }
|
|
|
|
private IDictionary<string, string> ArenaTextDic { get; set; }
|
|
|
|
public IDictionary<string, string> SleeveTextDic { get; private set; }
|
|
|
|
private IDictionary<string, string> SleeveSeriesTextDic { get; set; }
|
|
|
|
private IDictionary<string, string> SleeveCategoryTextDic { get; set; }
|
|
|
|
private IDictionary<string, string> SleeveProductTextDic { get; set; }
|
|
|
|
private IDictionary<string, string> LeaderSkinProductTextDic { get; set; }
|
|
|
|
private IDictionary<string, string> LeaderSkinSeriesTextDic { get; set; }
|
|
|
|
private IDictionary<string, string> BuildDeckProductTextDic { get; set; }
|
|
|
|
private IDictionary<string, string> BuildDeckSeriesTextDic { get; set; }
|
|
|
|
public IDictionary<string, string> ClassCharaTextDic { get; private set; }
|
|
|
|
public IDictionary<string, string> EmblemTextDic { get; private set; }
|
|
|
|
private IDictionary<string, string> EmblemCategoryTextDic { get; set; }
|
|
|
|
public IDictionary<string, string> DegreeTextDic { get; private set; }
|
|
|
|
private IDictionary<string, string> DegreeCategoryTextDic { get; set; }
|
|
|
|
private IDictionary<string, string> DegreeAchievementTextDic { get; set; }
|
|
|
|
private IDictionary<int, string> MasterRankingSeasonTextDic { get; set; }
|
|
|
|
private Dictionary<string, string> MyPageBGTextDic { get; set; }
|
|
|
|
public CardSetNameMgr CardSetNameMgr { get; private set; }
|
|
|
|
private IDictionary<string, string> CardVoiceTextDic { get; set; }
|
|
|
|
public List<string> CardDetailVoiceIgnoreList { get; private set; }
|
|
|
|
private IDictionary<string, string> PracticeTextDic { get; set; }
|
|
|
|
private IDictionary<string, string> StorySectionTitleTextDic { get; set; }
|
|
|
|
public IDictionary<int, List<int>> RelationCardSortDic { get; private set; }
|
|
|
|
public CardFilterKeyWordMaster CardFilterKeyWord { get; private set; }
|
|
|
|
public Dictionary<int, List<int>> GleamingGemListMaster { get; set; }
|
|
|
|
public Dictionary<string, MyPageCustomBGMasterData> MyPageCustomBGMaster { get; private set; }
|
|
|
|
public List<MyPageCustomBGMasterData> MyPageCustomBGMasterList { get; private set; }
|
|
|
|
public Dictionary<int, List<int>> RadiantCrystalListMaster { get; set; }
|
|
|
|
public Dictionary<int, List<int>> GleamingGemListV2Master { get; set; }
|
|
|
|
public Dictionary<int, List<int>> RadiantCrystalListV2Master { get; set; }
|
|
|
|
public List<int> GetGleamingGemList(int classId)
|
|
{
|
|
if (GleamingGemListMaster.ContainsKey(classId))
|
|
{
|
|
return GleamingGemListMaster[classId];
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<int> GetRadiantCrystalList(int classId)
|
|
{
|
|
if (RadiantCrystalListMaster.ContainsKey(classId))
|
|
{
|
|
return RadiantCrystalListMaster[classId];
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<int> GetGleamingGemListV2Master(int classId)
|
|
{
|
|
if (GleamingGemListV2Master.ContainsKey(classId))
|
|
{
|
|
return GleamingGemListV2Master[classId];
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<int> 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<GiftTransition>(GetFilename("item/gift_transition"));
|
|
StartLoadBattleInfos();
|
|
LoadClassInfoList();
|
|
LoadCrossOverClassInfoList();
|
|
LoadAvatarClassInfoList();
|
|
FusionBattleInfo = LoadList<BattleInformation>(GetFilename("battle/fusion_info"));
|
|
WhenPlayEffectKeywordMaster = LoadStringList(GetFilename("battle/when_play_effect_keyword_master"));
|
|
PuzzleQuestDataList = LoadList<PuzzleQuestData>(GetFilename("battle/puzzle_data"));
|
|
PuzzleBattleMasterList = LoadList<PuzzleBattleMasterData>(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<List<BattleInformation>>();
|
|
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<BattleInformation> LoadBattleInfo(string data)
|
|
{
|
|
List<BattleInformation> source = LoadList<BattleInformation>(GetFilename(data));
|
|
List<BattleInformation> 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<BattleInformation> 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<Dictionary<int, List<int>>>();
|
|
for (int i = 1; i < 6; i++)
|
|
{
|
|
List<ClassInfomationOrder> list = LoadList<ClassInfomationOrder>(GetFilename("battle/class_info_list_" + i));
|
|
Dictionary<int, List<int>> dictionary = new Dictionary<int, List<int>>();
|
|
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<string, string>();
|
|
List<CrossOverClassInfomationOrder> list = LoadList<CrossOverClassInfomationOrder>(GetFilename("battle/crossover_class_info_list"));
|
|
for (int i = 0; i < list.Count; i++)
|
|
{
|
|
_crossOverClassInfomationOrder.Add(list[i].KeyClassIds, list[i].ValueClassIds);
|
|
}
|
|
}
|
|
|
|
public List<int> GetCrossOverClassInfoListOrNull(int mainClass, int subClass)
|
|
{
|
|
return _crossOverClassInfomationOrder.GetValueOrDefault(mainClass + "|" + subClass, null)?.Split('|').Select(int.Parse).ToList();
|
|
}
|
|
|
|
private void LoadAvatarClassInfoList()
|
|
{
|
|
AvatarClassInformationOrder = new Dictionary<int, List<int>>();
|
|
List<ClassInfomationOrder> list = LoadList<ClassInfomationOrder>(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<string> emotionCsvDownLoadPath = new List<string>();
|
|
List<string> emotionCsvLoadPath = new List<string>();
|
|
List<int> skinidList = new List<int>();
|
|
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<string>();
|
|
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<int, List<int>>();
|
|
foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString()))
|
|
{
|
|
int key = int.Parse(item[0]);
|
|
List<int> sortList = new List<int>();
|
|
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<string, string>();
|
|
LoadLocalizeJsonAndParse(TutorialDic, fileName);
|
|
}
|
|
|
|
public void StartLoadCardNameText(string fileName)
|
|
{
|
|
CardNameDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(CardNameDic, fileName);
|
|
}
|
|
|
|
public void StartLoadBattleKeyWordText(string fileName)
|
|
{
|
|
Dictionary<string, string> dictionary = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(dictionary, fileName);
|
|
BattleKeyWordTitleDic = new Dictionary<string, string>();
|
|
BattleKeyWordDic = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
|
foreach (KeyValuePair<string, string> 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<string, string> dictionary = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(dictionary, filename);
|
|
char[] separator = new char[1] { ',' };
|
|
BattleKeywordReplaceDic = new Dictionary<string, string>(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<string, string> dictionary = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(dictionary, filename);
|
|
char[] separator = new char[1] { ',' };
|
|
CardFilterKeywordReplaceDic = new Dictionary<string, string>(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<string, string>();
|
|
LoadLocalizeJsonAndParse(EmoteWordDic, fileName);
|
|
}
|
|
|
|
public void StartLoadItemMasterText(string fileName)
|
|
{
|
|
ItemTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(ItemTextDic, fileName);
|
|
}
|
|
|
|
public void StartLoadArenaMasterText(string fileName)
|
|
{
|
|
ArenaTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(ArenaTextDic, fileName);
|
|
}
|
|
|
|
public void StartLoadTribeNameText(string fileName)
|
|
{
|
|
TribeNameDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(TribeNameDic, fileName);
|
|
}
|
|
|
|
public void StartLoadSkillDescText(string fileName)
|
|
{
|
|
SkillDescDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(SkillDescDic, fileName);
|
|
}
|
|
|
|
public void StartLoadFlavourText(string fileName)
|
|
{
|
|
FlavourTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(FlavourTextDic, fileName);
|
|
}
|
|
|
|
public void StartLoadSleeveText(string fileName)
|
|
{
|
|
SleeveTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(SleeveTextDic, fileName);
|
|
}
|
|
|
|
public void StartLoadSleeveSeriesText(string fileName)
|
|
{
|
|
SleeveSeriesTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(SleeveSeriesTextDic, fileName);
|
|
}
|
|
|
|
public void StartLoadSleeveCategoryText(string fileName)
|
|
{
|
|
SleeveCategoryTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(SleeveCategoryTextDic, fileName);
|
|
}
|
|
|
|
public void StartLoadSleeveProductText(string fileName)
|
|
{
|
|
SleeveProductTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(SleeveProductTextDic, fileName);
|
|
}
|
|
|
|
public void StartLoadLeaderSkinProductText(string fileName)
|
|
{
|
|
LeaderSkinProductTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(LeaderSkinProductTextDic, fileName);
|
|
}
|
|
|
|
public void StartLoadLeaderSkinSeriesText(string fileName)
|
|
{
|
|
LeaderSkinSeriesTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(LeaderSkinSeriesTextDic, fileName);
|
|
}
|
|
|
|
public void StartLoadBuildDeckSeriesText(string fileName)
|
|
{
|
|
BuildDeckSeriesTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(BuildDeckSeriesTextDic, fileName);
|
|
}
|
|
|
|
public void StartLoadBuildDeckProductText(string fileName)
|
|
{
|
|
BuildDeckProductTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(BuildDeckProductTextDic, fileName);
|
|
}
|
|
|
|
public void StartLoadClassCharaText(string fileName)
|
|
{
|
|
ClassCharaTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(ClassCharaTextDic, fileName);
|
|
}
|
|
|
|
private void StartLoadEmblemText(string fileName)
|
|
{
|
|
EmblemTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(EmblemTextDic, fileName, isTrimKey: true);
|
|
}
|
|
|
|
public void StartLoadEmblemCategoryText(string fileName)
|
|
{
|
|
EmblemCategoryTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(EmblemCategoryTextDic, fileName);
|
|
}
|
|
|
|
private void StartLoadDegreeText(string fileName)
|
|
{
|
|
DegreeTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(DegreeTextDic, fileName, isTrimKey: true);
|
|
}
|
|
|
|
public void StartLoadDegreeCategoryText(string fileName)
|
|
{
|
|
DegreeCategoryTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(DegreeCategoryTextDic, fileName);
|
|
}
|
|
|
|
public void StartLoadDegreeAchievementText(string fileName)
|
|
{
|
|
DegreeAchievementTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(DegreeAchievementTextDic, fileName);
|
|
}
|
|
|
|
public void StartLoadMyPageBGText(string fileName)
|
|
{
|
|
MyPageBGTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(MyPageBGTextDic, fileName);
|
|
}
|
|
|
|
private void StartLoadMasterRankingSeazonText(string fileName)
|
|
{
|
|
MasterRankingSeasonTextDic = new Dictionary<int, string>();
|
|
IDictionary<string, string> dictionary = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(dictionary, fileName, isTrimKey: true);
|
|
foreach (KeyValuePair<string, string> item in dictionary)
|
|
{
|
|
MasterRankingSeasonTextDic.Add(int.Parse(item.Key), item.Value);
|
|
}
|
|
}
|
|
|
|
private void StartLoadCardSetNameText(string fileName)
|
|
{
|
|
Dictionary<string, string> dictionary = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(dictionary, fileName, isTrimKey: true);
|
|
string text = "_long";
|
|
string text2 = "_short";
|
|
Dictionary<string, string> dictionary2 = new Dictionary<string, string>();
|
|
Dictionary<string, string> dictionary3 = new Dictionary<string, string>();
|
|
foreach (KeyValuePair<string, string> item in dictionary)
|
|
{
|
|
string key = item.Key;
|
|
string empty = string.Empty;
|
|
Dictionary<string, string> 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<string, string>();
|
|
LoadLocalizeJsonAndParse(CardVoiceTextDic, fileName);
|
|
}
|
|
|
|
public void StartLoadPracticeText(string fileName)
|
|
{
|
|
PracticeTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(PracticeTextDic, fileName);
|
|
}
|
|
|
|
public void StartLoadStorySectionTitleText(string fileName)
|
|
{
|
|
StorySectionTitleTextDic = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(StorySectionTitleTextDic, fileName);
|
|
}
|
|
|
|
private void StartLoadSystemText(string fileName)
|
|
{
|
|
LoadLocalizeJsonAndParseWithRegion(Data.SystemText.TextDictionary, Data.SystemText.RegionCode, fileName);
|
|
}
|
|
|
|
public void LoadLocalizeJsonAndParse(IDictionary<string, string> dic, string fileName, bool isTrimKey = false)
|
|
{
|
|
LoadLocalizeJsonAndParseWithRegion(dic, Data.SystemText.RegionCode, fileName, isTrimKey);
|
|
}
|
|
|
|
public void LoadLocalizeJsonAndParseWithRegion(IDictionary<string, string> 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>(Type key, IDictionary<Type, string> 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<string> GetAllTribeNameList()
|
|
{
|
|
List<string> list = new List<string>(TribeNameDic.Count);
|
|
foreach (KeyValuePair<string, string> item in TribeNameDic)
|
|
{
|
|
list.Add(item.Value);
|
|
}
|
|
return list;
|
|
}
|
|
|
|
public void StartLoadTutorial(string fileName)
|
|
{
|
|
List<TutorialData> list = new List<TutorialData>();
|
|
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<int, List<TutorialData>>();
|
|
}
|
|
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<TutorialData>());
|
|
}
|
|
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<string[]> list = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString());
|
|
if (TutorialAreaSelectList == null)
|
|
{
|
|
TutorialAreaSelectList = new List<TutorialAreaSelect>();
|
|
}
|
|
foreach (string[] item in list)
|
|
{
|
|
TutorialAreaSelectList.Add(new TutorialAreaSelect(item));
|
|
}
|
|
}
|
|
|
|
public void StartLoadClassCharacter(string fileName)
|
|
{
|
|
ClassCharacterList = new List<ClassCharacterMasterData>();
|
|
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<string[]> list = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString());
|
|
PackRarityEffectOverrideDic = new Dictionary<int, int>();
|
|
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<string[]> list = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(filename) as TextAsset).ToString());
|
|
GachaMaskDarkDic = new Dictionary<int, CardPackManager.GachaMaskDark>(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<BuildDeckCard> list = new List<BuildDeckCard>();
|
|
foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString()))
|
|
{
|
|
list.Add(new BuildDeckCard(item));
|
|
}
|
|
BuildDeckCardListDic = new Dictionary<int, List<BuildDeckCard>>();
|
|
for (int i = 0; i < list.Count; i++)
|
|
{
|
|
int id = list[i]._id;
|
|
List<BuildDeckCard> list2 = null;
|
|
if (!BuildDeckCardListDic.ContainsKey(id))
|
|
{
|
|
list2 = new List<BuildDeckCard>();
|
|
BuildDeckCardListDic.Add(id, list2);
|
|
}
|
|
else
|
|
{
|
|
list2 = BuildDeckCardListDic[id];
|
|
}
|
|
list2.Add(list[i]);
|
|
}
|
|
}
|
|
|
|
public void StartLoadBuildDeckSeries(string fileName)
|
|
{
|
|
List<BuildDeckSeries> list = new List<BuildDeckSeries>();
|
|
foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString()))
|
|
{
|
|
list.Add(new BuildDeckSeries(item));
|
|
}
|
|
BuildDeckSeriesIdDic = new Dictionary<int, BuildDeckSeries>(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<SleeveSeries> list = new List<SleeveSeries>();
|
|
foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString()))
|
|
{
|
|
list.Add(new SleeveSeries(item));
|
|
}
|
|
SleeveSeriesIdDic = new Dictionary<int, SleeveSeries>(list.Count);
|
|
for (int i = 0; i < list.Count; i++)
|
|
{
|
|
SleeveSeriesIdDic.Add(list[i].Id, list[i]);
|
|
}
|
|
}
|
|
|
|
public void StartLoadSleeveCategory(string fileName)
|
|
{
|
|
List<SleeveCategory> list = new List<SleeveCategory>();
|
|
foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString()))
|
|
{
|
|
list.Add(new SleeveCategory(item));
|
|
}
|
|
SleeveCategoryIdDic = new Dictionary<int, SleeveCategory>(list.Count);
|
|
for (int i = 0; i < list.Count; i++)
|
|
{
|
|
SleeveCategoryIdDic.Add(list[i].Id, list[i]);
|
|
}
|
|
}
|
|
|
|
public void StartLoadSkinSeries(string fileName)
|
|
{
|
|
List<LeaderSkinSeries> list = new List<LeaderSkinSeries>();
|
|
foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString()))
|
|
{
|
|
list.Add(new LeaderSkinSeries(item));
|
|
}
|
|
LeaderSkinSeriesIdDic = new Dictionary<int, LeaderSkinSeries>(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<string[]> list = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString());
|
|
List<EmblemCategory> list2 = new List<EmblemCategory>(list.Count);
|
|
foreach (string[] item in list)
|
|
{
|
|
list2.Add(new EmblemCategory(item));
|
|
}
|
|
EmblemCategoryIdDic = new Dictionary<int, EmblemCategory>(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<string[]> list = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString());
|
|
List<DegreeCategory> list2 = new List<DegreeCategory>(list.Count);
|
|
foreach (string[] item in list)
|
|
{
|
|
list2.Add(new DegreeCategory(item));
|
|
}
|
|
DegreeCategoryIdDic = new Dictionary<int, DegreeCategory>(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<string, string> dictionary = new Dictionary<string, string>();
|
|
LoadLocalizeJsonAndParse(dictionary, assetTypePath);
|
|
CountryList = new List<Country>();
|
|
foreach (string[] item in Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(fileName) as TextAsset).ToString()))
|
|
{
|
|
CountryList.Add(new Country(item, dictionary));
|
|
}
|
|
}
|
|
|
|
public void StartLoadEmoteData(List<string> fileNameList, List<int> skinidList)
|
|
{
|
|
_emotionDic = new Dictionary<string, Dictionary<ClassCharaPrm.EmotionType, Emotion>>();
|
|
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<string[]> list = Utility.ConvertCSV_Array(textAsset.ToString());
|
|
Dictionary<ClassCharaPrm.EmotionType, Emotion> dictionary = new Dictionary<ClassCharaPrm.EmotionType, Emotion>();
|
|
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<string> loadPathList, List<string> 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<string[]> list = Utility.ConvertCSV_Array(textAsset.ToString());
|
|
Dictionary<ClassCharaPrm.EmotionType, Emotion> dictionary = new Dictionary<ClassCharaPrm.EmotionType, Emotion>();
|
|
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<string> 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<Item>();
|
|
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<T> LoadList<T>(string filename) where T : ReadFromCsv, new()
|
|
{
|
|
List<T> list = new List<T>();
|
|
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<string> LoadStringList(string filename)
|
|
{
|
|
List<string> list = new List<string>();
|
|
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<Rank>();
|
|
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<string[]> csv = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(assetTypePath) as TextAsset).ToString());
|
|
AIBasicDataList.ConvertCsvTextToAsset(csv);
|
|
}
|
|
|
|
public void StartLoadHighRankEffect(string fileName)
|
|
{
|
|
HighRankEffect = new Dictionary<string, List<HighRankEffectInfo>>();
|
|
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<HighRankEffectInfo> list = new List<HighRankEffectInfo>();
|
|
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<string, MyPageCustomBGMasterData>();
|
|
MyPageCustomBGMasterList = new List<MyPageCustomBGMasterData>();
|
|
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<string> 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<string[]> csv = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(assetTypePath) as TextAsset).ToString());
|
|
AICommonDataList.ConvertCsvTextToAsset(csv);
|
|
}
|
|
}
|
|
|
|
public void StartLoadAIAllyCommonData(List<string> 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<string[]> 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, AICardDataAssetSet>();
|
|
}
|
|
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<string[]> 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<AIPolicyDataAsset>();
|
|
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, List<AIPolicyDataAsset>>();
|
|
}
|
|
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<AIPolicyDataAsset> list = new List<AIPolicyDataAsset>();
|
|
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, List<AIEmoteDataAsset>>();
|
|
}
|
|
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<AIEmoteDataAsset> list = new List<AIEmoteDataAsset>();
|
|
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<string> 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<string[]> list = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(assetTypePath) as TextAsset).ToString());
|
|
AICommonFileNameList = new List<string>();
|
|
foreach (string[] item2 in list)
|
|
{
|
|
string item = item2[0];
|
|
AICommonFileNameList.Add(item);
|
|
}
|
|
}
|
|
|
|
private void RegisterAICommonCsvFilePaths(List<string> 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<string[]> list = Utility.ConvertCSV_Array((Toolbox.ResourcesManager.LoadObject(assetTypePath) as TextAsset).ToString());
|
|
AIAllyCommonFileNameList = new List<string>();
|
|
foreach (string[] item2 in list)
|
|
{
|
|
string item = item2[0];
|
|
AIAllyCommonFileNameList.Add(item);
|
|
}
|
|
}
|
|
|
|
private void RegisterAIAllyCommonCsvFilePaths(List<string> 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<string> 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<string> 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<string> aiPaths = new List<string>();
|
|
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<AICsvLoadingInfo> infoList, Action callBack)
|
|
{
|
|
List<string> aiPaths = new List<string>();
|
|
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<string> 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<string> 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<int, List<int>> StartLoadGofCards(string fileName)
|
|
{
|
|
Dictionary<int, List<int>> dictionary = new Dictionary<int, List<int>>();
|
|
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;
|
|
}
|
|
}
|