nameplate: use same nil function for all plates

This commit is contained in:
shagu
2020-02-20 19:20:45 +01:00
parent d3a1e7b10b
commit 18bd54d54a
+3 -1
View File
@@ -1,4 +1,5 @@
pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
local function nilfunc() return nil end
local font = C.nameplates.use_unitfonts == "1" and pfUI.font_unit or pfUI.font_default
local font_size = C.nameplates.use_unitfonts == "1" and C.global.font_unit_size or C.global.font_size
local inactive_alpha = tonumber(C.nameplates.notargalpha)
@@ -53,7 +54,8 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
this.nameplate = CreateFrame("Button", nil, this)
this.nameplate.parent = this
this.healthbar, this.castbar = this:GetChildren()
this.healthbar:SetScript("OnEnter", function() return nil end)
this.healthbar:SetScript("OnEnter", nilfunc)
for i, frame in pairs({this:GetRegions()}) do
if NAMEPLATE_OBJECTORDER[i] == "_" then
frame.Show = function() return end