From a5a0c65c054fa211783628f7b1765fc7338adbde Mon Sep 17 00:00:00 2001 From: shagu Date: Tue, 2 Jun 2020 18:54:12 +0200 Subject: [PATCH] nameplates: set highlight backdrops only once --- modules/nameplates.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/nameplates.lua b/modules/nameplates.lua index fa9378f7..3adeeb91 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -23,6 +23,9 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function () local parentCount = 0 local registry = {} + -- cache default border color + local er, eg, eb, ea = GetStringColor(pfUI_config.appearance.border.color) + local function IsNamePlate(frame) if frame:GetObjectType() ~= NAMEPLATE_FRAMETYPE then return nil end regions = plate:GetRegions() @@ -451,8 +454,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function () if target and C.nameplates.targethighlight == "1" then plate.health.backdrop:SetBackdropBorderColor(1,1,1,1) else - local rawborder, default_border = GetBorderSize("nameplates") - CreateBackdrop(plate.health, default_border) + plate.health.backdrop:SetBackdropBorderColor(er,eg,eb,ea) end -- hide frames according to the configuration