Skip to content

Commit

Permalink
BT2: Update auras 2s after initial login
Browse files Browse the repository at this point in the history
On initial login tooltips are missing, so 2s after login simply recheck
all units with auras.

Fixes: #4572
  • Loading branch information
InfusOnWoW committed Sep 6, 2023
1 parent 0c78cf9 commit 0c7b9bc
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion WeakAuras/BuffTrigger2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,11 @@ local function UpdateMatchData(time, matchDataChanged, unit, index, auraInstance
-- Tell old auras that used this match data
for id, triggerData in pairs(data.auras) do
for triggernum in pairs(triggerData) do
if matchDataByTrigger[id] and matchDataByTrigger[id][triggernum] and matchDataByTrigger[id][triggernum][unit] and matchDataByTrigger[id][triggernum][unit][key] then
if matchDataByTrigger[id]
and matchDataByTrigger[id][triggernum]
and matchDataByTrigger[id][triggernum][unit]
and matchDataByTrigger[id][triggernum][unit][key]
then
matchDataByTrigger[id][triggernum][unit][key] = nil
matchDataChanged[id] = matchDataChanged[id] or {}
matchDataChanged[id][triggernum] = true
Expand Down Expand Up @@ -2137,6 +2141,17 @@ local function EventHandler(frame, event, arg1, arg2, ...)
tinsert(unitsToRemove, unit)
end
end

if arg1 then
-- Initial login has a bug where the tooltip information is not available,
-- so update tooltips 2s after login
C_Timer.After(2, function()
for unit, matchtDataPerUnit in pairs(matchData) do
EventHandler(frame, "UNIT_AURA", unit)
end
end)
end

elseif event == "RAID_TARGET_UPDATE" then
ScanRaidMarkScanFunc(matchDataChanged)
elseif event == "UNIT_TARGETABLE_CHANGED" then
Expand Down

0 comments on commit 0c7b9bc

Please sign in to comment.