feat(editor): add WTBR JSON round-trip (--export/--import-wtbr-json)

Closes the editing loop on the token-reward catalog: dump a
.wtbr to JSON, hand-edit rewardKind / rewardId / spent token
counts / faction gates (e.g. raise T10 helm cost from 95 to 100
Emblems, swap a server-custom mount reward to a Pet kind, lower
an Argent Tournament reward standing from Exalted to Honored),
re-import to a byte-identical binary.

Two dual-encoded fields:
  - rewardKind: int 0..7 OR "item" / "spell" / "title" /
    "mount" / "pet" / "currency" / "heirloom" / "cosmetic"
  - requiredFactionStanding: int 0..7 OR "hated" / "hostile" /
    "unfriendly" / "neutral" / "friendly" / "honored" /
    "revered" / "exalted"

Verified byte-identical round-trip on all three presets
(raid / pvp / faction). CLI flag count 1039 -> 1041.
This commit is contained in:
Kelsi 2026-05-09 23:28:23 -07:00
parent c1c4b8fa12
commit 28becba00e
3 changed files with 184 additions and 0 deletions

View file

@ -272,6 +272,7 @@ const char* const kArgRequired[] = {
"--export-wbkd-json", "--import-wbkd-json",
"--gen-tbr", "--gen-tbr-pvp", "--gen-tbr-faction",
"--info-wtbr", "--validate-wtbr",
"--export-wtbr-json", "--import-wtbr-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",