From 5c33660d0025c56ba78f54d2a1baa0a5cbb8cdaf Mon Sep 17 00:00:00 2001 From: Sean Baildon Date: Sat, 21 Oct 2017 11:45:32 +0100 Subject: [PATCH] unitframes: DRY --- modules/unitframes/layout.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/unitframes/layout.lua b/modules/unitframes/layout.lua index 2100045..ccd9490 100644 --- a/modules/unitframes/layout.lua +++ b/modules/unitframes/layout.lua @@ -992,9 +992,9 @@ oUF:Factory(function(self) C_NamePlate.SetNamePlateSelfClickThrough(true) SetCVar("nameplateSelfAlpha", 0) - spawnHelper(self, 'player', { - "CENTER", "NamePlatePlayerResourceFrame", "CENTER", 0, -50 - }) + local emulatePosition = { "CENTER", "NamePlatePlayerResourceFrame", "CENTER", 0, -50 } + + spawnHelper(self, 'player', emulatePosition) NamePlatePlayerResourceFrame:HookScript("OnHide", function() oUF_sInterfacePlayer:ClearAllPoints() @@ -1003,7 +1003,7 @@ oUF:Factory(function(self) NamePlatePlayerResourceFrame:HookScript("OnShow", function() oUF_sInterfacePlayer:ClearAllPoints() - oUF_sInterfacePlayer:SetPoint("CENTER", "NamePlatePlayerResourceFrame", "CENTER", 0, -50) + oUF_sInterfacePlayer:SetPoint(unpack(emulatePosition)) end) else SetCVar("nameplateSelfAlpha", GetCVarDefault("nameplateSelfAlpha"))