feat(editor): WBHV JSON round-trip closure

Adds --export-wbhv-json / --import-wbhv-json with the established
readEnumField template factoring int+name dual encoding for both
creatureKind ("melee"/"caster"/"tank"/"healer"/"pet"/"beast")
and evadeBehavior ("resettospawn"/"healatpath"/"fleetospawn"/
"noevade"). Variable-length specialAbilities serialize as JSON
object array of {spellId, cooldownMs, useChancePct}.

All 3 presets (melee/caster/boss) byte-identical binary
roundtrip OK including the boss preset's 4-ability rotation
with NoEvade and 90s-cooldown Deep Breath.

Live-tested leash<aggro un-killable invariant: hand-mutated
Onyxia boss leashRadius from 999 to 10 (below aggroRadius=50).
Validator correctly errored: "leashRadius=10.000000 <
aggroRadius=50.000000 — creature would evade before engaging
(un-killable from outside the leash)". Catches the class of
spawn-config bugs where a creature aggros at distance X but
evades at distance < X — no player can ever close to melee.

CLI flag count 1425 -> 1427.
This commit is contained in:
Kelsi 2026-05-10 04:55:54 -07:00
parent d2e623de9f
commit af59866f3d
3 changed files with 208 additions and 0 deletions

View file

@ -418,6 +418,7 @@ const char* const kArgRequired[] = {
"--export-wbnd-json", "--import-wbnd-json",
"--gen-bhv-melee", "--gen-bhv-caster", "--gen-bhv-boss",
"--info-wbhv", "--validate-wbhv",
"--export-wbhv-json", "--import-wbhv-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",