WoW:API GetSkillLineInfo: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
<center>'''GetSkillLineInfo''' ''-Documentation by Chevalric-''</center>
{{wowapi}} __NOTOC__
 


Returns the name and other information which is associated with the specific skill or skill header in the game.
Returns the name and other information which is associated with the specific skill or skill header in the game.


  GetSkillLineInfo(skillLine);
  skillName, isHeader, isExpanded, skillRank, numTempPoints, skillModifier,
 
  skillMaxRank, isAbandonable, stepCost, rankCost, minLevel, skillCostType,
----
  skillDescription = GetSkillLineInfo(skillIndex)
;''Arguments''
 
:(Number skillLine)
 
:;skillLine : The linenumber for the skill or skill header
 
----
;''Returns''
 
:;skillName(String) : The name of the skill/header
:;isHeader(Boolean) : True if this skillLine is a header
:;isExpanded(Boolean) : True if the skillLine is expanded
:;skillRank(Number) : The current rank for the current skill
:;numTempPoints(Number) : Temporary points for the current skill
:;skillModifier(Number) : Skill modifier value for the current skill
:;skillMaxRank(Number) : The maximum rank for the current skill
:;isAbandonable(Boolean) : True if the skill can be unlearned
:;stepCost(Boolean) : True if skill can be learned
:;rankCost(Boolean) : True if skill can be trained up
:;minLevel(Number) : Minimum level required to learn this skill
:;skillCostType(Number) : Unknown, seems to be related to primary and secondary skills
:;skillDescription(String) : Skill Description Text, localised
----
;''Example''
 
local skillTitle = GetSkillLineInfo(1);


;''Result''
== Parameters ==
"Armor"
=== Arguments ===
:(skillIndex)


;''Example from SkillFrame.lua''
:;skillIndex : Integer - The row of the skill display to request information from.
=== Returns ===
:skillName, isHeader, isExpanded, skillRank, numTempPoints, skillModifier, skillMaxRank, isAbandonable, stepCost, rankCost, minLevel, skillCostType, skillDescription


local skillName, header, isExpanded, skillRank, numTempPoints, skillModifier, skillMaxRank, isAbandonable, stepCost, rankCost, minLevel, skillCostType, skillDescription = GetSkillLineInfo(skillIndex);
:;skillName : String - The name of the skill/header
:;isHeader : Flag - 1 if row is header, nil otherwise.
:;isExpanded: Flag - 1 if row is expanded, nil otherwise.
:;skillRank : Integer - The current rank for the current skill
:;numTempPoints : Integer - Temporary points for the current skill
:;skillModifier : Integer - Skill modifier value for the current skill
:;skillMaxRank : Integer - The maximum rank for the current skill
:;isAbandonable : Flag - 1 if skill can be unlearned, nil otherwise.
:;stepCost : Flag - 1 if skill can be learned, nil otherwise.
:;rankCost : Flag - 1 if skill can be trained, nil otherwise.
:;minLevel : Integer - Minimum level required to learn this skill
:;skillCostType : Integer - Unknown, seems to be related to primary and secondary skills
:;skillDescription : String - Skill Description Text, localised


----
;''Description''


: Returns the string which is associated with the specific Skill Line in the game. Also returns other information about a given skill such as its current rank, its maximum rank, if it's a header and if so, if it's collapsed.
== Example ==
for skillIndex = 1, GetNumSkillLines() do
  skillName, isHeader, isExpanded, skillRank, numTempPoints, skillModifier,
    skillMaxRank, isAbandonable, stepCost, rankCost, minLevel, skillCostType,
    skillDescription = GetSkillLineInfo(skillIndex)
  if isHeader == nil then
      DEFAULT_CHAT_FRAME:AddMessage("Skill: " .. skillName .. " - " .. skillRank)
  end
end


----
====Result====
:Prints each skills's name and rank.
Two-Handed Mace - 229
Cooking - 278
Staves - 150
Leatherworking - 300


{{template:WoW API}}
[[Category:World of Warcraft API]]
Anonymous user