WoW:API TakeInboxItem: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(upgraded deprecated template)
m (Move page script moved page API TakeInboxItem to API TakeInboxItem without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{wowapi}}
{{wowapi}}
Sends a request to the server to take an item attachment from a mail message.  Note that this is only a request to the server, and the action might fail.  Possible reasons for failure include that the users bags are full, that they already have the maximum number of the item they are allowed to have (eg, a unique item), or that a prior TakeInboxItem() request is still being processed by the server.  There may be other reasons for failure.
''Syntax''
''Syntax''
----
----


TakeInboxItem(index)
TakeInboxItem(index, itemIndex)


index - the index of the mailbox message you want to take the item attachment from.
index - the index of the mailbox message you want to take the item attachment from.
itemIndex - The index of the item to take (1-ATTACHMENTS_MAX_RECEIVE(16))


''Returns''
''Returns''
----
----


Always returns nil.
Always returns nil. (note: please confirm) As the request is done to the server asynchronously and might fail, then if knowing whether the action was successful is important, you will need to check afterward that it was.
 
(note: please confirm)




Line 18: Line 22:
----
----
<pre>
<pre>
TakeInboxItem(1)
TakeInboxItem(1, 1)
</pre>
</pre>


Would take the attachment from the first message in the Inbox and place it in the next available container slot.
Would attempt to take the attachment from the first message in the Inbox and place it in the next available container slot.

Latest revision as of 04:47, 15 August 2023

WoW API < TakeInboxItem

Sends a request to the server to take an item attachment from a mail message. Note that this is only a request to the server, and the action might fail. Possible reasons for failure include that the users bags are full, that they already have the maximum number of the item they are allowed to have (eg, a unique item), or that a prior TakeInboxItem() request is still being processed by the server. There may be other reasons for failure.

Syntax


TakeInboxItem(index, itemIndex)

index - the index of the mailbox message you want to take the item attachment from.

itemIndex - The index of the item to take (1-ATTACHMENTS_MAX_RECEIVE(16))


Returns


Always returns nil. (note: please confirm) As the request is done to the server asynchronously and might fail, then if knowing whether the action was successful is important, you will need to check afterward that it was.


Example


TakeInboxItem(1, 1)

Would attempt to take the attachment from the first message in the Inbox and place it in the next available container slot.