ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Manipulate the Chat (https://www.esoui.com/forums/showthread.php?t=4639)

circonian 04/28/15 07:47 PM

Quote:

Originally Posted by stAjora (Post 20964)
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:
  1. local function GetInfoForSmithingCraftType(craftingSkillType)
  2.     local numResearchLines = GetNumSmithingResearchLines(craftingSkillType)
  3.  
  4.     for researchLineIndex=1, numResearcLines do
  5.         local name, icon, numTraits = GetSmithingResearchLineInfo(craftingSkillType, researchLineIndex)
  6.        
  7.         for traitIndex=1, numTraits do
  8.             local traitType, traitDescription, known = GetSmithingResearchLineTraitInfo(craftingSkillType, researchLineIndex, traitIndex)
  9.             if known then
  10.                 -- do whatever
  11.             end
  12.         end
  13.     end
  14. end


All times are GMT -6. The time now is 10:44 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI