public void Invoke()
        {
            //采集信息
            UIStepDelegate(0);
            UITipTextDelegate("正在抓取数据……");
            UICountTextDelegate(string.Empty);
            General.Instance.rooms.Clear();
            General.Instance.rooms = CollectUtility.GetCurrentRooms(Setting.Default.LiveType, Setting.Default.AreaID);
            UIProgressBarValueSetDelegate(General.Instance.rooms.Count);
            UICountTextDelegate(string.Format("0/{0}", General.Instance.rooms.Count));

            //更新与下载信息
            General.Instance.ups = General.Instance.GetUpsByRooms(General.Instance.rooms);
            for (int i = 0; i < General.Instance.ups.Count; i++)
            {
                UITipTextDelegate(string.Format("采集{0}的信息中…", General.Instance.ups[i].nickname));
                UICountTextDelegate(string.Format("{0}/{1}", i + 1, General.Instance.rooms.Count));
                DownloadUtility.DownloadUpInfo(General.Instance.ups[i]);
                string sysCoverFilename = Path.Combine(Path.CacheDirectory, Path.GetFileName(General.Instance.rooms[i].system_cover.Split('?')[0]));
                if (!string.IsNullOrEmpty(General.Instance.rooms[i].system_cover))
                {
                    DownloadUtility.DownloadImage(General.Instance.rooms[i].system_cover, sysCoverFilename);
                }
                UIStepDelegate(i + 1);
            }

            //保存信息
            UITipTextDelegate("正在保存数据……");
            General.Instance.ups = General.Instance.UpsOnline2Local(General.Instance.ups);
            General.Instance.SaveInfo();
            General.Instance.SaveAllInfos2File();
            UIStepDelegate(100);

            TaskCallBack();
        }
        public void Invoke()
        {
            StatuUpdate(string.Format("正在进行第{0}次自动采集任务。", General.Instance.collectCount));
            General.Instance.rooms = CollectUtility.GetCurrentRooms(Setting.Default.LiveType, Setting.Default.AreaID);
            General.Instance.ups   = General.Instance.GetUpsByRooms(General.Instance.rooms);
            StatuUpdate(string.Format("本次采集已完成5%,数据抓取完成,正在进行采集…"));
            for (int i = 0; i < General.Instance.rooms.Count; i++)
            {
                StatuUpdate(string.Format("本次采集已完成{1}%,正在采集{0}的信息…", General.Instance.ups[i].nickname, 89 * i / General.Instance.rooms.Count + 5));
                DownloadUtility.DownloadUpInfo(General.Instance.ups[i]);
                string sysCoverFilename = Path.Combine(Path.CacheDirectory, Path.GetFileName(General.Instance.rooms[i].system_cover.Split('?')[0]));
                if (!string.IsNullOrEmpty(General.Instance.rooms[i].system_cover))
                {
                    DownloadUtility.DownloadImage(General.Instance.rooms[i].system_cover, sysCoverFilename);
                }
            }

            StatuUpdate(string.Format("所有数据采集完成,正在保存数据…"));
            General.Instance.ups = General.Instance.UpsOnline2Local(General.Instance.ups);
            General.Instance.SaveInfo();
            General.Instance.SaveAllInfos2File();
            StatuUpdate(string.Format("第{0}次自动采集任务完成。", General.Instance.collectCount));

            Accomplish();
        }
Esempio n. 3
0
 public static void DownloadQuests(List <TowerFloorParam> floorParams)
 {
     for (int index = 0; index < floorParams.Count; ++index)
     {
         DownloadUtility.DownloadQuestMaps(floorParams[index].GetQuestParam());
     }
 }
        private List <Unit> LoadRankMatchParty()
        {
            PlayerData  player   = MonoSingleton <GameManager> .Instance.Player;
            PartyData   party    = player.Partys[10];
            List <Unit> unitList = new List <Unit>();

            for (int index1 = 0; index1 < party.MAX_UNIT; ++index1)
            {
                long unitUniqueId = party.GetUnitUniqueID(index1);
                if (unitUniqueId != 0L)
                {
                    UnitData unitDataByUniqueId = player.FindUnitDataByUniqueID(unitUniqueId);
                    DownloadUtility.DownloadUnit(unitDataByUniqueId.UnitParam, (JobData[])null);
                    Unit unit   = new Unit();
                    int  index2 = player.GetVersusPlacement(PlayerPrefsUtility.RANKMATCH_ID_KEY + (object)index1);
                    if (index2 < 0 || index2 >= this.CurrentMap.PartyUnitSettings.Count)
                    {
                        index2 = 0;
                    }
                    unit.Setup(unitDataByUniqueId, this.CurrentMap.PartyUnitSettings[index2], (Unit.DropItem)null, (Unit.DropItem)null);
                    unitList.Add(unit);
                }
            }
            return(unitList);
        }
Esempio n. 5
0
 public static void DownloadQuestMaps(QuestParam quest)
 {
     for (int index1 = 0; index1 < quest.map.Count; ++index1)
     {
         if (!string.IsNullOrEmpty(quest.map[index1].mapSetName))
         {
             string src = AssetManager.LoadTextData(AssetPath.LocalMap(quest.map[index1].mapSetName));
             if (src != null)
             {
                 JSON_MapUnit jsonObject = JSONParser.parseJSONObject <JSON_MapUnit>(src);
                 if ((int)jsonObject.is_rand > 0)
                 {
                     if (jsonObject.deck != null)
                     {
                         for (int index2 = 0; index2 < jsonObject.deck.Length; ++index2)
                         {
                             DownloadUtility.DownloadUnit(new NPCSetting(jsonObject.deck[index2]));
                         }
                     }
                 }
                 else if (jsonObject.enemy != null)
                 {
                     for (int index2 = 0; index2 < jsonObject.enemy.Length; ++index2)
                     {
                         DownloadUtility.DownloadUnit(new NPCSetting(jsonObject.enemy[index2]));
                     }
                 }
             }
         }
     }
 }
Esempio n. 6
0
    public static void DownloadUnit(NPCSetting npc)
    {
        Unit unit = new Unit();

        unit.Setup((UnitData)null, (UnitSetting)npc, (Unit.DropItem)null, (Unit.DropItem)null);
        DownloadUtility.DownloadUnit(unit, false);
    }
 private void DownloadPlacementAsset(MultiTowerFloorParam param)
 {
     if (param.map == null)
     {
         return;
     }
     for (int index1 = 0; index1 < param.map.Count; ++index1)
     {
         if (!string.IsNullOrEmpty(param.map[index1].mapSetName))
         {
             string src = AssetManager.LoadTextData(AssetPath.LocalMap(param.map[index1].mapSetName));
             if (src != null)
             {
                 JSON_MapUnit jsonObject = JSONParser.parseJSONObject <JSON_MapUnit>(src);
                 if (jsonObject != null)
                 {
                     for (int index2 = 0; index2 < jsonObject.enemy.Length; ++index2)
                     {
                         DownloadUtility.LoadUnitIconMedium(jsonObject.enemy[index2].iname);
                     }
                 }
             }
         }
     }
 }
