mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-11 19:43:52 +00:00
feat(editor): WLOC JSON round-trip closure
Adds --export-wloc-json / --import-wloc-json with the established
readEnumField template factoring int+name dual encoding for both
locKind ("poi"/"rarespawn"/"herbnode"/"mineralvein"/"fishingspot"/
"areatrigger"/"portallanding") and factionAccess ("both"/
"alliance"/"horde"/"neutral"). Float coords (x/y/z) and skill
fields preserved bit-for-bit through JSON.
All 3 presets (poi/herb/rare) byte-identical binary roundtrip
OK including the rare-spawns preset's mixed respawn timers
(1800s..7200s).
Live-tested spawnable-kind respawn=0 validator: hand-mutated
Mor'Ladim's respawnSec to 0 in JSON, validator correctly
errored: "spawnable kind (rarespawn) with respawnSec=0 —
entity would spawn once and never come back". Catches the
common "added a rare spawn but forgot the timer" bug class
where rare-elites silently disappear after first kill.
CLI flag count 1407 -> 1409.
This commit is contained in:
parent
fd6039973a
commit
c21f36bd29
3 changed files with 200 additions and 0 deletions
|
|
@ -2639,6 +2639,10 @@ void printUsage(const char* argv0) {
|
|||
std::printf(" Print WLOC entries (id / mapId / areaId / locKindName / factionAccessName / respawnSec / discoverableXp / requiredSkill / level / name)\n");
|
||||
std::printf(" --validate-wloc <wloc-base> [--json]\n");
|
||||
std::printf(" Static checks: id+name required, locKind 0..6, factionAccess 0..3, no duplicate locationIds, spawnable kinds (Rare/Herb/Mineral/Fishing) MUST have respawnSec > 0 (else entity spawns once and never returns); warns on discoverableXp set with non-POI kind (XP would never award), requiredSkillId set with non-gather kind (skill check would never fire), and gather kind with skill > 0 but level = 0 (every player satisfies — verify intentional)\n");
|
||||
std::printf(" --export-wloc-json <wloc-base> [out.json]\n");
|
||||
std::printf(" Export binary .wloc to a human-editable JSON sidecar (defaults to <base>.wloc.json; emits both locKind and factionAccess as int + name string; floats preserved bit-for-bit)\n");
|
||||
std::printf(" --import-wloc-json <json-path> [out-base]\n");
|
||||
std::printf(" Import a .wloc.json sidecar back into binary .wloc (locKind int OR \"poi\"/\"rarespawn\"/\"herbnode\"/\"mineralvein\"/\"fishingspot\"/\"areatrigger\"/\"portallanding\"; factionAccess int OR \"both\"/\"alliance\"/\"horde\"/\"neutral\")\n");
|
||||
std::printf(" --catalog-pluck <wXXX-file> <id> [--json]\n");
|
||||
std::printf(" Extract one entry by id from any registered catalog format. Auto-detects magic, dispatches to the per-format --info-* handler internally, then prints just the matching entry. Primary-key field is auto-detected (first *Id field, or first numeric)\n");
|
||||
std::printf(" --catalog-find <directory> <id> [--magic <WXXX>] [--json]\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue