CollapseTrainerSkillLine

From Warcraft Wiki
Jump to navigation Jump to search
Flavors
Links
Info
Added in 1.0.0
Removed in 4.0.1

Collapses a header in the trainer window, hiding all spells below it.

CollapseTrainerSkillLine(index)

Arguments

index
number - The index of a line in the trainer window (if the supplied index is not a header, an error is produced).
Index 0 ("All") will collapse all headers.
Note that indices are affected by the trainer filter, see GetTrainerServiceTypeFilter() and SetTrainerServiceTypeFilter()

Example

Collapses all trainer headers. This can also be done by using index 0 instead.

for i = 1, GetNumTrainerServices() do
	local category = select(3, GetTrainerServiceInfo(i))
	if category == "header" then
		CollapseTrainerSkillLine(i)
	end
end

Patch changes

Cataclysm Patch 4.0.1 (2010-10-12): Removed.

See also