X-Git-Url: https://www.aleksib.fi/git/wowui.git/blobdiff_plain/c39801df4486661ba42940fa59d24536e27131a1..08cc8044ac2a7609b09c248348311b7228798c17:/kehys/events.lua diff --git a/kehys/events.lua b/kehys/events.lua index 4a9264f..b194192 100644 --- a/kehys/events.lua +++ b/kehys/events.lua @@ -32,6 +32,7 @@ local width = 80; function addon.RegisterEvents(frame) frame:RegisterEvent("PLAYER_ENTERING_WORLD"); + frame:RegisterEvent("PLAYER_REGEN_DISABLED"); frame:RegisterEvent("READY_CHECK"); frame:RegisterEvent("READY_CHECK_FINISHED"); frame:RegisterEvent("GROUP_ROSTER_UPDATE"); @@ -159,6 +160,15 @@ local eventFuncs = { ["RAID_TARGET_UPDATE"] = function(frame) updateRaidMarker(frame, frame.displayed); end, + ["PLAYER_REGEN_DISABLED"] = function(frame) + -- clear buff status on entering combat, should also use UnitAura to re-fill + frame.tankcd = {}; + frame.alert = {}; + frame.stacks = {}; + frame.heal = {}; + frame.buff1 = {}; + addon.SetAuras(frame.unit, frame.guid); + end, ["UPDATE_ALL_BARS"] = function(frame) updateRole(frame, frame.unit); updateVehicle(frame); @@ -174,7 +184,12 @@ local eventFuncs = { if frame.guid then guids[frame.guid] = frame; end - -- TODO update initial aura state + frame.tankcd = {}; + frame.alert = {}; + frame.stacks = {}; + frame.heal = {}; + frame.buff1 = {}; + addon.SetAuras(frame.unit, frame.guid); end, }; eventFuncs["READY_CHECK_CONFIRM"] = eventFuncs["READY_CHECK"];