v0.13.8

C_SpellBook.GetSpellBookItemPowerCost

functionguessedavailable in: camelot

Returns a table containing one or more SpellPowerCostInfos, one for each power type a SpellBookItem costs.

signaturewowlua
function C_SpellBook.GetSpellBookItemPowerCost(    spellBookItemSlotIndex: number,    spellBookItemSpellBank: SpellBookSpellBank): SpellPowerCostInfo[]?

Parameters

nametype
spellBookItemSlotIndexnumber
spellBookItemSpellBankSpellBookSpellBank

Returns

powerCosts · SpellPowerCostInfo[]? · May return nil if item is not found or has no resource costs

SpellPowerCostInfo
fieldtypedescription
typePowerType
namestringThe name or 'power token' for this power type (ex: MANA, FOCUS, etc)
costnumberFull cost including optional cost; Optional cost is cost the spell will use but isn't required (ex: Rogue spell might cost 1CP but have optional cost of up to 5 more)
minCostnumberCost excluding optional cost; This is min required to cast the spell
costPercentnumberCost as a percentage of base maximum resource; May be 0 if the cost is simply a flat cost
costPerSecnumberCost as a percentage of base maximum resource consumed per second, used by channel spells; May be 0 if cost is simply a flat cost
requiredAuraIDnumberAn aura the caster must have for the cost to apply; Usually based on things like active spec or shapeshift form
hasRequiredAurabooleanTrue if there is a requiredAuraID and the caster currently has that aura; Caster is either the current player or their pet, depending on spell type

Blizzard's documentation says it may return nothing.

In wowlua's emulated client

guessedThe answer is worked out from Blizzard's documentation, its UI code and the function's name, and not checked against the client. what the statuses mean

Restrictions

sources

Signature and flags: Blizzard's API documentation (Blizzard_APIDocumentationGenerated) (SpellBook system, camelot 1.60.1). Description: warcraft.wiki.gg's API pages ↗, by its contributors, CC BY-SA 4.0 ↗.