Skip to content

Commit

Permalink
[fix] Greatly reduce memory usage
Browse files Browse the repository at this point in the history
INSPECT_READY is already fired when hovering over other players, not just when inspecting them
  • Loading branch information
BreakBB committed Jan 10, 2025
1 parent 06751be commit 5447d7f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Modules/EventHandler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ function EventHandler.HandleOnEvent(_, event, ...)
local shouldDebounce = currentTime - lastEventTime < DEBOUNCE_INTERVAL
lastEventTime = currentTime

local args = {...}

if (not shouldDebounce) and event == "GROUP_ROSTER_UPDATE" then
-- Someone joined or left the group
currentGroupMembers = GetNumGroupMembers()
Expand All @@ -53,7 +55,7 @@ function EventHandler.HandleOnEvent(_, event, ...)
C_Timer.After(0.5, function ()
Stats.UpdateInformation()
end)
elseif ((not shouldDebounce) and event == "INSPECT_READY") then
elseif ((not shouldDebounce) and event == "INSPECT_READY" and args[1] == UnitGUID("target")) then
GearInfos:UpdateInspectGearColorFrames()
end
end

0 comments on commit 5447d7f

Please sign in to comment.