Class WMO
A whole world map object, abstract over the client version — the root file and all its group files as one entity. Construct the concrete version with WMO.for_version(expansion), then read()/write(); the per-version WMO* classes are subclasses. See https://wowdev.wiki/WMO.
public class WMO : FileEntity, IDisposable
- Inheritance
-
WMO
- Implements
- Derived
- Inherited Members
Constructors
WMO()
public WMO()
WMO(WMO)
Copy-construct: a deep copy of other (the C++ copy constructor).
public WMO(WMO other)
Parameters
otherWMO
Properties
Groups
The group files, in group order.
public FamilyVector<WMOGroup> Groups { get; }
Property Value
Root
The root file contents.
public WMORoot 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()
ForVersion(ClientVersion)
A fresh WMO 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 WMO ForVersion(ClientVersion version)
Parameters
versionClientVersion
Returns
ForVersion(Expansion)
A fresh WMO for the given era, as the family base — the dynamic twin of the typed Era factories.
public static WMO ForVersion(Expansion era)
Parameters
eraExpansion
Returns
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
fsFileSystemkeyFileKey
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
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
fsFileSystemkeyFileKey