Class SMChunk
A terrain cell header (MCNK, 128 bytes): the flags, its (x, y) position in the 16x16 cell grid, the area id, the terrain hole mask and the origin. The sub-chunk offset/size/count fields are binary bookkeeping wowlib derives on write, so they are not exposed. See https://wowdev.wiki/ADT/v18#MCNK_chunk.
public class SMChunk : IDisposable
- Inheritance
-
SMChunk
- Implements
- Inherited Members
Constructors
SMChunk()
public SMChunk()
SMChunk(SMChunk)
Copy-construct: a deep copy of other (the C++ copy constructor).
public SMChunk(SMChunk other)
Parameters
otherSMChunk
Properties
AreaId
The cell's area id (a foreign key into AreaTable; in the alpha clients, packed zone/subzone u16s).
public uint AreaId { get; set; }
Property Value
Flags
Flags; MapChunkFlags bits.
public MapChunkFlags Flags { get; set; }
Property Value
HolesHighRes
The 64-bit high-resolution hole mask (the 8 bytes at header offset 0x14), valid when the high_res_holes flag is set.
public ulong HolesHighRes { get; }
Property Value
HolesLowRes
The 16-bit low-resolution terrain hole mask (a 4x4 bitfield); used unless the high_res_holes flag selects holes_high_res.
public ushort HolesLowRes { get; set; }
Property Value
IndexX
The cell's column index in the 16x16 grid (0-15).
public uint IndexX { get; set; }
Property Value
IndexY
The cell's row index in the 16x16 grid (0-15).
public uint IndexY { get; set; }
Property Value
NoEffectDoodad
An 8x8 bitfield (8 bytes): 1 disables detail doodads in that sub-cell (WoD may store it as an explicit MCDD chunk).
public FixedArray<byte> NoEffectDoodad { get; set; }
Property Value
Position
The cell origin in world space; MCVT heights are relative to it.
public C3Vector Position { get; set; }
Property Value
PredominantTexture
The "really low quality" predominant-texture map: an 8x8 grid of 2-bit layer indices (16 bytes), naming the detail doodads to show per sub-cell.
public FixedArray<byte> PredominantTexture { get; set; }
Property Value
UnknownButUsed
Unknown but written (padding in the alpha clients).
public ushort UnknownButUsed { get; set; }
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 virtual void Dispose()
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetHashCode()
Reference-identity hash (the C++ type has no hash to mirror).
public override int GetHashCode()
Returns
SetHolesHighRes(ulong)
Set the 64-bit high-resolution hole mask (and the high_res_holes flag).
public void SetHolesHighRes(ulong holes)
Parameters
holesulong
Operators
operator ==(SMChunk?, SMChunk?)
public static bool operator ==(SMChunk? l, SMChunk? r)
Parameters
Returns
operator !=(SMChunk?, SMChunk?)
public static bool operator !=(SMChunk? l, SMChunk? r)