From d2465bb1a717bc667f505089feceea3f0e58852c Mon Sep 17 00:00:00 2001 From: Szyler <66376500+Szyler@users.noreply.github.com> Date: Sun, 24 Nov 2024 20:48:31 +0100 Subject: [PATCH] Fixing Auto looter --- TradeSkillMaster_Mailing/Modules/Inbox.lua | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/TradeSkillMaster_Mailing/Modules/Inbox.lua b/TradeSkillMaster_Mailing/Modules/Inbox.lua index 3366aac..fb806b9 100644 --- a/TradeSkillMaster_Mailing/Modules/Inbox.lua +++ b/TradeSkillMaster_Mailing/Modules/Inbox.lua @@ -317,27 +317,27 @@ function private:InboxUpdate() private:UpdateTopLabel() - -- Yay nothing else to loot, so nothing else to update the cache for! - if private.cacheFrame.endTime and numMail == totalMail and private.lastTotal ~= totalMail then - private.cacheFrame.endTime = nil - private.cacheFrame:Hide() - -- Start a timer since we're over the limit of 50 items before waiting for it to recache - elseif (private.cacheFrame.endTime and numMail >= 50 and private.lastTotal ~= totalMail) or (numMail >= 50 and private.allowTimerStart) then - private.resetIndex = nil - private.allowTimerStart = nil - private.waitingForData = nil - private.lastTotal = totalMail - private.cacheFrame.endTime = GetTime() + 60 - private.cacheFrame:Show() - end + -- -- Yay nothing else to loot, so nothing else to update the cache for! + -- if private.cacheFrame.endTime and numMail == totalMail and private.lastTotal ~= totalMail then + -- private.cacheFrame.endTime = nil + -- private.cacheFrame:Hide() + -- -- Start a timer since we're over the limit of 50 items before waiting for it to recache + -- elseif (private.cacheFrame.endTime and numMail >= 50 and private.lastTotal ~= totalMail) or (numMail >= 50 and private.allowTimerStart) then + -- private.resetIndex = nil + -- private.allowTimerStart = nil + -- private.waitingForData = nil + -- private.lastTotal = totalMail + -- private.cacheFrame.endTime = GetTime() + 60 + -- private.cacheFrame:Show() + -- end -- The last item we setup to auto loot is finished, time for the next one if not private.frame.buttonsEnabled then - if private.autoLootTotal ~= numMail then - private.autoLootTotal = GetInboxNumItems() + -- if private.autoLootTotal ~= numMail then + -- private.autoLootTotal = GetInboxNumItems() -- If we're auto checking mail when new data is available, will wait and continue auto looting, otherwise we just stop now - if numMail == 0 and (not TSM.db.global.autoCheck or totalMail == 0) then + if totalMail == 0 then private:StopAutoLooting() else private:AutoLoot() @@ -350,7 +350,7 @@ function private:InboxUpdate() return private:AutoLoot() end end) - end + -- end end end