Skip to content

Commit

Permalink
TempFix: Show Timers on nameplates
Browse files Browse the repository at this point in the history
  • Loading branch information
Wutname1 committed Dec 8, 2022
1 parent aa2ea2d commit 987949b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Modules/Nameplates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ local NameplateCallback = function(self, event, unit)
return
end

self.ShowWidgetOnly = UnitNameplateShowsWidgetsOnly(unit)

local elementDB = module.DB.elements
if event == 'NAME_PLATE_UNIT_ADDED' then
local blizzPlate = self:GetParent().UnitFrame
Expand All @@ -424,6 +426,25 @@ local NameplateCallback = function(self, event, unit)
NameplateList[self:GetName()] = true

self:UpdateAllElements('ForceUpdate')

if self.ShowWidgetOnly then
for _, element in ipairs(ElementList) do
if self:IsElementEnabled(element) then
self:DisableElement(element)
if self[element] then
self[element]:Hide()
end
end
end

self.widgetContainer = self.blizzPlate.WidgetContainer
if self.widgetContainer then
self.widgetContainer:SetParent(self)
self.widgetContainer:ClearAllPoints()
self.widgetContainer:SetPoint('BOTTOM', self, 'TOP')
end
return
end
elseif event == 'NAME_PLATE_UNIT_REMOVED' then
NameplateList[self:GetName()] = false
end
Expand Down

0 comments on commit 987949b

Please sign in to comment.