Skip to content

Commit

Permalink
blizzard: Hide the new compact arena frames (#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim authored Jul 17, 2023
1 parent bb3358d commit 9c7e554
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
4 changes: 1 addition & 3 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@ read_globals = {
table = {fields = {'removemulti', 'wipe'}},

-- FrameXML
'ArenaEnemyFramesContainer',
'ArenaEnemyMatchFramesContainer',
'ArenaEnemyPrepFramesContainer',
'BossTargetFrameContainer',
'ColorMixin',
'ComboFrame',
'CompactArenaFrame',
'CreateColor',
'Enum',
'FocusFrame',
Expand Down
29 changes: 14 additions & 15 deletions blizzard.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
local _, ns = ...
local oUF = ns.oUF

-- sourced from FrameXML\ArenaUI.lua
local MAX_ARENA_ENEMIES = _G.MAX_ARENA_ENEMIES or 5

-- sourced from FrameXML/TargetFrame.lua
local MAX_BOSS_FRAMES = _G.MAX_BOSS_FRAMES or 5

Expand Down Expand Up @@ -62,7 +59,7 @@ local function handleFrame(baseName, doNotReparent)
power:UnregisterAllEvents()
end

local spell = frame.castBar or frame.spellbar
local spell = frame.castBar or frame.spellbar or frame.CastingBarFrame
if(spell) then
spell:UnregisterAllEvents()
end
Expand Down Expand Up @@ -91,6 +88,16 @@ local function handleFrame(baseName, doNotReparent)
if(classPowerBar) then
classPowerBar:UnregisterAllEvents()
end

local ccRemoverFrame = frame.CcRemoverFrame
if(ccRemoverFrame) then
ccRemoverFrame:UnregisterAllEvents()
end

local debuffFrame = frame.DebuffFrame
if(debuffFrame) then
debuffFrame:UnregisterAllEvents()
end
end
end

Expand Down Expand Up @@ -142,18 +149,10 @@ function oUF:DisableBlizzard(unit)
if(not isArenaHooked) then
isArenaHooked = true

-- this disables ArenaEnemyFramesContainer
SetCVar('showArenaEnemyFrames', '0')
SetCVar('showArenaEnemyPets', '0')

-- but still UAE and hide all containers
handleFrame(ArenaEnemyFramesContainer)
handleFrame(ArenaEnemyPrepFramesContainer)
handleFrame(ArenaEnemyMatchFramesContainer)
handleFrame(CompactArenaFrame)

for i = 1, MAX_ARENA_ENEMIES do
handleFrame('ArenaEnemyMatchFrame' .. i, true)
handleFrame('ArenaEnemyPrepFrame' .. i, true)
for _, frame in next, CompactArenaFrame.memberUnitFrames do
handleFrame(frame, true)
end
end
end
Expand Down

0 comments on commit 9c7e554

Please sign in to comment.