fix: Added isUnusable detection with caching

This commit is contained in:
Salikh Gurgenidze
2026-01-24 12:36:48 +04:00
parent 06db5f15fa
commit 52af32daaa
12 changed files with 198 additions and 258 deletions
+4 -10
View File
@@ -649,16 +649,10 @@ function QuestItemBar:Initialize()
addon.Modules.Events:Register("BAG_UPDATE", function()
if bagUpdatePending then return end
bagUpdatePending = true
-- Debounce: wait 0.15 seconds before updating to batch rapid events
local debounceFrame = CreateFrame("Frame")
debounceFrame.elapsed = 0
debounceFrame:SetScript("OnUpdate", function()
this.elapsed = this.elapsed + arg1
if this.elapsed >= 0.15 then
this:SetScript("OnUpdate", nil)
bagUpdatePending = false
QuestItemBar:Update()
end
-- Debounce: wait 0.15 seconds before updating (uses pooled timer)
Guda_ScheduleTimer(0.15, function()
bagUpdatePending = false
QuestItemBar:Update()
end)
end, "QuestItemBar")