Table of Contents

Class M2Event

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

One timed event. Abstract over the client version; construct a concrete version with M2Event.ForVersion / for_version.

public class M2Event : IDisposable
Inheritance
M2Event
Implements
Derived
Inherited Members

Constructors

M2Event()

public M2Event()

M2Event(M2Event)

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

public M2Event(M2Event other)

Parameters

other M2Event

Properties

Bone

The bone the event hangs off.

public uint Bone { get; set; }

Property Value

uint

Data

Payload passed on fire (sound entry id, ...).

public uint Data { get; set; }

Property Value

uint

Enabled

Timestamp-only track: each key fires the event.

public M2EventTrack Enabled { get; set; }

Property Value

M2EventTrack

Identifier

Usually a '$xxx' four-char tag stored raw.

public uint Identifier { get; set; }

Property Value

uint

Position

Relative to the bone.

public C3Vector Position { get; set; }

Property Value

C3Vector

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

Parameters

version ClientVersion

Returns

M2Event

ForVersion(Expansion)

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

public static M2Event ForVersion(Expansion era)

Parameters

era Expansion

Returns

M2Event

GetHashCode()

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

public override int GetHashCode()

Returns

int

Operators

operator ==(M2Event?, M2Event?)

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

Parameters

l M2Event
r M2Event

Returns

bool

operator !=(M2Event?, M2Event?)

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

Parameters

l M2Event
r M2Event

Returns

bool