Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API GetSendMailItemLink

Last wiki revision 2022-08-03

Returns the item link of an item attached in the outgoing message. itemLink = GetSendMailItemLink(attachment)

  • attachment: - The index of the attachment to query, in the range of [1,ATTACHMENTS_MAX_SEND]
  • itemLink : itemLink - The item link for the specified item
  • 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 sent message.
  • There is no API function to get the total number of items attached to a sent message. If your addon needs to know how many attachment slots are filled, you must loop over all the slots and count them yourself:

local total = 0 for i = 1, ATTACHMENTS_MAX_SEND do if GetSendMailItemLink(i) then total = total + 1 end end print("Attachment slots used:", total, "of", ATTACHMENTS_MAX_SEND)

Source

https://warcraft.wiki.gg/wiki/API_GetSendMailItemLink · 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.