Kelsidavis-WoWee/tools/editor/cli_spells_catalog.hpp

12 lines
200 B
C++
Raw Normal View History

feat(pipeline): add WSPL (Wowee Spell Catalog) format Novel open replacement for Blizzard's Spell.dbc + SpellEffect.dbc + the AzerothCore-style spell_dbc / spell_proc tables. The 20th open format added to the editor — completes the canonical-data side of the gameplay graph. Each entry holds the metadata side of a spell: name, description, school, range, mana / cast / cooldown times, plus a single primary effect. The simplified effect model (one effectKind + min/max value + misc field) covers the common cases (damage / heal / buff / debuff / teleport / summon / dispel) without needing to reproduce the full multi-effect graph that classic Spell.dbc carries. Cross-references with previously-added formats: WLCK.channel.targetId (kind=Spell) -> WSPL.entry.spellId WQT.objective.targetId (kind=SpellCast) -> WSPL.entry.spellId WCRT.equippedMain (item with on-use) -> WIT -> WSPL Format: • magic "WSPL", version 1, little-endian • per spell: spellId / name / description / iconPath / school / targetType / effectKind / cast & cooldown & GCD ms / manaCost / range min..max / minLevel / maxStacks / durationMs / effectValueMin..Max / effectMisc / flags Enums: • School (7): Physical / Holy / Fire / Nature / Frost / Shadow / Arcane • TargetType (6): Self / Single / Cone / AoeFromSelf / Line / Ground • EffectKind (7): Damage / Heal / Buff / Debuff / Teleport / Summon / Dispel • Flags: Passive / Hidden / Channeled / Ranged / AreaOfEffect / Triggered / UnitTargetOnly / FriendlyOnly / HostileOnly API: WoweeSpellLoader::save / load / exists / findById; presets makeStarter (Strike + Lesser Heal + Power Word: Fortitude + Hearthstone, one per major effect kind), makeMage (Frostbolt 116 + Fireball 133 + Arcane Intellect 1459 + Blink 1953, canonical Classic spellIds), makeWarrior (Heroic Strike 78 + Thunder Clap 6343 + Battle Shout 6673 + Mortal Strike 12294). CLI added (5 flags, 535 documented total now): --gen-spells / --gen-spells-mage / --gen-spells-warrior --info-wspl / --validate-wspl Validator catches: spellId=0 + duplicates, empty name, school out of range, effectKind out of range, NaN range, range/value min>max, FriendlyOnly+HostileOnly conflict (incoherent), friendly-only with damage/debuff effect (incoherent), hostile-only with heal/buff effect, buff/debuff effect with durationMs=0 (instant fade — almost certainly authoring oversight). The validator caught a real preset-emitter authoring error during initial smoke testing — buff spells were setting effectValueMin without effectValueMax (validator's range check immediately flagged it), prompting an in-batch fix to set both fields. This is exactly the catch-the-typo purpose validators serve.
2026-05-09 15:58:09 -07:00
#pragma once
namespace wowee {
namespace editor {
namespace cli {
bool handleSpellsCatalog(int& i, int argc, char** argv, int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee