Table of Contents

Class Skeleton

Namespace
WoWLib.Formats.M2
Assembly
WoWLib.dll

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

other Skeleton

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

Vector<AnimFileEntry>

AttachmentBlock

The attachments (decoded SKA1).

public SkelAttachmentsLegionPlus AttachmentBlock { get; set; }

Property Value

SkelAttachmentsLegionPlus

BoneBlock

The bones (decoded SKB1).

public SkelBonesLegionPlus BoneBlock { get; set; }

Property Value

SkelBonesLegionPlus

BoneFdids

.bone FileDataIDs (BFID); absent on child skeletons, which share the parent's (see parent_bone_fdids).

public Vector<uint> BoneFdids { get; }

Property Value

Vector<uint>

HeaderBlock

The skeleton identity (SKL1).

public SkelHeaderLegionPlus HeaderBlock { get; set; }

Property Value

SkelHeaderLegionPlus

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

Vector<AnimFileEntry>

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

Vector<uint>

The parent-skeleton link (SKPD); 0 or 1 entries.

public Vector<SkelParentData> ParentLink { get; }

Property Value

Vector<SkelParentData>

SequenceBlock

The sequence tables (SKS1).

public SkelSequencesLegionPlus SequenceBlock { get; set; }

Property Value

SkelSequencesLegionPlus

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

Vector<AnimFileEntry>

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

version ClientVersion

Returns

Skeleton

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

era Expansion

Returns

Skeleton

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

data byte[]

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

fs FileSystem
key FileKey

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

ValidationReport

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

fs FileSystem
key FileKey