hide blizzard arena pets as well

This commit is contained in:
Sumsebrum 2021-07-29 14:06:15 +02:00
parent 79371b72b0
commit d53f89c6d4
2 changed files with 36 additions and 21 deletions

View File

@ -275,6 +275,17 @@ function Gladdy:UpdateFrame()
for _, v in self:IterModules() do
self:Call(v, "UpdateFrameOnce")
end
if Gladdy.db.hideBlizzard == "always" then
Gladdy:BlizzArenaSetAlpha(0)
elseif Gladdy.db.hideBlizzard == "arena" then
if Gladdy.curBracket then
Gladdy:BlizzArenaSetAlpha(0)
else
Gladdy:BlizzArenaSetAlpha(1)
end
elseif Gladdy.db.hideBlizzard == "never" then
Gladdy:BlizzArenaSetAlpha(1)
end
end
function Gladdy:HideFrame()

View File

@ -229,13 +229,7 @@ function Gladdy:OnInitialize()
end
self:DeleteUnknownOptions(self.db, self.defaults.profile)
if Gladdy.db.hideBlizzard == "always" then
if IsAddOnLoaded("Blizzard_ArenaUI") then
ArenaEnemyFrame1:SetAlpha(0)
ArenaEnemyFrame2:SetAlpha(0)
ArenaEnemyFrame3:SetAlpha(0)
ArenaEnemyFrame4:SetAlpha(0)
ArenaEnemyFrame5:SetAlpha(0)
end
Gladdy:BlizzArenaSetAlpha(0)
end
end
@ -391,13 +385,7 @@ function Gladdy:Reset()
self:ResetUnit(unit)
end
if Gladdy.db.hideBlizzard == "never" or Gladdy.db.hideBlizzard == "arena" then
if IsAddOnLoaded("Blizzard_ArenaUI") then
ArenaEnemyFrame1:SetAlpha(1)
ArenaEnemyFrame2:SetAlpha(1)
ArenaEnemyFrame3:SetAlpha(1)
ArenaEnemyFrame4:SetAlpha(1)
ArenaEnemyFrame5:SetAlpha(1)
end
Gladdy:BlizzArenaSetAlpha(1)
end
end
@ -462,12 +450,28 @@ function Gladdy:JoinedArena()
self.buttons["arena" .. i]:SetAlpha(1)
end
if Gladdy.db.hideBlizzard == "arena" or Gladdy.db.hideBlizzard == "always" then
if IsAddOnLoaded("Blizzard_ArenaUI") then
ArenaEnemyFrame1:SetAlpha(0)
ArenaEnemyFrame2:SetAlpha(0)
ArenaEnemyFrame3:SetAlpha(0)
ArenaEnemyFrame4:SetAlpha(0)
ArenaEnemyFrame5:SetAlpha(0)
end
Gladdy:BlizzArenaSetAlpha(0)
end
end
---------------------------
-- BLIZZARD FRAMES
---------------------------
function Gladdy:BlizzArenaSetAlpha(alpha)
if IsAddOnLoaded("Blizzard_ArenaUI") then
ArenaEnemyFrames:SetAlpha(alpha)
ArenaEnemyFrame1:SetAlpha(alpha)
ArenaEnemyFrame1PetFrame:SetAlpha(alpha)
ArenaEnemyFrame2:SetAlpha(alpha)
ArenaEnemyFrame2PetFrame:SetAlpha(alpha)
ArenaEnemyFrame3:SetAlpha(alpha)
ArenaEnemyFrame3PetFrame:SetAlpha(alpha)
ArenaEnemyFrame4:SetAlpha(alpha)
ArenaEnemyFrame4PetFrame:SetAlpha(alpha)
ArenaEnemyFrame5:SetAlpha(alpha)
ArenaEnemyFrame5PetFrame:SetAlpha(alpha)
end
end