Fandom

WoWWiki

API GetInboxItem

104,637pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

WoW API < GetInboxItem

Retrieve details about an item from a mail.

name, itemTexture, count, quality, canUse = GetInboxItem(index, itemIndex)

Parameters Edit

Arguments Edit

(index, itemIndex)
index 
Integer - The index of the message to get information from.
itemIndex 
Integer - The index of the item (1-ATTACHMENTS_MAX_RECEIVE(16))

Returns Edit

name, itemTexture, count, quality, canUse
name 
String - The display name/label for the item.
itemTexture 
String - The path for the texture to display for the item.
count 
Integer - How many of the item are available in the mail (I believe 0 means that the item has been retrieved)
quality 
Integer - Item quality index.
canUse 
Flag - Indicates if the player can use the item, 1 if they can use it, or nil if not.

Example Edit

Sample code from Inglais.
inbox_items = GetInboxNumItems();
if (inbox_items > 0) then
  for inbox_item_index = 1, inbox_items do
    -- Get the Message Text
    inbox_text = GetInboxText(inbox_item_index);
    -- Get the Attachment Description Text
    inbox_item = GetInboxItem(inbox_item_index, 1);
    if (inbox_text ~= nil) then
      -- Print the message text
      DEFAULT_CHAT_FRAME:AddMessage("Inbox Text: "
        ..  GetInboxText(inbox_item_index), 1, 1, 1);
    end
    if (inbox_item ~= nil) then
      -- Print the attachment description
      DEFAULT_CHAT_FRAME:AddMessage("Inbox Item: "
        .. GetInboxItem(inbox_item_index, 1), 1, 1, 1);
    end
  end
end

DetailsEdit

As of 2.3.3 this function is bugged and the quality is always set to -1.


Also on Fandom

Random Wiki