Wikia

WoWWiki

Changes: API GetEquipmentSetInfo

Edit

Back to page

(Example)
(Undo revision 2624696 by Azilroka (talk))
 
Line 19: Line 19:
 
print("You have no equipment sets");
 
print("You have no equipment sets");
 
else
 
else
print("First equipment set: \124T" .. icon .. ":16\124t " .. name);
+
print("First equipment set: \124TInterface\\Icons\\" .. icon .. ":16\124t " .. name);
 
end
 
end
   

Latest revision as of 19:58, November 15, 2012

WoW API < GetEquipmentSetInfo

Returns information about a saved equipment set:

name, icon, lessIndex = GetEquipmentSetInfo(index)
icon, lessIndex = GetEquipmentSetInfoByName("name")

ArgumentsEdit

GetEquipmentSetInfo -- index 
Number: an ascending index going from 1 to GetNumEquipmentSets().
GetEquipmentSetInfoByName -- name
String: equipment set name.

ReturnsEdit

The functions returns nothing if the queried index or set name does not exist. If the index/name is valid, the following values are returned:

name 
String: Equipment set name.
icon 
String: Icon texture file name (relative to Interface/Icons) selected for this set.
lessIndex 
Number: A number one less than the set index. This return value is not used by the default UI.

ExampleEdit

local name, icon, lessIndex = GetEquipmentSetInfo(1);
if not name then
 print("You have no equipment sets");
else
 print("First equipment set: \124TInterface\\Icons\\" .. icon .. ":16\124t " .. name);
end

Around Wikia's network

Random Wiki