Table of Contents

Class ClientVersion

Namespace
WoWLib
Assembly
WoWLib.dll

A full client version tuple (major.minor.patch, build) plus the product flavor it came from. Determines which storage backend and archive chain a client uses, and — through format_lineage — which engine generation its files are laid out for. The versions namespace provides constants for the releases wowlib targets.

The version tuple alone does NOT identify an engine: the Classic
products reuse legacy version numbers on top of whatever retail branch
was current when they were built (Classic 3.4.x spans three retail
generations; 'wow_classic_titan' calls itself 3.80). The BUILD number
does — Blizzard's build counter is global across every product — so
every format decision keys on format_lineage, never on major/minor.
public class ClientVersion : IDisposable
Inheritance
ClientVersion
Implements
Inherited Members

Constructors

ClientVersion()

public ClientVersion()

ClientVersion(ushort, ushort, ushort, uint, ClientFlavor)

public ClientVersion(ushort major, ushort minor, ushort patch, uint build, ClientFlavor flavor)

Parameters

major ushort
minor ushort
patch ushort
build uint
flavor ClientFlavor

ClientVersion(ClientVersion)

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

public ClientVersion(ClientVersion other)

Parameters

other ClientVersion

Properties

Build

Exact client build number, e.g. 12340 for 3.3.5a. Unique and monotonic across ALL products, which is what makes it the only reliable engine-generation key.

public uint Build { get; set; }

Property Value

uint

DefaultCascProduct

The TACT product code this flavor installs under by default ('wow', 'wow_classic', 'wow_classic_era', 'wow_anniversary'). PTR, beta and one-off products carry their own code — pass it to the filesystem explicitly.

public string DefaultCascProduct { get; }

Property Value

string

Flavor

Which product line this client is — Retail unless stated.

public ClientFlavor Flavor { get; set; }

Property Value

ClientFlavor

FormatLineage

The RETAIL release whose file formats this client's files follow — the version every format decision is actually made against.

For a retail client this is the version itself. For a Classic client
it is the retail branch that was the live client when this build was
produced, looked up by build number: Classic branches fork off the
current retail engine, so Cataclysm Classic 4.4.2 (build 60895) lays
its files out like The War Within, not like Cataclysm. Builds newer
than the newest release wowlib models clamp to it.
public ClientVersion FormatLineage { get; }

Property Value

ClientVersion

IsClassic

Whether this is a Classic-family client: a modern engine wearing a legacy version number.

public bool IsClassic { get; }

Property Value

bool

Major

Expansion number, e.g. 3 for Wrath of the Lich King.

public ushort Major { get; set; }

Property Value

ushort

Minor

Minor version within the expansion.

public ushort Minor { get; set; }

Property Value

ushort

Patch

Patch version within the minor release.

public ushort Patch { get; set; }

Property Value

ushort

StorageKind

public StorageKind StorageKind { get; }

Property Value

StorageKind

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.

GetHashCode()

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

public override int GetHashCode()

Returns

int

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

operator ==(ClientVersion?, ClientVersion?)

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

Parameters

l ClientVersion
r ClientVersion

Returns

bool

operator >(ClientVersion, ClientVersion)

public static bool operator >(ClientVersion l, ClientVersion r)

Parameters

l ClientVersion
r ClientVersion

Returns

bool

operator >=(ClientVersion, ClientVersion)

public static bool operator >=(ClientVersion l, ClientVersion r)

Parameters

l ClientVersion
r ClientVersion

Returns

bool

operator !=(ClientVersion?, ClientVersion?)

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

Parameters

l ClientVersion
r ClientVersion

Returns

bool

operator <(ClientVersion, ClientVersion)

public static bool operator <(ClientVersion l, ClientVersion r)

Parameters

l ClientVersion
r ClientVersion

Returns

bool

operator <=(ClientVersion, ClientVersion)

public static bool operator <=(ClientVersion l, ClientVersion r)

Parameters

l ClientVersion
r ClientVersion

Returns

bool