mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-11 03:23:51 +00:00
Novel replacement for the implicit context-conditional spell substitution rules vanilla WoW encoded across SpellSpecificType, SpellEffect.EffectMechanic override fields, and the proc-modified spell tables in SpellProcEvent. Each entry binds one base spell to a variant spell that activates when a runtime condition is met (player in a specific stance, talent talented, racial buff active, weapon equipped, aura present). Six conditionKind values cover the full substitution surface: Stance / Form / Talent / Race / EquippedWeapon / AuraActive. The conditionValue field is polymorphic — its semantics depend on conditionKind (a stance spellId, a talentId, a race bit, etc.). The spell-cast pipeline iterates findByBaseSpell at cast time and picks the highest-priority variant whose condition is satisfied, falling through to the base spell if none matches. Three preset emitters demonstrating the pattern: makeWarriorStance (4 stance-conditional Warrior variants — Heroic Strike Berserker damage bonus, Battle baseline, Mocking Blow Defensive AoE taunt, Pummel Berserker-only gate), makeTalentMod (4 talent- modified variants — Frostbolt + Brain Freeze instant, Lava Burst + Flame Shock auto-crit, Earth Shield + Improved bonus heal, Ferocious Bite + Berserk), makeRacial (4 race-gated racials — Stoneform Dwarf, War Stomp Tauren, Berserking Troll, Will of the Forsaken). Validator's most novel check is the (baseSpell, conditionKind, conditionValue, priority) 4-tuple uniqueness — two variants with all four matching would tie at runtime and resolve non-deterministically (the spell-cast pipeline's std::sort by priority is stable but the underlying iteration order is undefined when priorities tie). Packs the tuple into 64 bits (base 32 | value 16 | kind 8 | prio 8) for set lookup. Format count 112 -> 113. CLI flag count 1213 -> 1218.
12 lines
240 B
C++
12 lines
240 B
C++
#pragma once
|
|
|
|
namespace wowee {
|
|
namespace editor {
|
|
namespace cli {
|
|
|
|
bool handleSpellVariantsCatalog(int& i, int argc, char** argv,
|
|
int& outRc);
|
|
|
|
} // namespace cli
|
|
} // namespace editor
|
|
} // namespace wowee
|