Esempio n. 8
0
        public string CollectInfoManual()
        {
            rooms.Clear();
            rooms = CollectUtility.GetCurrentRooms(Setting.Default.LiveType, Setting.Default.AreaID);
            ups   = GetUpsByRooms(rooms);
            foreach (var up in ups)
            {
                DownloadUtility.DownloadUpInfo(up);
            }

            return(string.Format("[{0}]: 第{1}次手动采集信息成功!共采集到{2}条信息。", DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"), ++collectCount, rooms.Count));
        }
        private List <Unit> LoadMultiTower()
        {
            List <MyPhoton.MyPlayer> roomPlayerList = PunMonoSingleton <MyPhoton> .Instance.GetRoomPlayerList();

            List <Unit> unitList = new List <Unit>();

            if (this.m_Players == null)
            {
                this.m_Players = new List <MyPhoton.MyPlayer>((IEnumerable <MyPhoton.MyPlayer>)roomPlayerList);
            }
            for (int index1 = 0; index1 < roomPlayerList.Count; ++index1)
            {
                JSON_MyPhotonPlayerParam photonPlayerParam = JSON_MyPhotonPlayerParam.Parse(roomPlayerList[index1].json);
                if (photonPlayerParam != null)
                {
                    for (int index2 = 0; index2 < photonPlayerParam.units.Length; ++index2)
                    {
                        if (photonPlayerParam.units[index2] != null && photonPlayerParam.units[index2].sub == 0)
                        {
                            int      index3   = photonPlayerParam.units[index2].place >= 0 ? photonPlayerParam.units[index2].place : index2;
                            UnitData unitdata = new UnitData();
                            if (unitdata != null)
                            {
                                unitdata.Deserialize(photonPlayerParam.units[index2].unitJson);
                                DownloadUtility.DownloadUnit(unitdata.UnitParam, (JobData[])null);
                                Unit unit = new Unit();
                                if (unit != null && unit.Setup(unitdata, this.CurrentMap.PartyUnitSettings[index3], (Unit.DropItem)null, (Unit.DropItem)null))
                                {
                                    unit.OwnerPlayerIndex = photonPlayerParam.playerIndex;
                                    unitList.Add(unit);
                                }
                            }
                        }
                    }
                }
            }
            int count = this.CurrentMap.NPCUnitSettings.Count;
            List <NPCSetting> npcUnitSettings = this.CurrentMap.NPCUnitSettings;

            for (int index = 0; index < count; ++index)
            {
                DownloadUtility.DownloadUnit(npcUnitSettings[index]);
                Unit unit = new Unit();
                if (unit.Setup((UnitData)null, (UnitSetting)npcUnitSettings[index], (Unit.DropItem)null, (Unit.DropItem)null))
                {
                    unitList.Add(unit);
                }
            }
            return(unitList);
        }
Esempio n. 10
0
        private async Task <IEnumerable <string> > CreateWordListFromHttp(IRsgDictionary dictionary, CancellationToken cancellationToken)
        {
            try
            {
                var wordListAsString = await DownloadUtility.DownloadFileAsStringAsync(dictionary.WordListOptions.Source, cancellationToken);

                var wordList = wordListAsString.Split(dictionary.WordListOptions.Delimiter, StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);

                return(wordList);
            }
            catch
            {
                return(Enumerable.Empty <string>());
            }
        }
Esempio n. 11
0
 public void CollectInfoAuto()
 {
     rooms = CollectUtility.GetCurrentRooms(Setting.Default.LiveType, Setting.Default.AreaID);
     if (File.Exists(Path.InfoFile))
     {
         ups = GetUpsByFile();
     }
     else
     {
         ups = GetUpsByRooms(rooms);
         foreach (var up in ups)
         {
             DownloadUtility.DownloadUpInfo(up);
         }
         ups = UpsOnline2Local(ups);
         SaveInfo();
     }
 }
Esempio n. 12
0
        private List <Unit> LoadVersusDraftParty()
        {
            List <Unit> unitList = new List <Unit>();

            for (int index1 = 0; index1 < VersusDraftList.VersusDraftPartyUnits.Count; ++index1)
            {
                UnitData versusDraftPartyUnit = VersusDraftList.VersusDraftPartyUnits[index1];
                DownloadUtility.DownloadUnit(versusDraftPartyUnit.UnitParam, (JobData[])null);
                int index2 = index1;
                if (index2 >= this.CurrentMap.PartyUnitSettings.Count)
                {
                    index2 = 0;
                }
                Unit unit = new Unit();
                unit.Setup(versusDraftPartyUnit, this.CurrentMap.PartyUnitSettings[index2], (Unit.DropItem)null, (Unit.DropItem)null);
                unitList.Add(unit);
            }
            return(unitList);
        }
Esempio n. 13
0
    private static void PrepareSkillAssets(CharacterDB.Job jobData, SkillParam skill)
    {
        if (skill == null || string.IsNullOrEmpty(skill.motion) && string.IsNullOrEmpty(skill.effect))
        {
            return;
        }
        SkillSequence sequence = SkillSequence.FindSequence(skill.motion);

        if (sequence == null)
        {
            return;
        }
        if (!string.IsNullOrEmpty(sequence.SkillAnimation.Name))
        {
            DownloadUtility.PrepareUnitAnimation(jobData, sequence.SkillAnimation.Name, false, (JobParam)null);
        }
        if (!string.IsNullOrEmpty(sequence.ChantAnimation.Name))
        {
            DownloadUtility.PrepareUnitAnimation(jobData, sequence.ChantAnimation.Name, false, (JobParam)null);
        }
        if (!string.IsNullOrEmpty(sequence.EndAnimation.Name))
        {
            DownloadUtility.PrepareUnitAnimation(jobData, sequence.EndAnimation.Name, false, (JobParam)null);
        }
        if (!string.IsNullOrEmpty(sequence.StartAnimation))
        {
            DownloadUtility.PrepareUnitAnimation(jobData, sequence.StartAnimation, false, (JobParam)null);
        }
        if (!string.IsNullOrEmpty(skill.effect))
        {
            AssetManager.PrepareAssets(AssetPath.SkillEffect(skill));
            if (!string.IsNullOrEmpty(skill.CollaboMainId))
            {
                AssetManager.PrepareAssets(AssetPath.SkillEffect(skill) + "_sub");
            }
        }
        if (string.IsNullOrEmpty(skill.SceneName))
        {
            return;
        }
        AssetManager.PrepareAssets(AssetPath.SkillScene(skill.SceneName));
    }
        public void Init(UnitGetParam rewards = null)
        {
            UnitGetParam unitGetParam = rewards == null ? GlobalVars.UnitGetReward : rewards;

            if (unitGetParam == null || unitGetParam.Params.Count <= 0)
            {
                this.mIsEnd = true;
            }
            else
            {
                bool     flag      = true;
                string[] unitIds   = new string[unitGetParam.Params.Count];
                bool[]   isConvert = new bool[unitGetParam.Params.Count];
                for (int index = 0; index < unitGetParam.Params.Count; ++index)
                {
                    if (unitGetParam.Params[index].ItemType != EItemType.Unit)
                    {
                        unitIds[index] = string.Empty;
                    }
                    else
                    {
                        if (flag)
                        {
                            flag = false;
                        }
                        unitIds[index]   = unitGetParam.Params[index].ItemId;
                        isConvert[index] = unitGetParam.Params[index].IsConvert;
                        if (!isConvert[index])
                        {
                            DownloadUtility.DownloadUnit(unitGetParam.Params[index].UnitParam, (JobData[])null);
                        }
                    }
                }
                this.mIsEnd = flag;
                if (this.mIsEnd)
                {
                    return;
                }
                this.StartCoroutine(this.SpawnEffectAsync(unitIds, isConvert));
            }
        }
Esempio n. 15
0
        private List <Unit> LoadVersusParty()
        {
            PlayerData  player   = MonoSingleton <GameManager> .Instance.Player;
            PartyData   party    = player.Partys[7];
            List <Unit> unitList = new List <Unit>();

            for (int index = 0; index < party.MAX_UNIT; ++index)
            {
                long unitUniqueId = party.GetUnitUniqueID(index);
                if (unitUniqueId != 0L)
                {
                    UnitData unitDataByUniqueId = player.FindUnitDataByUniqueID(unitUniqueId);
                    DownloadUtility.DownloadUnit(unitDataByUniqueId.UnitParam, (JobData[])null);
                    Unit unit            = new Unit();
                    int  versusPlacement = player.GetVersusPlacement(PlayerPrefsUtility.VERSUS_ID_KEY + (object)index);
                    unit.Setup(unitDataByUniqueId, this.CurrentMap.PartyUnitSettings[versusPlacement], (Unit.DropItem)null, (Unit.DropItem)null);
                    unitList.Add(unit);
                }
            }
            return(unitList);
        }
Esempio n. 16
0
 public static void PrepareUnitAssets(CharacterDB.Job jobData, JobParam param = null)
 {
     DownloadUtility.PrepareUnitModels(jobData);
     DownloadUtility.PrepareUnitAnimation(jobData, TacticsUnitController.ANIM_IDLE_FIELD, true, param);
     DownloadUtility.PrepareUnitAnimation(jobData, TacticsUnitController.ANIM_IDLE_DEMO, true, (JobParam)null);
     if (jobData.Movable)
     {
         DownloadUtility.PrepareUnitAnimation(jobData, TacticsUnitController.ANIM_RUN_FIELD, true, param);
         DownloadUtility.PrepareUnitAnimation(jobData, TacticsUnitController.ANIM_STEP, false, (JobParam)null);
         DownloadUtility.PrepareUnitAnimation(jobData, TacticsUnitController.ANIM_FALL_LOOP, false, (JobParam)null);
         DownloadUtility.PrepareUnitAnimation(jobData, TacticsUnitController.ANIM_FALL_END, false, (JobParam)null);
         DownloadUtility.PrepareUnitAnimation(jobData, TacticsUnitController.ANIM_CLIMBUP, false, (JobParam)null);
         DownloadUtility.PrepareUnitAnimation(jobData, TacticsUnitController.ANIM_GENKIDAMA, false, (JobParam)null);
     }
     DownloadUtility.PrepareUnitAnimation(jobData, TacticsUnitController.ANIM_PICKUP, false, (JobParam)null);
     DownloadUtility.PrepareUnitAnimation(jobData, "cmn_downstand0", false, (JobParam)null);
     DownloadUtility.PrepareUnitAnimation(jobData, "cmn_dodge0", false, (JobParam)null);
     DownloadUtility.PrepareUnitAnimation(jobData, "cmn_damage0", false, (JobParam)null);
     DownloadUtility.PrepareUnitAnimation(jobData, "cmn_damageair0", false, (JobParam)null);
     DownloadUtility.PrepareUnitAnimation(jobData, "cmn_down0", false, (JobParam)null);
     DownloadUtility.PrepareUnitAnimation(jobData, "itemuse0", false, (JobParam)null);
     DownloadUtility.PrepareUnitAnimation(jobData, "cmn_toss_lift0", false, (JobParam)null);
     DownloadUtility.PrepareUnitAnimation(jobData, "cmn_toss_throw0", false, (JobParam)null);
 }
Esempio n. 17
0
        internal static async Task <bool> HarvestBibleLinks(string languageCode, string editionCode)
        {
            var dir  = $"../../media/Audio/Bible/{languageCode}/{editionCode}";
            var file = $"{dir}/index.json";

            if (File.Exists(file))
            {
                return(true);
            }

            var harvestLink = $"https://www.jw.org/apps/TRGCHlZRQVNYVrXF?output=json&pub={editionCode}&fileformat=MP3%2CAAC&alllangs=0&langwritten={languageCode}&txtCMSLang=E";

            var jsonString = await DownloadUtility.GetAsync(harvestLink);

            dynamic model;

            try
            {
                model = JsonConvert.DeserializeObject <dynamic>(jsonString);
            }
            catch
            {
                return(false);
            }

            var bibleBooks = new Dictionary <int, BibleBook>();
            var bookFiles  = model.files[languageCode].MP3;

            foreach (var bookFile in bookFiles)
            {
                string url = bookFile.file.url;

                if (bookFile.track == 0 ||
                    url.EndsWith(".zip"))
                {
                    continue;
                }

                int bookNumber = bookFile.booknum;

                if (!bibleBooks.ContainsKey(bookNumber))
                {
                    bibleBooks[bookNumber] = new BibleBook()
                    {
                        BookNumber = bookFile.booknum,
                        Name       = bookFile.title.ToString().Split('-')[0].Trim()
                    };
                }

                bibleBooks[bookNumber].Chapters.Add(new BibleChapter()
                {
                    Chapter = $"Chapter {bookFile.track}",
                    Url     = bookFile.file.url
                });
            }



            if (bibleBooks.Count > 0)
            {
                if (!Directory.Exists(dir))
                {
                    Directory.CreateDirectory(dir);
                }

                File.WriteAllText(file, JsonConvert.SerializeObject(bibleBooks.Select(x => x.Value)));

                return(true);
            }

            return(false);
        }
Esempio n. 18
0
    public static void DownloadUnit(UnitParam unit, JobData[] jobs = null)
    {
        // ISSUE: object of a compiler-generated type is created
        // ISSUE: variable of a compiler-generated type
        DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1ED unitCAnonStorey1Ed = new DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1ED();
        // ISSUE: reference to a compiler-generated field
        unitCAnonStorey1Ed.unit = unit;
        // ISSUE: reference to a compiler-generated field
        if (unitCAnonStorey1Ed.unit == null)
        {
            return;
        }
        // ISSUE: reference to a compiler-generated field
        CharacterDB.Character character = CharacterDB.FindCharacter(unitCAnonStorey1Ed.unit.model);
        if (character == null)
        {
            return;
        }
        GameManager instance = MonoSingleton <GameManager> .Instance;

        // ISSUE: reference to a compiler-generated field
        if (unitCAnonStorey1Ed.unit.jobsets != null)
        {
            // ISSUE: reference to a compiler-generated field
            for (int index = 0; index < unitCAnonStorey1Ed.unit.jobsets.Length; ++index)
            {
                // ISSUE: reference to a compiler-generated field
                for (JobSetParam jobSetParam = instance.GetJobSetParam((string)unitCAnonStorey1Ed.unit.jobsets[index]); jobSetParam != null; jobSetParam = string.IsNullOrEmpty(jobSetParam.jobchange) ? (JobSetParam)null : instance.GetJobSetParam(jobSetParam.jobchange))
                {
                    JobParam jobParam = instance.GetJobParam(jobSetParam.job);
                    // ISSUE: reference to a compiler-generated field
                    SkillParam skillParam = string.IsNullOrEmpty(jobParam.atkskill[0]) ? instance.MasterParam.GetSkillParam(jobParam.atkskill[(int)unitCAnonStorey1Ed.unit.element]) : instance.MasterParam.GetSkillParam(jobParam.atkskill[0]);
                    if (skillParam != null)
                    {
                        SkillSequence sequence = SkillSequence.FindSequence(skillParam.motion);
                        if (sequence != null && !string.IsNullOrEmpty(sequence.SkillAnimation.Name) && index < character.Jobs.Count)
                        {
                            DownloadUtility.PrepareUnitAnimation(character.Jobs[index], sequence.SkillAnimation.Name, false, (JobParam)null);
                        }
                    }
                    DownloadUtility.DownloadJobEquipment(jobParam);
                    ArtifactParam artifactParam = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetArtifactParam(jobParam.artifact);

                    if (artifactParam != null)
                    {
                        DownloadUtility.DownloadArtifact(artifactParam);
                    }
                    int artifactSlotIndex = JobData.GetArtifactSlotIndex(ArtifactTypes.Arms);
                    if (jobs != null)
                    {
                        foreach (JobData job in jobs)
                        {
                            if (job != null)
                            {
                                // ISSUE: object of a compiler-generated type is created
                                // ISSUE: variable of a compiler-generated type
                                DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1EC unitCAnonStorey1Ec = new DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1EC();
                                List <ArtifactData> artifacts = MonoSingleton <GameManager> .GetInstanceDirect().Player.Artifacts;

                                // ISSUE: reference to a compiler-generated field
                                unitCAnonStorey1Ec.uniqId = job.Artifacts[artifactSlotIndex];
                                // ISSUE: reference to a compiler-generated method
                                ArtifactData artifactData = artifacts.Find(new Predicate <ArtifactData>(unitCAnonStorey1Ec.\u003C\u003Em__1B4));
                                if (artifactData != null)
                                {
                                    DownloadUtility.DownloadArtifact(artifactData.ArtifactParam);
                                }
                            }
                        }
                    }
                    else
                    {
                        DownloadUtility.DownloadArtifact(instance.MasterParam.GetArtifactParam(jobParam.artifact));
                    }
                    // ISSUE: reference to a compiler-generated field
                    AssetManager.PrepareAssets(AssetPath.UnitImage(unitCAnonStorey1Ed.unit, jobSetParam.job));
                    // ISSUE: reference to a compiler-generated field
                    AssetManager.PrepareAssets(AssetPath.UnitImage2(unitCAnonStorey1Ed.unit, jobSetParam.job));
                    // ISSUE: reference to a compiler-generated field
                    AssetManager.PrepareAssets(AssetPath.UnitIconSmall(unitCAnonStorey1Ed.unit, jobSetParam.job));
                    // ISSUE: reference to a compiler-generated field
                    AssetManager.PrepareAssets(AssetPath.UnitIconMedium(unitCAnonStorey1Ed.unit, jobSetParam.job));
                    // ISSUE: reference to a compiler-generated field
                    AssetManager.PrepareAssets(AssetPath.UnitEyeImage(unitCAnonStorey1Ed.unit, jobSetParam.job));
                }
            }
            // ISSUE: reference to a compiler-generated field
            JobSetParam[] changeJobSetParam = instance.GetClassChangeJobSetParam(unitCAnonStorey1Ed.unit.iname);
            if (changeJobSetParam != null && changeJobSetParam.Length > 0)
            {
                for (int index = 0; index < changeJobSetParam.Length; ++index)
                {
                    JobSetParam jobSetParam = changeJobSetParam[index];
                    if (jobSetParam != null)
                    {
                        JobParam      jobParam      = instance.GetJobParam(jobSetParam.job);
                        ArtifactParam artifactParam = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetArtifactParam(jobParam.artifact);

                        if (artifactParam != null)
                        {
                            DownloadUtility.DownloadArtifact(artifactParam);
                        }
                        // ISSUE: reference to a compiler-generated field
                        SkillParam skillParam = string.IsNullOrEmpty(jobParam.atkskill[0]) ? instance.MasterParam.GetSkillParam(jobParam.atkskill[(int)unitCAnonStorey1Ed.unit.element]) : instance.MasterParam.GetSkillParam(jobParam.atkskill[0]);
                        if (skillParam != null)
                        {
                            SkillSequence sequence = SkillSequence.FindSequence(skillParam.motion);
                            if (sequence != null && !string.IsNullOrEmpty(sequence.SkillAnimation.Name))
                            {
                                DownloadUtility.PrepareUnitAnimation(character.Jobs[index], sequence.SkillAnimation.Name, false, (JobParam)null);
                            }
                        }
                    }
                }
            }
        }
        for (int index = 0; index < character.Jobs.Count; ++index)
        {
            CharacterDB.Job job = character.Jobs[index];
            DownloadUtility.PrepareUnitModels(job);
            DownloadUtility.PrepareUnitAnimation(job, "unit_info_idle0", true, (JobParam)null);
            DownloadUtility.PrepareUnitAnimation(job, "unit_info_act0", true, (JobParam)null);
        }
        // ISSUE: reference to a compiler-generated field
        AssetManager.PrepareAssets("CHM/Home_" + unitCAnonStorey1Ed.unit.model + "_walk0");
        // ISSUE: reference to a compiler-generated field
        if (unitCAnonStorey1Ed.unit.skins != null)
        {
            List <ArtifactParam> artifacts = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.Artifacts;

            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1EE unitCAnonStorey1Ee = new DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1EE();
            // ISSUE: reference to a compiler-generated field
            unitCAnonStorey1Ee.\u003C\u003Ef__ref\u0024493 = unitCAnonStorey1Ed;
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            for (unitCAnonStorey1Ee.i = 0; unitCAnonStorey1Ee.i < unitCAnonStorey1Ed.unit.skins.Length; ++unitCAnonStorey1Ee.i)
            {
                // ISSUE: reference to a compiler-generated method
                ArtifactParam skin = artifacts.Find(new Predicate <ArtifactParam>(unitCAnonStorey1Ee.\u003C\u003Em__1B5));
                if (skin != null)
                {
                    // ISSUE: reference to a compiler-generated field
                    AssetManager.PrepareAssets(AssetPath.UnitSkinImage(unitCAnonStorey1Ed.unit, skin, (string)null));
                    // ISSUE: reference to a compiler-generated field
                    AssetManager.PrepareAssets(AssetPath.UnitSkinImage2(unitCAnonStorey1Ed.unit, skin, (string)null));
                    // ISSUE: reference to a compiler-generated field
                    AssetManager.PrepareAssets(AssetPath.UnitSkinIconSmall(unitCAnonStorey1Ed.unit, skin, (string)null));
                    // ISSUE: reference to a compiler-generated field
                    AssetManager.PrepareAssets(AssetPath.UnitSkinIconMedium(unitCAnonStorey1Ed.unit, skin, (string)null));
                    // ISSUE: reference to a compiler-generated field
                    AssetManager.PrepareAssets(AssetPath.UnitSkinEyeImage(unitCAnonStorey1Ed.unit, skin, (string)null));
                }
            }
        }
        // ISSUE: reference to a compiler-generated field
        DownloadUtility.PrepareUnitVoice(unitCAnonStorey1Ed.unit);
    }
Esempio n. 19
0
        private async static Task Harvest_Bible_Links()
        {
            var tasks = new List <Task>();

            var languageEditionsMapping = new Dictionary <string, List <string> >();
            var languageCodes           = new Dictionary <string, string>();

            foreach (var edition in bibleCodes)
            {
                var editionCode = edition.Key;

                var harvestLink = $"https://www.jw.org/apps/TRGCHlZRQVNYVrXF?booknum=0&output=json&pub={editionCode}&fileformat=MP3%2CAAC&alllangs=1&langwritten=E&txtCMSLang=E";

                var jsonString = await DownloadUtility.GetAsync(harvestLink);

                var model = JsonConvert.DeserializeObject <dynamic>(jsonString);

                foreach (var item in model.languages)
                {
                    var languageCode = item.Name;
                    var language     = model.languages[item.Name]["name"].Value;

                    bool result = false;
                    languageCodes[languageCode] = language;

                    try
                    {
                        result = await BibleHarvester.HarvestBibleLinks(languageCode, editionCode);
                    }
                    catch { }

                    if (result)
                    {
                        if (languageEditionsMapping.ContainsKey(languageCode))
                        {
                            languageEditionsMapping[languageCode].Add(edition.Key);
                        }
                        else
                        {
                            languageEditionsMapping[languageCode] = new List <string>(new[] { edition.Key });
                        }
                    }
                }
            }


            if (!Directory.Exists($"../../media/Audio/Bible"))
            {
                Directory.CreateDirectory($"../../media/Audio/Bible");
            }

            File.WriteAllText($"../../media/Audio/Bible/languages.json", JsonConvert.SerializeObject(
                                  languageEditionsMapping.Select(x => new
            {
                Key   = x.Key,
                Value = languageCodes[x.Key]
            }).ToList()));

            foreach (var languageEditionsMap in languageEditionsMapping)
            {
                if (!Directory.Exists($"../../media/Audio/Bible/{languageEditionsMap.Key}"))
                {
                    Directory.CreateDirectory($"../media/Audio/Bible/{languageEditionsMap.Key}");
                }

                File.WriteAllText($"../../media/Audio/Bible/{languageEditionsMap.Key}/editions.json", JsonConvert.SerializeObject(
                                      languageEditionsMap.Value.Select(x => new
                {
                    Key   = x,
                    Value = bibleCodes[x]
                })));
            }
        }
Esempio n. 20
0
        private async static Task Harvest_SingToJehovah_Vocal_Links()
        {
            var tasks = new List <Task>();

            var languageDiscs = new Dictionary <string, List <string> >();
            var languageCodes = new Dictionary <string, string>();
            var discCodes     = new Dictionary <string, string>();

            for (int i = 1; i <= 6; i++)
            {
                var currentDisc     = string.Format("Disc {0}", i);
                var currentDiscCode = $"iasnv{i}";
                discCodes.Add(currentDiscCode, currentDisc);

                var harvestLink = $"https://www.jw.org/apps/TRGCHlZRQVNYVrXF?booknum=0&output=json&pub={currentDiscCode}&fileformat=MP3%2CAAC&alllangs=1&langwritten=E&txtCMSLang=E";

                var jsonString = await DownloadUtility.GetAsync(harvestLink);

                var model = JsonConvert.DeserializeObject <dynamic>(jsonString);

                foreach (var item in model.languages)
                {
                    var languageCode = item.Name;
                    var language     = model.languages[item.Name]["name"].Value;

                    languageCodes[languageCode] = language;

                    await MusicHarverster.HarvestMusicLinks("iasnv", currentDiscCode, languageCode);

                    if (languageDiscs.ContainsKey(languageCode))
                    {
                        languageDiscs[languageCode].Add(currentDiscCode);
                    }
                    else
                    {
                        languageDiscs[languageCode] = new List <string>(new[] { currentDiscCode });
                    }
                }
            }

            if (!Directory.Exists($"../../media/Music/Vocals/iasnv"))
            {
                Directory.CreateDirectory($"../../media/music/Vocals/iasnv");
            }

            File.WriteAllText($"../../media/Music/Vocals/index.json", JsonConvert.SerializeObject(
                                  new [] { new { Key = "iasnv", Value = "Sing to Jehovah (2009)" } }));


            File.WriteAllText($"../../media/Music/Vocals/iasnv/index.json", JsonConvert.SerializeObject(
                                  languageDiscs.Select(x => new
            {
                Key   = x.Key,
                Value = languageCodes[x.Key]
            }).ToList()));

            foreach (var discs in languageDiscs)
            {
                if (!Directory.Exists($"../../media/Music/Vocals/iasnv/{discs.Key}"))
                {
                    Directory.CreateDirectory($"../../media/Music/Vocals/iasnv/{discs.Key}");
                }

                File.WriteAllText($"../../media/Music/Vocals/iasnv/{discs.Key}/index.json", JsonConvert.SerializeObject(
                                      discs.Value.Select(x => new
                {
                    Key   = x,
                    Value = discCodes[x]
                })));
            }
        }
Esempio n. 21
0
    public static void DownloadUnit(Unit unit, bool dlStatusEffects = false)
    {
        UnitParam     unitParam    = unit.UnitParam;
        JobParam      job          = unit.Job == null ? (JobParam)null : unit.Job.Param;
        ArtifactParam selectedSkin = unit.UnitData.GetSelectedSkin(-1);

        CharacterDB.Job characterData = DownloadUtility.GetCharacterData(unitParam, job, selectedSkin);
        if (characterData == null)
        {
            return;
        }
        DownloadUtility.PrepareUnitAssets(characterData, job);
        if (unit.Job != null)
        {
            DownloadUtility.PrepareJobAssets(unit.Job.Param);
        }
        string jobName = unit.UnitData.CurrentJob == null ? string.Empty : unit.UnitData.CurrentJob.JobID;

        AssetManager.PrepareAssets(AssetPath.UnitSkinIconSmall(unitParam, selectedSkin, jobName));
        AssetManager.PrepareAssets(AssetPath.UnitSkinIconMedium(unitParam, selectedSkin, jobName));
        AssetManager.PrepareAssets(AssetPath.UnitSkinEyeImage(unitParam, selectedSkin, jobName));
        SkillData attackSkill = unit.GetAttackSkill();

        if (attackSkill != null)
        {
            DownloadUtility.PrepareSkillAssets(characterData, attackSkill.SkillParam);
        }
        for (int index = unit.BattleSkills.Count - 1; index >= 0; --index)
        {
            DownloadUtility.PrepareSkillAssets(characterData, unit.BattleSkills[index].SkillParam);
        }
        for (int index = unit.BattleAbilitys.Count - 1; index >= 0; --index)
        {
            AbilityData battleAbility = unit.BattleAbilitys[index];
            if (battleAbility != null && battleAbility.Param != null)
            {
                AssetManager.PrepareAssets(AssetPath.AbilityIcon(battleAbility.Param));
            }
        }
        if (unit != null)
        {
            DownloadUtility.PrepareUnitVoice(unit.UnitParam);
        }
        if (dlStatusEffects)
        {
            for (int index = 0; index < BadStatusEffects.Effects.Count; ++index)
            {
                if (!string.IsNullOrEmpty(BadStatusEffects.Effects[index].AnimationName))
                {
                    DownloadUtility.PrepareUnitAnimation(characterData, BadStatusEffects.Effects[index].AnimationName, false, (JobParam)null);
                }
            }
        }
        JobData[] jobs = unit.UnitData.Jobs;
        int       artifactSlotIndex = JobData.GetArtifactSlotIndex(ArtifactTypes.Arms);

        if (jobs != null)
        {
            List <ArtifactParam> artifacts = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.Artifacts;

            foreach (JobData jobData in jobs)
            {
                if (jobData != null)
                {
                    // ISSUE: object of a compiler-generated type is created
                    // ISSUE: reference to a compiler-generated method
                    ArtifactParam artifalct = artifacts.Find(new Predicate <ArtifactParam>(new DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1F2()
                    {
                        uniqId = (string)null, uniqId = jobData.ArtifactDatas[artifactSlotIndex] == null ? jobData.Param.artifact : jobData.ArtifactDatas[artifactSlotIndex].ArtifactParam.iname
                    }.\u003C\u003Em__1B8));
                    if (artifalct != null)
                    {
                        DownloadUtility.DownloadArtifact(artifalct);
                    }
                }
            }
        }
        else
        {
            if (unit.Job == null)
            {
                return;
            }
            DownloadUtility.DownloadArtifact(MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetArtifactParam(unit.Job.Param.artifact));
        }
    }
        private void AddAssets()
        {
            GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            if (this.mQueue != null)
            {
                for (int index = 0; index < this.mQueue.Count; ++index)
                {
                    AssetDownloader.Add(this.mQueue[index].IDStr);
                }
                this.mQueue = (List <AssetList.Item>)null;
            }
            if (this.Download == (FlowNode_DownloadAssets.DownloadAssets) - 1)
            {
                return;
            }
            if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.Tutorial) != (FlowNode_DownloadAssets.DownloadAssets) 0 && instanceDirect.HasTutorialDLAssets)
            {
                instanceDirect.DownloadTutorialAssets();
            }
            if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.OwnUnits) != (FlowNode_DownloadAssets.DownloadAssets) 0)
            {
                PlayerData player = MonoSingleton <GameManager> .Instance.Player;
                if (player != null)
                {
                    for (int index = 0; index < player.Units.Count; ++index)
                    {
                        DownloadUtility.DownloadUnit(player.Units[index].UnitParam, player.Units[index].Jobs);
                        if (player.Units[index].ConceptCard != null)
                        {
                            DownloadUtility.DownloadConceptCard(player.Units[index].ConceptCard.Param);
                        }
                    }
                }
            }
            if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.AllUnits) != (FlowNode_DownloadAssets.DownloadAssets) 0)
            {
                UnitParam[] allUnits = MonoSingleton <GameManager> .Instance.MasterParam?.GetAllUnits();

                if (allUnits != null)
                {
                    for (int index = 0; index < allUnits.Length; ++index)
                    {
                        DownloadUtility.DownloadUnit(allUnits[index], (JobData[])null);
                    }
                }
            }
            if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.LoginBonus) != (FlowNode_DownloadAssets.DownloadAssets) 0)
            {
                Json_LoginBonusTable loginBonus28days = MonoSingleton <GameManager> .Instance.Player.LoginBonus28days;
                if (loginBonus28days != null && loginBonus28days.bonus_units != null && loginBonus28days.bonus_units.Length > 0)
                {
                    MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam;
                    foreach (string bonusUnit in loginBonus28days.bonus_units)
                    {
                        DownloadUtility.DownloadUnit(masterParam.GetUnitParam(bonusUnit), (JobData[])null);
                    }
                }
            }
            if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.Artifacts) != (FlowNode_DownloadAssets.DownloadAssets) 0)
            {
                List <ArtifactData> artifacts = MonoSingleton <GameManager> .Instance.Player.Artifacts;
                if (artifacts != null && artifacts.Count > 0)
                {
                    for (int index = 0; index < artifacts.Count; ++index)
                    {
                        DownloadUtility.DownloadArtifact(artifacts[index].ArtifactParam);
                    }
                }
            }
            if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.OwnConceptCard) != (FlowNode_DownloadAssets.DownloadAssets) 0)
            {
                List <ConceptCardData> conceptCards = MonoSingleton <GameManager> .Instance.Player.ConceptCards;
                if (conceptCards != null && conceptCards.Count > 0)
                {
                    for (int index = 0; index < conceptCards.Count; ++index)
                    {
                        DownloadUtility.DownloadConceptCard(conceptCards[index].Param);
                    }
                }
                List <ConceptCardMaterialData> cardExpMaterials = MonoSingleton <GameManager> .Instance.Player.ConceptCardExpMaterials;
                if (cardExpMaterials != null && cardExpMaterials.Count > 0)
                {
                    for (int index = 0; index < cardExpMaterials.Count; ++index)
                    {
                        DownloadUtility.DownloadConceptCard(cardExpMaterials[index].Param);
                    }
                }
                List <ConceptCardMaterialData> cardTrustMaterials = MonoSingleton <GameManager> .Instance.Player.ConceptCardTrustMaterials;
                if (cardTrustMaterials != null && cardTrustMaterials.Count > 0)
                {
                    for (int index = 0; index < cardTrustMaterials.Count; ++index)
                    {
                        DownloadUtility.DownloadConceptCard(cardTrustMaterials[index].Param);
                    }
                }
            }
            for (int index = 0; index < this.AssetPaths.Length; ++index)
            {
                if (!string.IsNullOrEmpty(this.AssetPaths[index]))
                {
                    AssetManager.PrepareAssets(this.AssetPaths[index]);
                }
            }
            if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)instanceDirect, (UnityEngine.Object)null))
            {
                return;
            }
            for (int index = 0; index < this.DownloadUnits.Length; ++index)
            {
                if (!string.IsNullOrEmpty(this.DownloadUnits[index]))
                {
                    UnitParam unitParam = instanceDirect.GetUnitParam(this.DownloadUnits[index]);
                    if (unitParam != null)
                    {
                        DownloadUtility.DownloadUnit(unitParam, (JobData[])null);
                    }
                }
            }
            for (int index = 0; index < this.DownloadQuests.Length; ++index)
            {
                if (!string.IsNullOrEmpty(this.DownloadQuests[index]))
                {
                    QuestParam quest = instanceDirect.FindQuest(this.DownloadQuests[index]);
                    if (quest == null)
                    {
                        DebugUtility.LogError("Can't download " + this.DownloadQuests[index]);
                    }
                    else
                    {
                        DownloadUtility.DownloadQuestBase(quest);
                    }
                }
            }
        }
