WoW API: ExpandTrainerSkillLine

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

WoW API < ExpandTrainerSkillLine

Expands a header, showing all spells below it.

ExpandTrainerSkillLine(id);

Arguments
id
Index of the trainer service header to expand (if the supplied index is not a header, an error is produced). Note that indices are affected by the trainer filter. (See GetTrainerServiceTypeFilter and SetTrainerServiceTypeFilter.)

Example

Expands all trainer headers.

local i, category;
for i=1,GetNumTrainerServices() do
 _ , _, category = GetTrainerServiceInfo(i);
 if (category == nil) then
  break; -- GetNumTrainerServices() does not check if you're talking to a trainer or not.
 end
 if (category == "header") then
  ExpandTrainerSkillLine(i);
 end
end