local UnitInRange = UnitInRange;
local InCombatLockdown = InCombatLockdown;
local CreateFrame, RegisterStateDriver, RegisterUnitWatch = CreateFrame, RegisterStateDriver, RegisterUnitWatch;
+local CTimerAfter = C_Timer.After;
local STANDARD_TEXT_FONT = STANDARD_TEXT_FONT;
-local GameTooltip = nil;
-local GameTooltip_SetDefaultAnchor = nil;
+local GameTooltip = GameTooltip;
+local GameTooltip_SetDefaultAnchor = GameTooltip_SetDefaultAnchor;
local registerEvents = OmaRFEvents.RegisterEvents;
local registerUnitEvents = OmaRFEvents.RegisterUnitEvents;
end
local function initialize()
- -- let other addons hook these to anchor tooltip elsewhere
- GameTooltip = _G["GameTooltip"];
- GameTooltip_SetDefaultAnchor = _G["GameTooltip_SetDefaultAnchor"];
_, class = UnitClass("player");
anchorX, anchorY = Settings.Character.AnchorX, Settings.Character.AnchorY;
attributes = Settings.Character.Clickheal;
end
end
+local function updateTooltipFuncs()
+ -- let MoveAnything hook these to anchor tooltip elsewhere
+ GameTooltip = _G["GameTooltip"];
+ GameTooltip_SetDefaultAnchor = _G["GameTooltip_SetDefaultAnchor"];
+end
+
CFrame:RegisterEvent("PLAYER_LOGIN");
+CFrame:RegisterEvent("PLAYER_ENTERING_WORLD");
CFrame:RegisterEvent("PLAYER_REGEN_ENABLED");
CFrame:SetScript("OnEvent", function(self, event, addon)
- if event == "PLAYER_LOGIN" then
- OmaRFLoadChar();
- hideBlizzardRaid();
- initialize();
- elseif event == "PLAYER_REGEN_ENABLED" then
+ if event == "PLAYER_REGEN_ENABLED" then
-- if CompactRaidFrameManager_UpdateOptionsFlowContainer was called in combat
-- couldn't hide the button
hideBlizzardRaidButton();
+ elseif event == "PLAYER_ENTERING_WORLD" then
+ CTimerAfter(0.01, updateTooltipFuncs);
+ elseif event == "PLAYER_LOGIN" then
+ OmaRFLoadChar();
+ hideBlizzardRaid();
+ initialize();
end
end);