API GetSpellInfo

Get information about a spell.

name, rank, icon, cost, isFunnel, powerType, castTime, minRange, maxRange = GetSpellInfo(spellId or spellName)

Arguments

 * (spellId or spellName)


 * spellId : Integer - The global spell number, found on wowhead or through COMBAT_LOG_EVENT.
 * spellName : String - The Name of the spell.

Returns

 * name, rank, icon, cost, isFunnel, powerType, castTime, minRange, maxRange


 * name : String - The name of the spell.
 * rank: String - The secondary text of the spell, displayed in the top right-hand corner of the spell's tooltip. e.g "Racial", "Turtle", "Battle Stance".
 * icon : String - The interface path to the icon texture.
 * cost : Number - The cost of the spell in Mana/Rage/Energy/Focus.
 * isFunnel : Boolean - Returns true if the spell is a health funnel effect.
 * powerType : Number - The power type required.
 * -2 for Health
 * Others: See PowerType
 * castTime : Number - The cast time, in milliseconds.
 * minRange : Number - The minimum range of the spell.
 * maxRange : Number - The maximum range of the spell.

Arguments
Using spellId as the argument will always return the info. Using spellName or spellLink will only return the info if the spell is in your spellbook. Otherwise it will return nil.

isFunnel
Currently the only spells isFunnel returns true on are a warlock's Health Funnel spells, and a few other miscellaneous NPC spells.

PowerType
It is unknown at this time whether Happiness (PowerType 4) is ever passed as a spell cost.