View Single Post
01-22-20, 06:19 PM   #4
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by Seerah View Post
Does the IsAbandonable return work? (8th in the list)
Yes this works but it only return the 2 Professions not the secondary skills.

so I've been playing around with it and almost have it where I want it.

Its sloppy but almost does the trick.
Code:
GameTooltip:AddLine("Professions")
for skillIndex = 1, GetNumSkillLines() do
	local skillName, isHeader, _, skillRank, _, _, skillMaxRank, isAbandonable, _, _, _, _, _ = GetSkillLineInfo(skillIndex)
	if isAbandonable then
		GameTooltip:AddDoubleLine(skillName, skillRank..' / '..skillMaxRank,.75,.9,1,.3,1,.3)
	end
end

GameTooltip:AddLine(" ")
GameTooltip:AddLine("Secondary Skills")
for skillIndex = 1, GetNumSkillLines() do
	local skillName, isHeader, _, skillRank, _, _, skillMaxRank, isAbandonable, _, _, _, _, _ = GetSkillLineInfo(skillIndex)
	if skillName == "Cooking" then
		GameTooltip:AddDoubleLine("Cooking", skillRank..' / '..skillMaxRank,.75,.9,1,.3,1,.3)
	end
	if skillName == "First Aid" then
		GameTooltip:AddDoubleLine("First Aid", skillRank..' / '..skillMaxRank,.75,.9,1,.3,1,.3)
	end
	if skillName == "Fishing" then
		GameTooltip:AddDoubleLine("Fishing", skillRank..' / '..skillMaxRank,.75,.9,1,.3,1,.3)
	end
end
	
GameTooltip:AddLine(" ")
GameTooltip:AddLine("Skills")
for skillIndex = 1, GetNumSkillLines() do
	local skillName, isHeader, _, skillRank, _, _, skillMaxRank, isAbandonable, _, _, _, _, _ = GetSkillLineInfo(skillIndex)			
	if not isHeader and not isAbandonable then
		GameTooltip:AddDoubleLine(skillName, skillRank..' / '..skillMaxRank,.75,.9,1,.3,1,.3)
	end

end
Here is the screenshot:


Now if I can just figure out how to remove the Secondary skills from the bottom list it would be perfect.

Thanks again for the help.
  Reply With Quote