Table of Contents

Class M2Sequence

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

One animation sequence entry. Abstract over the client version; construct a concrete version with M2Sequence.ForVersion / for_version.

public class M2Sequence : IDisposable
Inheritance
M2Sequence
Implements
Derived
Inherited Members

Constructors

M2Sequence()

public M2Sequence()

M2Sequence(M2Sequence)

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

public M2Sequence(M2Sequence other)

Parameters

other M2Sequence

Properties

AliasNext

public ushort AliasNext { get; set; }

Property Value

ushort

Bounds

Bounds while the sequence plays.

public M2Bounds Bounds { get; set; }

Property Value

M2Bounds

Flags

See SequenceFlags.

public SequenceFlags Flags { get; set; }

Property Value

SequenceFlags

Frequency

Playback probability weight (sums to 0x7FFF per id).

public short Frequency { get; set; }

Property Value

short

Id

Animation id in AnimationData.dbc.

public ushort Id { get; set; }

Property Value

ushort

Movespeed

Character move speed during the sequence.

public float Movespeed { get; set; }

Property Value

float

Padding

Unused alignment padding.

public ushort Padding { get; set; }

Property Value

ushort

Replay

Random repetition bounds; both 0 = no repeat.

public M2Range Replay { get; set; }

Property Value

M2Range

VariationIndex

Which variation of the animation this is.

public ushort VariationIndex { get; set; }

Property Value

ushort

VariationNext

Next variation index, -1 if none.

public short VariationNext { get; set; }

Property Value

short

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

Parameters

version ClientVersion

Returns

M2Sequence

ForVersion(Expansion)

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

public static M2Sequence ForVersion(Expansion era)

Parameters

era Expansion

Returns

M2Sequence

GetHashCode()

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

public override int GetHashCode()

Returns

int

IsAlias()

Whether this sequence is an alias (flag 0x40): it owns NO track data — resolve it by following alias_next. Files still carry stale array records for aliases (dead offsets, junk values), so they are never chased.

public bool IsAlias()

Returns

bool

OwnsAnimFile()

Whether this sequence owns an external .anim file: its data is low-priority (0x10/0x20/0x100 all clear) and it is no alias.

public bool OwnsAnimFile()

Returns

bool

Operators

operator ==(M2Sequence?, M2Sequence?)

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

Parameters

l M2Sequence
r M2Sequence

Returns

bool

operator !=(M2Sequence?, M2Sequence?)

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

Parameters

l M2Sequence
r M2Sequence

Returns

bool