Skip to content

Commit

Permalink
unitframes: DRY
Browse files Browse the repository at this point in the history
  • Loading branch information
sbaildon committed Oct 21, 2017
1 parent 9e9872b commit 5c33660
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/unitframes/layout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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"))
Expand Down

0 comments on commit 5c33660

Please sign in to comment.