Navigation menu

WoW:API GetSkillLineInfo: Difference between revisions

Jump to navigation Jump to search
→‎Example: Cleaned up example code slightly to be a bit more optimized.
(→‎Example: Cleaned up example code slightly to be a bit more optimized.)
Line 33: Line 33:
== Example ==
== Example ==
  for skillIndex = 1, GetNumSkillLines() do
  for skillIndex = 1, GetNumSkillLines() do
   skillName, isHeader, isExpanded, skillRank, numTempPoints, skillModifier,
   local skillName, isHeader, isExpanded, skillRank, numTempPoints, skillModifier,
     skillMaxRank, isAbandonable, stepCost, rankCost, minLevel, skillCostType,
     skillMaxRank, isAbandonable, stepCost, rankCost, minLevel, skillCostType,
     skillDescription = GetSkillLineInfo(skillIndex)
     skillDescription = GetSkillLineInfo(skillIndex)
   if isHeader == nil then
   if not isHeader then
       DEFAULT_CHAT_FRAME:AddMessage("Skill: " .. skillName .. " - " .. skillRank)
       print(string.format("Skill: %s - %s", skillName, skillRank))
   end
   end
  end
  end
Line 48: Line 48:
  Leatherworking - 300
  Leatherworking - 300


[[Category:World of Warcraft API]]


====Another Example====
====Another Example====
Line 63: Line 62:


:For more information on this method try the Lua website:[http://www.lua.org/pil/5.1.html]
:For more information on this method try the Lua website:[http://www.lua.org/pil/5.1.html]
[[Category:World of Warcraft API]]
Anonymous user