Commit graph

2 commits

Author SHA1 Message Date
Kelsi
b16ee9886b feat(editor): add WBOS JSON round-trip (--export/--import-wbos-json)
Closes the editing loop on the boss-encounter catalog: dump a
.wbos to JSON, hand-edit phaseCount / enrageTimerMs / berserk
spell / recommended item level / required party size (e.g.
shorten Lich King's enrage from 15 to 12 minutes for a sweatier
server, raise Marrowgar's recommended ilvl from 232 to 245 for
a Heroic-equivalent variant, swap a 5-phase encounter to 6
phases for a custom server fight), re-import to a byte-identical
binary.

All fields are scalar uint32/uint16/uint8 so no dual encoding
needed — the JSON exporter emits each field directly. The
catalog is the highest fan-out so far among raid-content
catalogs, cross-referencing five other catalogs (WCRT for boss
creature, WMS for map, WCDF for difficulty routing, WSPL for
berserk spell, WACR back-references via achievement targetId).

Verified byte-identical round-trip on all three presets
(5man / raid / world). CLI flag count 1060 -> 1062.
2026-05-09 23:47:19 -07:00
Kelsi
acaef78696 feat(editor): add WBOS (Boss Encounter Definition) open catalog format
Open replacement for AzerothCore's instance_encounter SQL table
plus the per-boss script bindings. Defines raid boss encounter
metadata: which creature is the boss, which map and difficulty
variant it lives in, how many phases the encounter has, the
soft-enrage timer and berserk spell, recommended group size, and
item level.

One entry per (boss × difficulty) combination. Lord Marrowgar in
10-Normal ICC is one entry; Lord Marrowgar in 25-Heroic ICC is a
separate entry with a higher recommendedItemLevel and a different
difficultyId pointing into WCDF.

This format ties together five other catalogs into a coherent
encounter description:
  - WCRT for the boss creature template
  - WMS for the instance map
  - WCDF for difficulty routing (10/25/H10/H25 variants)
  - WSPL for the berserk spell that fires at enrage
  - WACR for achievement criteria like "kill The Lich King in
    25-Heroic" that point back via KillCreature targetId

findByMap(mapId) returns all encounters in one raid instance,
sorted by their catalog order — used by the Encounter Journal
UI and instance lockout logic. findByBossCreature(bossId)
returns all difficulty variants of one boss.

Three preset emitters: --gen-bos (3 5-man dungeon bosses with
no soft-enrage), --gen-bos-raid10 (4 ICC 10-Normal bosses
including 5-phase Lich King with 15min hard enrage via Fury of
Frostmourne 72546), --gen-bos-world (2 outdoor world bosses
with 25-player size + no difficulty).

Validation enforces id+name+boss+map+phases+size presence, no
duplicate ids; warns on:
  - non-standard requiredPartySize (canonical sizes are
    5/10/25/40)
  - berserkSpellId set without enrageTimerMs (spell never fires)
  - enrageTimerMs > 30 minutes (sanity check)

Wired through the cross-format table; WBOS appears in all 18
cross-format utilities. Format count 90 -> 91; CLI flag count
1055 -> 1060.
2026-05-09 23:45:26 -07:00