public PreviewAnimatedSkeleton(SkeletonSection skeleton) : base() { this.skeleton = skeleton; string skeletonFilePath = skeleton.GetParent<DatDigger.Sections.PwibSection>().FilePath; skeletonFilePath = System.IO.Path.GetDirectoryName(skeletonFilePath); skeletonFilePath = skeletonFilePath.Substring(0, skeletonFilePath.LastIndexOfAny(new char[] { '\\', '/' })); string animationFilePath = System.IO.Path.Combine(skeletonFilePath, "act/emp_emp/bid/base/0000"); if (!System.IO.File.Exists(animationFilePath)) { throw new System.InvalidOperationException("File " + animationFilePath + " does not exist"); } var animFile = DatDigger.Sections.SectionLoader.OpenFile(animationFilePath); animationData = animFile.FindChild<MtbSection>(x => x.ResourceId == "cbnm_id0"); if (animationData == null) { throw new System.InvalidOperationException("Cannot find cbnm_id0"); } }
public PreviewSkeleton(SkeletonSection skeleton) : base() { this.skeleton = skeleton; }