feat(editor): WPRC JSON round-trip closure

Adds --export-wprc-json / --import-wprc-json with the established
readEnumField template factoring int+name dual encoding for
triggerEvent ("onhit"/"oncrit"/"oncast"/"ontakedamage"/"onheal"/
"ondodge"/"onparry"/"onblock"/"onkill").

All 3 presets (weapon/ret/rage) byte-identical binary roundtrip
OK including the rage preset's previously-fixed Berserker Rage
proc rule (sourceSpellId=18499, procEffectSpellId=23691 distinct).

Live-tested self-loop validator a second time: re-introduced the
Berserker Rage source==effect bug via JSON edit (set effect back
to 18499). Validator correctly errored: "sourceSpellId ==
procEffectSpellId=18499 on OnCast trigger — infinite proc loop
(effect re-casts itself)". Confirms the round-trip path
preserves the self-loop guard and that the validator is ready
to catch this class of bug whenever a hand-edit reintroduces it.

CLI flag count 1443 -> 1445.
This commit is contained in:
Kelsi 2026-05-10 05:11:47 -07:00
parent 73d66a04d0
commit e49567da3c
3 changed files with 178 additions and 0 deletions

View file

@ -424,6 +424,7 @@ const char* const kArgRequired[] = {
"--export-wirc-json", "--import-wirc-json",
"--gen-prc-weapon", "--gen-prc-ret", "--gen-prc-rage",
"--info-wprc", "--validate-wprc",
"--export-wprc-json", "--import-wprc-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",