feat(editor): add WSCD JSON round-trip (--export/--import-wscd-json)

Closes the editing loop on the spell-cooldown bucket catalog: dump
a .wscd to JSON, hand-edit cooldownMs / bucketKind / category
flags (e.g. retune the global cooldown from 1.5s to 1.0s, mark a
bucket as IgnoresCooldownReduction, add Polymorph variants to the
class family bucket), re-import to a byte-identical binary.

The exporter emits both bucketKind (int 0..4) and the human-
readable bucketKindName ("spell", "item", "class", "global",
"misc"); same dual form for categoryFlags (int bitfield AND
"AffectedByHaste|OnGCDStart" pipe-separated label string). The
importer prefers the int form for categoryFlags when both are
present so unknown flag bits round-trip losslessly, falling back
to the label form for hand-edited sidecars.

Verified byte-identical round-trip on all three presets
(starter / class / items). CLI flag count 912 -> 914.
This commit is contained in:
Kelsi 2026-05-09 21:50:39 -07:00
parent 493db026dd
commit 7ecc829c4d
3 changed files with 183 additions and 0 deletions

View file

@ -217,6 +217,7 @@ const char* const kArgRequired[] = {
"--export-wsdr-json", "--import-wsdr-json",
"--gen-cdb", "--gen-cdb-class", "--gen-cdb-items",
"--info-wscd", "--validate-wscd",
"--export-wscd-json", "--import-wscd-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",