arkayenro / arkinventory

A World of Warcraft Inventory mod for Retail, Burning Crusade, and Classic
108 stars 14 forks source link

Mail action should wait for MAIL_INBOX_UPDATE #1831

Closed stornquist closed 10 months ago

stornquist commented 11 months ago

Is your feature request related to a problem? Please describe. Currently the action to send emails is triggered on MAIL_INBOX_SHOW but you are not allowed to send mails until MAIL_INBOX_UPDATE has been triggered. This results in the items being added to the outgoing mail in the "send" tab but the mail never being sent since Ark thinks it has sent the items but the mail was blocked by the API.

Describe the solution you'd like Move the auto-send logic to trigger when MAIL_INBOX_UPDATE triggers

Describe alternatives you've considered I created a small Weakauras that triggers the manual run ArkInventory.Action.Manual on event MAIL_INBOX_UPDATE and have yet to experience any issue where the mail gets "stuck" with all items in the "send" window but no mail being actually sent.

Additional context

arkayenro commented 11 months ago

will be fixed in 3.10.18 alpha 3

stornquist commented 11 months ago

will be fixed in 3.10.18 alpha 3

do remember to have a flag still so that it doesn't try to send mail on each MAIL_INBOX_UPDATE triggered by retrieving mail

IE



OnEvent(function(event)
  if event == "MAIL_SHOW" then
    ArkInventory.HasSentMail = false
  end

  else if event == "MAIL_INBOX_UPDATE" and [whatever else checks for auto mail] then
    ArkInventory.SendMail()
    ArkInventory.HasSentMail = true
  end
end)
arkayenro commented 11 months ago

yes, already in there. will only run once per open.