Class WMOGroupBodyLegion
The MOGP payload for one client version: the group header and the geometry subchunks (triangles, vertices, normals, batches, BSP, liquid, lights). See https://wowdev.wiki/WMO.
public class WMOGroupBodyLegion : WMOGroupBody, IDisposable
- Inheritance
-
WMOGroupBodyLegion
- Implements
- Inherited Members
Constructors
WMOGroupBodyLegion()
public WMOGroupBodyLegion()
WMOGroupBodyLegion(WMOGroupBodyLegion)
Copy-construct: a deep copy of other (the C++ copy constructor).
public WMOGroupBodyLegion(WMOGroupBodyLegion other)
Parameters
otherWMOGroupBodyLegion
Properties
AmbientColorOverride
Ambient color override (MDAL, MoP+); a single color in practice, replacing the header ambient. wowdev dates it to WoD but flags that unverified — a 5.4.8 corpus sweep found 421 of these, while sampled Cata and WotLK groups carry none.
public Vector<CArgb> AmbientColorOverride { get; }
Property Value
BatchOverrides
Triangle-strip batch overrides (MORB, Cata+); same count as MOBA.
public Vector<RenderBatchOverride> BatchOverrides { get; }
Property Value
Batches
Render batches (MOBA).
public Vector<WMOBatchLegionPlus> Batches { get; }
Property Value
BspFaceIndices
BSP face indices (MOBR).
public Vector<ushort> BspFaceIndices { get; }
Property Value
BspNodes
Collision BSP nodes (MOBN).
public Vector<CAaBspNode> BspNodes { get; }
Property Value
DoodadRefs
Doodad references into the root's MODD (MODR).
public Vector<ushort> DoodadRefs { get; }
Property Value
Header
The group header leading the MOGP payload.
public WMOGroupHeaderVanillaToBfa Header { get; set; }
Property Value
Indices
Triangle vertex indices (MOVI), three per triangle.
public Vector<ushort> Indices { get; }
Property Value
LightRefs
Light references into the root's MOLT (MOLR).
public Vector<ushort> LightRefs { get; }
Property Value
Liquid
Liquid data (MLIQ): a vertex grid and tile-flag grid with a base position and material id.
public MliqData Liquid { get; set; }
Property Value
Normals
Normals (MONR).
public Vector<C3Vector> Normals { get; }
Property Value
PointLights
Point lights (MOLP, Legion+).
public Vector<PointLight> PointLights { get; }
Property Value
Polys
Per-triangle material info (MOPY).
public Vector<SmoPoly> Polys { get; }
Property Value
PrepassBatches
Prepass batches (MOPB, Legion+); undocumented 24-byte records, kept opaque.
public ChunkBlob PrepassBatches { get; set; }
Property Value
ShadowBatches
Shadow batches (MOBS, Cata+).
public Vector<ShadowBatch> ShadowBatches { get; }
Property Value
SpotLights
Spot lights (MOLS, Legion+); undocumented 56-byte records, kept opaque.
public ChunkBlob SpotLights { get; set; }
Property Value
Tangents
Tangent arrays (MOTA, Cata+); offset-based layout, kept opaque.
public ChunkBlob Tangents { get; set; }
Property Value
TerrainCutPlanes
Terrain-cutting planes (MOPL, WoD+); requires the can_cut_terrain flag, at most 32.
public Vector<C4Plane> TerrainCutPlanes { get; }
Property Value
TransBatchIndices
Triangle-strip indices (MORI).
public Vector<ushort> TransBatchIndices { get; }
Property Value
Vertices
Vertices (MOVT).
public Vector<C3Vector> Vertices { get; }
Property Value
Methods
AppendTexcoordSet(Vector<C2Vector>)
Fill the next free texture-coordinate slot (MOTV).
public void AppendTexcoordSet(Vector<C2Vector> coords)
Parameters
AppendVertexColorLayer(Vector<CImVector>)
Fill the next free vertex-color layer slot (MOCV).
public void AppendVertexColorLayer(Vector<CImVector> colors)
Parameters
ClearTexcoordSets()
Empty every texture-coordinate slot (MOTV).
public void ClearTexcoordSets()
ClearVertexColorLayers()
Empty every vertex-color layer slot (MOCV).
public void ClearVertexColorLayers()
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
SetTexcoordSet(ulong, Vector<C2Vector>)
Replace one filled texture-coordinate set (MOTV).
public void SetTexcoordSet(ulong set, Vector<C2Vector> coords)
Parameters
SetVertexColorLayer(ulong, Vector<CImVector>)
Replace one filled vertex-color layer (MOCV).
public void SetVertexColorLayer(ulong layer, Vector<CImVector> colors)
Parameters
TexcoordSet(ulong)
One filled texture-coordinate set (MOTV), as a live zero-copy view.
public Vector<C2Vector>? TexcoordSet(ulong set)
Parameters
setulongthe filled-set index
Returns
TexcoordSetCount()
The number of filled texture-coordinate sets (MOTV), 0 to 4.
public ulong TexcoordSetCount()
Returns
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
VertexColorLayer(ulong)
One filled vertex-color layer (MOCV), as a live zero-copy view.
public Vector<CImVector>? VertexColorLayer(ulong layer)
Parameters
layerulongthe filled-layer index
Returns
VertexColorLayerCount()
The number of filled vertex-color layers (MOCV), 0 to 2.
public ulong VertexColorLayerCount()
Returns
Write()
Serialize this entity.
public byte[] Write()
Returns
- byte[]
the file bytes