WoW:API GameTooltip SetSpell: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{widgetmethod}} | {{widgetmethod}} | ||
Shows the tooltip for the specified spell. | Shows the tooltip for the specified spell. | ||
GameTooltip:SetSpell(spellId, | GameTooltip:SetSpell(spellId, bookType); | ||
;''Arguments'' | ;''Arguments'' | ||
:(spellId, spellbookTabNum) | :(spellId, spellbookTabNum) | ||
:;spellId: Number - the id of the spell on the tab | :;spellId: Number - the id of the spell on the tab | ||
:; | :;bookType: String - Either BOOKTYPE_SPELL ("spell") or BOOKTYPE_PET ("pet"). | ||
;''Returns'' | ;''Returns'' | ||
:unknown | :unknown | ||
== Examples == | |||
GameTooltip:SetSpell(46, BOOKTYPE_SPELL) | |||
== Details == | |||
* Find the spellId 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 |
Revision as of 00:49, 15 January 2007
← Widget API ← GameTooltip < SetSpell
Shows the tooltip for the specified spell.
GameTooltip:SetSpell(spellId, bookType);
- Arguments
- (spellId, spellbookTabNum)
- spellId
- Number - the id of the spell on the tab
- bookType
- String - Either BOOKTYPE_SPELL ("spell") or BOOKTYPE_PET ("pet").
- Returns
- unknown
Examples
GameTooltip:SetSpell(46, BOOKTYPE_SPELL)
Details
- Find the spellId 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