focus: enable native focus units for tbc

This commit is contained in:
shagu
2020-02-17 18:37:26 +01:00
parent f0019bd6a0
commit fdbf6715dc
3 changed files with 20 additions and 12 deletions
+6 -1
View File
@@ -237,11 +237,16 @@ pfUI:RegisterModule("castbar", "vanilla:tbc", function ()
-- [[ pfFocusCastbar ]] --
if C.castbar.focus.hide_pfui == "0" and pfUI.uf.focus then
pfUI.castbar.focus = CreateCastbar("pfFocusCastbar", UIParent)
pfUI.castbar.focus = CreateCastbar("pfFocusCastbar", UIParent, "focus")
pfUI.castbar.focus.showicon = C.castbar.focus.showicon == "1" and true or nil
pfUI.castbar.focus.showlag = C.castbar.focus.showlag == "1" and true or nil
pfUI.castbar.focus.showrank = C.castbar.focus.showrank == "1" and true or nil
-- reset unitstr for vanilla focus frame emulation
if pfUI.client <= 11200 then
pfUI.castbar.focus.unitstr = nil
end
local pspace = tonumber(C.unitframes.focus.pspace)
local width = C.castbar.focus.width ~= "-1" and C.castbar.focus.width or pfUI.uf.focus:GetWidth()
pfUI.castbar.focus:SetPoint("TOPLEFT", pfUI.uf.focus, "BOTTOMLEFT", 0, -default_border * 2 - pspace)