From 167dc66d0830c303e9404dc6d15287af456d51f8 Mon Sep 17 00:00:00 2001 From: Eltreum Date: Wed, 16 Feb 2022 20:41:28 -0300 Subject: [PATCH] only if shown --- ElvUI_EltreumUI/Modules/Nameplates/PowerBar.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ElvUI_EltreumUI/Modules/Nameplates/PowerBar.lua b/ElvUI_EltreumUI/Modules/Nameplates/PowerBar.lua index 2689d004d..55bc45fad 100644 --- a/ElvUI_EltreumUI/Modules/Nameplates/PowerBar.lua +++ b/ElvUI_EltreumUI/Modules/Nameplates/PowerBar.lua @@ -598,11 +598,12 @@ function ElvUI_EltreumUI:NameplatePower(nameplate) end if E.db.ElvUI_EltreumUI.nameplatepower.autoadjustposition then - if _G['ElvNP_TargetClassPowerRunes'] then + if _G['ElvNP_TargetClassPowerRunes'] and _G['ElvNP_TargetClassPowerRunes']:IsShown() then EltreumPowerBar:SetPoint("TOP", _G['ElvNP_TargetClassPowerRunes'], "TOP", 0, 7) - elseif _G['ElvNP_TargetClassPowerClassPower'] then + elseif _G['ElvNP_TargetClassPowerClassPower'] and _G['ElvNP_TargetClassPowerClassPower']:IsShown() then + --print("using classpower anchor instead") EltreumPowerBar:SetPoint("TOP", _G['ElvNP_TargetClassPowerClassPower'], "TOP", 0, 7) - elseif _G['ElvNP_TargetClassPowerStagger'] then + elseif _G['ElvNP_TargetClassPowerStagger'] and _G['ElvNP_TargetClassPowerStagger']:IsShown() then EltreumPowerBar:SetPoint("TOP", _G['ElvNP_TargetClassPowerStagger'], "TOP", 0, 7) end end