Class SkeletonLegionPlus
A shared model skeleton (.skel, Legion 7.3+): bones, attachments and sequences for skel-based models, shareable between models via the parent link. See https://wowdev.wiki/M2/.skel.
public class SkeletonLegionPlus : Skeleton, IDisposable
- Inheritance
-
SkeletonLegionPlus
- Implements
- Inherited Members
Constructors
SkeletonLegionPlus()
public SkeletonLegionPlus()
SkeletonLegionPlus(SkeletonLegionPlus)
Copy-construct: a deep copy of other (the C++ copy constructor).
public SkeletonLegionPlus(SkeletonLegionPlus other)
Parameters
otherSkeletonLegionPlus
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()
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[]the file bytes
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
fsFileSystemthe filesystem gateway
keyFileKeythe .skel identity (path and/or FileDataID)
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
every violated contract, in member order
Write()
Serialize this entity.
public byte[] Write()
Returns
- byte[]
the file bytes
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
fsFileSystemthe filesystem gateway
keyFileKeythe .skel identity; must resolve to a path