Fandom

WoWWiki

API GetSpellTabInfo

104,634pages on
this wiki
Add New Page
Talk0 Share

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.

WoW API < GetSpellTabInfo

Retrieves information about the specified line of spells

name, texture, offset, numSpells = GetSpellTabInfo(spellbookTabNum)

Parameters Edit

Arguments

spellbookTabNum  
Number - The index of the tab, ranges from 1 to MAX_SKILLLINE_TABS


Returns

name, texture, offset, numSpells
name 
String - The name of the spell line (General, Shadow, Fury, etc.)
texture 
String - The texture path for the spell line's icon
offset 
Number - The number of spells before this spell line (will be one less than the index of the first spell in this spell line)
numSpells 
Number - The number of spells in this spell line

Example Edit

for i = 1, MAX_SKILLLINE_TABS do
   local name, texture, offset, numSpells = GetSpellTabInfo(i);
   
   if not name then
      break;
   end
   
   for s = offset + 1, offset + numSpells do
      local	spell, rank = GetSpellName(s, BOOKTYPE_SPELL);
      
      if rank then
          spell = spell.." "..rank;
      end
      
      DEFAULT_CHAT_FRAME:AddMessage(name..": "..spell);
   end
end

Also on Fandom

Random Wiki