WoW API: GetEquipmentSetLocations

From AddOn Studio
Revision as of 04:45, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API GetEquipmentSetLocations to API GetEquipmentSetLocations without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < GetEquipmentSetLocations

Populates a table with the location/status of each slot in the specified equipment set.

infoArray = GetEquipmentSetLocations("name"[, infoArray]);

Arguments

"name"
String - equipment set name to retrieve information about.
infoArray
Table - optional if you don't want a new return table created. (Recommended if you call this multiple times)

Returns

infoArray
Table - the array portion of this table contains information on each of the slots for the set.
0: Ammo
1: Head
2: Neck
3: Shoulder
4: Shirt
5: Chest
6: Belt
7: Legs
8: Feet
9: Wrist
10: Gloves
11: Finger 1
12: Finger 2
13: Trinket 1
14: Trinket 2
15: Back
16: Main hand
17: Off hand
18: Ranged
19: Tabard

Notes

If "name" is not a valid equipment set, the function will not return any value.

If you supply infoArray as an argument, the elements [0..19] of the array will be set accordingly and all other values are left unchanged. If successful, the return value of the function will be a reference to the passed infoArray.

If you do not supply infoArray as an argument, a new table is created and returned by the function.

The values for each slot [0..19] of infoArray can be examined as follows:

  • -1 : The item for this slot is unavailable.
  • 0 : The slot should be emptied.
  • 1 : This slot is ignored by the equipment set, no change will be made.
  • Any other value can be examined by calling EquipmentManager_UnpackLocation(value).