Table of Contents

Class WMORootBfa

Namespace
WoWLib.Formats.WMO.Root
Assembly
WoWLib.dll

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 WMORootBfa : WMORoot, IDisposable
Inheritance
WMORootBfa
Implements
Inherited Members

Constructors

WMORootBfa()

public WMORootBfa()

WMORootBfa(WMORootBfa)

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

public WMORootBfa(WMORootBfa other)

Parameters

other WMORootBfa

Properties

AmbientBoxVolumes

Box ambient volumes (MBVD, 8.3+); read only when MAVG/MAVD is present.

public Vector<AmbientBoxVolume> AmbientBoxVolumes { get; }

Property Value

Vector<AmbientBoxVolume>

AmbientVolumes

Ambient volumes (MAVD, 8.3+), overriding the header ambient color inside their radius.

public Vector<AmbientVolume> AmbientVolumes { get; }

Property Value

Vector<AmbientVolume>

ConvexVolumePlanes

Convex volume planes (MCVP); transports mostly.

public Vector<C4Plane> ConvexVolumePlanes { get; }

Property Value

Vector<C4Plane>

DoodadColorMults

Per-doodad color multipliers (MDDI, 8.3+), applied to the MODD color.

public Vector<float> DoodadColorMults { get; }

Property Value

Vector<float>

DoodadDefs

Doodad placements (MODD).

public Vector<SmoDoodadDef> DoodadDefs { get; }

Property Value

Vector<SmoDoodadDef>

DoodadFdids

Doodad FileDataIDs (MODI, 8.1+; replaces doodad_names).

public Vector<uint> DoodadFdids { get; }

Property Value

Vector<uint>

DoodadSets

Doodad sets (MODS).

public Vector<SmoDoodadSet> DoodadSets { get; }

Property Value

Vector<SmoDoodadSet>

Fogs

Fog volumes (MFOG).

public Vector<SmoFog> Fogs { get; }

Property Value

Vector<SmoFog>

GlobalAmbientVolumes

Global ambient volumes (MAVG, 8.3+); position and radii are zero, selected by doodad set.

public Vector<AmbientVolume> GlobalAmbientVolumes { get; }

Property Value

Vector<AmbientVolume>

GroupFdids

Group file FileDataIDs (GFID, Legion+), in group order; repeated per LOD level for LOD WMOs.

public Vector<uint> GroupFdids { get; }

Property Value

Vector<uint>

GroupInfos

Per-group info (MOGI).

public Vector<SmoGroupInfo> GroupInfos { get; }

Property Value

Vector<SmoGroupInfo>

GroupNames

Group names (MOGN), referenced by byte offset.

public StringBlock GroupNames { get; set; }

Property Value

StringBlock

Header

The root header (MOHD).

public SmoHeader Header { get; set; }

Property Value

SmoHeader

Lights

Lights (MOLT).

public Vector<SmoLight> Lights { get; }

Property Value

Vector<SmoLight>

Materials

Materials (MOMT).

public Vector<SmoMaterial> Materials { get; }

Property Value

Vector<SmoMaterial>

Momx

MOMX (11.x, undocumented purpose); preserved opaque.

public ChunkBlob Momx { get; set; }

Property Value

ChunkBlob

Mver

The WMO format version; 17 for every supported client.

public uint Mver { get; set; }

Property Value

uint

ParticulateVolumes

Particulate volume data (MPVD, 8.3+); undocumented layout, kept opaque.

public ChunkBlob ParticulateVolumes { get; set; }

Property Value

ChunkBlob

PortalRefs

Portal references from groups (MOPR).

public Vector<SmoPortalRef> PortalRefs { get; }

Property Value

Vector<SmoPortalRef>

PortalVertices

Portal vertices (MOPV).

public Vector<C3Vector> PortalVertices { get; }

Property Value

Vector<C3Vector>

Portals

Portals (MOPT).

public Vector<SmoPortal> Portals { get; }

Property Value

Vector<SmoPortal>

SkyboxFdid

Skybox FileDataID (MOSI, 8.1+).

public Vector<uint> SkyboxFdid { get; }

Property Value

Vector<uint>

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

ChunkBlob

UvAnimations

Texture-coordinate translation animations (MOUV, 7.3+), one per material.

public Vector<UvAnimation> UvAnimations { get; }

Property Value

Vector<UvAnimation>

VisibleBlockVertices

Visible block vertices (MOVV).

public Vector<C3Vector> VisibleBlockVertices { get; }

Property Value

Vector<C3Vector>

VisibleBlocks

Visible blocks (MOVB).

public Vector<SmoVisibleBlock> VisibleBlocks { get; }

Property Value

Vector<SmoVisibleBlock>

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

data byte[]

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