Table of Contents

Class WDTWod

Namespace
WoWLib.Formats.WDT
Assembly
WoWLib.dll

A whole map description for one client version: the main .wdt file and its era's satellite files (_occ/_lgt since WoD, _fogs since Legion 7.2.5, _mpv since BfA) as one entity. Satellites locate by the "{map}_occ.wdt" naming convention up to 8.1 and by the MPHD FileDataIDs after; a missing satellite stays default-empty. An entity read from a client and left unmodified rewrites byte-for-byte. See https://wowdev.wiki/WDT.

public class WDTWod : WDT, IDisposable
Inheritance
WDTWod
Implements
Inherited Members

Constructors

WDTWod()

public WDTWod()

WDTWod(WDTWod)

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

public WDTWod(WDTWod other)

Parameters

other WDTWod

Properties

Lights

The _lgt.wdt lights satellite (WoD+); default-empty when the file does not exist.

public WDTLightsWod Lights { get; set; }

Property Value

WDTLightsWod

Occlusion

The _occ.wdt occlusion satellite (WoD+); default-empty when the file does not exist.

public WDTOcclusionWodPlus Occlusion { get; set; }

Property Value

WDTOcclusionWodPlus

Root

The main file contents.

public WDTRootVanillaToLegion Root { get; set; }

Property Value

WDTRootVanillaToLegion

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(FileSystem, FileKey)

Load the WDT and every satellite file present 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 main file identity (path and/or FileDataID)

Validate()

Check the logical integrity contracts this object must satisfy to LOAD in the client — across the main file AND every engaged satellite — which write() deliberately never enforces. Call it before writing when you want to know the files will load. An object read from a client and left unmodified reports no errors.

public ValidationReport Validate()

Returns

ValidationReport

every violated contract, each with its member path ("root..." / "occlusion..." / "lights..." / "fogs..." / "particulates...")

Write(FileSystem, FileKey)

Serialize and store the WDT (main file and every engaged satellite) through the filesystem's project overlay; satellite file names are derived from the main key, which must resolve to a path.

public void Write(FileSystem fs, FileKey key)

Parameters

fs FileSystem

the filesystem gateway

key FileKey

the main file identity; must resolve to a path