WoW:API GetTalentInfo: Difference between revisions

no edit summary
(Returns information about a specified talent in a specified tab.)
No edit summary
Line 1: Line 1:
Returns information about a specified talent in a specified tab.  
Returns information about a specified talent in a specified tab.  


  ''nameTalent'' , ''iconPath'' , ''iconX'' , ''iconY'' , ''currentRank'' , ''maxRank'' = GetTalentInfo( ''tabIndex'' , ''talentIndex'' );
  ''nameTalent'' , ''iconPath'' , ''tier'' , ''column'' , ''currentRank'' , ''maxRank'', ''isExceptional'', ''meetsPrereq'' = GetTalentInfo( ''tabIndex'' , ''talentIndex'' );


----
----
Line 17: Line 17:
:;nameTalent : String - The name of the talent in that tab.
:;nameTalent : String - The name of the talent in that tab.
:;iconPath : String - The path to the icon of the talent.
:;iconPath : String - The path to the icon of the talent.
:;iconX : Integer - The horizontal grid position of the talent icon in its talent pane tab.
:;tier : Integer - The vertical grid position of the talent icon in its talent pane tab.
:;iconY : Integer - The horizontal grid position of the talent icon in its talent pane tab.
:;column : Integer - The horizontal grid position of the talent icon in its talent pane tab.
:;currentRank : Integer - The current rank (currently assigned talent points) of the talent.
:;currentRank : Integer - The current rank (currently assigned talent points) of the talent.
:;maxRank : Integer - The maximum rank (maximum number of talent points) of the talent.
:;maxRank : Integer - The maximum rank (maximum number of talent points) of the talent.
:;isExceptional -
:;meetsPrereq -


----
----
Line 30: Line 32:
     local numTalents = GetNumTalents(t);
     local numTalents = GetNumTalents(t);
     for i=1, numTalents do
     for i=1, numTalents do
         nameTalent, icon, iconx, icony, currRank, maxRank= GetTalentInfo(t,i);
         nameTalent, icon, tier, column, currRank, maxRank= GetTalentInfo(t,i);
         DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
         DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank);
     end
     end
Anonymous user