Skip to content

Commit 2cbc26f

Browse files
committed
[Frame] Optimize Private Aura Frames
1 parent 1ea147a commit 2cbc26f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Frame.lua

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,30 +1553,30 @@ function PlexusFrame:UpdateFrameUnits()
15531553

15541554
--Start Priavte Aura
15551555
if Plexus:IsRetailWow() and settings.enablePrivateAura and guid and (old_unit ~= unitid or old_guid ~= guid) and not frame.anchorID then
1556-
local icon = CreateFrame("Button", frame_name .. "PA", frame.indicators.bar, BackdropTemplateMixin and "BackdropTemplate")
1557-
icon:SetPoint("CENTER")
1558-
icon:SetSize(1, 1)
1559-
icon:EnableMouse(false)
1560-
icon:Show()
1556+
frame.pa = CreateFrame("Button", nil, frame.indicators.bar, BackdropTemplateMixin and "BackdropTemplate")
1557+
frame.pa:SetPoint("CENTER")
1558+
frame.pa:SetSize(1, 1)
1559+
frame.pa:EnableMouse(false)
1560+
frame.pa:Show()
15611561
local auraAnchor = {
15621562
durationAnchor =
15631563
{
15641564
point = "CENTER",
1565-
relativeTo = icon, --frame.Duration
1565+
relativeTo = frame.pa, --frame.Duration
15661566
relativePoint = "CENTER",
15671567
offsetX = settings.PrivateAuraOffsetX,
15681568
offsetY = settings.PrivateAuraOffsetY,
15691569
};
15701570
unitToken = unitid,
15711571
auraIndex = 1, --frame.auraIndex
1572-
parent = icon,
1572+
parent = frame.pa,
15731573
showCountdownFrame = settings.enablePrivateAuraCountdownFrame,
15741574
showCountdownNumbers = settings.enablePrivateAuraCountdownNumbers,
15751575
iconInfo =
15761576
{
15771577
iconAnchor = {
15781578
point = "CENTER",
1579-
relativeTo = icon,
1579+
relativeTo = frame.pa,
15801580
relativePoint = "CENTER",
15811581
offsetX = settings.PrivateAuraOffsetX,
15821582
offsetY = settings.PrivateAuraOffsetY,
@@ -1591,7 +1591,7 @@ function PlexusFrame:UpdateFrameUnits()
15911591
if Plexus:IsRetailWow() and settings.enablePrivateAura and guid and (old_unit ~= unitid or old_guid ~= guid) and frame.anchorID then
15921592
C_UnitAuras.RemovePrivateAuraAnchor(frame.anchorID)
15931593
frame.anchorID = nil
1594-
local icon = _G[frame_name .. "PA"]
1594+
local icon = frame.pa
15951595
icon:SetParent(frame.indicators.bar)
15961596
icon:SetPoint("CENTER")
15971597
icon:SetSize(1, 1)

0 commit comments

Comments
 (0)