Fandom

WoWWiki

API GameTooltip SetSpell

104,998pages on
this wiki
Add New Page
Talk0 Share
Widget API ← GameTooltip < SetSpell

Shows the tooltip for the specified spell.

GameTooltip:SetSpell(spellBookId, bookType);
Arguments
spellBookId
Number - the id of the spell on the tab from the spellbook - not the same as SpellId
bookType
String - Either BOOKTYPE_SPELL ("spell") or BOOKTYPE_PET ("pet").
Returns
unknown

Examples Edit

GameTooltip:SetSpell(46, BOOKTYPE_SPELL)

Details Edit

  • Find the spellBookId as follows:
local i = 1
while true do
   local spell, rank = GetSpellName(i, BOOKTYPE_SPELL)
   if (not spell) then
      break
   end
   if (rank) then
      spell = spell.." ("..rank..")"
   end
   DEFAULT_CHAT_FRAME:AddMessage(i..": "..spell)
   i = i + 1
end

Notes Edit

This has been renamed to SetSpellBookItem in patch 4.0.1

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.