Esempio n. 23
0
        private void AddAssets()
        {
            GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            if (this.mQueue != null)
            {
                for (int index = 0; index < this.mQueue.Count; ++index)
                {
                    AssetDownloader.Add(this.mQueue[index].IDStr);
                }
                this.mQueue = (List <AssetList.Item>)null;
            }
            if (this.Download == (FlowNode_DownloadAssets.DownloadAssets) - 1)
            {
                return;
            }
            if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.Tutorial) != (FlowNode_DownloadAssets.DownloadAssets) 0)
            {
                if ((instanceDirect.Player.TutorialFlags & 1L) != 0L)
                {
                    if (instanceDirect.HasTutorialDLAssets)
                    {
                        instanceDirect.DownloadTutorialAssets();
                    }
                    AssetManager.PrepareAssets("town001");
                }
                else if (BackgroundDownloader.Instance.IsEnabled)
                {
                    this.ProgressBar = false;
                    this.ActivateOutputLinks(10);
                    BackgroundDownloader.Instance.GetRequiredAssets(GameSettings.Instance.Tutorial_Steps[instanceDirect.TutorialStep]);
                }
                else
                {
                    if (instanceDirect.HasTutorialDLAssets)
                    {
                        instanceDirect.DownloadTutorialAssets();
                    }
                    if (!GameUtility.IsDebugBuild || GlobalVars.DebugIsPlayTutorial)
                    {
                        AssetManager.PrepareAssets("PortraitsM/urob");
                        AssetManager.PrepareAssets("op0002exit");
                        AssetManager.PrepareAssets("op0005exit");
                        AssetManager.PrepareAssets("op0006exit");
                    }
                    AssetManager.PrepareAssets("town001");
                    AssetManager.PrepareAssets("UI/QuestAssets");
                }
            }
            if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.OwnUnits) != (FlowNode_DownloadAssets.DownloadAssets) 0 && ((instanceDirect.Player.TutorialFlags & 1L) != 0L || !BackgroundDownloader.Instance.IsEnabled))
            {
                PlayerData player = MonoSingleton <GameManager> .Instance.Player;
                if (player != null)
                {
                    for (int index = 0; index < player.Units.Count; ++index)
                    {
                        DownloadUtility.DownloadUnit(player.Units[index].UnitParam, player.Units[index].Jobs);
                    }
                }
            }
            if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.AllUnits) != (FlowNode_DownloadAssets.DownloadAssets) 0)
            {
                MasterParam masterParam    = MonoSingleton <GameManager> .Instance.MasterParam;
                UnitParam[] unitParamArray = masterParam != null?masterParam.GetAllUnits() : (UnitParam[])null;

                if (unitParamArray != null)
                {
                    for (int index = 0; index < unitParamArray.Length; ++index)
                    {
                        DownloadUtility.DownloadUnit(unitParamArray[index], (JobData[])null);
                    }
                }
            }
            if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.LoginBonus) != (FlowNode_DownloadAssets.DownloadAssets) 0 && ((instanceDirect.Player.TutorialFlags & 1L) != 0L || !BackgroundDownloader.Instance.IsEnabled))
            {
                Json_LoginBonusTable loginBonus28days = MonoSingleton <GameManager> .Instance.Player.LoginBonus28days;
                if (loginBonus28days != null && loginBonus28days.bonus_units != null && loginBonus28days.bonus_units.Length > 0)
                {
                    MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam;
                    foreach (string bonusUnit in loginBonus28days.bonus_units)
                    {
                        DownloadUtility.DownloadUnit(masterParam.GetUnitParam(bonusUnit), (JobData[])null);
                    }
                }
            }
            if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.Artifacts) != (FlowNode_DownloadAssets.DownloadAssets) 0)
            {
                List <ArtifactData> artifacts = MonoSingleton <GameManager> .Instance.Player.Artifacts;
                if (artifacts != null && artifacts.Count > 0)
                {
                    for (int index = 0; index < artifacts.Count; ++index)
                    {
                        DownloadUtility.DownloadArtifact(artifacts[index].ArtifactParam);
                    }
                }
            }
            for (int index = 0; index < this.AssetPaths.Length; ++index)
            {
                if (!string.IsNullOrEmpty(this.AssetPaths[index]))
                {
                    AssetManager.PrepareAssets(this.AssetPaths[index]);
                }
            }
            if (!Object.op_Inequality((Object)instanceDirect, (Object)null))
            {
                return;
            }
            for (int index = 0; index < this.DownloadUnits.Length; ++index)
            {
                if (!string.IsNullOrEmpty(this.DownloadUnits[index]))
                {
                    UnitParam unitParam = instanceDirect.GetUnitParam(this.DownloadUnits[index]);
                    if (unitParam != null)
                    {
                        DownloadUtility.DownloadUnit(unitParam, (JobData[])null);
                    }
                }
            }
            for (int index = 0; index < this.DownloadQuests.Length; ++index)
            {
                if (!string.IsNullOrEmpty(this.DownloadQuests[index]))
                {
                    QuestParam quest = instanceDirect.FindQuest(this.DownloadQuests[index]);
                    if (quest == null)
                    {
                        DebugUtility.LogError("Can't download " + this.DownloadQuests[index]);
                    }
                    else
                    {
                        DownloadUtility.DownloadQuestBase(quest);
                    }
                }
            }
        }
