Besides the standard Lua types (nil, boolean, number, string, table, function, thread, userdata), WoW uses several logical data types throughout the API. For instance, unit IDs are technically strings, but they follow a particular form as described below. The API documentation on this site refers to these logical types as follows:
| Type | Description |
|---|---|
1nil |
This variable type indicates that a function returns a boolean result, by returning 1 for true, and nil for false. While in most cases these operate the same as boolean values, they aren’t the actual values true and false. |
unitID |
In addition, any Functions that accept a |
Team |
Arena teams are specified by the index in which they appear in the PvP tab of the character window. These teams are listed in increasing size order, so if the player is a member of a 3v3 and a 5v5 team, the index 1 will refer to 3v3, and 2 will refer to 5v5. |
inventoryID |
The API functions that query the inventory take a number that identifies one of the queriable inventory slots. These numbers may be obtained using GetInventorySlotInfo. |
bagID |
Functions that operate on containers take a numeric index that represents a specific bag. The player’s backpack has index 0, and the normal bags have indices 1–4. The player’s keyring is index -2. The bank itself has index -1, and the bank bags are indices 5–11. |
itemID |
An item’s ID is the internal number used by the client to identify specific items. For the item Mantle of the Avatar, the ID is 30154. |
itemString |
The itemString for a given item is the information portion of the itemLink without the color information or the item’s name. Partial strings are accepted so you can provide as much or as little information as you have. For the item Mantle of the Avatar, an example itemString could be "item:30154:2993:2741:2741". The extra numbers indicate the specific enchantments of gems that are included with this item. |
itemLink |
The full hyperlink, including the color information, item name and the full itemString for the given item. For Mantle of the Avatar this might be "|cffa335ee|Hitem:30154:2993:2741:2741:0:0:0:0|h[Mantle of the Avatar]|h|r". |