feat(editor): add WSEF (Spell Effect Type) open catalog format

Open replacement for the SpellEffect.Effect field meanings in
Spell.dbc plus the engine's hard-coded effect dispatch table.
Defines what each spell-effect integer value actually does —
SCHOOL_DAMAGE=2 deals magical damage, DUMMY=3 is a script hook,
HEAL=10 restores health, ENERGIZE=30 restores power,
APPLY_AURA=6 attaches a buff/debuff, etc.

WotLK's Spell.dbc has 192+ effect type integers, each with its
own resolver in the spell engine. This catalog lets the engine
look up "given effect=10, what resolution behavior do I run?"
via a single table lookup instead of a hard-coded switch
statement, and lets server-custom spells reference new effect
IDs without touching engine code.

Ten effectKind values capture the major behavior families
(Damage / Heal / Aura / Energize / Trigger / Movement / Summon /
Dispel / Dummy / Misc), and a 6-bit behaviorFlags field
captures targeting/gating semantics:
  - RequiresTarget       — must have a target
  - RequiresLineOfSight  — LoS check on target
  - IsHostileEffect      — hostile only (PvP gating)
  - IsBeneficialEffect   — friendly only
  - IgnoresImmunities    — bypasses Bubble / IBF / etc
  - TriggersGCD          — counts toward GCD

Distinct from WAUR (Spell Aura Type, future format) which is the
secondary classification used when effectType is APPLY_AURA. The
two together cover the full spell-effect classification space.

Three preset emitters: --gen-sef (5 damage effects covering
typical Spell.dbc damage IDs), --gen-sef-healing (4 heal
effects all flagged IsBeneficialEffect), --gen-sef-aura (5
aura-application effects covering single-target / pet /
party-wide / area variants).

Validation enforces name presence, effectKind 0..9, no duplicate
ids; warns on:
  - both Hostile and Beneficial flags set (engine picks Hostile,
    contradiction suggests config bug)
  - Damage kind without TriggersGCD (most damage should be on GCD
    — env damage is the canonical exception)
  - Heal kind without IsBeneficialEffect (engine treats heal as
    ungated, may damage enemies)

Wired through the cross-format table; WSEF appears automatically
in all 15 cross-format utilities. Format count 81 -> 82; CLI flag
count 989 -> 994.
This commit is contained in:
Kelsi 2026-05-09 22:50:13 -07:00
parent a97bc676db
commit 24e9a55a10
10 changed files with 669 additions and 0 deletions

View file

@ -123,6 +123,7 @@
#include "cli_currency_types_catalog.hpp"
#include "cli_spell_reagents_catalog.hpp"
#include "cli_achievement_criteria_catalog.hpp"
#include "cli_spell_effect_types_catalog.hpp"
#include "cli_quest_objective.hpp"
#include "cli_quest_reward.hpp"
#include "cli_clone.hpp"
@ -287,6 +288,7 @@ constexpr DispatchFn kDispatchTable[] = {
handleCurrencyTypesCatalog,
handleSpellReagentsCatalog,
handleAchievementCriteriaCatalog,
handleSpellEffectTypesCatalog,
handleQuestObjective,
handleQuestReward,
handleClone,