Esempio n. 24
0
 public void GetRequiredAssets(string tutorialStep)
 {
     if (tutorialStep == "tutorial_start")
     {
         AssetManager.PrepareAssets("PortraitsM/urob");
         if ((long)GlobalVars.BtlID == 0L)
         {
             AssetManager.PrepareAssets("tutorial_start");
         }
         else
         {
             AssetManager.PrepareAssets("UI/QuestAssets");
             AssetManager.PrepareAssets("SkillSplash/splash_base");
             AssetManager.PrepareAssets("SGDevelopment/Tutorial/Tutorial_Guidance");
             AssetManager.PrepareAssets("CHM/F_cmn_jumploop0");
             AssetManager.PrepareAssets("CHM/M_cmn_jumploop0");
             AssetManager.PrepareAssets("CHM/MM_cmn_jumploop0");
             GameManager instance = MonoSingleton <GameManager> .Instance;
             if (instance.HasTutorialDLAssets)
             {
                 instance.DownloadTutorialAssetsByFolder("Effects/");
             }
             if ((long)GlobalVars.BtlID != 200L)
             {
                 return;
             }
             AssetManager.PrepareAssets("StreamingAssets/BGM_0028.acb");
             AssetManager.PrepareAssets("StreamingAssets/BGM_0028.awb");
         }
     }
     else if (tutorialStep == "op0002exit")
     {
         GameManager instance = MonoSingleton <GameManager> .Instance;
         AssetManager.PrepareAssets("op0002exit");
         AssetManager.PrepareAssets("StreamingAssets/tut001b.acb");
         AssetManager.PrepareAssets("StreamingAssets/tut001b.awb");
         AssetManager.PrepareAssets("StreamingAssets/BGM_0002.acb");
         AssetManager.PrepareAssets("StreamingAssets/BGM_0002.awb");
         AssetManager.PrepareAssets("CHM/F_cmn_jumploop0");
         AssetManager.PrepareAssets("CHM/M_cmn_jumploop0");
     }
     else if (tutorialStep == "op0005exit")
     {
         AssetManager.PrepareAssets("op0005exit");
         AssetManager.PrepareAssets("StreamingAssets/0_6b_2d.acb");
         AssetManager.PrepareAssets("StreamingAssets/0_6b_2d.awb");
         AssetManager.PrepareAssets("StreamingAssets/BGM_0002.acb");
         AssetManager.PrepareAssets("StreamingAssets/BGM_0002.awb");
         AssetManager.PrepareAssets("StreamingAssets/BGM_0000.acb");
         AssetManager.PrepareAssets("StreamingAssets/BGM_0000.awb");
         AssetManager.PrepareAssets("StreamingAssets/VO_uroboros.acb");
         AssetManager.PrepareAssets("StreamingAssets/VO_uroboros.awb");
         AssetManager.PrepareAssets("UI/QuestAssets");
         AssetManager.PrepareAssets("SkillSplash/splash_base");
         AssetManager.PrepareAssets("SGDevelopment/Tutorial/Tutorial_Guidance");
         AssetManager.PrepareAssets("CHM/F_cmn_jumploop0");
         AssetManager.PrepareAssets("CHM/M_cmn_jumploop0");
         AssetManager.PrepareAssets("CHM/MM_cmn_jumploop0");
         PlayerData player = MonoSingleton <GameManager> .Instance.Player;
         if (player != null)
         {
             for (int index = 0; index < player.Units.Count; ++index)
             {
                 DownloadUtility.DownloadUnit(player.Units[index].UnitParam, player.Units[index].Jobs);
             }
         }
         GameManager instance = MonoSingleton <GameManager> .Instance;
         if (!instance.HasTutorialDLAssets)
         {
             return;
         }
         instance.DownloadTutorialAssetsByFolder("UI/");
         instance.DownloadTutorialAssetsByFolder("ItemIcon/");
         instance.DownloadTutorialAssetsByFolder("Effects/");
         instance.DownloadTutorialAssetsByFolder("JIN_");
     }
     else
     {
         if (!(tutorialStep == "op0006exit"))
         {
             return;
         }
         AssetManager.PrepareAssets("op0006exit");
         AssetManager.PrepareAssets("StreamingAssets/0_8_2d.acb");
         AssetManager.PrepareAssets("StreamingAssets/0_8_2d.awb");
     }
 }