Wikia

WoWWiki

API GetTrainerServiceIcon

Talk0
98,461pages on
this wiki
Revision as of 14:31, December 23, 2006 by Starlightblunder (Talk | contribs)

(diff) ←Older revision | Latest revision (diff) | Newer revision → (diff)

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 GetTrainerServiceTypeFilter and 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
Advertisement | Your ad here

Photos

Add a Photo
61,979photos on this wiki
See all photos >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki