API GetItemSpell

From Wowpedia
Jump to: navigation, search

Return spell information about a specific item.

spellName, spellID = GetItemSpell(itemID or "itemString" or "itemName" or "itemLink")

Arguments

One of the following four ways to specify which item to query:

itemId 
Number - Numeric ID of the item.
itemName 
String - Name of an item owned by the player at some point during this session.
itemString 
String - A fragment of the itemString for the item, e.g. "item:30234:0:0:0:0:0:0:0" or "item:30234".
itemLink 
String - The full itemLink.

Returns

spellName 
String - The name of the spell.
spellID 
Number - The spell's unique identifier.

Details

  • Useful for determining whether an item is usable.