Class WDTVanillaToMop
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 WDTVanillaToMop : WDT, IDisposable
- Inheritance
-
WDTVanillaToMop
- Implements
- Inherited Members
Constructors
WDTVanillaToMop()
public WDTVanillaToMop()
WDTVanillaToMop(WDTVanillaToMop)
Copy-construct: a deep copy of other (the C++ copy constructor).
public WDTVanillaToMop(WDTVanillaToMop other)
Parameters
otherWDTVanillaToMop
Properties
Root
The main file contents.
public WDTRootVanillaToLegion Root { get; set; }
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()
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
fsFileSystemthe filesystem gateway
keyFileKeythe 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
fsFileSystemthe filesystem gateway
keyFileKeythe main file identity; must resolve to a path