feat(editor): add WSPS (Spell Proc Trigger) open catalog format

Open replacement for AzerothCore's spell_proc_event SQL table
plus the per-spell proc fields embedded in Spell.dbc. Defines
when a "trigger" spell fires in response to other spell/combat
events: Windfury Weapon procs on melee attack, Clearcasting on
damaging cast, Judgement of Wisdom on melee hit, etc.

Each entry says "when an event matching procFlags fires from a
spell matching procFromSpellId (0 = any), at procChance
probability with at most one trigger per internalCooldownMs
window, fire triggerSpellId". The procPpm field provides an
alternative procs-per-minute formula (when non-zero, supersedes
procChance and scales with weapon speed for melee procs — the
canonical WoW behavior for weapon imbues).

13-bit procFlags bitfield covers the standard event taxonomy:
DealtMeleeAutoAttack / DealtMeleeSpell / TakenMeleeAutoAttack /
TakenMeleeSpell / DealtRangedAutoAttack / DealtRangedSpell /
DealtSpell / DealtSpellHeal / TakenSpell / OnKill / OnDeath /
OnCastFinished / Critical (the last is a modifier — fires only
on crit-tagged events).

Cross-references back to WSPL (triggerSpellId references the
spell that fires; procFromSpellId optionally restricts to a
specific source spell).

Three preset emitters: --gen-sps (4 weapon-imbue procs with
canonical PPM rates and ICDs), --gen-sps-aura (4 aura-tied
procs across multiple proc-flag combinations), --gen-sps-talent
(4 talent procs including charge-consuming Clearcasting and
Nightfall variants).

Validation enforces id+name+triggerSpellId+procFlags presence,
no duplicate ids; warns on:
  - procChance outside [0..1] (engine clamps)
  - procPpm < 0 (invalid PPM rate)
  - both procChance > 0 AND procPpm > 0 set (engine prefers PPM
    so procChance is silently ignored)
  - both procChance=0 AND procPpm=0 (proc never fires)

Wired through the cross-format table; WSPS appears automatically
in all 18 cross-format utilities. Format count 88 -> 89; CLI
flag count 1041 -> 1046.
This commit is contained in:
Kelsi 2026-05-09 23:32:25 -07:00
parent 28becba00e
commit 16ebcdda44
10 changed files with 714 additions and 0 deletions

View file

@ -113,6 +113,7 @@ constexpr FormatRow kFormats[] = {
{"WIFS", ".wifs", "items", "Item.dbc Flags bit meanings", "Item flag bit catalog"},
{"WBKD", ".wbkd", "npcs", "npc_vendor + npc_trainer SQL", "NPC service definition catalog"},
{"WTBR", ".wtbr", "tokens", "currency_token_reward SQL", "Token reward redemption catalog"},
{"WSPS", ".wsps", "spells", "spell_proc_event SQL + Spell.dbc", "Spell proc trigger catalog"},
// Additional pipeline catalogs without the alternating
// gen/info/validate CLI surface (loaded by the engine