Table of Contents

Class M2Attachment

Namespace
WoWLib.Formats.M2.Root.Record
Assembly
WoWLib.dll

One attachment point. Abstract over the client version; construct a concrete version with M2Attachment.ForVersion / for_version.

public class M2Attachment : IDisposable
Inheritance
M2Attachment
Implements
Derived
Inherited Members

Constructors

M2Attachment()

public M2Attachment()

M2Attachment(M2Attachment)

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

public M2Attachment(M2Attachment other)

Parameters

other M2Attachment

Properties

AnimateAttached

Bool track: animate the attached model.

public M2TrackUInt8 AnimateAttached { get; set; }

Property Value

M2TrackUInt8

Bone

The bone the point follows.

public ushort Bone { get; set; }

Property Value

ushort

Id

Attachment slot (see wowdev's attachment id table).

public uint Id { get; set; }

Property Value

uint

Position

Relative to the bone, typically its pivot.

public C3Vector Position { get; set; }

Property Value

C3Vector

Unknown

Unknown; almost always 0 (vanilla's BogBeast.m2 carries values here).

public ushort Unknown { get; set; }

Property Value

ushort

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

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

ForVersion(ClientVersion)

A fresh M2Attachment 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 M2Attachment ForVersion(ClientVersion version)

Parameters

version ClientVersion

Returns

M2Attachment

ForVersion(Expansion)

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

public static M2Attachment ForVersion(Expansion era)

Parameters

era Expansion

Returns

M2Attachment

GetHashCode()

Reference-identity hash (the C++ type has no hash to mirror).

public override int GetHashCode()

Returns

int

Operators

operator ==(M2Attachment?, M2Attachment?)

public static bool operator ==(M2Attachment? l, M2Attachment? r)

Parameters

l M2Attachment
r M2Attachment

Returns

bool

operator !=(M2Attachment?, M2Attachment?)

public static bool operator !=(M2Attachment? l, M2Attachment? r)

Parameters

l M2Attachment
r M2Attachment

Returns

bool