Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API GetSendMailItem

Last wiki revision 2022-08-01

Returns info for an item attached in the outgoing message. name, itemID, texture, count, quality = GetSendMailItem(index)

  • index: - The index of the attachment to query, in the range of [1,ATTACHMENTS_MAX_SEND]
  • name: - The localized name of the item
  • itemID: - Numeric ID of the item.
  • texture: - The icon texture for the item
  • count: - The number of items in the stack
  • quality: - The quality index of the item (0-6)

The following code will loop over all the items currently attached to the send mail frame, and print information about them to the chat frame:

for i = 1, ATTACHMENTS_MAX_SEND do local name, itemID, texture, count, quality = GetSendMailItem(i) if name then -- Construct an inline texture sequence: print("You are sending", "\124T"..texture..":0\124t", name, "x", count) end end

  • Requires that the mailbox window is open.
  • ATTACHMENTS_MAX_SEND is defined in Constants.lua, and currently (Jan 2014) has a value of 12. Using this variable instead of a hardcoded 12 is recommended in case Blizzard changes the maximum number of items that may be attached to a single message.
  • 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_GetSendMailItem · 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.