Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API GetTrainerServiceIcon
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{wowapi}} Returns the icon texture for a particular trainer service. icon = GetTrainerServiceIcon(id); ---- ;''Arguments'' :; id : Index of the trainer service to retrieve information about. Note that indices are affected by the trainer filter. (See [[API_GetTrainerServiceTypeFilter|GetTrainerServiceTypeFilter]] and [[API_SetTrainerServiceTypeFilter|SetTrainerServiceTypeFilter]].) ---- ;''Returns'' :; icon : (String) Name of the icon texture for a particular trainer service. nil if id is a header rather than a spell line. ---- ;''Example'' Prints skill names and icon textures when interacting with a trainer. local i, name, category, icon; for i=1,GetNumTrainerServices() do name, _, category = GetTrainerServiceInfo(i); if (name == nil) then break; -- GetNumTrainerServices() does not check if you're talking to a trainer or not. end if (category ~= "header") then icon = GetTrainerServiceIcon(i); DEFAULT_CHAT_FRAME:AddMessage(name .. ": " .. icon); end end
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Wowapi
(
edit
)