Class MapChunkCataPlus
One terrain chunk (MCNK) of a map tile, fully decoded: the chunk header, the 9x9+8x8 height and normal grids, the texture layers with their decoded 64x64 alpha maps, the shadow map, doodad/object references, sound emitters and (version dependent) vertex colors, baked lighting and legacy liquid. A tile has 256 of these. wowlib decodes alpha/shadow maps to a plain 64x64 edit surface and re-encodes on write; the round-trip is semantic, not byte-identical. See https://wowdev.wiki/ADT/v18#MCNK_chunk.
public class MapChunkCataPlus : MapChunk, IDisposable
- Inheritance
-
MapChunkCataPlus
- Implements
- Inherited Members
Constructors
MapChunkCataPlus()
public MapChunkCataPlus()
MapChunkCataPlus(MapChunkCataPlus)
Copy-construct: a deep copy of other (the C++ copy constructor).
public MapChunkCataPlus(MapChunkCataPlus other)
Parameters
otherMapChunkCataPlus
Properties
AlphaMaps
One decoded 64x64 (4096-byte) alpha map per layer, aligned with layers (layer 0's is empty); 0 = base texture, 255 = this layer.
public Vector<Vector<byte>> AlphaMaps { get; }
Property Value
DoodadRefs
Doodad references (MCRF doodad part pre-Cata, MCRD Cata+): indices into the tile's MDDF placements drawn in this chunk.
public Vector<uint> DoodadRefs { get; }
Property Value
Header
The chunk header (flags, grid position, area, holes, origin).
public SMChunk Header { get; set; }
Property Value
Heights
The 9x9 + 8x8 = 145 terrain heights (MCVT), relative to the chunk origin, in the interleaved outer/inner row order.
public Vector<float> Heights { get; }
Property Value
Layers
The texture layers (MCLY); layer 0 is opaque, later layers blend through their alpha map.
public Vector<SMLayer> Layers { get; }
Property Value
MaterialIds
Per-layer terrain material ids (MCMT, Cata+).
public Vector<SMTerrainMaterial> MaterialIds { get; }
Property Value
Normals
The 145 terrain normals (MCNR), X Z Y signed bytes.
public Vector<McnrEntry> Normals { get; }
Property Value
ObjectRefs
Object references (MCRF object part pre-Cata, MCRW Cata+): indices into the tile's MODF placements drawn in this chunk.
public Vector<uint> ObjectRefs { get; }
Property Value
ShadowMap
The decoded 64x64 (4096-byte) shadow map (MCSH), 0/1 per texel; empty when the chunk casts no baked shadow.
public Vector<byte> ShadowMap { get; }
Property Value
SoundEmitters
Sound emitters placed in this chunk (MCSE): pre-WotLK versions carry the full 52-byte inline emitter (CWSoundEmitterVanilla), WotLK+ the 28-byte SoundEntriesAdvanced reference (CWSoundEmitter).
public Vector<CwSoundEmitter> SoundEmitters { get; }
Property Value
VertexColors
Per-vertex colors (MCCV, WotLK+): 145 BGRA entries blended onto the terrain (0x7F = neutral).
public Vector<CImVector> VertexColors { get; }
Property Value
VertexLighting
Per-vertex baked lighting (MCLV, Cata+): 145 ARGB entries from level-designer omni lights.
public Vector<CArgb> VertexLighting { 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()