Table of Contents

Class WMOGroup

Namespace
WoWLib.Formats.WMO.Group
Assembly
WoWLib.dll

One WMO group file, abstract over the client version. A group file holds the 3D model data (geometry, render batches, collision, liquid) for one unit of a world map object. Construct a concrete version with WMOGroup.for_version(expansion); the per-version WMOGroup* classes are subclasses. See https://wowdev.wiki/WMO.

public class WMOGroup : IDisposable
Inheritance
WMOGroup
Implements
Derived
Inherited Members

Constructors

WMOGroup()

public WMOGroup()

WMOGroup(WMOGroup)

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

public WMOGroup(WMOGroup other)

Parameters

other WMOGroup

Properties

Body

The MOGP container: group header and geometry.

public WMOGroupBody Body { get; set; }

Property Value

WMOGroupBody

Mver

The WMO format version; 17 for every supported client.

public uint Mver { get; set; }

Property Value

uint

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 virtual 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 WMOGroup 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 WMOGroup ForVersion(ClientVersion version)

Parameters

version ClientVersion

Returns

WMOGroup

ForVersion(Expansion)

A fresh WMOGroup for the given era, as the family base — the dynamic twin of the typed Era factories.

public static WMOGroup ForVersion(Expansion era)

Parameters

era Expansion

Returns

WMOGroup

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[]

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

Write()

Serialize this entity.

public byte[] Write()

Returns

byte[]