The following are not primitive Lua data types, but for the purposes of this Reference it is useful to recognize cases where API functions expect or return data in a standard format.
Type: 1nil
Many API functions return a value indicative of a binary state but do not use the boolean true and false values -- instead returning 1 for true and nil for false. Since Lua treats nil as false and any non-nil value as true in conditionals, these values can generally be used the same as boolean values (e.g. if IsInGuild() then ... end). However, one should avoid making direct comparisons: for example, the condition in if IsInGuild() == true then ... end will never be triggered.
Type: ah-list-type
There are three different auction house listing types:
list- The items that are currently for sale in the auction house.bidder- The items for which the player has bid.owner- The items that the player has placed up for auction.
Type: backdrop
A backdrop definition is a Lua table with specific attributes, that match directly with the elements in the <Backdrop> definition in an XML definition. It has the following structure:
{
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
tileSize = 32
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
tile = 1,
edgeSize = 32,
insets = {
top = 12,
right = 12,
left = 12,
bottom = 12,
}
}
Type: bitfield
A value combining several binary flags into one number; the flags can be inspected individually using bitlib functions. For example (using GetItemFamily and related constants):
GetItemFamily("Crystallized Air")
-- returns 1224
bit.bor(0x0008,0x0040,0x0080,0x0400)
-- returns 1224
-- these are the masks for Leatherworking, Enchanting, Engineering, and Mining bags
bit.band(GetItemFamily("Crystallized Air"), 0x0040)
-- returns 64, or 0x0040: the item fits in an Enchanting Bag
bit.band(GetItemFamily("Crystallized Air"), 0x0020)
-- returns 0, or 0x0040: the item does not fit in an Herb Bag
Type: containerID
Identifies one of the player's bags or other containers. Possible values:
-2: Keyring-1Main storage area in the bank0: Backpack1throughNUM_BAG_SLOTS: Bag slots (as presented in the default UI, numbered right to left)NUM_BAG_SLOTS + 1throughNUM_BAG_SLOTS + NUM_BANKBAGSLOTS: Bank bag slots (as presented in the default UI, numbered left to right)
Type: containerSlotID
Index of an item slot within a container. Slots are numbered (as presented in the default UI) left-to-right, top-to-bottom, starting with the leftmost slot on the top row.
Type: glyphIndex
Glyph indices are ordered by the level at which they are discovered. Specifically:
- The major glyph at the top of the user interface (level 15)
- The minor glyph at the bottom of the user interface (level 15)
- The minor glyph at the top left of the user interface (level 30)
- The major glyph at the bottom right of the user interface (level 50)
- The minor glyph at the top right of the user interface (level 70)
- The major glyph at the bottom left of the user interface (level 80)
Type: hyperlink
Type: inventoryID
Identifies an inventory slot used (mostly) for the equipping of items. Inventory ID numbers exist not only for the armor and weapon slots seen in the default UI's Character window, but also for bag slots, bank bag slots, the contents of the bank's main storage area, and the contents of the keyring. Inventory slots are not defined as constants in the default UI; to obtain the inventoryID for a slot, use one of the following functions:
Type: itemQuality
Indicates the quality (or rarity) of an item. Possible values and examples:
- Poor (gray): Broken I.W.I.N. Button
- Common (white): Archmage Vargoth's Staff
- Uncommon (green): X-52 Rocket Helmet
- Rare / Superior (blue): Onyxia Scale Cloak
- Epic (purple): Talisman of Ephemeral Power
- Legendary (orange): Fragment of Val'anyr
- Artifact / Heirloom (light yellow): Bloodied Arcanite Reaper
Type: layer
One of the graphical layers present in World of Warcraft (presented from lowest to highest). Any graphics on the HIGHLIGHT layer are only displayed when the mouse is over the parent frame.
BACKGROUNDBORDERARTWORKOVERLAYHIGHLIGHT
Type: rollID
The default user interface assigns a unique numeric identifier for all items that are able to be rolled on by the party. This identifier can be obtained by checking the rollID member of the specific group loot frame. For example: /run print(GroupLootFrame1.rollID).
Type: standingID
Identifies a level of reputation:
- Hated
- Hostile
- Unfriendly
- Neutral
- Friendly
- Honored
- Revered
- Exalted
The default UI provides constants which can be helpful in displaying standing information. Prepending "FACTION_STANDING_LABEL" to a standingID results in the name of a global containing the localized name for that standing (e.g. FACTION_STANDING_LABEL5 == "Friendly"). Color values for each standing (as seen in reputation status bars in the default UI) can be found in the table FACTION_BAR_COLORS.
Type: unitid
Used throughout the API to identify units of interest. Possible values:
player- The player him/herselfpet- The player's petvehicle- The vehicle currently controlled by the playertarget- The player's current targetfocus- The player's focused unit (as can be set by typing/focus name)mouseover- The unit currently under the mouse cursor (applies to both unit frames and units in the 3D world)npc- The NPC the player is currently interacting with (while the merchant, trainer, gossip, etc UIs are active)party1toparty4- Another member of the player's party. Indices match the order party member frames are displayed in the default UI (party1is at the top,party4at the bottom), but not consistent among party members (i.e. if Thrall and Cairne are in the same party, the player Thrall sees asparty2may not be the same player Cairne sees asparty2).partypet1topartypet4- A pet belonging to another member of the player's partyraid1toraid40- A member of the player's raid group. Unlike with thepartytokens, one of theraidunit IDs will belong to the player. Indices have no relation to the arrangement of units in the default UI.raidpet1toraidpet40- A pet belonging to a member of the player's raid grouparena1toarena5- A member of the opposing team in an Arena match
Type: auraFilter
This parameter can be any of "HELPFUL", "HARMFUL", "PLAYER", "RAID", "CANCELABLE", "NOT_CANCELABLE". You can also specify several filters separated by a | or space character to chain multiple filters together (e.g. "HELPFUL|RAID" or "HELPFUL RAID" == helpful buffs that you can cast on your raid). By default UnitAura has "HELPFUL" as an implicit filter - you cannot get back BOTH helpful and harmful at the same time. Neither "HELPFUL" or "HARMFUL" have meaning for UnitBuff/UnitDebuff, and will be ignored.