Mercurial > wow > mailopener
changeset 1:6f17035de058
MO will now request a server refresh when mail opening has finished, ignoring the timer.
(Collected Module) Fixed the time spent to only be displayed if it is being tracked.
The inventory full sound will properly be played again when your bags change.
| author | Zerotorescue |
|---|---|
| date | Sun, 05 Sep 2010 17:02:19 +0200 |
| parents | 823e33465b6e |
| children | 57ba1593ac42 |
| files | Core.lua Modules/Collected.lua Modules/OpenAll.lua embeds.xml |
| diffstat | 4 files changed, 12 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/Core.lua Fri Sep 03 12:43:36 2010 +0200 +++ b/Core.lua Sun Sep 05 17:02:19 2010 +0200 @@ -193,15 +193,6 @@ end); -- And add it to the interface options InterfaceOptions_AddCategory(frame); - - -- If the above becomes impossible this is another way to load the config module when required due to Interface/AddOns options - --InterfaceOptionsFrameTab2:HookScript("OnClick", function() - -- -- Load the config module - -- MailOpener:EnableConfigModule(); - - -- -- Load the options and add it to the blizzard interface list - -- MailOpenerConfig:Load(); - --end); end function MailOpener:OnEnable() @@ -421,7 +412,10 @@ function MailOpener:MO_OPEN_COMPLETE() opening = false; - + + -- Try a recheck + self:Recheck(); + local current, total = GetInboxNumItems(); if (total - current) == 0 then @@ -615,7 +609,9 @@ whileDead = 1, hideOnEscape = 1, maxLetters = 1024, -} +}; + +-- The below either has to be removed or changed when releasing function MailOpener:ShowBetaPopup() function TableDump(key, val, jumps)
--- a/Modules/Collected.lua Fri Sep 03 12:43:36 2010 +0200 +++ b/Modules/Collected.lua Sun Sep 05 17:02:19 2010 +0200 @@ -226,12 +226,12 @@ -- Did we record any mail being opened? if mailOpened and mailOpened > 0 then -- Time Spent - if timeSpent then + if timeSpent and timeSpent > 0 then printMessage = printMessage .. format("Collected a total of %d mails within %d minutes and %d seconds. ", mailOpened, floor( timeSpent / 60 ), ( timeSpent % 60 )); else printMessage = printMessage .. format("Collected a total of %d mails. ", mailOpened); end - elseif timeSpent then + elseif timeSpent and timeSpent > 0 then printMessage = printMessage .. format("Spent %d minutes and %d seconds collecting mail. ", floor( timeSpent / 60 ), ( timeSpent % 60 )); end @@ -256,7 +256,7 @@ -- Did we record any mail being opened? if sessionMailOpened and sessionMailOpened > 0 then -- Time Spent - if sessionTimeSpent then + if sessionTimeSpent and sessionTimeSpent > 0 then printMessage = printMessage .. format("Collected a total of %d mails within %d minutes and %d seconds this session. ", sessionMailOpened, floor( sessionTimeSpent / 60 ), ( sessionTimeSpent % 60 )); else printMessage = printMessage .. format("Collected a total of %d mails this session. ", sessionMailOpened);
--- a/Modules/OpenAll.lua Fri Sep 03 12:43:36 2010 +0200 +++ b/Modules/OpenAll.lua Sun Sep 05 17:02:19 2010 +0200 @@ -191,6 +191,8 @@ function OpenAll:BAG_UPDATE() -- If the bags are updated we should check if the inventory is full again inventoryFull = false; + -- Replay sound + inventoryFullSoundPlayed = nil; end function OpenAll:MAIL_INBOX_UPDATE()
--- a/embeds.xml Fri Sep 03 12:43:36 2010 +0200 +++ b/embeds.xml Sun Sep 05 17:02:19 2010 +0200 @@ -3,7 +3,6 @@ <Script file="Libs\LibStub\LibStub.lua"/> <Include file="Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml"/> <Include file="Libs\AceAddon-3.0\AceAddon-3.0.xml"/> - <Include file="Libs\AceAddon-3.0\AceAddon-3.0.xml"/> <Include file="Libs\AceDB-3.0\AceDB-3.0.xml"/> <Include file="Libs\AceDBOptions-3.0\AceDBOptions-3.0.xml"/> <Include file="Libs\AceGUI-3.0\AceGUI-3.0.xml"/>
