WoW:API GetInboxNumItems: Difference between revisions

m
Move page script moved page API GetInboxNumItems to WoW:API GetInboxNumItems without leaving a redirect
No edit summary
m (Move page script moved page API GetInboxNumItems to WoW:API GetInboxNumItems without leaving a redirect)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<center>'''GetInboxNumItems()''' ''-Documentation by [[user:Feysharnalie|Feysharnalie]]-''</center>
{{wowapi}} __NOTOC__
{{Stub/API}}


GetInboxNumItems();
numItems, totalItems = GetInboxNumItems()


Reports the number of messages in the client's inbox.
Reports the number of messages in the client's inbox.


----
=== Example ===
;''Details''
 
if ( totalItems > numItems) then
  InboxTooMuchMail:Show();
else
  InboxTooMuchMail:Hide();
end
 
=== Details ===
 
Uppdated with ''totalItems'' in Patch 3.2


After [[API_CheckInbox|CheckInbox()]] is called and the inbox populated, this function will report the number of items in the user's inbox.
After [[API_CheckInbox|CheckInbox()]] is called and the inbox populated, this function will report the number of items in the user's inbox.
Ensure that the MAIL_INBOX_UPDATE event has been fired before accessing this function, or it will return 0 numItems.


You access items in the inbox using [[API_GetInboxHeaderInfo|GetInboxHeaderInfo()]].
You access items in the inbox using [[API_GetInboxHeaderInfo|GetInboxHeaderInfo()]].


FIXME - Requires that the mailbox window is open?
FIXME - Requires that the mailbox window is open? <br />
FIXME - Sample code showing use of the mail when at the mailbox or out in the world.
FIXME - Sample code showing use of the mail when at the mailbox or out in the world. <br />
 
----
{{Template:WoW API}}
Anonymous user