├── .gitattributes ├── FreeUI ├── FreeUI.toc ├── class │ └── paladin.lua ├── core │ ├── api.lua │ ├── core.lua │ ├── gui.lua │ ├── notifications.lua │ └── slash.lua ├── license │ ├── FreeUI.txt │ └── oUF.txt ├── media │ ├── CheckButtonHilight.blp │ ├── DBMSpark.blp │ ├── PFRondaSeven.ttf │ ├── UI-LFG-ICON-ROLES.blp │ ├── arrow-down-active.tga │ ├── arrow-left-active.tga │ ├── arrow-right-active.tga │ ├── arrow-up-active.tga │ ├── font.ttf │ ├── glowTex.tga │ ├── gradient.tga │ ├── iFlash705.ttf │ ├── sound.mp3 │ └── statusbar.tga ├── oUF │ ├── blizzard.lua │ ├── colors.lua │ ├── elements │ │ ├── altpowerbar.lua │ │ ├── aura.lua │ │ ├── castbar.lua │ │ ├── druidmana.lua │ │ ├── eclipsebar.lua │ │ ├── harmonyorbs.lua │ │ ├── healprediction.lua │ │ ├── health.lua │ │ ├── holypower.lua │ │ ├── leader.lua │ │ ├── lfdrole.lua │ │ ├── masterlooter.lua │ │ ├── power.lua │ │ ├── pvp.lua │ │ ├── qicon.lua │ │ ├── range.lua │ │ ├── readycheck.lua │ │ ├── resurrect.lua │ │ ├── ricons.lua │ │ ├── runebar.lua │ │ ├── shadoworbs.lua │ │ ├── stagger.lua │ │ ├── tags.lua │ │ └── threat.lua │ ├── events.lua │ ├── factory.lua │ ├── finalize.lua │ ├── init.lua │ ├── oUF.xml │ ├── oUF_CounterBar │ │ └── oUF_CounterBar.lua │ ├── oUF_RuneOfPower │ │ └── oUF_RuneOfPower.lua │ ├── oUF_WarlockSpecBars │ │ └── oUF_WarlockSpecBars.lua │ ├── ouf.lua │ ├── private.lua │ └── units.lua ├── options.lua ├── profiles.lua ├── scripts │ ├── actionbars.lua │ ├── archaeologybar.lua │ ├── arena.lua │ ├── automation.lua │ ├── bags.lua │ ├── bubbles.lua │ ├── buffreminder.lua │ ├── buffs.lua │ ├── bufftracker.lua │ ├── buttons.lua │ ├── chat.lua │ ├── chattabs.lua │ ├── colours.lua │ ├── combattext.lua │ ├── combo.lua │ ├── cooldowns.lua │ ├── dbm.lua │ ├── disable.lua │ ├── durability.lua │ ├── errors.lua │ ├── events.lua │ ├── expbar.lua │ ├── fonts.lua │ ├── globals.lua │ ├── interrupt.lua │ ├── loot.lua │ ├── lootroll.lua │ ├── mail.lua │ ├── map.lua │ ├── marking.lua │ ├── menubar.lua │ ├── micromenu.lua │ ├── minimap.lua │ ├── mirrorbars.lua │ ├── moneytext.lua │ ├── nameplates.lua │ ├── objectivetracker.lua │ ├── petbattles.lua │ ├── queuetimer.lua │ ├── rangecolor.lua │ ├── rarealert.lua │ ├── role.lua │ ├── stats.lua │ ├── tekkrush.lua │ ├── threatmeter.lua │ ├── tooltip.lua │ ├── unitframes.lua │ ├── worldmarker.lua │ └── worldstateframe.lua └── theme │ ├── AddOns │ ├── Blizzard_AchievementUI.lua │ ├── Blizzard_ArchaeologyUI.lua │ ├── Blizzard_AuctionUI.lua │ ├── Blizzard_BarbershopUI.lua │ ├── Blizzard_BattlefieldMinimap.lua │ ├── Blizzard_BindingUI.lua │ ├── Blizzard_BlackMarketUI.lua │ ├── Blizzard_Calendar.lua │ ├── Blizzard_ChallengesUI.lua │ ├── Blizzard_Collections.lua │ ├── Blizzard_DeathRecap.lua │ ├── Blizzard_DebugTools.lua │ ├── Blizzard_EncounterJournal.lua │ ├── Blizzard_GMSurveyUI.lua │ ├── Blizzard_GarrisonTemplates.lua │ ├── Blizzard_GarrisonUI.lua │ ├── Blizzard_GlyphUI.lua │ ├── Blizzard_GuildBankUI.lua │ ├── Blizzard_GuildControlUI.lua │ ├── Blizzard_GuildUI.lua │ ├── Blizzard_InspectUI.lua │ ├── Blizzard_ItemAlterationUI.lua │ ├── Blizzard_ItemSocketingUI.lua │ ├── Blizzard_ItemUpgradeUI.lua │ ├── Blizzard_LookingForGuildUI.lua │ ├── Blizzard_MacroUI.lua │ ├── Blizzard_PVPUI.lua │ ├── Blizzard_QuestChoice.lua │ ├── Blizzard_TalentUI.lua │ ├── Blizzard_TimeManager.lua │ ├── Blizzard_TradeSkillUI.lua │ ├── Blizzard_TrainerUI.lua │ ├── Blizzard_VoidStorageUI.lua │ ├── DBM-GUI.lua │ └── KayrChat.lua │ ├── FrameXML │ ├── AlertFrames.lua │ ├── BankFrame.lua │ ├── CharacterFrame.lua │ ├── ChatConfigFrame.lua │ ├── ContainerFrame.lua │ ├── DressUpFrames.lua │ ├── EquipmentFlyout.lua │ ├── GarrisonFollowerTooltip.lua │ ├── InterfaceOptionsFrame.lua │ ├── LFDFrame.lua │ ├── LFGFrame.lua │ ├── LFGList.lua │ ├── LFRFrame.lua │ ├── LootHistory.lua │ ├── MailFrame.lua │ ├── MerchantFrame.lua │ ├── ModelPreviewFrame.lua │ ├── NavigationBar.lua │ ├── PVEFrame.lua │ ├── PaperDollFrame.lua │ ├── ProductChoiceFrame.lua │ ├── QuestFrame.lua │ ├── QuestInfo.lua │ ├── QuestMapFrame.lua │ ├── QueueStatusFrame.lua │ ├── RaidFinder.lua │ ├── RecruitAFriendFrame.lua │ ├── RolePoll.lua │ ├── ScenarioFinder.lua │ ├── SpellBookFrame.lua │ ├── SplashFrame.lua │ ├── StaticPopup.lua │ ├── TaxiFrame.lua │ ├── VideoOptionsFrame.lua │ ├── WorldMapFrame.lua │ └── WorldStateFrame.lua │ ├── SharedXML │ └── AddonList.lua │ └── theme.lua ├── FreeUI_Install ├── FreeUI_Install.toc └── install.lua └── FreeUI_Options ├── FreeUI_Options.toc ├── frames.lua ├── freeui_options.lua └── localization ├── chinese.lua └── english.lua /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /FreeUI/class/paladin.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if select(2, UnitClass("player")) ~= "PALADIN" or not C.classmod.paladinRF then return end 4 | 5 | local name, _, icon = GetSpellInfo(25780) 6 | 7 | local frame = CreateFrame("Frame", nil, UIParent) 8 | frame:SetSize(57, 57) 9 | 10 | frame.icon = frame:CreateTexture(nil, "ARTWORK") 11 | frame.icon:SetTexture(icon) 12 | frame.icon:SetTexCoord(.08, .92, .08, .92) 13 | frame.icon:SetAllPoints(frame) 14 | 15 | F.CreateBG(frame) 16 | 17 | frame:Hide() 18 | 19 | local function checkFury(_, unit) 20 | if not UnitBuff("player", name) and UnitAffectingCombat("player") then 21 | frame:Show() 22 | else 23 | frame:Hide() 24 | end 25 | end 26 | 27 | local registered = false 28 | 29 | local function checkTalents() 30 | if GetSpecialization() == 2 then 31 | if not registered then 32 | F.RegisterEvent("PLAYER_REGEN_ENABLED", checkFury) 33 | F.RegisterEvent("PLAYER_REGEN_DISABLED", checkFury) 34 | F.RegisterEvent("UNIT_AURA", checkFury) 35 | registered = true 36 | end 37 | elseif registered then 38 | F.UnregisterEvent("PLAYER_REGEN_ENABLED", checkFury) 39 | F.UnregisterEvent("PLAYER_REGEN_DISABLED", checkFury) 40 | F.UnregisterEvent("UNIT_AURA", checkFury) 41 | registered = false 42 | end 43 | end 44 | 45 | F.RegisterEvent("PLAYER_ENTERING_WORLD", checkTalents) 46 | F.RegisterEvent("PLAYER_TALENT_UPDATE", checkTalents) 47 | 48 | local mover = CreateFrame("Frame") 49 | mover:RegisterEvent("PlAYER_LOGIN") 50 | mover:SetScript("OnEvent", function() 51 | frame:SetPoint("BOTTOM", oUF_FreeTarget, "TOP", 0, 42) 52 | mover = nil 53 | end) -------------------------------------------------------------------------------- /FreeUI/core/core.lua: -------------------------------------------------------------------------------- 1 | -- [[ Core ]] 2 | 3 | local addon, core = ... 4 | 5 | core[1] = {} -- F, Functions 6 | core[2] = {} -- C, Constants/Config 7 | core[3] = {} -- L, Localisation 8 | 9 | FreeUI = core 10 | 11 | local F, C, L = unpack(select(2, ...)) 12 | 13 | -- [[ Saved variables ]] 14 | 15 | FreeUIGlobalConfig = {} 16 | FreeUIConfig = {} 17 | 18 | -- [[ Event handler ]] 19 | 20 | local eventFrame = CreateFrame("Frame") 21 | local events = {} 22 | 23 | eventFrame:SetScript("OnEvent", function(_, event, ...) 24 | for i = #events[event], 1, -1 do 25 | events[event][i](event, ...) 26 | end 27 | end) 28 | 29 | F.RegisterEvent = function(event, func) 30 | if not events[event] then 31 | events[event] = {} 32 | eventFrame:RegisterEvent(event) 33 | end 34 | table.insert(events[event], func) 35 | end 36 | 37 | F.UnregisterEvent = function(event, func) 38 | for index, tFunc in ipairs(events[event]) do 39 | if tFunc == func then 40 | table.remove(events[event], index) 41 | end 42 | end 43 | if #events[event] == 0 then 44 | events[event] = nil 45 | eventFrame:UnregisterEvent(event) 46 | end 47 | end 48 | 49 | F.UnregisterAllEvents = function(func) 50 | for event in next, events do 51 | F.UnregisterEvent(event, func) 52 | end 53 | end 54 | 55 | F.debugEvents = function() 56 | for event in next, events do 57 | print(event..": "..#events[event]) 58 | end 59 | end 60 | 61 | -- Options GUI callbacks 62 | 63 | F.AddOptionsCallback = function(category, option, func, widgetType) 64 | if not IsAddOnLoaded("FreeUI_Options") then return end 65 | 66 | if widgetType and widgetType == "radio" then 67 | local index = 1 68 | local frame = FreeUIOptionsPanel[category][option..index] 69 | while frame do 70 | frame:HookScript("OnClick", func) 71 | 72 | index = index + 1 73 | frame = FreeUIOptionsPanel[category][option..index] 74 | end 75 | else 76 | local frame = FreeUIOptionsPanel[category][option] 77 | 78 | if frame:GetObjectType() == "Slider" then 79 | frame:HookScript("OnValueChanged", func) 80 | else 81 | frame:HookScript("OnClick", func) 82 | end 83 | end 84 | end 85 | 86 | -- [[ Resolution support ]] 87 | 88 | C.RESOLUTION_SMALL = 1 89 | C.RESOLUTION_MEDIUM = 2 90 | C.RESOLUTION_LARGE = 3 91 | 92 | C.resolution = 0 93 | 94 | local updateScale 95 | updateScale = function(event) 96 | if event == "VARIABLES_LOADED" then 97 | local height = GetScreenHeight() 98 | 99 | if height <= 900 then 100 | C.resolution = C.RESOLUTION_SMALL 101 | elseif height < 1200 then 102 | C.resolution = C.RESOLUTION_MEDIUM 103 | else 104 | C.resolution = C.RESOLUTION_LARGE 105 | end 106 | end 107 | 108 | if C.general.uiScaleAuto then 109 | if not InCombatLockdown() then 110 | -- we don't bother with the cvar because of high resolution shenanigans 111 | UIParent:SetScale(768/string.match(({GetScreenResolutions()})[GetCurrentResolution()], "%d+x(%d+)")) 112 | ChatFrame1:ClearAllPoints() 113 | ChatFrame1:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 30, 30) 114 | else 115 | F.RegisterEvent("PLAYER_REGEN_ENABLED", updateScale) 116 | end 117 | 118 | if event == "PLAYER_REGEN_ENABLED" then 119 | F.UnregisterEvent("PLAYER_REGEN_ENABLED", updateScale) 120 | end 121 | end 122 | end 123 | 124 | F.RegisterEvent("VARIABLES_LOADED", updateScale) 125 | F.RegisterEvent("UI_SCALE_CHANGED", updateScale) 126 | 127 | F.AddOptionsCallback("general", "uiScaleAuto", function() 128 | if C.general.uiScaleAuto then 129 | F.RegisterEvent("UI_SCALE_CHANGED", updateScale) 130 | updateScale() 131 | else 132 | F.UnregisterEvent("UI_SCALE_CHANGED", updateScale) 133 | end 134 | end) 135 | 136 | -- [[ For secure frame hiding ]] 137 | 138 | local hider = CreateFrame("Frame", "FreeUIHider", UIParent) 139 | hider:Hide() -------------------------------------------------------------------------------- /FreeUI/core/gui.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not IsAddOnLoaded("FreeUI_Options") then return end 4 | 5 | local realm = GetRealmName() 6 | local name = UnitName("player") 7 | 8 | -- create the profile boolean 9 | if not FreeUIOptionsGlobal then FreeUIOptionsGlobal = {} end 10 | if FreeUIOptionsGlobal[realm] == nil then FreeUIOptionsGlobal[realm] = {} end 11 | if FreeUIOptionsGlobal[realm][name] == nil then FreeUIOptionsGlobal[realm][name] = false end 12 | 13 | -- create the main options table 14 | if FreeUIOptions == nil then FreeUIOptions = {} end 15 | 16 | -- determine which settings to use 17 | local profile 18 | if FreeUIOptionsGlobal[realm][name] == true then 19 | if FreeUIOptionsPerChar == nil then 20 | FreeUIOptionsPerChar = {} 21 | end 22 | profile = FreeUIOptionsPerChar 23 | else 24 | profile = FreeUIOptions 25 | end 26 | 27 | -- apply or remove saved settings as needed 28 | for group, options in pairs(profile) do 29 | if C[group] then 30 | for option, value in pairs(options) do 31 | if C[group][option] == nil or C[group][option] == value then 32 | -- remove saved vars if they do not exist in lua config anymore, or are the same as the lua config 33 | profile[group][option] = nil 34 | else 35 | C[group][option] = value 36 | end 37 | end 38 | else 39 | profile[group] = nil 40 | end 41 | end 42 | 43 | -- add global options variable 44 | C.options = profile -------------------------------------------------------------------------------- /FreeUI/core/slash.lua: -------------------------------------------------------------------------------- 1 | local F, C, L = unpack(select(2, ...)) 2 | 3 | SlashCmdList.FRAMENAME = function() print(GetMouseFocus():GetName()) end 4 | SLASH_FRAMENAME1 = "/gn" 5 | 6 | SlashCmdList.GETPARENT = function() print(GetMouseFocus():GetParent():GetName()) end 7 | SLASH_GETPARENT1 = "/gp" 8 | 9 | SlashCmdList.DISABLE_ADDON = function(s) DisableAddOn(s) end 10 | SLASH_DISABLE_ADDON1 = "/dis" 11 | 12 | SlashCmdList.ENABLE_ADDON = function(s) EnableAddOn(s) end 13 | SLASH_ENABLE_ADDON1 = "/en" 14 | 15 | SlashCmdList.RELOADUI = ReloadUI 16 | SLASH_RELOADUI1 = "/rl" 17 | 18 | SlashCmdList.RCSLASH = DoReadyCheck 19 | SLASH_RCSLASH1 = "/rc" 20 | 21 | SlashCmdList.ROLECHECK = InitiateRolePoll 22 | SLASH_ROLECHECK1 = "/rolecheck" 23 | SLASH_ROLECHECK2 = "/rolepoll" 24 | 25 | SlashCmdList.TICKET = ToggleHelpFrame 26 | SLASH_TICKET1 = "/gm" 27 | 28 | SlashCmdList.VOLUME = function(value) 29 | local numValue = tonumber(value) 30 | if numValue and 0 <= numValue and numValue <= 1 then 31 | SetCVar("Sound_MasterVolume", numValue) 32 | end 33 | end 34 | SLASH_VOLUME1 = "/vol" 35 | 36 | SlashCmdList.FREEUI = function(cmd) 37 | local cmd, args = strsplit(" ", cmd:lower(), 2) 38 | if C.unitframes.enable then 39 | if cmd == "dps" then 40 | FreeUIConfig.layout = 1 41 | ReloadUI() 42 | elseif(cmd == "heal" or cmd == "healer") then 43 | FreeUIConfig.layout = 2 44 | ReloadUI() 45 | end 46 | end 47 | 48 | if cmd == "install" then 49 | if IsAddOnLoaded("FreeUI_Install") then 50 | FreeUI_InstallFrame:Show() 51 | else 52 | EnableAddOn("FreeUI_Install") 53 | LoadAddOn("FreeUI_Install") 54 | end 55 | elseif cmd == "reset" then 56 | FreeUIGlobalConfig = {} 57 | FreeUIConfig = {} 58 | ReloadUI() 59 | else 60 | if not BankFrame:IsShown() and FreeUIOptionsPanel then 61 | FreeUIOptionsPanel:Show() 62 | end 63 | DEFAULT_CHAT_FRAME:AddMessage("FreeUI |cffffffff"..GetAddOnMetadata("FreeUI", "Version"), unpack(C.class)) 64 | if C.unitframes.enable then 65 | DEFAULT_CHAT_FRAME:AddMessage("|cffffffff/freeui|r [dps/healer]|cffffffff: Select a unitframe layout|r", unpack(C.class)) 66 | end 67 | DEFAULT_CHAT_FRAME:AddMessage("|cffffffff/freeui|r install|cffffffff: Load the intaller|r", unpack(C.class)) 68 | DEFAULT_CHAT_FRAME:AddMessage("|cffffffff/freeui|r reset|cffffffff: Clear saved settings|r", unpack(C.class)) 69 | end 70 | end 71 | SLASH_FREEUI1 = "/freeui" 72 | 73 | SlashCmdList.GPOINT = function(f) 74 | if f ~= "" then 75 | f = _G[f] 76 | else 77 | f = GetMouseFocus() 78 | end 79 | 80 | if f ~= nil then 81 | local a1, p, a2, x, y = f:GetPoint() 82 | print("|cffFFD100"..a1.."|r "..p:GetName().."|cffFFD100 "..a2.."|r "..x.." "..y) 83 | end 84 | end 85 | 86 | SLASH_GPOINT1 = "/gpoint" 87 | 88 | SlashCmdList.FPS = function(value) 89 | local numValue = tonumber(value) 90 | if numValue and 0 <= numValue then 91 | SetCVar("maxFPS", numValue) 92 | end 93 | end 94 | SLASH_FPS1 = "/fps" -------------------------------------------------------------------------------- /FreeUI/license/FreeUI.txt: -------------------------------------------------------------------------------- 1 | Copyright © 2010-2014 Haleth/Lightsword ( http://www.wowinterface.com/forums/member.php?u=110142 ) 2 | 3 | The contents of this addon, excluding third-party resources, are 4 | copyrighted to its authors with all rights reserved. 5 | 6 | The author of this addon hereby grants you the following rights: 7 | 8 | 1. You may make modifications to this addon for private use only except 9 | if you have been granted explicit permission by the author. 10 | 11 | 2. Do not modify the name of this addon, including the addon folders. 12 | 13 | 3. This copyright notice shall be included in all copies or substantial 14 | portions of the Software. 15 | 16 | All rights not explicitly addressed in this license are reserved by 17 | the copyright holder. -------------------------------------------------------------------------------- /FreeUI/license/oUF.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006-2014 Trond A Ekseth 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /FreeUI/media/CheckButtonHilight.blp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleth/FreeUI/b7b7feee19898b7c0983cfef1a0274629eca165c/FreeUI/media/CheckButtonHilight.blp -------------------------------------------------------------------------------- /FreeUI/media/DBMSpark.blp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleth/FreeUI/b7b7feee19898b7c0983cfef1a0274629eca165c/FreeUI/media/DBMSpark.blp -------------------------------------------------------------------------------- /FreeUI/media/PFRondaSeven.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleth/FreeUI/b7b7feee19898b7c0983cfef1a0274629eca165c/FreeUI/media/PFRondaSeven.ttf -------------------------------------------------------------------------------- /FreeUI/media/UI-LFG-ICON-ROLES.blp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleth/FreeUI/b7b7feee19898b7c0983cfef1a0274629eca165c/FreeUI/media/UI-LFG-ICON-ROLES.blp -------------------------------------------------------------------------------- /FreeUI/media/arrow-down-active.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleth/FreeUI/b7b7feee19898b7c0983cfef1a0274629eca165c/FreeUI/media/arrow-down-active.tga -------------------------------------------------------------------------------- /FreeUI/media/arrow-left-active.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleth/FreeUI/b7b7feee19898b7c0983cfef1a0274629eca165c/FreeUI/media/arrow-left-active.tga -------------------------------------------------------------------------------- /FreeUI/media/arrow-right-active.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleth/FreeUI/b7b7feee19898b7c0983cfef1a0274629eca165c/FreeUI/media/arrow-right-active.tga -------------------------------------------------------------------------------- /FreeUI/media/arrow-up-active.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleth/FreeUI/b7b7feee19898b7c0983cfef1a0274629eca165c/FreeUI/media/arrow-up-active.tga -------------------------------------------------------------------------------- /FreeUI/media/font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleth/FreeUI/b7b7feee19898b7c0983cfef1a0274629eca165c/FreeUI/media/font.ttf -------------------------------------------------------------------------------- /FreeUI/media/glowTex.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleth/FreeUI/b7b7feee19898b7c0983cfef1a0274629eca165c/FreeUI/media/glowTex.tga -------------------------------------------------------------------------------- /FreeUI/media/gradient.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleth/FreeUI/b7b7feee19898b7c0983cfef1a0274629eca165c/FreeUI/media/gradient.tga -------------------------------------------------------------------------------- /FreeUI/media/iFlash705.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleth/FreeUI/b7b7feee19898b7c0983cfef1a0274629eca165c/FreeUI/media/iFlash705.ttf -------------------------------------------------------------------------------- /FreeUI/media/sound.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleth/FreeUI/b7b7feee19898b7c0983cfef1a0274629eca165c/FreeUI/media/sound.mp3 -------------------------------------------------------------------------------- /FreeUI/media/statusbar.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleth/FreeUI/b7b7feee19898b7c0983cfef1a0274629eca165c/FreeUI/media/statusbar.tga -------------------------------------------------------------------------------- /FreeUI/oUF/blizzard.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local parent, ns = ... 6 | local oUF = ns.oUF 7 | 8 | local hiddenParent = CreateFrame("Frame") 9 | hiddenParent:Hide() 10 | 11 | local HandleFrame = function(baseName) 12 | local frame 13 | if(type(baseName) == 'string') then 14 | frame = _G[baseName] 15 | else 16 | frame = baseName 17 | end 18 | 19 | if(frame) then 20 | frame:UnregisterAllEvents() 21 | frame:Hide() 22 | 23 | -- Keep frame hidden without causing taint 24 | frame:SetParent(hiddenParent) 25 | 26 | local health = frame.healthbar 27 | if(health) then 28 | health:UnregisterAllEvents() 29 | end 30 | 31 | local power = frame.manabar 32 | if(power) then 33 | power:UnregisterAllEvents() 34 | end 35 | 36 | local spell = frame.spellbar 37 | if(spell) then 38 | spell:UnregisterAllEvents() 39 | end 40 | 41 | local altpowerbar = frame.powerBarAlt 42 | if(altpowerbar) then 43 | altpowerbar:UnregisterAllEvents() 44 | end 45 | end 46 | end 47 | 48 | function oUF:DisableBlizzard(unit) 49 | if(not unit) then return end 50 | 51 | if(unit == 'player') then 52 | HandleFrame(PlayerFrame) 53 | 54 | -- For the damn vehicle support: 55 | PlayerFrame:RegisterEvent('PLAYER_ENTERING_WORLD') 56 | PlayerFrame:RegisterEvent('UNIT_ENTERING_VEHICLE') 57 | PlayerFrame:RegisterEvent('UNIT_ENTERED_VEHICLE') 58 | PlayerFrame:RegisterEvent('UNIT_EXITING_VEHICLE') 59 | PlayerFrame:RegisterEvent('UNIT_EXITED_VEHICLE') 60 | 61 | -- User placed frames don't animate 62 | PlayerFrame:SetUserPlaced(true) 63 | PlayerFrame:SetDontSavePosition(true) 64 | elseif(unit == 'pet') then 65 | HandleFrame(PetFrame) 66 | elseif(unit == 'target') then 67 | HandleFrame(TargetFrame) 68 | HandleFrame(ComboFrame) 69 | elseif(unit == 'focus') then 70 | HandleFrame(FocusFrame) 71 | HandleFrame(TargetofFocusFrame) 72 | elseif(unit == 'targettarget') then 73 | HandleFrame(TargetFrameToT) 74 | elseif(unit:match'(boss)%d?$' == 'boss') then 75 | local id = unit:match'boss(%d)' 76 | if(id) then 77 | HandleFrame('Boss' .. id .. 'TargetFrame') 78 | else 79 | for i=1, 4 do 80 | HandleFrame(('Boss%dTargetFrame'):format(i)) 81 | end 82 | end 83 | elseif(unit:match'(party)%d?$' == 'party') then 84 | local id = unit:match'party(%d)' 85 | if(id) then 86 | HandleFrame('PartyMemberFrame' .. id) 87 | else 88 | for i=1, 4 do 89 | HandleFrame(('PartyMemberFrame%d'):format(i)) 90 | end 91 | end 92 | elseif(unit:match'(arena)%d?$' == 'arena') then 93 | local id = unit:match'arena(%d)' 94 | if(id) then 95 | HandleFrame('ArenaEnemyFrame' .. id) 96 | else 97 | for i=1, 4 do 98 | HandleFrame(('ArenaEnemyFrame%d'):format(i)) 99 | end 100 | end 101 | 102 | -- Blizzard_ArenaUI should not be loaded 103 | Arena_LoadUI = function() end 104 | SetCVar('showArenaEnemyFrames', '0', 'SHOW_ARENA_ENEMY_FRAMES_TEXT') 105 | end 106 | end -------------------------------------------------------------------------------- /FreeUI/oUF/elements/harmonyorbs.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local parent, ns = ... 6 | local oUF = ns.oUF 7 | 8 | local SPELL_POWER_CHI = SPELL_POWER_CHI 9 | 10 | local Update = function(self, event, unit) 11 | if(unit ~= 'player') then return end 12 | 13 | local element = self.Harmony 14 | if(element.PreUpdate) then 15 | element:PreUpdate() 16 | end 17 | 18 | local chi = UnitPower(unit, SPELL_POWER_CHI) 19 | 20 | for index = 1, UnitPowerMax(unit, SPELL_POWER_CHI) do 21 | if(index <= chi) then 22 | element[index]:Show() 23 | else 24 | element[index]:Hide() 25 | end 26 | end 27 | 28 | if(element.PostUpdate) then 29 | return element:PostUpdate(chi) 30 | end 31 | end 32 | 33 | local Path = function(self, ...) 34 | return (self.Harmony.Override or Update) (self, ...) 35 | end 36 | 37 | local ForceUpdate = function(element) 38 | return Path(element.__owner, 'ForceUpdate', element.__owner.unit) 39 | end 40 | 41 | local Enable = function(self, unit) 42 | local element = self.Harmony 43 | if(element and unit == 'player') then 44 | element.__owner = self 45 | element.ForceUpdate = ForceUpdate 46 | 47 | self:RegisterEvent('UNIT_DISPLAYPOWER', Path, true) 48 | self:RegisterEvent("UNIT_POWER_FREQUENT", Path) 49 | self:RegisterEvent("UNIT_MAXPOWER", Path) 50 | 51 | return true 52 | end 53 | end 54 | 55 | local Disable = function(self) 56 | local element = self.Harmony 57 | if(element) then 58 | self:UnregisterEvent('UNIT_DISPLAYPOWER', Path) 59 | self:UnregisterEvent('UNIT_POWER_FREQUENT', Path) 60 | self:UnregisterEvent('UNIT_MAXPOWER', Path) 61 | end 62 | end 63 | 64 | oUF:AddElement('Harmony', Path, Enable, Disable) -------------------------------------------------------------------------------- /FreeUI/oUF/elements/healprediction.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local _, ns = ... 6 | local oUF = ns.oUF 7 | 8 | local function UpdateFillBar(frame, previousTexture, bar, amount) 9 | if amount == 0 then 10 | bar:Hide() 11 | return previousTexture 12 | end 13 | 14 | bar:SetPoint("TOPLEFT", previousTexture, "TOPRIGHT", 0, 0) 15 | bar:SetPoint("BOTTOMLEFT", previousTexture, "BOTTOMRIGHT", 0, 0) 16 | 17 | local totalWidth, totalHeight = frame.Health:GetSize() 18 | local _, totalMax = frame.Health:GetMinMaxValues() 19 | 20 | local barSize = (amount / totalMax) * totalWidth 21 | bar:SetWidth(barSize) 22 | bar:Show() 23 | 24 | return bar 25 | end 26 | 27 | local function Update(self, event, unit) 28 | if(self.unit ~= unit) then return end 29 | 30 | local hp = self.HealPrediction 31 | if(hp.PreUpdate) then hp:PreUpdate(unit) end 32 | 33 | local myIncomingHeal = UnitGetIncomingHeals(unit, 'player') or 0 34 | local allIncomingHeal = UnitGetIncomingHeals(unit) or 0 35 | local totalAbsorb 36 | 37 | local health, maxHealth = UnitHealth(unit), UnitHealthMax(unit) 38 | 39 | if(health + allIncomingHeal > maxHealth * hp.maxOverflow) then 40 | allIncomingHeal = maxHealth * hp.maxOverflow - health 41 | end 42 | 43 | if(allIncomingHeal < myIncomingHeal) then 44 | myIncomingHeal = allIncomingHeal 45 | allIncomingHeal = 0 46 | else 47 | allIncomingHeal = allIncomingHeal - myIncomingHeal 48 | end 49 | 50 | if hp.absorbBar then 51 | totalAbsorb = UnitGetTotalAbsorbs(unit) or 0 52 | 53 | local overAbsorb = false 54 | if health + myIncomingHeal + allIncomingHeal + totalAbsorb >= maxHealth then 55 | if totalAbsorb > 0 then 56 | overAbsorb = true 57 | end 58 | totalAbsorb = max(0, maxHealth - (health + myIncomingHeal + allIncomingHeal)) 59 | end 60 | if overAbsorb then 61 | hp.overAbsorbGlow:Show() 62 | else 63 | hp.overAbsorbGlow:Hide() 64 | end 65 | end 66 | 67 | local previousTexture = self.Health:GetStatusBarTexture() 68 | 69 | previousTexture = UpdateFillBar(self, previousTexture, hp.myBar, myIncomingHeal) 70 | previousTexture = UpdateFillBar(self, previousTexture, hp.otherBar, allIncomingHeal) 71 | if hp.absorbBar then UpdateFillBar(self, previousTexture, hp.absorbBar, totalAbsorb) end 72 | 73 | if(hp.PostUpdate) then 74 | return hp:PostUpdate(unit) 75 | end 76 | end 77 | 78 | local function Path(self, ...) 79 | return (self.HealPrediction.Override or Update) (self, ...) 80 | end 81 | 82 | local ForceUpdate = function(element) 83 | return Path(element.__owner, 'ForceUpdate', element.__owner.unit) 84 | end 85 | 86 | local function Enable(self) 87 | local hp = self.HealPrediction 88 | if(hp) then 89 | hp.__owner = self 90 | hp.ForceUpdate = ForceUpdate 91 | 92 | self:RegisterEvent('UNIT_HEAL_PREDICTION', Path) 93 | if hp.absorbBar then 94 | self:RegisterEvent("UNIT_ABSORB_AMOUNT_CHANGED", Path) 95 | self:RegisterEvent('UNIT_HEAL_ABSORB_AMOUNT_CHANGED', Path) 96 | end 97 | self:RegisterEvent('UNIT_MAXHEALTH', Path) 98 | if(hp.frequentUpdates) then 99 | self:RegisterEvent('UNIT_HEALTH_FREQUENT', Path) 100 | else 101 | self:RegisterEvent('UNIT_HEALTH', Path) 102 | end 103 | 104 | if(hp.overAbsorbGlow and hp.overAbsorbGlow:IsObjectType'Texture' and not hp.overAbsorbGlow:GetTexture()) then 105 | hp.overAbsorbGlow:SetTexture([[Interface\RaidFrame\Shield-Overshield]]) 106 | end 107 | 108 | return true 109 | end 110 | end 111 | 112 | local function Disable(self) 113 | local hp = self.HealPrediction 114 | if(hp) then 115 | self:UnregisterEvent('UNIT_HEAL_PREDICTION', Path) 116 | self:UnregisterEvent("UNIT_ABSORB_AMOUNT_CHANGED", Path) 117 | self:UnregisterEvent('UNIT_HEAL_ABSORB_AMOUNT_CHANGED', Path) 118 | self:UnregisterEvent('UNIT_MAXHEALTH', Path) 119 | self:UnregisterEvent('UNIT_HEALTH', Path) 120 | self:UnregisterEvent('UNIT_HEALTH_FREQUENT', Path) 121 | end 122 | end 123 | 124 | oUF:AddElement('HealPrediction', Path, Enable, Disable) -------------------------------------------------------------------------------- /FreeUI/oUF/elements/health.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local parent, ns = ... 6 | local oUF = ns.oUF 7 | 8 | oUF.colors.health = {49/255, 207/255, 37/255} 9 | 10 | local Update = function(self, event, unit) 11 | if(self.unit ~= unit) then return end 12 | local health = self.Health 13 | 14 | if(health.PreUpdate) then health:PreUpdate(unit) end 15 | 16 | local min, max = UnitHealth(unit), UnitHealthMax(unit) 17 | local disconnected = not UnitIsConnected(unit) 18 | health:SetMinMaxValues(0, max) 19 | 20 | if(disconnected) then 21 | health:SetValue(max) 22 | else 23 | health:SetValue(min) 24 | end 25 | 26 | health.disconnected = disconnected 27 | 28 | local r, g, b, t 29 | if(health.colorTapping and not UnitPlayerControlled(unit) and UnitIsTapDenied(unit)) then 30 | t = self.colors.tapped 31 | elseif(health.colorDisconnected and not UnitIsConnected(unit)) then 32 | t = self.colors.disconnected 33 | elseif(health.colorClass and UnitIsPlayer(unit)) or 34 | (health.colorClassNPC and not UnitIsPlayer(unit)) or 35 | (health.colorClassPet and UnitPlayerControlled(unit) and not UnitIsPlayer(unit)) then 36 | local _, class = UnitClass(unit) 37 | t = self.colors.class[class] 38 | elseif(health.colorReaction and UnitReaction(unit, 'player')) then 39 | t = self.colors.reaction[UnitReaction(unit, "player")] 40 | elseif(health.colorSmooth) then 41 | r, g, b = self.ColorGradient(min, max, unpack(health.smoothGradient or self.colors.smooth)) 42 | elseif(health.colorHealth) then 43 | t = self.colors.health 44 | end 45 | 46 | if(t) then 47 | r, g, b = t[1], t[2], t[3] 48 | end 49 | 50 | if(b) then 51 | health:SetStatusBarColor(r, g, b) 52 | 53 | local bg = health.bg 54 | if(bg) then local mu = bg.multiplier or 1 55 | bg:SetVertexColor(r * mu, g * mu, b * mu) 56 | end 57 | end 58 | 59 | if(health.PostUpdate) then 60 | return health:PostUpdate(unit, min, max) 61 | end 62 | end 63 | 64 | local Path = function(self, ...) 65 | return (self.Health.Override or Update) (self, ...) 66 | end 67 | 68 | local ForceUpdate = function(element) 69 | return Path(element.__owner, 'ForceUpdate', element.__owner.unit) 70 | end 71 | 72 | local Enable = function(self, unit) 73 | local health = self.Health 74 | if(health) then 75 | health.__owner = self 76 | health.ForceUpdate = ForceUpdate 77 | 78 | if(health.frequentUpdates) then 79 | self:RegisterEvent('UNIT_HEALTH_FREQUENT', Path) 80 | else 81 | self:RegisterEvent('UNIT_HEALTH', Path) 82 | end 83 | 84 | self:RegisterEvent("UNIT_MAXHEALTH", Path) 85 | self:RegisterEvent('UNIT_CONNECTION', Path) 86 | 87 | -- For tapping. 88 | self:RegisterEvent('UNIT_FACTION', Path) 89 | 90 | if(health:IsObjectType'StatusBar' and not health:GetStatusBarTexture()) then 91 | health:SetStatusBarTexture[[Interface\TargetingFrame\UI-StatusBar]] 92 | end 93 | 94 | return true 95 | end 96 | end 97 | 98 | local Disable = function(self) 99 | local health = self.Health 100 | if(health) then 101 | self:UnregisterEvent('UNIT_HEALTH_FREQUENT', Path) 102 | self:UnregisterEvent('UNIT_HEALTH', Path) 103 | self:UnregisterEvent('UNIT_MAXHEALTH', Path) 104 | self:UnregisterEvent('UNIT_CONNECTION', Path) 105 | 106 | self:UnregisterEvent('UNIT_FACTION', Path) 107 | end 108 | end 109 | 110 | oUF:AddElement('Health', Path, Enable, Disable) 111 | -------------------------------------------------------------------------------- /FreeUI/oUF/elements/holypower.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | if(select(2, UnitClass('player')) ~= 'PALADIN') then return end 6 | 7 | local parent, ns = ... 8 | local oUF = ns.oUF 9 | 10 | local Path = function(self, ...) 11 | return (self.HolyPower.Override) (self, ...) 12 | end 13 | 14 | local ForceUpdate = function(element) 15 | return Path(element.__owner, 'ForceUpdate', element.__owner.unit, 'HOLY_POWER') 16 | end 17 | 18 | local function Enable(self) 19 | local hp = self.HolyPower 20 | if(hp) then 21 | hp.__owner = self 22 | hp.ForceUpdate = ForceUpdate 23 | 24 | self:RegisterEvent('UNIT_POWER', Path) 25 | 26 | return true 27 | end 28 | end 29 | 30 | local function Disable(self) 31 | local hp = self.HolyPower 32 | if(hp) then 33 | self:UnregisterEvent('UNIT_POWER', Path) 34 | end 35 | end 36 | 37 | oUF:AddElement('HolyPower', Path, Enable, Disable) -------------------------------------------------------------------------------- /FreeUI/oUF/elements/leader.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local parent, ns = ... 6 | local oUF = ns.oUF 7 | 8 | local Update = function(self, event) 9 | local leader = self.Leader 10 | if(leader.PreUpdate) then 11 | leader:PreUpdate() 12 | end 13 | 14 | local unit = self.unit 15 | if (UnitInParty(unit) or UnitInRaid(unit)) and UnitIsGroupLeader(unit) then 16 | leader:Show() 17 | else 18 | leader:Hide() 19 | end 20 | 21 | if(leader.PostUpdate) then 22 | return leader:PostUpdate(isLeader) 23 | end 24 | end 25 | 26 | local Path = function(self, ...) 27 | return (self.Leader.Override or Update) (self, ...) 28 | end 29 | 30 | local ForceUpdate = function(element) 31 | return Path(element.__owner, 'ForceUpdate') 32 | end 33 | 34 | local Enable = function(self) 35 | local leader = self.Leader 36 | if(leader) then 37 | leader.__owner = self 38 | leader.ForceUpdate = ForceUpdate 39 | 40 | self:RegisterEvent("PARTY_LEADER_CHANGED", Path, true) 41 | self:RegisterEvent("GROUP_ROSTER_UPDATE", Path, true) 42 | 43 | if(leader:IsObjectType"Texture" and not leader:GetTexture()) then 44 | leader:SetTexture[[Interface\GroupFrame\UI-Group-LeaderIcon]] 45 | end 46 | 47 | return true 48 | end 49 | end 50 | 51 | local Disable = function(self) 52 | local leader = self.Leader 53 | if(leader) then 54 | self:UnregisterEvent("PARTY_LEADER_CHANGED", Path) 55 | self:UnregisterEvent("GROUP_ROSTER_UPDATE", Path) 56 | end 57 | end 58 | 59 | oUF:AddElement('Leader', Path, Enable, Disable) -------------------------------------------------------------------------------- /FreeUI/oUF/elements/lfdrole.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local parent, ns = ... 6 | local oUF = ns.oUF 7 | 8 | local Update = function(self, event) 9 | local lfdrole = self.LFDRole 10 | if(lfdrole.PreUpdate) then 11 | lfdrole:PreUpdate() 12 | end 13 | 14 | local role = UnitGroupRolesAssigned(self.unit) 15 | if(role == 'TANK' or role == 'HEALER' or role == 'DAMAGER') then 16 | lfdrole:SetTexCoord(GetTexCoordsForRoleSmallCircle(role)) 17 | lfdrole:Show() 18 | else 19 | lfdrole:Hide() 20 | end 21 | 22 | if(lfdrole.PostUpdate) then 23 | return lfdrole:PostUpdate(role) 24 | end 25 | end 26 | 27 | local Path = function(self, ...) 28 | return (self.LFDRole.Override or Update) (self, ...) 29 | end 30 | 31 | local ForceUpdate = function(element) 32 | return Path(element.__owner, 'ForceUpdate') 33 | end 34 | 35 | local Enable = function(self) 36 | local lfdrole = self.LFDRole 37 | if(lfdrole) then 38 | lfdrole.__owner = self 39 | lfdrole.ForceUpdate = ForceUpdate 40 | 41 | if(self.unit == "player") then 42 | self:RegisterEvent("PLAYER_ROLES_ASSIGNED", Path, true) 43 | else 44 | self:RegisterEvent("GROUP_ROSTER_UPDATE", Path, true) 45 | end 46 | 47 | if(lfdrole:IsObjectType"Texture" and not lfdrole:GetTexture()) then 48 | lfdrole:SetTexture[[Interface\LFGFrame\UI-LFG-ICON-PORTRAITROLES]] 49 | end 50 | 51 | return true 52 | end 53 | end 54 | 55 | local Disable = function(self) 56 | local lfdrole = self.LFDRole 57 | if(lfdrole) then 58 | self:UnregisterEvent("PLAYER_ROLES_ASSIGNED", Path) 59 | self:UnregisterEvent("PARTY_MEMBERS_CHANGED", Path) 60 | end 61 | end 62 | 63 | oUF:AddElement('LFDRole', Path, Enable, Disable) -------------------------------------------------------------------------------- /FreeUI/oUF/elements/masterlooter.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local parent, ns = ... 6 | local oUF = ns.oUF 7 | 8 | local Update = function(self, event) 9 | local unit = self.unit 10 | local masterlooter = self.MasterLooter 11 | if(not (UnitInParty(unit) or UnitInRaid(unit))) then 12 | return masterlooter:Hide() 13 | end 14 | 15 | if(masterlooter.PreUpdate) then 16 | masterlooter:PreUpdate() 17 | end 18 | 19 | local method, pid, rid = GetLootMethod() 20 | if(method == 'master') then 21 | local mlUnit 22 | if(pid) then 23 | if(pid == 0) then 24 | mlUnit = 'player' 25 | else 26 | mlUnit = 'party'..pid 27 | end 28 | elseif(rid) then 29 | mlUnit = 'raid'..rid 30 | end 31 | 32 | if(UnitIsUnit(unit, mlUnit)) then 33 | masterlooter:Show() 34 | elseif(masterlooter:IsShown()) then 35 | masterlooter:Hide() 36 | end 37 | else 38 | masterlooter:Hide() 39 | end 40 | 41 | if(masterlooter.PostUpdate) then 42 | return masterlooter:PostUpdate(masterlooter:IsShown()) 43 | end 44 | end 45 | 46 | local Path = function(self, ...) 47 | return (self.MasterLooter.Override or Update) (self, ...) 48 | end 49 | 50 | local ForceUpdate = function(element) 51 | return Path(element.__owner, 'ForceUpdate') 52 | end 53 | 54 | local function Enable(self, unit) 55 | local masterlooter = self.MasterLooter 56 | if(masterlooter) then 57 | masterlooter.__owner = self 58 | masterlooter.ForceUpdate = ForceUpdate 59 | 60 | self:RegisterEvent('PARTY_LOOT_METHOD_CHANGED', Path, true) 61 | self:RegisterEvent('GROUP_ROSTER_UPDATE', Path, true) 62 | 63 | if(masterlooter:IsObjectType('Texture') and not masterlooter:GetTexture()) then 64 | masterlooter:SetTexture([[Interface\GroupFrame\UI-Group-MasterLooter]]) 65 | end 66 | 67 | return true 68 | end 69 | end 70 | 71 | local function Disable(self) 72 | if(self.MasterLooter) then 73 | self:UnregisterEvent('PARTY_LOOT_METHOD_CHANGED', Path) 74 | self:UnregisterEvent('GROUP_ROSTER_UPDATE', Path) 75 | end 76 | end 77 | 78 | oUF:AddElement('MasterLooter', Path, Enable, Disable) -------------------------------------------------------------------------------- /FreeUI/oUF/elements/pvp.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable or not C.unitframes.pvp then return end 4 | 5 | local parent, ns = ... 6 | local oUF = ns.oUF 7 | 8 | local Path = function(self, ...) 9 | return (self.PvP.Override) (self, ...) 10 | end 11 | 12 | local ForceUpdate = function(element) 13 | return Path(element.__owner, 'ForceUpdate', element.__owner.unit) 14 | end 15 | 16 | local Enable = function(self) 17 | local pvp = self.PvP 18 | if(pvp) then 19 | pvp.__owner = self 20 | pvp.ForceUpdate = ForceUpdate 21 | 22 | self:RegisterEvent("UNIT_FACTION", Path) 23 | 24 | return true 25 | end 26 | end 27 | 28 | local Disable = function(self) 29 | local pvp = self.PvP 30 | if(pvp) then 31 | self:UnregisterEvent("UNIT_FACTION", Path) 32 | end 33 | end 34 | 35 | oUF:AddElement('PvP', Path, Enable, Disable) -------------------------------------------------------------------------------- /FreeUI/oUF/elements/qicon.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local parent, ns = ... 6 | local oUF = ns.oUF 7 | 8 | local Update = function(self, event, unit) 9 | if(unit ~= self.unit) then return end 10 | 11 | local qicon = self.QuestIcon 12 | if(qicon.PreUpdate) then 13 | qicon:PreUpdate() 14 | end 15 | 16 | local isQuestBoss = UnitIsQuestBoss(unit) 17 | if(isQuestBoss) then 18 | qicon:Show() 19 | else 20 | qicon:Hide() 21 | end 22 | 23 | if(qicon.PostUpdate) then 24 | return qicon:PostUpdate(isQuestBoss) 25 | end 26 | end 27 | 28 | local Path = function(self, ...) 29 | return (self.QuestIcon.Override or Update) (self, ...) 30 | end 31 | 32 | local ForceUpdate = function(element) 33 | return Path(element.__owner, 'ForceUpdate', element.__owner.unit) 34 | end 35 | 36 | local Enable = function(self) 37 | local qicon = self.QuestIcon 38 | if(qicon) then 39 | qicon.__owner = self 40 | qicon.ForceUpdate = ForceUpdate 41 | 42 | self:RegisterEvent('UNIT_CLASSIFICATION_CHANGED', Path) 43 | 44 | if(qicon:IsObjectType'Texture' and not qicon:GetTexture()) then 45 | qicon:SetTexture[[Interface\TargetingFrame\PortraitQuestBadge]] 46 | end 47 | 48 | return true 49 | end 50 | end 51 | 52 | local Disable = function(self) 53 | if(self.QuestIcon) then 54 | self.QuestIcon:Hide() 55 | self:UnregisterEvent('UNIT_CLASSIFICATION_CHANGED', Path) 56 | end 57 | end 58 | 59 | oUF:AddElement('QuestIcon', Path, Enable, Disable) -------------------------------------------------------------------------------- /FreeUI/oUF/elements/range.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local parent, ns = ... 6 | local oUF = ns.oUF 7 | 8 | local _FRAMES = {} 9 | local OnRangeFrame 10 | 11 | local UnitInRange, UnitIsConnected = UnitInRange, UnitIsConnected 12 | 13 | -- updating of range. 14 | local timer = 0 15 | local OnRangeUpdate = function(self, elapsed) 16 | timer = timer + elapsed 17 | 18 | if(timer >= .20) then 19 | for _, object in next, _FRAMES do 20 | if(object:IsShown()) then 21 | local range = object.Range 22 | if(UnitIsConnected(object.unit)) then 23 | local inRange, checkedRange = UnitInRange(object.unit) 24 | if(checkedRange and not inRange) then 25 | if(range.Override) then 26 | range.Override(object, 'outside') 27 | else 28 | object:SetAlpha(range.outsideAlpha) 29 | end 30 | else 31 | if(range.Override) then 32 | range.Override(object, 'inside') 33 | elseif(object:GetAlpha() ~= range.insideAlpha) then 34 | object:SetAlpha(range.insideAlpha) 35 | end 36 | end 37 | else 38 | if(range.Override) then 39 | range.Override(object, 'offline') 40 | elseif(object:GetAlpha() ~= range.insideAlpha) then 41 | object:SetAlpha(range.insideAlpha) 42 | end 43 | end 44 | end 45 | end 46 | 47 | timer = 0 48 | end 49 | end 50 | 51 | local Enable = function(self) 52 | local range = self.Range 53 | if(range and range.insideAlpha and range.outsideAlpha) then 54 | table.insert(_FRAMES, self) 55 | 56 | if(not OnRangeFrame) then 57 | OnRangeFrame = CreateFrame"Frame" 58 | OnRangeFrame:SetScript("OnUpdate", OnRangeUpdate) 59 | end 60 | 61 | OnRangeFrame:Show() 62 | 63 | return true 64 | end 65 | end 66 | 67 | local Disable = function(self) 68 | local range = self.Range 69 | if(range) then 70 | for k, frame in next, _FRAMES do 71 | if(frame == self) then 72 | table.remove(_FRAMES, k) 73 | break 74 | end 75 | end 76 | 77 | if(#_FRAMES == 0) then 78 | OnRangeFrame:Hide() 79 | end 80 | end 81 | end 82 | 83 | oUF:AddElement('Range', nil, Enable, Disable) -------------------------------------------------------------------------------- /FreeUI/oUF/elements/resurrect.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local Update = function(self, event) 6 | local resurrect = self.ResurrectIcon 7 | if(resurrect.PreUpdate) then 8 | resurrect:PreUpdate() 9 | end 10 | 11 | local incomingResurrect = UnitHasIncomingResurrection(self.unit) 12 | if(incomingResurrect) then 13 | resurrect:Show() 14 | else 15 | resurrect:Hide() 16 | end 17 | 18 | if(resurrect.PostUpdate) then 19 | return resurrect:PostUpdate(incomingResurrect) 20 | end 21 | end 22 | 23 | local Path = function(self, ...) 24 | return (self.ResurrectIcon.Override or Update) (self, ...) 25 | end 26 | 27 | local ForceUpdate = function(element) 28 | return Path(element.__owner, 'ForceUpdate') 29 | end 30 | 31 | local Enable = function(self) 32 | local resurrect = self.ResurrectIcon 33 | if(resurrect) then 34 | resurrect.__owner = self 35 | resurrect.ForceUpdate = ForceUpdate 36 | 37 | self:RegisterEvent('INCOMING_RESURRECT_CHANGED', Path, true) 38 | 39 | if(resurrect:IsObjectType('Texture') and not resurrect:GetTexture()) then 40 | resurrect:SetTexture[[Interface\RaidFrame\Raid-Icon-Rez]] 41 | end 42 | 43 | return true 44 | end 45 | end 46 | 47 | local Disable = function(self) 48 | local resurrect = self.ResurrectIcon 49 | if(resurrect) then 50 | self:UnregisterEvent('INCOMING_RESURRECT_CHANGED', Path) 51 | end 52 | end 53 | 54 | oUF:AddElement('ResurrectIcon', Path, Enable, Disable) -------------------------------------------------------------------------------- /FreeUI/oUF/elements/ricons.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local parent, ns = ... 6 | local oUF = ns.oUF 7 | 8 | local GetRaidTargetIndex = GetRaidTargetIndex 9 | local SetRaidTargetIconTexture = SetRaidTargetIconTexture 10 | 11 | local Update = function(self, event) 12 | local index = GetRaidTargetIndex(self.unit) 13 | local icon = self.RaidIcon 14 | 15 | if(index) then 16 | SetRaidTargetIconTexture(icon, index) 17 | icon:Show() 18 | else 19 | icon:Hide() 20 | end 21 | end 22 | 23 | local Path = function(self, ...) 24 | return (self.RaidIcon.Override or Update) (self, ...) 25 | end 26 | 27 | local ForceUpdate = function(element) 28 | if(not element.__owner.unit) then return end 29 | return Path(element.__owner, 'ForceUpdate') 30 | end 31 | 32 | local Enable = function(self) 33 | local ricon = self.RaidIcon 34 | if(ricon) then 35 | ricon.__owner = self 36 | ricon.ForceUpdate = ForceUpdate 37 | 38 | self:RegisterEvent("RAID_TARGET_UPDATE", Path, true) 39 | 40 | if(ricon:IsObjectType"Texture" and not ricon:GetTexture()) then 41 | ricon:SetTexture[[Interface\TargetingFrame\UI-RaidTargetingIcons]] 42 | end 43 | 44 | return true 45 | end 46 | end 47 | 48 | local Disable = function(self) 49 | local ricon = self.RaidIcon 50 | if(ricon) then 51 | self:UnregisterEvent("RAID_TARGET_UPDATE", Path) 52 | end 53 | end 54 | 55 | oUF:AddElement('RaidIcon', Path, Enable, Disable) -------------------------------------------------------------------------------- /FreeUI/oUF/elements/runebar.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | --[[ Runebar: 6 | Authors: Zariel, Haste 7 | ]] 8 | 9 | if select(2, UnitClass("player")) ~= "DEATHKNIGHT" then return end 10 | local isBetaClient = select(4, GetBuildInfo()) >= 70000 11 | 12 | local parent, ns = ... 13 | local oUF = ns.oUF 14 | 15 | local runemap, UpdateType 16 | 17 | local OnUpdate = function(self, elapsed) 18 | local duration = self.duration + elapsed 19 | if(duration >= self.max) then 20 | return self:SetScript("OnUpdate", nil) 21 | else 22 | self.duration = duration 23 | return self:SetValue(duration) 24 | end 25 | end 26 | 27 | local Update = function(self, event, rid) 28 | local runes = self.Runes 29 | local rune = runes[rid] 30 | if(not rune) then return end 31 | 32 | local start, duration, runeReady 33 | if(UnitHasVehicleUI'player') then 34 | rune:Hide() 35 | else 36 | start, duration, runeReady = GetRuneCooldown(rid) 37 | if(not start) then 38 | -- As of 6.2.0 GetRuneCooldown returns nil values when zoning 39 | return 40 | end 41 | 42 | if(runeReady) then 43 | rune:SetMinMaxValues(0, 1) 44 | rune:SetValue(1) 45 | rune:SetScript("OnUpdate", nil) 46 | else 47 | rune.duration = GetTime() - start 48 | rune.max = duration 49 | rune:SetMinMaxValues(1, duration) 50 | rune:SetScript("OnUpdate", OnUpdate) 51 | end 52 | 53 | rune:Show() 54 | end 55 | 56 | if(runes.PostUpdate) then 57 | return runes:PostUpdate(rune, rid, start, duration, runeReady) 58 | end 59 | end 60 | 61 | local Path = function(self, event, ...) 62 | local UpdateMethod = self.Runes.Override or Update 63 | if(event == 'RUNE_POWER_UPDATE') then 64 | return UpdateMethod(self, event, ...) 65 | else 66 | for index = 1, 6 do 67 | UpdateMethod(self, event, index) 68 | end 69 | end 70 | end 71 | 72 | local ForceUpdate = function(element) 73 | return Path(element.__owner, 'ForceUpdate') 74 | end 75 | 76 | local Enable = function(self, unit) 77 | local runes = self.Runes 78 | if(runes and unit == 'player') then 79 | runes.__owner = self 80 | runes.ForceUpdate = ForceUpdate 81 | 82 | for i=1, 6 do 83 | local rune = runes[i] 84 | if(rune:IsObjectType'StatusBar' and not rune:GetStatusBarTexture()) then 85 | rune:SetStatusBarTexture[[Interface\TargetingFrame\UI-StatusBar]] 86 | 87 | local colors = oUF.colors.power.RUNES 88 | rune:SetStatusBarColor(colors[1], colors[2], colors[3]) 89 | 90 | if(rune.bg) then 91 | local mu = rune.bg.multiplier or 1 92 | rune.bg:SetVertexColor(r * mu, g * mu, b * mu) 93 | end 94 | end 95 | end 96 | 97 | self:RegisterEvent("RUNE_POWER_UPDATE", Path, true) 98 | 99 | return true 100 | end 101 | end 102 | 103 | local Disable = function(self) 104 | self:UnregisterEvent("RUNE_POWER_UPDATE", Path) 105 | end 106 | 107 | oUF:AddElement("Runes", Path, Enable, Disable) 108 | -------------------------------------------------------------------------------- /FreeUI/oUF/elements/shadoworbs.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local parent, ns = ... 6 | local oUF = ns.oUF 7 | 8 | local SPELL_POWER_SHADOW_ORBS = SPELL_POWER_SHADOW_ORBS 9 | local PRIEST_BAR_NUM_ORBS = PRIEST_BAR_NUM_ORBS 10 | local SPEC_PRIEST_SHADOW = SPEC_PRIEST_SHADOW 11 | 12 | local Update = function(self, event, unit, powerType) 13 | if(self.unit ~= unit or (powerType and powerType ~= 'SHADOW_ORBS')) then return end 14 | 15 | local element = self.ShadowOrbs 16 | if(element.PreUpdate) then 17 | element:PreUpdate() 18 | end 19 | 20 | local numOrbs = UnitPower(unit, SPELL_POWER_SHADOW_ORBS) 21 | 22 | for index = 1, PRIEST_BAR_NUM_ORBS do 23 | if(index <= numOrbs) then 24 | element[index]:Show() 25 | else 26 | element[index]:Hide() 27 | end 28 | end 29 | 30 | if(element.PostUpdate) then 31 | return element:PostUpdate(numOrbs) 32 | end 33 | end 34 | 35 | local Visibility = function(self, event, unit) 36 | local element = self.ShadowOrbs 37 | if(GetSpecialization() == SPEC_PRIEST_SHADOW) then 38 | element:Show() 39 | else 40 | element:Hide() 41 | end 42 | end 43 | 44 | local Path = function(self, ...) 45 | return (self.ShadowOrbs.Override or Update) (self, ...) 46 | end 47 | 48 | local ForceUpdate = function(element) 49 | return Path(element.__owner, 'ForceUpdate', element.__owner.unit) 50 | end 51 | 52 | local Enable = function(self, unit) 53 | local element = self.ShadowOrbs 54 | if(element and unit == 'player') then 55 | element.__owner = self 56 | element.ForceUpdate = ForceUpdate 57 | 58 | self:RegisterEvent('UNIT_POWER', Path) 59 | self:RegisterEvent('UNIT_DISPLAYPOWER', Path) 60 | self:RegisterEvent('PLAYER_TALENT_UPDATE', Visibility, true) 61 | 62 | return true 63 | end 64 | end 65 | 66 | local Disable = function(self) 67 | local element = self.ShadowOrbs 68 | if(element) then 69 | self:UnregisterEvent('UNIT_POWER', Path) 70 | self:UnregisterEvent('UNIT_DISPLAYPOWER', Path) 71 | self:UnregisterEvent('PLAYER_TALENT_UPDATE', Visibility) 72 | end 73 | end 74 | 75 | oUF:AddElement('ShadowOrbs', Path, Enable, Disable) -------------------------------------------------------------------------------- /FreeUI/oUF/elements/threat.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local parent, ns = ... 6 | local oUF = ns.oUF 7 | 8 | local Update = function(self, event, unit) 9 | if(unit ~= self.unit) then return end 10 | 11 | local threat = self.Threat 12 | if(threat.PreUpdate) then threat:PreUpdate(unit) end 13 | 14 | unit = unit or self.unit 15 | local status = UnitThreatSituation(unit) 16 | 17 | local r, g, b 18 | if(status and status > 0) then 19 | r, g, b = GetThreatStatusColor(status) 20 | threat:SetVertexColor(r, g, b) 21 | threat:Show() 22 | else 23 | threat:Hide() 24 | end 25 | 26 | if(threat.PostUpdate) then 27 | return threat:PostUpdate(unit, status, r, g, b) 28 | end 29 | end 30 | 31 | local Path = function(self, ...) 32 | return (self.Threat.Override or Update) (self, ...) 33 | end 34 | 35 | local ForceUpdate = function(element) 36 | return Path(element.__owner, 'ForceUpdate', element.__owner.unit) 37 | end 38 | 39 | local Enable = function(self) 40 | local threat = self.Threat 41 | if(threat) then 42 | threat.__owner = self 43 | threat.ForceUpdate = ForceUpdate 44 | 45 | self:RegisterEvent("UNIT_THREAT_SITUATION_UPDATE", Path) 46 | 47 | if(threat:IsObjectType"Texture" and not threat:GetTexture()) then 48 | threat:SetTexture[[Interface\Minimap\ObjectIcons]] 49 | threat:SetTexCoord(6/8, 7/8, 1/8, 2/8) 50 | end 51 | 52 | return true 53 | end 54 | end 55 | 56 | local Disable = function(self) 57 | local threat = self.Threat 58 | if(threat) then 59 | self:UnregisterEvent("UNIT_THREAT_SITUATION_UPDATE", Path) 60 | end 61 | end 62 | 63 | oUF:AddElement('Threat', Path, Enable, Disable) -------------------------------------------------------------------------------- /FreeUI/oUF/events.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local parent, ns = ... 6 | local oUF = ns.oUF 7 | local Private = oUF.Private 8 | 9 | local argcheck = Private.argcheck 10 | local error = Private.error 11 | local frame_metatable = Private.frame_metatable 12 | 13 | -- Original event methods 14 | local RegisterEvent = frame_metatable.__index.RegisterEvent 15 | local RegisterUnitEvent = frame_metatable.__index.RegisterUnitEvent 16 | local UnregisterEvent = frame_metatable.__index.UnregisterEvent 17 | local IsEventRegistered = frame_metatable.__index.IsEventRegistered 18 | 19 | local unitEvents = {} 20 | 21 | Private.UpdateUnits = function(frame, unit, realUnit) 22 | if unit == realUnit then 23 | realUnit = nil 24 | end 25 | if frame.unit ~= unit or frame.realUnit ~= realUnit then 26 | for event in next, unitEvents do 27 | -- IsEventRegistered returns the units in case of an event 28 | -- registered with RegisterUnitEvent 29 | local registered, unit1 = IsEventRegistered(frame, event) 30 | if registered and unit1 ~= unit then 31 | -- RegisterUnitEvent erases previously registered units so 32 | -- do not bother to unregister it 33 | RegisterUnitEvent(frame, event, unit, realUnit) 34 | end 35 | end 36 | frame.unit = unit 37 | frame.realUnit = realUnit 38 | frame.id = unit:match'^.-(%d+)' 39 | return true 40 | end 41 | end 42 | 43 | local OnEvent = function(self, event, ...) 44 | if self:IsVisible() then 45 | return self[event](self, event, ...) 46 | end 47 | end 48 | 49 | local event_metatable = { 50 | __call = function(funcs, self, ...) 51 | for _, func in next, funcs do 52 | func(self, ...) 53 | end 54 | end, 55 | } 56 | 57 | function frame_metatable.__index:RegisterEvent(event, func, unitless) 58 | -- Block OnUpdate polled frames from registering events. 59 | if(self.__eventless) then return end 60 | 61 | argcheck(event, 2, 'string') 62 | 63 | if(type(func) == 'string' and type(self[func]) == 'function') then 64 | func = self[func] 65 | end 66 | 67 | -- TODO: should warn the user. 68 | if not unitless and not (unitEvents[event] or event:match'^UNIT_') then 69 | unitless = true 70 | end 71 | 72 | local curev = self[event] 73 | local kind = type(curev) 74 | if(curev and func) then 75 | if(kind == 'function' and curev ~= func) then 76 | self[event] = setmetatable({curev, func}, event_metatable) 77 | elseif(kind == 'table') then 78 | for _, infunc in next, curev do 79 | if(infunc == func) then return end 80 | end 81 | 82 | table.insert(curev, func) 83 | end 84 | elseif(IsEventRegistered(self, event)) then 85 | return 86 | else 87 | if(type(func) == 'function') then 88 | self[event] = func 89 | elseif(not self[event]) then 90 | return error("Style [%s] attempted to register event [%s] on unit [%s] with a handler that doesn't exist.", self.style, event, self.unit or 'unknown') 91 | end 92 | 93 | if not self:GetScript('OnEvent') then 94 | self:SetScript('OnEvent', OnEvent) 95 | end 96 | 97 | if unitless then 98 | RegisterEvent(self, event) 99 | else 100 | unitEvents[event] = true 101 | RegisterUnitEvent(self, event, self.unit) 102 | end 103 | end 104 | end 105 | 106 | function frame_metatable.__index:UnregisterEvent(event, func) 107 | argcheck(event, 2, 'string') 108 | 109 | local curev = self[event] 110 | if(type(curev) == 'table' and func) then 111 | for k, infunc in next, curev do 112 | if(infunc == func) then 113 | table.remove(curev, k) 114 | 115 | local n = #curev 116 | if(n == 1) then 117 | local _, handler = next(curev) 118 | self[event] = handler 119 | elseif(n == 0) then 120 | -- This should not happen 121 | UnregisterEvent(self, event) 122 | end 123 | 124 | break 125 | end 126 | end 127 | elseif(curev == func) then 128 | self[event] = nil 129 | UnregisterEvent(self, event) 130 | end 131 | end -------------------------------------------------------------------------------- /FreeUI/oUF/factory.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local parent, ns = ... 6 | local oUF = ns.oUF 7 | local Private = oUF.Private 8 | 9 | local argcheck = Private.argcheck 10 | 11 | local _QUEUE = {} 12 | local _FACTORY = CreateFrame'Frame' 13 | _FACTORY:SetScript('OnEvent', function(self, event, ...) 14 | return self[event](self, event, ...) 15 | end) 16 | 17 | _FACTORY:RegisterEvent'PLAYER_LOGIN' 18 | _FACTORY.active = true 19 | 20 | function _FACTORY:PLAYER_LOGIN() 21 | if(not self.active) then return end 22 | 23 | for _, func in next, _QUEUE do 24 | func(oUF) 25 | end 26 | 27 | -- Avoid creating dupes. 28 | wipe(_QUEUE) 29 | end 30 | 31 | function oUF:Factory(func) 32 | argcheck(func, 2, 'function') 33 | 34 | -- Call the function directly if we're active and logged in. 35 | if(IsLoggedIn() and _FACTORY.active) then 36 | return func(self) 37 | else 38 | table.insert(_QUEUE, func) 39 | end 40 | end 41 | 42 | function oUF:EnableFactory() 43 | _FACTORY.active = true 44 | end 45 | 46 | function oUF:DisableFactory() 47 | _FACTORY.active = nil 48 | end 49 | 50 | function oUF:RunFactoryQueue() 51 | _FACTORY:PLAYER_LOGIN() 52 | end -------------------------------------------------------------------------------- /FreeUI/oUF/finalize.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local parent, ns = ... 6 | 7 | -- It's named Private for a reason! 8 | ns.oUF.Private = nil -------------------------------------------------------------------------------- /FreeUI/oUF/init.lua: -------------------------------------------------------------------------------- 1 | local F, C = unpack(select(2, ...)) 2 | 3 | if not C.unitframes.enable then return end 4 | 5 | local parent, ns = ... 6 | ns.oUF = {} 7 | ns.oUF.Private = {} -------------------------------------------------------------------------------- /FreeUI/oUF/oUF.xml: -------------------------------------------------------------------------------- 1 | 2 |