WoW:API GameTooltip SetSpell: Difference between revisions

m
Confusion between SpellId and the id of the spell in the spell book. Renamed SpellId to SpellBookId for clarity
(Note for cata)
m (Confusion between SpellId and the id of the spell in the spell book. Renamed SpellId to SpellBookId for clarity)
Line 1: Line 1:
{{widgetmethod}}
{{widgetmethod}}
Shows the tooltip for the specified spell.
Shows the tooltip for the specified spell.
  GameTooltip:SetSpell(spellId, bookType);
  GameTooltip:SetSpell(spellBookId, bookType);
;''Arguments''
;''Arguments''
:(spellId, spellbookTabNum)
:
:;spellId: Number - the id of the spell on the tab
:;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").
:;bookType: String - Either BOOKTYPE_SPELL ("spell") or BOOKTYPE_PET ("pet").


Line 14: Line 14:


== Details ==
== Details ==
* Find the spellId as follows:
* Find the spellBookId as follows:


  local i = 1
  local i = 1
Anonymous user