Hm. Wowprogramming says
numItems, totalItems = GetInboxNumItems()
Returns:
•numItems - Number of mails in the player's inbox (number)
•totalItems - Total number of items both in the inbox and on the server. (number)
|
I'm not sure what the difference is as I never did something with the mail api.
Totally guessing: the first one is the number of mails the player had opened at least once, and the second one is the number of opened and unopened mails?
You could try:
Lua Code:
local function Accountant_DetectAhMail()
local numItems, totalItems = GetInboxNumItems()
for x = 1, totalItems do
local invoiceType = GetInboxInvoiceInfo(x)
print(x, invoiceType)
if string.find(string.lower(invoiceType), "seller") then
return true
end
end
end
Does this change anything?