Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API GetInboxItem

Last wiki revision 2022-08-01

Returns info for an item attached to a message in the mailbox. name, itemID, texture, count, quality, canUse = GetInboxItem(index, itemIndex)

  • index: - The index of the message to query, in the range [1,GetInboxNumItems]
  • itemIndex: - The index of the item to query, in the range [1,ATTACHMENTS_MAX_RECEIVE]
  • name: - The localized name of the item
  • itemID: - Numeric ID of the item.
  • texture: - The path to the icon texture for the item
  • count: - The number of items in the stack
  • quality: - The quality index of the item
  • canUse: - 1 if the player can use the item, or nil otherwise

Loop over all messages currently in the player's mailbox, get information about the items attached to them, and print it to the chat frame:

for i = 1, GetInboxNumItems do -- An underscore is commonly used to name variables you aren't going to use in your code: local _, _, sender, subject, _, _, _, hasItem = GetInboxHeaderInfo(i) if hasItem then print("Message", subject, "from", sender, "has attachments:") for j = 1, ATTACHMENTS_MAX_RECEIVE do local name, itemID, texture, count, quality, canUse = GetInboxItem(i, j) if name then -- Construct an inline texture sequence: print("\128T"..texture..":0\128t", name, "x", count) end end else print("Message", subject, "from", sender, "has no attachments.") end end

  • As of 2.3.3 this function is bugged and the quality is always returned as -1. If you need to know the item's quality, get a link for the item using, and pass the link to.

Source

https://warcraft.wiki.gg/wiki/API_GetInboxItem · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.