mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-15 23:50:38 +00:00
Returns a SpellPowerCostInfo[] (one entry in vanilla — spells have a single power cost), or nil for an unknown / no-cost spell. The `cost` is the player-effective value via the engine's own cost helper FUN_006e31b0 (base + level + ManaCostPercent-of-resource + descriptor power-cost mods + the cost SpellMod, op 0xE) — so it matches what casting actually deducts, talents included. Verified in-game: Blizzard (10187) on a Mage with 3/3 Frost Channeling returns cost 1190 = 1400 base x 0.85 (15% reduction). Keeps C_Spell.GetSpellInfo's `cost` field as the base ManaCost (intrinsic spell data); GetSpellPowerCost is the player-modified counterpart — same base/modified split as GetSpellRadius. Calling the full engine helper beats replicating op 14 via Spell::Mod, since the helper also folds in the descriptor power-cost modifiers. Fields: type (Enum.PowerType), name (power token), cost, minCost (==cost, no optional cost in vanilla), costPercent, costPerSec 0, requiredAuraID 0, hasRequiredAura false. Docs: API.md section + README Spell row.