Class Skeleton
A shared model skeleton (.skel, Legion 7.3+), abstract over the client version. Construct a concrete version with Skeleton.for_version(expansion); the per-version Skeleton* classes are subclasses. See https://wowdev.wiki/M2/.skel.
public class Skeleton : FileEntity, IDisposable
- Inheritance
-
Skeleton
- Implements
- Derived
- Inherited Members
Constructors
Skeleton()
public Skeleton()
Skeleton(Skeleton)
Copy-construct: a deep copy of other (the C++ copy constructor).
public Skeleton(Skeleton other)
Parameters
otherSkeleton
Properties
AnimFdids
.anim FileDataIDs (AFID); absent on child skeletons, which share the parent's (see parent_anim_fdids).
public Vector<AnimFileEntry> AnimFdids { get; }
Property Value
AttachmentBlock
The attachments (decoded SKA1).
public SkelAttachmentsLegionPlus AttachmentBlock { get; set; }
Property Value
BoneBlock
The bones (decoded SKB1).
public SkelBonesLegionPlus BoneBlock { get; set; }
Property Value
BoneFdids
.bone FileDataIDs (BFID); absent on child skeletons, which share the parent's (see parent_bone_fdids).
public Vector<uint> BoneFdids { get; }
Property Value
HeaderBlock
The skeleton identity (SKL1).
public SkelHeaderLegionPlus HeaderBlock { get; set; }
Property Value
ParentAnimFdids
The parent's AFID entries when this skeleton is a child (filled by read(fs, key); not part of this file).
public Vector<AnimFileEntry> ParentAnimFdids { get; }
Property Value
ParentBoneFdids
The parent's BFID entries when this skeleton is a child (filled by read(fs, key); not part of this file).
public Vector<uint> ParentBoneFdids { get; }
Property Value
ParentLink
The parent-skeleton link (SKPD); 0 or 1 entries.
public Vector<SkelParentData> ParentLink { get; }
Property Value
SequenceBlock
The sequence tables (SKS1).
public SkelSequencesLegionPlus SequenceBlock { get; set; }
Property Value
Methods
Dispose()
Release the native object now. Optional: the finalizer releases it on
collection anyway - dispose (or using) when you want native memory back
promptly.
public override void Dispose()
EffectiveAnimFdids()
The effective AFID entries: own when present, else the parent's.
public Vector<AnimFileEntry> EffectiveAnimFdids()
Returns
EffectiveBoneFdids()
The effective BFID entries: own when present, else the parent's.
public uint[] EffectiveBoneFdids()
Returns
- uint[]
EnsureValid()
Validate and raise on the first error instead of returning a report — the assert-style face of validate().
public void EnsureValid()
ForVersion(ClientVersion)
A fresh Skeleton for an exact client version — the only axis that can name a Classic client, whose files follow the engine its build was cut on rather than its 1.15 / 4.4 version number.
public static Skeleton ForVersion(ClientVersion version)
Parameters
versionClientVersion
Returns
ForVersion(Expansion)
A fresh Skeleton for the given era, as the family base — the dynamic twin of the typed Era factories.
public static Skeleton ForVersion(Expansion era)
Parameters
eraExpansion
Returns
Read(byte[])
Deserialize file bytes into this entity, replacing its contents. Unmodeled chunks are preserved so an unmodified entity rewrites byte-for-byte.
public void Read(byte[] data)
Parameters
databyte[]
Read(FileSystem, FileKey)
Load the skeleton: chunks, the parent's shared AFID/BFID and the .anim-resolved bone/attachment data.
public void Read(FileSystem fs, FileKey key)
Parameters
fsFileSystemkeyFileKey
Validate()
Check the logical integrity contracts this file must satisfy to LOAD in the client — companion-chunk counts, index ranges, flag/presence coherence — which write() deliberately never enforces. Call it before writing when you want to know the result will load. A file read from a client and left unmodified reports no errors; warnings mark states real client files ship.
public ValidationReport Validate()
Returns
Write()
Serialize this entity.
public byte[] Write()
Returns
- byte[]
Write(FileSystem, FileKey)
Serialize the skeleton and its .anim files (AFSA/AFSB sections) through the project overlay. A paired model's AFM2 section is restored by the owning M2's write.
public void Write(FileSystem fs, FileKey key)
Parameters
fsFileSystemkeyFileKey