WoW API: GetTradeSkillSelectionIndex

From AddOn Studio
Revision as of 23:10, 23 December 2006 by WoWWiki>Starlightblunder ({{wowapi}}, format)
Jump to navigation Jump to search

WoW API < GetTradeSkillSelectionIndex

Returns the index of the currently selected trade skill.

local tradeSkillIndex = GetTradeSkillSelectionIndex();

Parameters

Returns

tradeSkillIndex
Number - 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;