WoW:API InboxItemCanDelete: Difference between revisions
mNo edit summary |
(REALLY fixed the link to the DeleteInboxItem page) |
||
Line 1: | Line 1: | ||
{{wowapi}}__NOTOC__ | {{wowapi}}__NOTOC__ | ||
Returns false | Boolean function for determining whether a message is returnable. | ||
canDelete = InboxItemCanDelete(index) | |||
==Parameters== | |||
===Arguments=== | |||
:;index : Number - the index of the message (1 is the first message) | |||
===Returns=== | |||
:;canDelete : Flag - false if a mailed item or money is returnable, true otherwise. | |||
==Notes== | |||
InboxItemCanDelete() is used by Blizzard's MailFrame.lua to determine whether a mail message is returnable, and thus whether it should put a "Return" button on the message frame or a "Delete" button. This is true when the message has been sent by the Auction House or an NPC, or has been bounced back (returned) from a player character. It will be false when it is an original message from a player character. | |||
This function should not be confused with whether [[API DeleteInboxItem|DeleteInboxItem]] will succeed or not; despite its name, InboxItemCanDelete is not checking for whether you are allowed to delete a message. For safety, assume that DeleteInboxItem will succeed whenever it is passed a valid index, regardless of whether the message contains any item or money. It is Blizzard's MailFrame.lua that provides confirmation boxes for deleting messages that still have an item or money attached. |
Revision as of 15:13, 10 January 2007
← WoW API < InboxItemCanDelete
Boolean function for determining whether a message is returnable.
canDelete = InboxItemCanDelete(index)
Parameters
Arguments
- index
- Number - the index of the message (1 is the first message)
Returns
- canDelete
- Flag - false if a mailed item or money is returnable, true otherwise.
Notes
InboxItemCanDelete() is used by Blizzard's MailFrame.lua to determine whether a mail message is returnable, and thus whether it should put a "Return" button on the message frame or a "Delete" button. This is true when the message has been sent by the Auction House or an NPC, or has been bounced back (returned) from a player character. It will be false when it is an original message from a player character.
This function should not be confused with whether DeleteInboxItem will succeed or not; despite its name, InboxItemCanDelete is not checking for whether you are allowed to delete a message. For safety, assume that DeleteInboxItem will succeed whenever it is passed a valid index, regardless of whether the message contains any item or money. It is Blizzard's MailFrame.lua that provides confirmation boxes for deleting messages that still have an item or money attached.