Commit graph

2 commits

Author SHA1 Message Date
Kelsi
ea173d6ff8 feat(editor): add WGFS JSON round-trip (--export/--import-wgfs-json)
Closes the editing loop on the glyph-slot catalog: dump a .wgfs
to JSON, hand-edit slotKind / displayOrder / minLevelToUnlock /
requiredClassMask (e.g. add a fourth Major slot, lower a Minor
slot's unlock from 75 to 70, restrict a Prime slot to Mages
only), re-import to a byte-identical binary.

The exporter emits both slotKind (int 0..2) and the human-
readable slotKindName ("major", "minor", "prime"); the importer
accepts either form.

Verified byte-identical round-trip on all three presets
(starter / wotlk / cata). CLI flag count 934 -> 936.
2026-05-09 22:06:16 -07:00
Kelsi
48c770f5ea feat(editor): add WGFS (Glyph Slot) open catalog format
Open replacement for Blizzard's GlyphSlot.dbc. Defines the
per-class glyph slot layout: which slots a class has (Major /
Minor / Prime), in which display order they appear in the
spellbook UI, and at which character level each slot becomes
available for use.

Distinct from WGLY (GlyphProperties) which defines the individual
glyphs themselves. WGLY says "Glyph of Polymorph exists, costs 1
inscription dust, modifies Polymorph"; WGFS says "the slot that
holds Glyph of Polymorph is the second Major Glyph Slot, unlocks
at level 25, and only Mages have it".

Layout grew across expansions, captured by the three presets:
  - --gen-gfs       — 6 slots: 3 Major + 3 Minor all-class
                       baseline (25/50/75 each)
  - --gen-gfs-wotlk — 6 slots: 3 Major (15/30/50) + 3 Minor
                       (15/50/70) matching WotLK 3.3.5a
  - --gen-gfs-cata  — 9 slots: 3 Prime + 3 Major + 3 Minor
                       matching Cataclysm

Cross-references back to WGLY (glyphs reference slotKind to
constrain which glyph fits which slot) and WCHC (requiredClassMask
uses the same bit layout as WCHC class IDs).

Validation enforces id+name+classMask presence (classMask=0 means
no class can use the slot — usually a config bug), slotKind 0..2,
no duplicate ids; warns on minLevelToUnlock>80 (would never
unlock at WotLK cap), displayOrder>4 (UI typically shows 3-4),
and (kind+order) collisions for overlapping classMask (two slots
claiming the same UI position would render on top of each other).
isUnlockedFor(id, classBit, level) is the engine helper.

Wired through the cross-format table; WGFS appears automatically
in all 11 cross-format utilities. Format count 73 -> 74; CLI flag
count 929 -> 934.
2026-05-09 22:05:05 -07:00