Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local OTF = ObjectiveTrackerFrame
- local OTFdisabled = false
- local hiddenFrame = CreateFrame("Frame")
- hiddenFrame:Hide()
- --disable frame
- local function DisableFrame(frame)
- if not frame then return false end
- --https://warcraft.wiki.gg/wiki/API_pcall
- return pcall(function()
- frame:UnregisterAllEvents()
- frame:SetParent(hiddenFrame)
- frame:Hide()
- frame:SetAlpha(0)
- frame:EnableMouse(false)
- if frame:HasScript("OnShow") then
- frame:HookScript("OnShow", function(self) self:Hide() end)
- end
- end)
- end
- --may return false in combat/protected, try again out of combat/later
- if OTF and not OTFdisabled then
- OTFdisabled = DisableFrame(OTF)
- end
Advertisement
Add Comment
Please, Sign In to add comment