Class WDLVanilla
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 WDLVanilla : WDL, IDisposable
- Inheritance
-
WDLVanilla
- Implements
- Inherited Members
Constructors
WDLVanilla()
public WDLVanilla()
WDLVanilla(WDLVanilla)
Copy-construct: a deep copy of other (the C++ copy constructor).
public WDLVanilla(WDLVanilla other)
Parameters
otherWDLVanilla
Properties
Heightmaps
The per-tile heightmaps (MARE), one per nonzero tileOffsets slot, in row-major slot order.
public Vector<TileHeights> Heightmaps { get; }
Property Value
Mver
The WDL format version; 18 for every supported client.
public uint Mver { get; set; }
Property Value
OcclusionMeshes
Per-tile occlusion mesh vertices (MAOC, pre-Legion; optional and absent from every surveyed file), one record per occurrence, kept opaque. Follows its tile's heightmap in the stream.
public Vector<ChunkBlob> OcclusionMeshes { get; set; }
Property Value
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
WmoFilenameOffsets
MWMO filename start offsets (MWID), one per name.
public Vector<uint> WmoFilenameOffsets { get; }
Property Value
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
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
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
databyte[]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
fsFileSystemthe filesystem gateway
keyFileKeythe 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
fsFileSystemthe filesystem gateway
keyFileKeythe file identity; must resolve to a path