Commit graph

2 commits

Author SHA1 Message Date
Kelsi
fa23aff6e9 feat(editor): add WTLE JSON round-trip (--export/--import-wtle-json)
Closes the editing loop on the talent-tab catalog: dump a .wtle
to JSON, hand-edit roleHint / classMask / displayOrder /
iconPath / backgroundFile (e.g. swap a Mage Frost tab from DPS
to Hybrid, point Holy Paladin's tab to a custom background art
file, reorder displayOrder to put Protection first), re-import
to a byte-identical binary.

The exporter emits both roleHint (int 0..4) and the human-
readable roleHintName ("dps" / "tank" / "healer" / "hybrid" /
"pet"); the importer accepts either form.

Verified byte-identical round-trip on all three presets
(warrior / mage / paladin). CLI flag count 963 -> 965.
2026-05-09 22:28:28 -07:00
Kelsi
bf8d55cb3e feat(editor): add WTLE (Talent Tab) open catalog format
Open replacement for Blizzard's TalentTab.dbc plus the per-tab
fields in Spell.dbc / Talent.dbc. Defines the three talent trees
that each class has — Warrior: Arms / Fury / Protection;
Mage: Arcane / Fire / Frost; Paladin: Holy / Protection /
Retribution; etc.

Each tab carries its own name, role hint (DPS / Tank / Healer /
Hybrid / PetClass), display order in the talent UI, background
artwork path (e.g. "WarriorArms" for the parchment background),
icon path, and the class bitmask it belongs to.

Distinct from WTAL (which defines individual talent points) —
WTLE says "the Arms tree exists for Warriors, displays in tab 1,
is a DPS spec"; WTAL says "Mortal Strike is a 1-point talent in
the Arms tree, row 7, requires Improved Charge as a prerequisite".

Cross-references back to WCHC (classMask uses the same bit
layout) and forward to WTAL (talent entries reference tabId
here). findByClass(classBit) returns all tabs for a class
sorted by displayOrder — the talent UI uses this directly to
populate its tab buttons.

Three preset emitters: --gen-tle (Warrior 3 tabs with two DPS +
one Tank), --gen-tle-mage (Mage 3 DPS tabs), --gen-tle-paladin
(Paladin 3 tabs covering all three roles in one preset).

Validation enforces id+name+classMask presence (classMask=0
means no class can use the tab — usually a config bug),
roleHint 0..4, no duplicate ids; warns on empty iconPath
(missing-texture render), empty backgroundFile (no panel art),
displayOrder>3 (UI shows at most 4 tabs), and (classMask +
displayOrder) collisions for overlapping classes (two tabs
claiming the same UI slot for the same class).

Wired through the cross-format table; WTLE appears automatically
in all 12 cross-format utilities. Format count 77 -> 78; CLI flag
count 958 -> 963.
2026-05-09 22:27:18 -07:00