Originally Posted by stAjora
As you can see, I'm collecting all information regarding a players researched traits. I tried to do this dynamically but I couldn't figure it out. Shouldn't be able to build the complete tree craft->weapon_type->trait with a couple loops?
|
I did not test it, but you could do something like this:
Lua Code:
local function GetInfoForSmithingCraftType(craftingSkillType)
local numResearchLines = GetNumSmithingResearchLines(craftingSkillType)
for researchLineIndex=1, numResearcLines do
local name, icon, numTraits = GetSmithingResearchLineInfo(craftingSkillType, researchLineIndex)
for traitIndex=1, numTraits do
local traitType, traitDescription, known = GetSmithingResearchLineTraitInfo(craftingSkillType, researchLineIndex, traitIndex)
if known then
-- do whatever
end
end
end
end