Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
(fixed link to DeleteInboxItem)
(REALLY fixed the link to the DeleteInboxItem page)
Line 12: Line 12:
 
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.
 
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|API_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.
+
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

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.