Table of Contents

Class WDT

Namespace
WoWLib.Formats.WDT
Assembly
WoWLib.dll

A whole map description, abstract over the client version — the main .wdt file and its era's satellite files (_occ/_lgt/_fogs/_mpv) as one entity. Construct the concrete version with WDT.for_version(expansion), then read()/write(); the per-version WDT* classes are subclasses. See https://wowdev.wiki/WDT.

public class WDT : FileEntity, IDisposable
Inheritance
WDT
Implements
Derived
Inherited Members

Constructors

WDT()

public WDT()

WDT(WDT)

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

public WDT(WDT other)

Parameters

other WDT

Properties

Root

The main file contents.

public WDTRoot Root { get; set; }

Property Value

WDTRoot

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

ForVersion(ClientVersion)

A fresh WDT for an exact client version — the only axis that can name a Classic client, whose files follow the engine its build was cut on rather than its 1.15 / 4.4 version number.

public static WDT ForVersion(ClientVersion version)

Parameters

version ClientVersion

Returns

WDT

ForVersion(Expansion)

A fresh WDT for the given era, as the family base — the dynamic twin of the typed Era factories.

public static WDT ForVersion(Expansion era)

Parameters

era Expansion

Returns

WDT

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
key FileKey

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

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
key FileKey