Classic's skills tab is always in the same order: Class, Primary, Secondary, Weapon, Armor, and Language. Using the header text, the SKILLS global string, and some local tables:
Lua Code:
local section, primary, secondary, other = 0, {}, {}, {}
for i = 1, GetNumSkillLines() do
local name, header, _, rank, _, _, max = GetSkillLineInfo(i)
if header then
section = section + 1
if section == 2 then
primary.n = name
elseif section == 3 then
secondary.n = name
end
else
tinsert( section == 2 and primary or section == 3 and secondary or other, {name,rank..' / '..max,.75,.9,1,.3,1,.3} )
end
end
GameTooltip:AddLine(primary.n)
for i = 1, #primary do
GameTooltip:AddDoubleLine( unpack( primary[i] ) )
end
GameTooltip:AddLine(" ")
GameTooltip:AddLine(secondary.n)
for i = 1, #secondary do
GameTooltip:AddDoubleLine( unpack( secondary[i] ) )
end
GameTooltip:AddLine(" ")
GameTooltip:AddLine(SKILLS)
for i = 1, #other do
GameTooltip:AddDoubleLine( unpack( other[i] ) )
end