예제 #1
0
        protected override void PostSetup()
        {
            base.PostSetup();
            this.LoadUnitAnimationAsync("idle", "unit_info_idle0", true, false);
            this.LoadUnitAnimationAsync("action", "unit_info_act0", true, false);
            JobData       jobData  = Array.Find <JobData>(this.GUnitData.Jobs, (Predicate <JobData>)(p => p.JobID == this.mCurrentJobID));
            SkillSequence sequence = SkillSequence.FindSequence(jobData == null ? this.GUnitData.CurrentJob.GetAttackSkill().SkillParam.motion : jobData.GetAttackSkill().SkillParam.motion);

            if (sequence == null)
            {
                return;
            }
            if (sequence.SkillAnimation.Name.Length > 0)
            {
                this.LoadUnitAnimationAsync("B_SKL", sequence.SkillAnimation.Name, false, false);
            }
            this.StartCoroutine(this.LoadThread());
        }
예제 #2
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));
    }
예제 #3
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);
    }