Table of Contents

Class WDLShadowlandsToDragonflight

Namespace
WoWLib.Formats.WDL
Assembly
WoWLib.dll

A map's low-resolution heightmap file for one client version: the 64x64 tile offset table, one 17x17+16x16 int16 heightmap (and hole mask) per present tile, the low-resolution object placements of the era, and the Shadowlands+ sky scenes. Tile chunks pair by ordinal — the i-th heightmap belongs to the i-th nonzero tileOffsets slot (row-major); the offsets themselves are recomputed on every write, so only the nonzero pattern is authored data. An instance read from a client file rewrites byte-for-byte until modified. See https://wowdev.wiki/WDL.

public class WDLShadowlandsToDragonflight : WDL, IDisposable
Inheritance
WDLShadowlandsToDragonflight
Implements
Inherited Members

Constructors

WDLShadowlandsToDragonflight()

public WDLShadowlandsToDragonflight()

WDLShadowlandsToDragonflight(WDLShadowlandsToDragonflight)

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

public WDLShadowlandsToDragonflight(WDLShadowlandsToDragonflight other)

Parameters

other WDLShadowlandsToDragonflight

Properties

Heightmaps

The per-tile heightmaps (MARE), one per nonzero tileOffsets slot, in row-major slot order.

public Vector<TileHeights> Heightmaps { get; }

Property Value

Vector<TileHeights>

Holes

Per-tile hole masks (MAHO, TBC+): the i-th mask belongs to the i-th heightmap. Blizzard writes one per tile even when all zero; hole masks are all-or-nothing — leave the list empty or give every heightmap its mask. (wowdev.wiki dates MAHO to WotLK, but vanilla WDLs carry none and every 2.4.3 WDL pairs one MAHO per MARE — so it debuts in TBC.)

public Vector<TileHoles> Holes { get; }

Property Value

Vector<TileHoles>

LodDoodadExtents

Visibility extents for the M2 placements (MLDX, Legion+); same count and order as lod_doodads.

public Vector<LodExtent> LodDoodadExtents { get; }

Property Value

Vector<LodExtent>

LodDoodadFades

Fade-distance ranges for the M2 placements (MLDF, BfA); same count and order as lod_doodads. Undocumented on wowdev; the layout and the BfA (not Shadowlands) debut are survey findings across every 8.3.7 WDL carrying the chunk.

public Vector<LodDoodadFade> LodDoodadFades { get; }

Property Value

Vector<LodDoodadFade>

LodDoodads

Low-resolution M2 placements (MLDD, Legion+), drawn instead of the far-away real models; name_id is always a FileDataID here.

public Vector<SmDoodadDef> LodDoodads { get; }

Property Value

Vector<SmDoodadDef>

LodMapObjectExtents

Visibility extents for the WMO placements (MLMX, Legion+); same count and order as lod_map_objects.

public Vector<LodExtent> LodMapObjectExtents { get; }

Property Value

Vector<LodExtent>

LodMapObjects

Low-resolution WMO placements (MLMD, Legion+); sorted by their extent radius, largest first, in shipped files.

public Vector<LodMapObjDef> LodMapObjects { get; }

Property Value

Vector<LodMapObjDef>

Mldb

MLDB (9.x+, undocumented); preserved opaque.

public ChunkBlob Mldb { get; set; }

Property Value

ChunkBlob

Mldl

MLDL (9.x+): per-lod_doodads values, engaged by placement flag 0x8 (as the ADT chunk of the same name).

public Vector<uint> Mldl { get; }

Property Value

Vector<uint>

Mlmb

One byte per WMO placement (MLMB, BfA; same count and order as lod_map_objects — the ADT twin pairs with MODF in _obj0 and MLMD in _obj1). Semantics unknown; the 8.3.7 fleet survey (1300+ instances) shows an enum-like value set (0x19/0x20/0x26/0x33/0x40/0x46/ 0x80) that clusters per map, varies per instance of the same asset, and does not correlate with the placement radius; 0x80 co-occurs with other values on the same asset like an override state.

public Vector<byte> Mlmb { get; }

Property Value

Vector<byte>

Mver

The WDL format version; 18 for every supported client.

public uint Mver { get; set; }

Property Value

uint

OceanMasks

Sparse per-tile ocean masks (MAOE, Legion+), emitted between a tile's heightmap and its hole mask — only SOME tiles have one, so use ocean_mask_tiles() for the mask -> heightmap pairing.

public Vector<TileOcean> OceanMasks { get; }

Property Value

Vector<TileOcean>

SkySceneConditions

Sky-scene conditions (MSSC, Shadowlands+), ranged by the scenes' condition_index/count.

public Vector<SkySceneCondition> SkySceneConditions { get; }

Property Value

Vector<SkySceneCondition>

SkySceneObjectParams

Sky-scene object params (MSSF; wowdev dates it Dragonflight+ but 9.2.7 files carry it), referenced by the objects' params_index.

public Vector<SkySceneObjectParams> SkySceneObjectParams { get; }

Property Value

Vector<SkySceneObjectParams>

SkySceneObjects

Sky-scene objects (MSSO, Shadowlands+), ranged by the scenes' object_index/count.

public Vector<SkySceneObject> SkySceneObjects { get; }

Property Value

Vector<SkySceneObject>

SkyScenes

Sky scenes (MSSN, Shadowlands+).

public Vector<SkyScene> SkyScenes { get; }

Property Value

Vector<SkyScene>

TileOffsets

The tile offset table (MAOF): 64 x 64 absolute file offsets in row-major order (y outer, x inner), 0 for absent tiles. The offset VALUES are derived — every write restamps them from the finished layout — so only the nonzero pattern is authored: the i-th nonzero slot owns the i-th heightmap.

public Vector<uint> TileOffsets { get; }

Property Value

Vector<uint>

WmoFilenameOffsets

MWMO filename start offsets (MWID), one per name.

public Vector<uint> WmoFilenameOffsets { get; }

Property Value

Vector<uint>

WmoFilenames

WMO silhouette filenames (MWMO): zero-terminated strings, referenced by offset. Every pre-Legion file carries the chunk (often empty); Legion+ terrain maps replace the object set with the MLDD/MLMD placements, but WMO-only maps keep shipping it.

public StringBlock WmoFilenames { get; set; }

Property Value

StringBlock

WmoPlacements

WMO silhouette placements (MODF), one per MWMO name; the same 64-byte record the WDT and ADT use.

public Vector<SmMapObjDef> WmoPlacements { get; }

Property Value

Vector<SmMapObjDef>

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

OceanMaskTiles()

The heightmap ordinal each ocean mask belongs to (parallel to oceanMasks), derived from the read file's chunk interleave. Empty when there are no ocean masks.

public uint[] OceanMaskTiles()

Returns

uint[]

one heightmap ordinal per ocean mask

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

Read(FileSystem, FileKey)

Load the WDL from a client filesystem, replacing this entity's contents.

public void Read(FileSystem fs, FileKey key)

Parameters

fs FileSystem

the filesystem gateway

key FileKey

the file 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 and store the WDL through the filesystem's project overlay.

public void Write(FileSystem fs, FileKey key)

Parameters

fs FileSystem

the filesystem gateway

key FileKey

the file identity; must resolve to a path