X-Git-Url: https://www.aleksib.fi/git/wowui.git/blobdiff_plain/f2f73f67a5bb65ef1d0250d964c3945ea8f236c7..ad67f41cf4019dca1e2ea587019fe825f92fdcf0:/OmaUF/UnitFrames.lua?ds=inline diff --git a/OmaUF/UnitFrames.lua b/OmaUF/UnitFrames.lua index 6f40e0d..f477e37 100644 --- a/OmaUF/UnitFrames.lua +++ b/OmaUF/UnitFrames.lua @@ -2,6 +2,9 @@ local _; local pairs = pairs; local InCombatLockdown = InCombatLockdown; +local CTimerAfter = C_Timer.After; + +local updateAuraTooltips = OmaUFAuras.UpdateAuraTooltips; local UnitFrames = CreateFrame("Frame", "OmaUnitFrames", UIParent); @@ -30,9 +33,9 @@ local function hideBlizzardFrames() WarlockPowerFrame, MonkHarmonyBarFrame, PaladinPowerBarFrame, MageArcaneChargesFrame, CastingBarFrame, PetCastingBarFrame}; for i = 1,MAX_BOSS_FRAMES do - table.insert(frames, _G["Boss"..i.."TargetFrame"]); - table.insert(frames, _G["Boss"..i.."TargetFrameHealthBar"]); - table.insert(frames, _G["Boss"..i.."TargetFrameManaBar"]); + --table.insert(frames, _G["Boss"..i.."TargetFrame"]); + --table.insert(frames, _G["Boss"..i.."TargetFrameHealthBar"]); + --table.insert(frames, _G["Boss"..i.."TargetFrameManaBar"]); end for _, frame in pairs(frames) do frame:UnregisterAllEvents(); @@ -70,14 +73,26 @@ local function hideArenaFrames() end end +local function updateTooltipFuncs() + -- let MoveAnything hook these to anchor tooltip elsewhere + M.UpdatePlayerTooltips(); + M.UpdatePetTooltips(); + M.UpdateTargetTooltips(); + M.UpdateBossTooltips(); + updateAuraTooltips(); +end + UnitFrames:RegisterEvent("PLAYER_LOGIN"); +UnitFrames:RegisterEvent("PLAYER_ENTERING_WORLD"); UnitFrames:RegisterEvent("ADDON_LOADED"); UnitFrames:SetScript("OnEvent", function(self, event, addon) - if event == "PLAYER_LOGIN" then + if event == "PLAYER_ENTERING_WORLD" then + CTimerAfter(0.01, updateTooltipFuncs); + elseif event == "ADDON_LOADED" and addon == "Blizzard_ArenaUI" then + hideArenaFrames(); + elseif event == "PLAYER_LOGIN" then OmaUFLoadChar(); hideBlizzardFrames(); initialize(); - elseif event == "ADDON_LOADED" and addon == "Blizzard_ArenaUI" then - hideArenaFrames(); end end);