diff --git a/api/config.lua b/api/config.lua index e3642760..6e61f087 100644 --- a/api/config.lua +++ b/api/config.lua @@ -693,6 +693,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("thirdparty", "atlasloot", "enable", "1") pfUI:UpdateConfig("thirdparty", "myroleplay", "enable", "1") pfUI:UpdateConfig("thirdparty", "druidmana", "enable", "1") + pfUI:UpdateConfig("thirdparty", "druidbar", "enable", "1") pfUI:UpdateConfig("thirdparty", "noteit", "enable", "1") pfUI:UpdateConfig("thirdparty", "recount", "skin", "1") pfUI:UpdateConfig("thirdparty", "recount", "dock", "1") diff --git a/modules/gui.lua b/modules/gui.lua index 818444da..f8839851 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -2107,6 +2107,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(nil, "HealComm", C.thirdparty.healcomm, "enable", "checkbox", nil, nil, nil, nil, "vanilla") CreateConfig(nil, "SortBags", C.thirdparty.sortbags, "enable", "checkbox", nil, nil, nil, nil, "vanilla") CreateConfig(nil, "MrPlow", C.thirdparty.mrplow, "enable", "checkbox") + CreateConfig(nil, "DruidBar", C.thirdparty.druidbar, "enable", "checkbox", nil, nil, nil, nil, "tbc") CreateConfig(nil, "FlightMap", C.thirdparty.flightmap, "enable", "checkbox", nil, nil, nil, nil, "vanilla") CreateConfig(nil, "TheoryCraft", C.thirdparty.theorycraft, "enable", "checkbox", nil, nil, nil, nil, "vanilla") CreateConfig(nil, "SuperMacro", C.thirdparty.supermacro, "enable", "checkbox", nil, nil, nil, nil, "vanilla") diff --git a/modules/thirdparty-tbc.lua b/modules/thirdparty-tbc.lua index 4904bef7..12fee5f9 100644 --- a/modules/thirdparty-tbc.lua +++ b/modules/thirdparty-tbc.lua @@ -182,4 +182,30 @@ pfUI:RegisterModule("thirdparty-tbc", "tbc", function () end end end) + + HookAddonOrVariable("DruidBarFrame", function() + if C.thirdparty.druidbar.enable == "0" then return end + local p = ManaBarColor[0] + local pr, pg, pb = 0, 0, 0 + if p then pr, pg, pb = p.r + .5, p.g +.5, p.b +.5 end + DruidBarKey.color = { pr, pg, pb, 1 } + DruidBarKey.bordercolor = {1,1,1,0} + DruidBarKey.bgcolor = {0,0,0,0} + DruidBarKey.manatexture = pfUI.media["img:bar"] + DruidBarKey.bordertexture = "" + + hooksecurefunc("DruidBar_MainGraphics", function() + local f = pfUI.uf.player + DruidBarFrame:SetWidth((f.config.pwidth ~= "-1" and f.config.pwidth or f.config.width)) + DruidBarFrame:SetHeight(f.config.pheight) + DruidBarMana:SetAllPoints(DruidBarFrame) + + DruidBarText:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE") + DruidBarText1:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE") + + StripTextures(DruidBarFrame) + CreateBackdrop(DruidBarFrame) + CreateBackdropShadow(DruidBarFrame) + end) + end) end)