public static SkillSequence Create() { SkillSequence skill_sequence = new SkillSequence(null); return(skill_sequence); }
public static SkillSequence FindSequence(string name) { SkillSequence.LoadSequences(); int hashCode = name.GetHashCode(); for (int index = 0; index < SkillSequence.mSequences.Count; ++index) { if (SkillSequence.mSequences[index].NameHash == hashCode && SkillSequence.mSequences[index].Name == name) { return(SkillSequence.mSequences[index]); } } return((SkillSequence)null); }
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()); }
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)); }
private static void LoadSequences() { if (!Application.get_isPlaying() || SkillSequence.mSequences != null) { return; } SkillSequence.mSequences = new List <SkillSequence>(512); string s = AssetManager.LoadTextData("SkillSeq/SKILLSEQ"); if (s == null) { return; } using (StringReader stringReader = new StringReader(s)) { string[] array = stringReader.ReadLine().Split('\t'); int index1 = Array.IndexOf <string>(array, "ID"); int index2 = Array.IndexOf <string>(array, "CHANT"); int index3 = Array.IndexOf <string>(array, "CHANTCAM"); int index4 = Array.IndexOf <string>(array, "SKILL"); int index5 = Array.IndexOf <string>(array, "SKILLCAM"); int index6 = Array.IndexOf <string>(array, "END"); int index7 = Array.IndexOf <string>(array, "ENDCAM"); int index8 = Array.IndexOf <string>(array, "CHANTCAMCLIP"); int index9 = Array.IndexOf <string>(array, "INTERPCHANTCAM"); int index10 = Array.IndexOf <string>(array, "SKILLCAMCLIP"); int index11 = Array.IndexOf <string>(array, "INTERPSKILLCAM"); int index12 = Array.IndexOf <string>(array, "ENDCAMCLIP"); int index13 = Array.IndexOf <string>(array, "ENDLENGTH"); int index14 = Array.IndexOf <string>(array, "HITDELAY"); int index15 = Array.IndexOf <string>(array, "TYPE"); int index16 = Array.IndexOf <string>(array, "TURNTYPE"); int index17 = Array.IndexOf <string>(array, "PREPARE"); int index18 = Array.IndexOf <string>(array, "MAPCAMTYPE"); int index19 = Array.IndexOf <string>(array, "NOTMIRROR"); string str; while ((str = stringReader.ReadLine()) != null) { string[] strArray = str.Split('\t'); if (!string.IsNullOrEmpty(strArray[0]) && strArray.Length > 1) { SkillSequence skillSequence = new SkillSequence(); if (index1 >= 0) { skillSequence.Name = strArray[index1]; skillSequence.NameHash = skillSequence.Name.GetHashCode(); } if (index2 >= 0) { skillSequence.ChantAnimation.Name = strArray[index2]; } if (index3 >= 0) { skillSequence.ChantAnimation.UseCamera = SkillSequence.ParseBool(strArray[index3]); } if (index4 >= 0) { skillSequence.SkillAnimation.Name = strArray[index4]; } if (index5 >= 0) { skillSequence.SkillAnimation.UseCamera = SkillSequence.ParseBool(strArray[index5]); } if (index6 >= 0) { skillSequence.EndAnimation.Name = strArray[index6]; } if (index7 >= 0) { skillSequence.EndAnimation.UseCamera = SkillSequence.ParseBool(strArray[index7]); } if (index8 >= 0) { skillSequence.ChantCameraClipName = strArray[index8]; } if (index9 >= 0) { skillSequence.InterpChantCamera = SkillSequence.ParseBool(strArray[index9]); } if (index10 >= 0) { skillSequence.MainCameraClipName = strArray[index10]; } if (index11 >= 0) { skillSequence.InterpSkillCamera = SkillSequence.ParseBool(strArray[index11]); } if (index12 >= 0) { skillSequence.EndCameraClipName = strArray[index12]; } if (index13 >= 0) { skillSequence.EndLength = SkillSequence.ParseFloat(strArray[index13]); } if (index14 >= 0) { skillSequence.ProjectileHitDelay = SkillSequence.ParseFloat(strArray[index14]); } if (index15 >= 0) { skillSequence.SkillType = (SkillSequence.SkillTypes)Enum.Parse(typeof(SkillSequence.SkillTypes), strArray[index15]); } if (index16 >= 0) { skillSequence.SkillTurnType = (SkillSequence.SkillTurnTypes)Enum.Parse(typeof(SkillSequence.SkillTurnTypes), strArray[index16]); } if (index18 >= 0) { skillSequence.MapCameraType = (SkillSequence.MapCameraTypes)Enum.Parse(typeof(SkillSequence.MapCameraTypes), !(strArray[index18] == string.Empty) ? strArray[index18] : "0"); } if (index19 >= 0) { skillSequence.NotMirror = SkillSequence.ParseBool(strArray[index19]); } if (index17 >= 0) { skillSequence.StartAnimation = strArray[index17]; } SkillSequence.mSequences.Add(skillSequence); } } } }
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); }