17#include <welder/vocabulary.hpp>
23 Which storage technology a client generation uses: Mpq for pre-WoD retail
24 clients (StormLib), Casc for WoD+ and every Classic client (CascLib).)")
33 Which product line a client belongs to. Retail is the ordinary
34 progression client, where the version number also tells you the engine
35 generation. Every other flavor is a MODERN-engine client wearing a
36 legacy version number: WoW Classic Era 1.15.9 is a Midnight-era client,
37 Cataclysm Classic 4.4.2 a War Within-era one. Their file formats follow
38 the build number, not the version tuple — see
39 ClientVersion.format_lineage.
41 The enumerator also names the client's default TACT product code
42 ('wow', 'wow_classic', 'wow_classic_era', 'wow_anniversary'); products
43 outside these four (PTR, beta, 'wow_classic_titan') pick the closest
44 flavor and pass their exact code to the filesystem explicitly.)")
56 A full client version tuple (major.minor.patch, build) plus the product
57 flavor it came from. Determines which storage backend and archive chain
58 a client uses, and — through format_lineage — which engine generation
59 its files are laid out for. The versions namespace provides constants
60 for the releases wowlib targets.
62 The version tuple alone does NOT identify an engine: the Classic
63 products reuse legacy version numbers on top of whatever retail branch
64 was current when they were built (Classic 3.4.x spans three retail
65 generations; 'wow_classic_titan' calls itself 3.80). The BUILD number
66 does — Blizzard's build counter is global across every product — so
67 every format decision keys on format_lineage, never on major/minor.)")
69 [[=welder::doc("Expansion number, e.g. 3 for Wrath of the Lich King.")]]
70 std::uint16_t major = 0;
72 [[=welder::doc(
"Minor version within the expansion.")]]
73 std::uint16_t minor = 0;
75 [[=welder::doc(
"Patch version within the minor release.")]]
76 std::uint16_t patch = 0;
79 "Exact client build number, e.g. 12340 for 3.3.5a. Unique and "
80 "monotonic across ALL products, which is what makes it the "
81 "only reliable engine-generation key.")]]
82 std::uint32_t build = 0;
84 [[=welder::doc(
"Which product line this client is — Retail unless stated.")]
89 =welder::doc(
"Whether this is a Classic-family client: a modern engine "
90 "wearing a legacy version number.")]]
94 =welder::doc(
"Which storage technology this client uses: Mpq for pre-WoD "
95 "(< 6.0) retail clients, Casc for everything else — every "
96 "Classic client is CASC no matter what its version says.")]]
103 The RETAIL release whose file formats this client's files follow — the
104 version every format decision is actually made against.
106 For a retail client this is the version itself. For a Classic client
107 it is the retail branch that was the live client when this build was
108 produced, looked up by build number: Classic branches fork off the
109 current retail engine, so Cataclysm Classic 4.4.2 (build 60895) lays
110 its files out like The War Within, not like Cataclysm. Builds newer
111 than the newest release wowlib models clamp to it.)")]]
116 "The TACT product code this flavor installs under by default "
117 "('wow', 'wow_classic', 'wow_classic_era', "
118 "'wow_anniversary'). PTR, beta and one-off products carry "
119 "their own code — pass it to the filesystem explicitly.")]]
120 constexpr std::string_view defaultCascProduct()
const {
135 The releases wowlib targets: the last-minor-of-major of every finished
136 expansion (Midnight 12.x is ongoing and has no final build yet), plus the
137 newest build of each living Classic product line. Builds verified against
140 The Classic constants are snapshots of a MOVING target — those products
141 ship new builds continuously, and a newer build can land on a newer engine
142 (Classic 4.4.0 is Dragonflight-era, 4.4.1 already War Within-era). Pin the
143 exact build you have, or let ClientInstall.detect read it off the install.)")
147 =welder::doc("Vanilla 1.12.1 (build 5875).")]]
151 =welder::doc(
"The Burning Crusade 2.4.3 (build 8606).")]]
155 =welder::doc(
"Wrath of the Lich King 3.3.5a (build 12340).")]]
159 =welder::doc(
"Cataclysm 4.3.4 (build 15595).")]]
160 inline constexpr ClientVersion
Cata{4, 3, 4, 15595};
163 =welder::doc(
"Mists of Pandaria 5.4.8 (build 18414).")]]
167 =welder::doc(
"Warlords of Draenor 6.2.4 (build 21742).")]]
171 =welder::doc(
"Legion 7.3.5 (build 26972).")]]
175 =welder::doc(
"Battle for Azeroth 8.3.7 (build 35662).")]]
179 =welder::doc(
"Shadowlands 9.2.7 (build 45745).")]]
180 inline constexpr ClientVersion
Shadowlands{9, 2, 7, 45745};
183 =welder::doc(
"Dragonflight 10.2.7 (build 55664).")]]
187 =welder::doc(
"The War Within 11.2.7 (build 65299).")]]
197 =welder::doc(
"Classic Era 1.15.9 (build 69109) — a Midnight-era client "
198 "('wow_classic_era').")]]
208 =welder::doc(
"Burning Crusade Classic 2.5.4 (build 44833) — a "
209 "Shadowlands-era client ('wow_classic').")]]
219 =welder::doc(
"Wrath of the Lich King Classic 3.4.5 (build 63697) — a War "
220 "Within-era client ('wow_classic').")]]
230 =welder::doc(
"Cataclysm Classic 4.4.2 (build 60895) — a War Within-era "
231 "client ('wow_classic').")]]
241 =welder::doc(
"Mists of Pandaria Classic 5.5.4 (build 69155) — a "
242 "Midnight-era client ('wow_classic').")]]
253 "The Anniversary realms 2.5.6 (build 69110) — a Midnight-era "
254 "client ('wow_anniversary').")]]
298 constexpr ClientVersion ClientVersion::formatLineage()
const {
304 if (generation.firstBuild <=
build)
305 out = generation.release;
316 std::ostream&
operator<<(std::ostream& out,
const ClientVersion& version);
321 "Game client locale; enumerators use the client's own four-letter "
constexpr std::array EngineTimeline
The retail engine timeline a Classic build is placed on.
constexpr ClientVersion ClassicBcc
constexpr ClientVersion Shadowlands
constexpr ClientVersion Tww
constexpr ClientVersion Bfa
constexpr ClientVersion Mop
constexpr ClientVersion Wod
constexpr ClientVersion Tbc
constexpr ClientVersion Vanilla
constexpr ClientVersion ClassicEra
constexpr ClientVersion Legion
constexpr ClientVersion ClassicCata
constexpr ClientVersion Dragonflight
constexpr ClientVersion Anniversary
constexpr ClientVersion Cata
constexpr ClientVersion ClassicWotlk
constexpr ClientVersion Wotlk
constexpr ClientVersion ClassicMop
std::string_view localeCode(Locale locale)
The four-letter code of locale ("enUS", ...) as used in MPQ locale directory and archive names.
@ Retail
The progression client ('wow').
@ Anniversary
The Anniversary realms ('wow_anniversary').
@ ClassicEra
Classic Era ('wow_classic_era'): the 1.13-1.15 vanilla realms.
@ Classic
The Classic progression line ('wow_classic'): BCC 2.5, WotLK 3.4, Cata 4.4, MoP 5....
std::optional< Locale > localeFromCode(std::string_view code)
Parse a four-letter locale code.
std::uint32_t cascLocaleFlag(Locale locale)
The CASC_LOCALE_* bit of locale for CascOpenStorage/CascOpenFile locale masks.
std::ostream & operator<<(std::ostream &out, const ClientVersion &version)
render version as "major.minor.patch.build", with the flavor appended when it is not Retail ("1....
@ Mpq
Pre-WoD retail clients (< 6.0), StormLib.
@ Casc
WoD+ retail and all Classic clients, CascLib.
std::uint16_t patch
Patch version within the minor release.
std::uint32_t build
Exact client build number, e.g.
std::uint16_t major
Expansion number, e.g.
std::uint16_t minor
Minor version within the expansion.
One retail engine generation on the global build counter: the build at which that major became the li...
ClientVersion release
The versions constant modelling it.
std::uint32_t firstBuild
First live/PTR build of the retail major.