feat(editor): add WSPR (Spell Reagent) — 80th open format milestone

Open replacement for the per-spell reagent fields in Spell.dbc
(Reagent[8] + ReagentCount[8]). Defines the item reagents that a
spell consumes from the caster's inventory each time it's cast —
Mage Portal needs a Rune of Portals, Resurrection needs a Holy
Candle (focused, not consumed), Warlock summons consume Soul
Shards.

One entry per reagent-using spell — most spells have no reagents
and are absent from this catalog. Each entry can list up to 8
(itemId, count) pairs which all must be present for the spell
to cast. Five reagentKind values capture the variety of reagent
semantics:
  - Standard      — ordinary consumed reagent
  - SoulShard     — warlock-specific shard tracking
  - FocusedItem   — required to cast but NOT consumed
                    (Symbol of Divinity for Resurrection)
  - Catalyst      — enables a stronger version of the spell
  - Tradeable     — crafting reagent for trade-skill recipes

Cross-references back to WSPL (every entry references a spellId)
and WIT (every reagent itemId references an item entry).
findBySpell(spellId) is the primary engine lookup.

Three preset emitters: --gen-spr (4 mage portal/teleport
reagents using Rune of Teleportation 17031), --gen-spr-warlock
(4 demon summons each consuming 1 Soul Shard 6265),
--gen-spr-rez (3 resurrection variants demonstrating each
ReagentKind including a no-reagent Druid Rebirth and a
focused-item Priest Resurrection).

Validation enforces id+name+spellId presence, reagentKind 0..4,
no duplicate ids; warns on:
  - slot itemId/count mismatch (id without count or vice versa)
  - SoulShard kind with non-canonical reagent (not item 6265)
  - FocusedItem kind with no reagent slots set (focused-item
    gating has nothing to gate)
  - duplicate spellId across entries (engine honors only first)

This is the 80th open format milestone. Wired through the
cross-format table; WSPR appears automatically in all 14
cross-format utilities. Format count 79 -> 80; CLI flag count
974 -> 979.
This commit is contained in:
Kelsi 2026-05-09 22:38:36 -07:00
parent 736ec3a1c0
commit d97f4bf5db
10 changed files with 704 additions and 0 deletions

View file

@ -120,6 +120,7 @@
#include "cli_player_spawn_profiles_catalog.hpp"
#include "cli_talent_tabs_catalog.hpp"
#include "cli_currency_types_catalog.hpp"
#include "cli_spell_reagents_catalog.hpp"
#include "cli_quest_objective.hpp"
#include "cli_quest_reward.hpp"
#include "cli_clone.hpp"
@ -281,6 +282,7 @@ constexpr DispatchFn kDispatchTable[] = {
handlePlayerSpawnProfilesCatalog,
handleTalentTabsCatalog,
handleCurrencyTypesCatalog,
handleSpellReagentsCatalog,
handleQuestObjective,
handleQuestReward,
handleClone,