Class WMORootVanillaToWod
A WMO root file for one client version. The root lists the object's shared data — materials and textures, doodad (M2) sets and placements, portals, lights, fog, culling volumes and the per-group table — while the 3D geometry lives in the separate group files (see WMOGroup). An instance read from a client file rewrites byte-for-byte until modified. See https://wowdev.wiki/WMO.
public class WMORootVanillaToWod : WMORoot, IDisposable
- Inheritance
-
WMORootVanillaToWod
- Implements
- Inherited Members
Constructors
WMORootVanillaToWod()
public WMORootVanillaToWod()
WMORootVanillaToWod(WMORootVanillaToWod)
Copy-construct: a deep copy of other (the C++ copy constructor).
public WMORootVanillaToWod(WMORootVanillaToWod other)
Parameters
otherWMORootVanillaToWod
Properties
ConvexVolumePlanes
Convex volume planes (MCVP); transports mostly.
public Vector<C4Plane> ConvexVolumePlanes { get; }
Property Value
DoodadDefs
Doodad placements (MODD).
public Vector<SmoDoodadDef> DoodadDefs { get; }
Property Value
DoodadNames
Doodad (M2) filenames (MODN); MODD entries index into this block. Pre-8.1 primary, 8.1/8.2 fallback (see textures). Removed at 8.3 alongside MOTX; MODI (doodad FileDataIDs) replaces it.
public StringBlock DoodadNames { get; set; }
Property Value
DoodadSets
Doodad sets (MODS).
public Vector<SmoDoodadSet> DoodadSets { get; }
Property Value
Fogs
Fog volumes (MFOG).
public Vector<SmoFog> Fogs { get; }
Property Value
GroupInfos
Per-group info (MOGI).
public Vector<SmoGroupInfo> GroupInfos { get; }
Property Value
GroupNames
Group names (MOGN), referenced by byte offset.
public StringBlock GroupNames { get; set; }
Property Value
Header
The root header (MOHD).
public SmoHeader Header { get; set; }
Property Value
Lights
Lights (MOLT).
public Vector<SmoLight> Lights { get; }
Property Value
Materials
Materials (MOMT).
public Vector<SmoMaterial> Materials { get; }
Property Value
Momx
MOMX (11.x, undocumented purpose); preserved opaque.
public ChunkBlob Momx { get; set; }
Property Value
Mver
The WMO format version; 17 for every supported client.
public uint Mver { get; set; }
Property Value
PortalRefs
Portal references from groups (MOPR).
public Vector<SmoPortalRef> PortalRefs { get; }
Property Value
PortalVertices
Portal vertices (MOPV).
public Vector<C3Vector> PortalVertices { get; }
Property Value
Portals
Portals (MOPT).
public Vector<SmoPortal> Portals { get; }
Property Value
SkyboxName
Skybox filename (MOSB); raw bytes — files pad it to 4-byte alignment. skybox_fdid (MOSI, 8.1+) functionally replaces it, but the chunk never left the corpus: a 9.2.7 client survey (2026-08-08) found MOSB in 5404 of 8148 roots — always empty, never alongside MOSI — so it stays on every version as the no-skybox marker exporters still emit.
public ChunkBlob SkyboxName { get; set; }
Property Value
Textures
Texture filenames (MOTX); the material texture fields index into this block. Pre-8.1 it is the primary reference; in 8.1/8.2 its presence marks the fallback mode (MOMT texture fields are MOTX offsets, not FileDataIDs). Removed at 8.3, when the client dropped name-based texture loading.
public StringBlock Textures { get; set; }
Property Value
VisibleBlockVertices
Visible block vertices (MOVV).
public Vector<C3Vector> VisibleBlockVertices { get; }
Property Value
VisibleBlocks
Visible blocks (MOVB).
public Vector<SmoVisibleBlock> VisibleBlocks { get; }
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(byte[])
Deserialize file bytes into this entity, replacing its contents. Unmodeled chunks are preserved so an unmodified entity rewrites byte-for-byte.
public void Read(byte[] data)
Parameters
databyte[]the file bytes
Validate()
Check the logical integrity contracts this file must satisfy to LOAD in the client — companion-chunk counts, index ranges, flag/presence coherence — which write() deliberately never enforces. Call it before writing when you want to know the result will load. A file 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, in member order
Write()
Serialize this entity.
public byte[] Write()
Returns
- byte[]
the file bytes