WoW API: GetTradeSkillSelectionIndex

From AddOn Studio
Revision as of 04:46, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API GetTradeSkillSelectionIndex to API GetTradeSkillSelectionIndex without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < GetTradeSkillSelectionIndex

Returns the index of the currently selected trade skill.

local tradeSkillIndex = GetTradeSkillSelectionIndex();

Parameters[edit]

Returns[edit]

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

Example[edit]

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