From b0f338204f6b6d8fe6c509d747007cfcf22f5a47 Mon Sep 17 00:00:00 2001 From: shagu Date: Fri, 2 Aug 2019 17:57:02 +0200 Subject: [PATCH] nameplates: disable modern click handlers for tbc+ --- modules/nameplates.lua | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/modules/nameplates.lua b/modules/nameplates.lua index 46aaf634..2f998102 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -69,18 +69,21 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function () end -- init - if C.nameplates["legacy"] == "0" and pfUI.expansion == "vanilla" then - this:SetFrameLevel(0) - this:EnableMouse(false) - end + -- skip modern handlers and overlapping for modern gameclients + if pfUI.client < 20000 then + if C.nameplates["legacy"] == "0" then + this:SetFrameLevel(0) + this:EnableMouse(false) + end - -- enable plate overlap - if C.nameplates.overlap == "1" and C.nameplates["legacy"] == "0" then - this:SetWidth(1) - this:SetHeight(1) - elseif pfUI.expansion == "vanilla" then - this:SetWidth(plate_width * UIParent:GetScale()) - this:SetHeight(plate_height * UIParent:GetScale()) + -- enable plate overlap + if C.nameplates.overlap == "1" and C.nameplates["legacy"] == "0" then + this:SetWidth(1) + this:SetHeight(1) + else + this:SetWidth(plate_width * UIParent:GetScale()) + this:SetHeight(plate_height * UIParent:GetScale()) + end end -- set dimensions