fix: guard legacy InterfaceOptions globals in UnitFrames
The CoA client's reworked options panels may omit legacy InterfaceOptions* status/combat/display widgets; an unguarded access aborted UnitFrames initialisation on login. Guard every access.
This commit is contained in:
@@ -1429,34 +1429,55 @@ function UF:Initialize()
|
|||||||
hooksecurefunc(CompactUnitMixin, "SetUnit", UF.DisableBlizzard_SetUnit)
|
hooksecurefunc(CompactUnitMixin, "SetUnit", UF.DisableBlizzard_SetUnit)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- The CoA client's reworked options panels may omit these legacy
|
||||||
|
-- InterfaceOptions* widgets; guard every access so a missing global
|
||||||
|
-- cannot abort UnitFrames initialisation.
|
||||||
if E.private.unitframe.disabledBlizzardFrames.arena and E.private.unitframe.disabledBlizzardFrames.focus and E.private.unitframe.disabledBlizzardFrames.party then
|
if E.private.unitframe.disabledBlizzardFrames.arena and E.private.unitframe.disabledBlizzardFrames.focus and E.private.unitframe.disabledBlizzardFrames.party then
|
||||||
InterfaceOptionsFrameCategoriesButton10:SetScale(0.0001)
|
if InterfaceOptionsFrameCategoriesButton10 then
|
||||||
|
InterfaceOptionsFrameCategoriesButton10:SetScale(0.0001)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if E.private.unitframe.disabledBlizzardFrames.player then
|
if E.private.unitframe.disabledBlizzardFrames.player then
|
||||||
InterfaceOptionsStatusTextPanelPlayer:SetScale(0.0001)
|
if InterfaceOptionsStatusTextPanelPlayer then
|
||||||
InterfaceOptionsStatusTextPanelPlayer:SetAlpha(0)
|
InterfaceOptionsStatusTextPanelPlayer:SetScale(0.0001)
|
||||||
InterfaceOptionsStatusTextPanelPet:SetScale(0.0001)
|
InterfaceOptionsStatusTextPanelPlayer:SetAlpha(0)
|
||||||
InterfaceOptionsStatusTextPanelPet:SetAlpha(0)
|
end
|
||||||
|
if InterfaceOptionsStatusTextPanelPet then
|
||||||
|
InterfaceOptionsStatusTextPanelPet:SetScale(0.0001)
|
||||||
|
InterfaceOptionsStatusTextPanelPet:SetAlpha(0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if E.private.unitframe.disabledBlizzardFrames.target then
|
if E.private.unitframe.disabledBlizzardFrames.target then
|
||||||
InterfaceOptionsStatusTextPanelTarget:SetScale(0.0001)
|
if InterfaceOptionsStatusTextPanelTarget then
|
||||||
InterfaceOptionsStatusTextPanelTarget:SetAlpha(0)
|
InterfaceOptionsStatusTextPanelTarget:SetScale(0.0001)
|
||||||
InterfaceOptionsCombatPanelEnemyCastBarsOnPortrait:SetAlpha(0)
|
InterfaceOptionsStatusTextPanelTarget:SetAlpha(0)
|
||||||
InterfaceOptionsCombatPanelEnemyCastBarsOnPortrait:EnableMouse(false)
|
end
|
||||||
InterfaceOptionsCombatPanelEnemyCastBarsOnNameplates:ClearAllPoints()
|
if InterfaceOptionsCombatPanelEnemyCastBarsOnPortrait and InterfaceOptionsCombatPanelEnemyCastBarsOnNameplates then
|
||||||
InterfaceOptionsCombatPanelEnemyCastBarsOnNameplates:Point(InterfaceOptionsCombatPanelEnemyCastBarsOnPortrait:GetPoint())
|
InterfaceOptionsCombatPanelEnemyCastBarsOnPortrait:SetAlpha(0)
|
||||||
InterfaceOptionsCombatPanelTargetOfTarget:SetScale(0.0001)
|
InterfaceOptionsCombatPanelEnemyCastBarsOnPortrait:EnableMouse(false)
|
||||||
InterfaceOptionsCombatPanelTargetOfTarget:SetAlpha(0)
|
InterfaceOptionsCombatPanelEnemyCastBarsOnNameplates:ClearAllPoints()
|
||||||
InterfaceOptionsDisplayPanelShowAggroPercentage:SetScale(0.0001)
|
InterfaceOptionsCombatPanelEnemyCastBarsOnNameplates:Point(InterfaceOptionsCombatPanelEnemyCastBarsOnPortrait:GetPoint())
|
||||||
InterfaceOptionsDisplayPanelShowAggroPercentage:SetAlpha(0)
|
end
|
||||||
|
if InterfaceOptionsCombatPanelTargetOfTarget then
|
||||||
|
InterfaceOptionsCombatPanelTargetOfTarget:SetScale(0.0001)
|
||||||
|
InterfaceOptionsCombatPanelTargetOfTarget:SetAlpha(0)
|
||||||
|
end
|
||||||
|
if InterfaceOptionsDisplayPanelShowAggroPercentage then
|
||||||
|
InterfaceOptionsDisplayPanelShowAggroPercentage:SetScale(0.0001)
|
||||||
|
InterfaceOptionsDisplayPanelShowAggroPercentage:SetAlpha(0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if E.private.unitframe.disabledBlizzardFrames.party then
|
if E.private.unitframe.disabledBlizzardFrames.party then
|
||||||
InterfaceOptionsStatusTextPanelParty:SetScale(0.0001)
|
if InterfaceOptionsStatusTextPanelParty then
|
||||||
InterfaceOptionsStatusTextPanelParty:SetAlpha(0)
|
InterfaceOptionsStatusTextPanelParty:SetScale(0.0001)
|
||||||
InterfaceOptionsFrameCategoriesButton11:SetScale(0.0001)
|
InterfaceOptionsStatusTextPanelParty:SetAlpha(0)
|
||||||
|
end
|
||||||
|
if InterfaceOptionsFrameCategoriesButton11 then
|
||||||
|
InterfaceOptionsFrameCategoriesButton11:SetScale(0.0001)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if E.private.unitframe.disabledBlizzardFrames.arena then
|
if E.private.unitframe.disabledBlizzardFrames.arena then
|
||||||
|
|||||||
Reference in New Issue
Block a user