Class WMOVanillaToWotlk
A whole world map object for one client version: the root file and all its group files as one entity. Group files are located by GFID (Legion+ clients) or the "{root}_NNN.wmo" naming convention. An entity read from a client and left unmodified rewrites byte-for-byte. See https://wowdev.wiki/WMO.
public class WMOVanillaToWotlk : WMO, IDisposable
- Inheritance
-
WMOVanillaToWotlk
- Implements
- Inherited Members
Constructors
WMOVanillaToWotlk()
public WMOVanillaToWotlk()
WMOVanillaToWotlk(WMOVanillaToWotlk)
Copy-construct: a deep copy of other (the C++ copy constructor).
public WMOVanillaToWotlk(WMOVanillaToWotlk other)
Parameters
otherWMOVanillaToWotlk
Properties
Groups
The group files, in group order.
public Vector<WMOGroupVanillaToWotlk> Groups { get; }
Property Value
Root
The root file contents.
public WMORootVanillaToWod 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 WMO and all its group files from a client filesystem, replacing this entity's contents.
public void Read(FileSystem fs, FileKey key)
Parameters
fsFileSystemthe filesystem gateway
keyFileKeythe root file identity (path and/or FileDataID)
Validate()
Check the logical integrity contracts this object must satisfy to LOAD in the client — across the root file AND every group file — 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; warnings mark states real client files ship.
public ValidationReport Validate()
Returns
- ValidationReport
every violated contract, each with its member path ("root..." / "groups[i]...")
Write(FileSystem, FileKey)
Serialize and store the WMO (root and every group) through the filesystem's project overlay; group file names are derived from the root key, which must resolve to a path.
public void Write(FileSystem fs, FileKey key)
Parameters
fsFileSystemthe filesystem gateway
keyFileKeythe root file identity; must resolve to a path