mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-20 19:30:49 +00:00
unitframes: check for disabled in visibility function
This commit is contained in:
+18
-17
@@ -182,7 +182,16 @@ function pfUI.uf:UpdateVisibility()
|
|||||||
local self = self or this
|
local self = self or this
|
||||||
|
|
||||||
if InCombatLockdown and InCombatLockdown() then return end
|
if InCombatLockdown and InCombatLockdown() then return end
|
||||||
if self.config.visible == "0" then return end
|
|
||||||
|
if self.config.visible == "0" then
|
||||||
|
if UnregisterStateDriver then
|
||||||
|
UnregisterStateDriver(self, "visibility")
|
||||||
|
self.visible = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
self:Hide()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if InCombatLockdown and not InCombatLockdown() then
|
if InCombatLockdown and not InCombatLockdown() then
|
||||||
if pfUI.unlock and pfUI.unlock:IsShown() then
|
if pfUI.unlock and pfUI.unlock:IsShown() then
|
||||||
@@ -195,8 +204,6 @@ function pfUI.uf:UpdateVisibility()
|
|||||||
self.visible = true
|
self.visible = true
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
elseif InCombatLockdown and InCombatLockdown() then
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local unitstr = string.format("%s%s", self.label or "", self.id or "")
|
local unitstr = string.format("%s%s", self.label or "", self.id or "")
|
||||||
@@ -1171,11 +1178,6 @@ function pfUI.uf:RefreshUnit(unit, component)
|
|||||||
if not unit.id then unit.id = "" end
|
if not unit.id then unit.id = "" end
|
||||||
local component = component or ""
|
local component = component or ""
|
||||||
|
|
||||||
if unit.config.visible ~= "1" then
|
|
||||||
unit:Hide()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- don't update scanner activity
|
-- don't update scanner activity
|
||||||
if unit.label == "target" or unit.label == "targettarget" then
|
if unit.label == "target" or unit.label == "targettarget" then
|
||||||
if pfScanActive == true then return end
|
if pfScanActive == true then return end
|
||||||
@@ -1203,21 +1205,20 @@ function pfUI.uf:RefreshUnit(unit, component)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local unitstr = unit.label..unit.id
|
-- hide unused and invalid frames
|
||||||
|
unit:UpdateVisibility()
|
||||||
|
|
||||||
|
-- return on invisible unit frames
|
||||||
|
if not unit:IsShown() then return end
|
||||||
|
|
||||||
|
-- create required fields
|
||||||
|
if not unit.cache then unit.cache = {} end
|
||||||
|
local unitstr = unit.label..unit.id
|
||||||
local default_border = C.appearance.border.default
|
local default_border = C.appearance.border.default
|
||||||
if C.appearance.border.unitframes ~= "-1" then
|
if C.appearance.border.unitframes ~= "-1" then
|
||||||
default_border = C.appearance.border.unitframes
|
default_border = C.appearance.border.unitframes
|
||||||
end
|
end
|
||||||
|
|
||||||
-- create required fields
|
|
||||||
if not unit.cache then unit.cache = {} end
|
|
||||||
|
|
||||||
-- hide unused and invalid frames
|
|
||||||
unit:UpdateVisibility()
|
|
||||||
|
|
||||||
if not unit:IsShown() then return end
|
|
||||||
|
|
||||||
-- Buffs
|
-- Buffs
|
||||||
if unit.buffs and ( component == "all" or component == "aura" ) then
|
if unit.buffs and ( component == "all" or component == "aura" ) then
|
||||||
for i=1, unit.config.bufflimit do
|
for i=1, unit.config.bufflimit do
|
||||||
|
|||||||
Reference in New Issue
Block a user