WoW:API GetInboxHeaderInfo: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
m (Move page script moved page API GetInboxHeaderInfo to API GetInboxHeaderInfo without leaving a redirect)
 
(11 intermediate revisions by 11 users not shown)
Line 1: Line 1:
<center>'''GetInboxHeaderInfo(index)''' ''-Documentation by [[user: BaHaMuTNeO]]-''</center>
{{wowapi}} __NOTOC__
Returns information about an item in the mailbox.
packageIcon, stationeryIcon, sender, subject, money, CODAmount, daysLeft, hasItem, wasRead, wasReturned,
textCreated, canReply, isGM = GetInboxHeaderInfo(index);


<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
==Parameters==
===Arguments===
:;index : Number - the index of the message (1 is the first message)
===Returns===
:;packageIcon : String - texture path for package icon if it contains a package (nil otherwise)
:;stationeryIcon : String - texture path for mail message icon.
:;sender : String - name of the player who sent the message.
:;subject : String - the message subject
:;money : Number - The amount of money attached
:;CODAmount : Number - The amount of COD payment required to receive the package
:;daysLeft : Number - The number of days (fractional) before the message expires
:;hasItem : Number - Either the number of attachments or nil if no items are present.  Note that items that have been taken from the mailbox continue to occupy empty slots, but hasItem is the total number of items remaining in the mailbox.  Use ATTACHMENTS_MAX_RECEIVE for the total number of attachments rather than this.
:;wasRead : Flag - 1 if the mail has been read, nil otherwise.  Using [[API GetInboxText|GetInboxText]]() marks an item as read.
:;wasReturned : Flag - 1 if the mail was returned, nil otherwise
:;textCreated : Flag - 1 if a letter object has been created from this mail, nil otherwise
:;canReply : Flag - 1 if this letter can be replied to, nil otherwise
:;isGM : Flag - 1 if this letter was sent by a GameMaster


GetInboxHeaderInfo(index);
==Example==
local packageTexture = GetInboxHeaderInfo(1);
===Result===
packageTexture is "Interface\Icons\INV_Scroll_03.blp"


<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->
==Notes==
Returns the path of the header icon for a given mail index.*
This function may be called from anywhere in the world, but will only be current as of the last time [[API_CheckInbox|CheckInbox()]] was called.


----
Details of an Auction House message can be extracted with [[API_GetInboxInvoiceInfo|GetInboxInvoiceInfo()]].
;''Arguments''
 
<!-- List each argument, together with its type -->
:("index")
:;index : Number - the index of the message
 
----
;''Returns''
 
<!-- List each return value, together with its type -->
:;headerinfostring : String - icon file path
 
----
;''Example''
 
<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory -->
local s = GetInboxHeaderInfo(0);
 
;''Result''
 
<!-- If it helps, include example results here, though they are not required-->
"Interface\Icons\INV_Scroll_03.blp"
 
----
;''Details''
 
<!-- Details not appropriate for the main description can go here -->
*indexs start at 0.
 
----
{{Template:WoW API}}
<!-- Update the category to the appropriate subsection, and be sure to put the function name as the label for the category link. Multiple subcategories are okay if appropriate, please dont link functions to the API Functions category directly. -->
[[Category:API Functions|Empty Template]]

Latest revision as of 04:45, 15 August 2023

WoW API < GetInboxHeaderInfo

Returns information about an item in the mailbox.

packageIcon, stationeryIcon, sender, subject, money, CODAmount, daysLeft, hasItem, wasRead, wasReturned, 
textCreated, canReply, isGM = GetInboxHeaderInfo(index);

Parameters[edit]

Arguments[edit]

index
Number - the index of the message (1 is the first message)

Returns[edit]

packageIcon
String - texture path for package icon if it contains a package (nil otherwise)
stationeryIcon
String - texture path for mail message icon.
sender
String - name of the player who sent the message.
subject
String - the message subject
money
Number - The amount of money attached
CODAmount
Number - The amount of COD payment required to receive the package
daysLeft
Number - The number of days (fractional) before the message expires
hasItem
Number - Either the number of attachments or nil if no items are present. Note that items that have been taken from the mailbox continue to occupy empty slots, but hasItem is the total number of items remaining in the mailbox. Use ATTACHMENTS_MAX_RECEIVE for the total number of attachments rather than this.
wasRead
Flag - 1 if the mail has been read, nil otherwise. Using GetInboxText() marks an item as read.
wasReturned
Flag - 1 if the mail was returned, nil otherwise
textCreated
Flag - 1 if a letter object has been created from this mail, nil otherwise
canReply
Flag - 1 if this letter can be replied to, nil otherwise
isGM
Flag - 1 if this letter was sent by a GameMaster

Example[edit]

local packageTexture = GetInboxHeaderInfo(1);

Result[edit]

packageTexture is "Interface\Icons\INV_Scroll_03.blp"

Notes[edit]

This function may be called from anywhere in the world, but will only be current as of the last time CheckInbox() was called.

Details of an Auction House message can be extracted with GetInboxInvoiceInfo().