WoW:API GetTradeSkillSelectionIndex: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 26: Line 26:
   end;
   end;
  end;
  end;




----
----
{{Template:WoW API}}
{{WoW API}}
 
[[Category:API TradeSkill Functions|GetTradeskillSelectionIndex]]

Revision as of 05:50, 4 January 2006

GetTradeSkillSelectionIndex -Documentation by Goldark-

Returns the index of the currently selected trade skill.

local tradeSkillIndex = GetTradeSkillSelectionIndex();

Arguments
none

Returns
Number tradeSkillIndex
tradeSkillIndex
The index of the currently selected trade skill, or 0 if none selected.

Example
if ( GetTradeSkillSelectionIndex() > 1 ) then
  TradeSkillFrame_SetSelection(GetTradeSkillSelectionIndex());
else
  if ( GetNumTradeSkills() > 0 ) then
    TradeSkillFrame_SetSelection(GetFirstTradeSkill());
  end;
end;



Template:WoW API