Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Register
(remove 5.x returns)
Line 5: Line 5:
 
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
 
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
   
 
name, rank, icon, castTime, minRange, maxRange, spellId = GetSpellInfo(spellId or spellName)
6.0:
 
name, rank, icon, castTime, minRange, maxRange, spellId
 
= GetSpellInfo(spellId or spellName)
 
   
 
== Arguments ==
Pre-6.0:
 
  +
:;spellId : Integer - The spell's unique identifier.
name, rank, icon, cost, isFunnel, powerType, castTime, minRange, maxRange
 
= GetSpellInfo(spellId or spellName)
 
   
  +
::'''OR'''
   
== Arguments ==
 
<!-- List each argument, together with its type -->
 
:(spellId or spellName)
 
 
:;spellId : Integer - The global spell number, found on wowhead or through [[API_COMBAT_LOG_EVENT|COMBAT_LOG_EVENT]].
 
 
:;spellName : String - The Name of the spell.
 
:;spellName : String - The Name of the spell.
   
 
== Returns ==
 
== Returns ==
6.0:
 
 
:name, rank, icon, castTime, minRange, maxRange, spellId
 
:name, rank, icon, castTime, minRange, maxRange, spellId
Pre-6.0:
 
:name, rank, icon, cost, isFunnel, powerType, castTime, minRange, maxRange
 
 
   
 
:;name : String - The name of the spell.
 
:;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".
 
:;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.
 
:;icon : String - The interface path to the icon texture.
:;cost (Pre-6.0 only) : Number - The cost of the spell in Mana/Rage/Energy/Focus.
 
:;isFunnel (Pre-6.0 only) : Boolean - Returns true if the spell is a health funnel effect.
 
:;powerType (Pre-6.0 only) : Number - The power type required.
 
::* -2 for Health
 
::* Others: See [[PowerType]]
 
 
:;castTime : Number - The cast time, in milliseconds.
 
:;castTime : Number - The cast time, in milliseconds.
 
:;minRange : Number - The minimum range of the spell.
 
:;minRange : Number - The minimum range of the spell.
 
:;maxRange : Number - The maximum range of the spell.
 
:;maxRange : Number - The maximum range of the spell.
:;spellId : Integer - The global spell number.
+
:;spellId : Integer - The spell's unique identifier.
   
 
== Details ==
 
== Details ==
 
===Arguments===
 
===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. The values returned by this function are '''affected by the player's form or stance''' on relevant spells, such as a warlock's Corruption spell transforming to Doom when Metamorphosis is active.
 
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. The values returned by this function are '''affected by the player's form or stance''' on relevant spells, such as a warlock's Corruption spell transforming to Doom when Metamorphosis is active.
 
===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.
 
 
===Patch 6.0===
 
Patch 6.0 removed returns cost, isFunnel, and powerType. See [[Patch_6.0.2/API_changes]]
 

Revision as of 18:40, 4 March 2015

Get information about a spell.

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

Arguments

spellId
Integer - The spell's unique identifier.
OR
spellName
String - The Name of the spell.

Returns

name, rank, icon, castTime, minRange, maxRange, spellId
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.
castTime
Number - The cast time, in milliseconds.
minRange
Number - The minimum range of the spell.
maxRange
Number - The maximum range of the spell.
spellId
Integer - The spell's unique identifier.

Details

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. The values returned by this function are affected by the player's form or stance on relevant spells, such as a warlock's Corruption spell transforming to Doom when Metamorphosis is active.