From 9ac6b125a34276679a8b75f9d7f73286799f774e Mon Sep 17 00:00:00 2001 From: Parnic Date: Mon, 12 Dec 2022 20:50:03 -0600 Subject: [PATCH] Fix reported issue with Breakables not updating If a throttle happens, we lose the items that we already processed. So, effectively, we only display whatever we can find in the final update (i.e. things located toward the end of bags) on machines that can't process all bags in one go. Fixes #5 --- Breakables.lua | 10 ++++++++-- changelog.txt | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Breakables.lua b/Breakables.lua index ef37959..7a44a40 100644 --- a/Breakables.lua +++ b/Breakables.lua @@ -1129,6 +1129,7 @@ end do local bagId = 0 local updatefunc + local foundBreakables = {} function Breakables:FindBreakables() if self.settings.hide then return @@ -1143,9 +1144,14 @@ do return end + if currState ~= STATE_SCANNING then + local count = #foundBreakables + for i=0, count do + foundBreakables[i]=nil + end + end currState = STATE_SCANNING - local foundBreakables = {} - local i=1 + local i=#foundBreakables + 1 local numBreakableStacks = {} local maxTime = GetTimePreciseSec() + 0.01 diff --git a/changelog.txt b/changelog.txt index 575246f..3a60c06 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +v1.9.9 + +- Fix issue with not updating or showing items in some cases. + v1.9.8: - Add Dragonflight Mystic disenchantable items.