WoW:API ExpandTrainerSkillLine: Difference between revisions
Jump to navigation
Jump to search
ExpandTrainerSkillLine -Documentation by starlightblunder-
No edit summary |
(Added Documentation) |
||
Line 1: | Line 1: | ||
{{API | <center>'''ExpandTrainerSkillLine''' ''-Documentation by [[User:starlightblunder|starlightblunder]]-''</center> | ||
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 [[API_GetTrainerServiceTypeFilter|GetTrainerServiceTypeFilter]] and [[API_SetTrainerServiceTypeFilter|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 | |||
---- | |||
{{WoW API}} |
Revision as of 11:55, 4 March 2006
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