Table of Contents

Class M2ChunkedFileLegion

Namespace
WoWLib.Formats.M2.Chunked
Assembly
WoWLib.dll

The chunked .m2 shell for one Legion+ client version: the MD21 image blob plus the satellite chunks. An untouched shell rewrites byte-for-byte. See https://wowdev.wiki/M2#Chunks.

public class M2ChunkedFileLegion : M2ChunkedFile, IDisposable
Inheritance
M2ChunkedFileLegion
Implements
Inherited Members

Constructors

M2ChunkedFileLegion()

public M2ChunkedFileLegion()

M2ChunkedFileLegion(M2ChunkedFileLegion)

Copy-construct: a deep copy of other (the C++ copy constructor).

public M2ChunkedFileLegion(M2ChunkedFileLegion other)

Parameters

other M2ChunkedFileLegion

Properties

Afra

AFRA (Dragonflight+); not yet observed, kept verbatim.

public ChunkBlob Afra { get; set; }

Property Value

ChunkBlob

AlphaAttenuation

Distance-based model alpha attenuation coefficients (NERF); kept verbatim.

public ChunkBlob AlphaAttenuation { get; set; }

Property Value

ChunkBlob

AnimFdids

.anim FileDataIDs (AFID), one per external (animation, variation) pair.

public Vector<AnimFileEntry> AnimFdids { get; }

Property Value

Vector<AnimFileEntry>

BoneFdids

.bone FileDataIDs (BFID), one per FacePose variant.

public Vector<uint> BoneFdids { get; }

Property Value

Vector<uint>

Dboc

DBOC; undocumented (16 or 32 bytes seen), kept verbatim.

public ChunkBlob Dboc { get; set; }

Property Value

ChunkBlob

Dpiv

DPIV; undocumented, kept verbatim.

public ChunkBlob Dpiv { get; set; }

Property Value

ChunkBlob

EdgeFade

Edge fade data (EDGF), applied to batches with flags2 0x8; kept verbatim.

public ChunkBlob EdgeFade { get; set; }

Property Value

ChunkBlob

ExtendedParticles

Extended particle parameters (EXPT), one per emitter; superseded by EXP2 when both exist.

public Vector<M2ExtendedParticleSimple> ExtendedParticles { get; }

Property Value

Vector<M2ExtendedParticleSimple>

ExtendedParticles2

Extended particle parameters with alpha-cutoff ramps (EXP2), one per emitter.

public Exp2Data ExtendedParticles2 { get; set; }

Property Value

Exp2Data

GeometryParticleModelFdids

Geometry particle model FileDataIDs (GPID), one per emitter.

public Vector<uint> GeometryParticleModelFdids { get; }

Property Value

Vector<uint>

HousingCollision

Player-housing collision mesh (PCOL); offset-based layout, kept verbatim.

public ChunkBlob HousingCollision { get; set; }

Property Value

ChunkBlob

InlinePhys

Inline physics (PFDC): a whole .phys image plus alignment padding, kept verbatim (structured PHYS is a follow-up milestone). wowdev dates it to the 9.0.1 alpha, but 8.3.7 shipped mid-alpha with the backport — 31 item M2s in the fleet client carry it.

public ChunkBlob InlinePhys { get; set; }

Property Value

ChunkBlob

LightDetails

Per-light detail overrides (DETL), kept verbatim: real 9.x files carry 16-byte records where wowdev documents 12 (see M2LightDetail for the known half).

public ChunkBlob LightDetails { get; set; }

Property Value

ChunkBlob

LodData

LOD data (LDV1); layout partially known, kept verbatim.

public ChunkBlob LodData { get; set; }

Property Value

ChunkBlob

ParentEventData

Parent event data (PEDC); offset-based track payload kept verbatim.

public ChunkBlob ParentEventData { get; set; }

Property Value

ChunkBlob

ParentSequenceBlacklist

Parent-model sequence blacklist (PABC).

public PabcData ParentSequenceBlacklist { get; set; }

Property Value

PabcData

ParentSequenceBounds

Parent sequence bounds (PSBC).

public PsbcData ParentSequenceBounds { get; set; }

Property Value

PsbcData

ParentTextureWeights

Parent texture weights (PADC); offset-based track payload kept verbatim.

public ChunkBlob ParentTextureWeights { get; set; }

Property Value

ChunkBlob

ParticleGeosetData

Particle geoset data (PGD1), one geoset per emitter (wowdev dates it to the 1.13.2.30172 classic build — the 8.2.0 retail era).

public Pgd1Data ParticleGeosetData { get; set; }

Property Value

Pgd1Data

PhysFdid

.phys FileDataID (PFID); 0 or 1 entries.

public Vector<uint> PhysFdid { get; }

Property Value

Vector<uint>

RecursiveParticleModelFdids

Recursive (child-emitter) particle model FileDataIDs (RPID), one per emitter.

public Vector<uint> RecursiveParticleModelFdids { get; }

Property Value

Vector<uint>

SkeletonFdid

.skel FileDataID (SKID); 0 or 1 entries.

public Vector<uint> SkeletonFdid { get; }

Property Value

Vector<uint>

SkinFdids

.skin FileDataIDs (SFID): num_skin_profiles view entries, then the LOD-band skins.

public Vector<uint> SkinFdids { get; }

Property Value

Vector<uint>

TextureAc

Texture transform flags (TXAC), one 2-byte record per material then per particle emitter.

public Vector<FixedArray<byte>> TextureAc { get; }

Property Value

Vector<FixedArray<byte>>

TextureFdids

Texture FileDataIDs (TXID), replacing the in-image texture filenames, one per texture.

public Vector<uint> TextureFdids { get; }

Property Value

Vector<uint>

WaterfallV1

Waterfall render path v1 (WFV1); undocumented, kept verbatim.

public ChunkBlob WaterfallV1 { get; set; }

Property Value

ChunkBlob

WaterfallV2

Waterfall render path v2 (WFV2); undocumented, kept verbatim.

public ChunkBlob WaterfallV2 { get; set; }

Property Value

ChunkBlob

WaterfallV3

Waterfall render path v3 (WFV3); shader parameter block, kept verbatim.

public ChunkBlob WaterfallV3 { get; set; }

Property Value

ChunkBlob

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()

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

data byte[]

the file bytes

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

Operators

operator ==(M2ChunkedFileLegion?, M2ChunkedFileLegion?)

public static bool operator ==(M2ChunkedFileLegion? l, M2ChunkedFileLegion? r)

Parameters

l M2ChunkedFileLegion
r M2ChunkedFileLegion

Returns

bool

operator !=(M2ChunkedFileLegion?, M2ChunkedFileLegion?)

public static bool operator !=(M2ChunkedFileLegion? l, M2ChunkedFileLegion? r)

Parameters

l M2ChunkedFileLegion
r M2ChunkedFileLegion

Returns

bool