totem plates fix UpdateFrameOnce
This commit is contained in:
parent
993de572cd
commit
cbf8c1a13b
@ -282,8 +282,7 @@ function TotemPlates:UpdateFrameOnce()
|
|||||||
nameplate.gladdyTotemFrame.totemName:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.npTremorFont), Gladdy.db.npTremorFontSize, "OUTLINE")
|
nameplate.gladdyTotemFrame.totemName:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.npTremorFont), Gladdy.db.npTremorFontSize, "OUTLINE")
|
||||||
nameplate.gladdyTotemFrame.totemName:SetText(Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].customText or "")
|
nameplate.gladdyTotemFrame.totemName:SetText(Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].customText or "")
|
||||||
self:SetTotemAlpha(nameplate.gladdyTotemFrame, k)
|
self:SetTotemAlpha(nameplate.gladdyTotemFrame, k)
|
||||||
nameplate.UnitFrame.selectionHighlight:SetPoint("TOPLEFT", nameplate.gladdyTotemFrame, "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16)
|
self:ToggleAddon(nameplate)
|
||||||
nameplate.UnitFrame.selectionHighlight:SetPoint("BOTTOMRIGHT", nameplate.gladdyTotemFrame, "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16)
|
|
||||||
end
|
end
|
||||||
for i,gladdyTotemFrame in ipairs(self.totemPlateCache) do
|
for i,gladdyTotemFrame in ipairs(self.totemPlateCache) do
|
||||||
gladdyTotemFrame:SetWidth(Gladdy.db.npTotemPlatesSize * Gladdy.db.npTotemPlatesWidthFactor)
|
gladdyTotemFrame:SetWidth(Gladdy.db.npTotemPlatesSize * Gladdy.db.npTotemPlatesWidthFactor)
|
||||||
@ -344,8 +343,7 @@ function TotemPlates:PLAYER_TARGET_CHANGED()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function TotemPlates:ToggleAddon(nameplate, show)
|
function TotemPlates:ToggleAddon(nameplate)
|
||||||
if not show then
|
|
||||||
if self.addon == "Blizzard" then
|
if self.addon == "Blizzard" then
|
||||||
nameplate.UnitFrame:Hide()
|
nameplate.UnitFrame:Hide()
|
||||||
elseif self.addon == "Plater" then
|
elseif self.addon == "Plater" then
|
||||||
@ -362,7 +360,6 @@ function TotemPlates:ToggleAddon(nameplate, show)
|
|||||||
nameplate.unitFrame:Hide()
|
nameplate.unitFrame:Hide()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function TotemPlates.OnUpdate(self)
|
function TotemPlates.OnUpdate(self)
|
||||||
@ -413,7 +410,7 @@ function TotemPlates:NAME_PLATE_UNIT_ADDED(...)
|
|||||||
nameplate.gladdyTotemFrame.parent = nameplate
|
nameplate.gladdyTotemFrame.parent = nameplate
|
||||||
nameplate.gladdyTotemFrame:Show()
|
nameplate.gladdyTotemFrame:Show()
|
||||||
TotemPlates:SetTotemAlpha(nameplate.gladdyTotemFrame, unitID)
|
TotemPlates:SetTotemAlpha(nameplate.gladdyTotemFrame, unitID)
|
||||||
self:ToggleAddon(nameplate, false)
|
self:ToggleAddon(nameplate)
|
||||||
self.activeTotemNameplates[unitID] = nameplate
|
self.activeTotemNameplates[unitID] = nameplate
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user