Correcting return value for supplied infoArray
(Created page with '{{wowapi}} Populates a table with the location/status of each slot in the specified equipment set. infoArray = GetEquipmentSetLocations("name"); ==Arguments== ;"name" : String …') |
(Correcting return value for supplied infoArray) |
||
| Line 1: | Line 1: | ||
{{wowapi}} | {{wowapi}} | ||
Populates a table with the location/status of each slot in the specified equipment set. | Populates a table with the location/status of each slot in the specified equipment set. | ||
infoArray = GetEquipmentSetLocations("name"); | infoArray = GetEquipmentSetLocations("name"[, infoArray]); | ||
==Arguments== | ==Arguments== | ||
;"name" : String - equipment set name to retrieve information about. | ;"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== | ==Returns== | ||
;infoArray : Table - the array portion of this table contains information on each of the slots for the set. | ;infoArray : Table - the array portion of this table contains information on each of the slots for the set. | ||
| Line 30: | Line 32: | ||
==Notes== | ==Notes== | ||
If '''"name"''' is not a valid equipment set, the function will not return any value. | |||
is not | |||
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 [[API_EquipmentManager_UnpackLocation|EquipmentManager_UnpackLocation]](value). | |||
{{API Trail EquipmentManager}} | {{API Trail EquipmentManager}} | ||