I just debugged some sourcecode and found out that the following event "EVENT_MAIL_CLOSE_MAILBOX" will be fired if the inventory of the player gets closed?
It fires even 3 times if I open the mailbox and close the mailbox afterwards sometime?
Lua Code:
EVENT_MANAGER:RegisterForEvent(gAddonName, EVENT_MAIL_OPEN_MAILBOX, Open_Mail_Panel)
EVENT_MANAGER:RegisterForEvent(gAddonName, EVENT_MAIL_CLOSE_MAILBOX, Close_Mail_Panel)
--Event upon opening of the mail panel
local function Open_Mail_Panel()
d("Open_Mail")
end
--Event upon closing of the mail panel
local function Close_Mail_Panel()
d("Close_Mail")
end
Is this normal and wished?
Or do I have to unregister the event in the "Open_Mail_Panel()" function and register it again in "Close_Mail_panel()" function?
Thanks