Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API GetInboxItemLink

Last wiki revision 2022-08-03

Returns the item link of an item attached to a message in the mailbox. itemLink = GetInboxItemLink(message, attachment)

  • message: - The index of the message to query, in the range of [1,GetInboxNumItems]
  • attachment: - The index of the attachment to query, in the range of [1,ATTACHMENTS_MAX_RECEIVE]
  • itemLink : itemLink - The itemLink for the specified item
  • ATTACHMENTS_MAX_RECEIVE is defined in Constants.lua, and currently (Jan 2014) has a value of 16. Using this variable instead of a hardcoded 16 is recommended in case Blizzard changes the maximum number of items that may be attached to a received message.

To determine which messages are currently displayed in the mailbox frame, check the "pageNum" property set on the InboxFrame and do the math:

local maxIndex = GetInboxNumItems if maxIndex > 0 then local firstIndex = ((InboxFrame.pageNum - 1) * INBOXITEMS_TO_DISPLAY) + 1 local lastIndex = math.min(maxIndex, firstIndex + (INBOXITEMS_TO_DISPLAY - 1)) print("Currently displaying messages", firstIndex, "though", lastIndex) else print("No messages to display") end

Source

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