7.12: Prep for compact raid frames
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
## Interface: 30300
|
## Interface: 30300
|
||||||
## Author: Elv, Bunny
|
## Author: Elv, Bunny
|
||||||
## Version: 7.11
|
## Version: 7.12
|
||||||
## Title: |cff1784d1E|r|cffe5e3e3lvUI|r
|
## Title: |cff1784d1E|r|cffe5e3e3lvUI|r
|
||||||
## Notes: User Interface replacement AddOn for World of Warcraft.
|
## Notes: User Interface replacement AddOn for World of Warcraft.
|
||||||
## SavedVariables: ElvDB, ElvPrivateDB
|
## SavedVariables: ElvDB, ElvPrivateDB
|
||||||
|
|||||||
@@ -1034,6 +1034,10 @@ function UF:UpdateAllHeaders(event)
|
|||||||
ElvUF:DisableBlizzard("party")
|
ElvUF:DisableBlizzard("party")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if E.private.unitframe.disabledBlizzardFrames.raid then
|
||||||
|
ElvUF:DisableBlizzard("raid")
|
||||||
|
end
|
||||||
|
|
||||||
self:RegisterRaidDebuffIndicator()
|
self:RegisterRaidDebuffIndicator()
|
||||||
|
|
||||||
local smartRaidFilterEnabled = self.db.smartRaidFilter
|
local smartRaidFilterEnabled = self.db.smartRaidFilter
|
||||||
@@ -1055,6 +1059,33 @@ function UF:UpdateAllHeaders(event)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local SetFrameUp = {}
|
||||||
|
local SetFrameUnit = {}
|
||||||
|
local AllowedFuncs = {}
|
||||||
|
if _G.DefaultCompactUnitFrameSetup then
|
||||||
|
AllowedFuncs[_G.DefaultCompactUnitFrameSetup] = true
|
||||||
|
end
|
||||||
|
|
||||||
|
function UF:DisableBlizzard_SetUpFrame(func)
|
||||||
|
if not AllowedFuncs[func] then return end
|
||||||
|
|
||||||
|
local name = (not self.IsForbidden or not self:IsForbidden()) and self:GetName()
|
||||||
|
if not name then return end
|
||||||
|
|
||||||
|
for _, pattern in next, SetFrameUp do
|
||||||
|
if strmatch(name, pattern) then
|
||||||
|
SetFrameUnit[self] = name
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function UF:DisableBlizzard_SetUnit(token)
|
||||||
|
if SetFrameUnit[self] and token ~= nil then
|
||||||
|
self:SetScript('OnEvent', nil)
|
||||||
|
self:SetScript('OnUpdate', nil)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local hiddenParent = CreateFrame("Frame")
|
local hiddenParent = CreateFrame("Frame")
|
||||||
hiddenParent:SetAllPoints()
|
hiddenParent:SetAllPoints()
|
||||||
hiddenParent:Hide()
|
hiddenParent:Hide()
|
||||||
@@ -1090,6 +1121,13 @@ local HandleFrame = function(baseName)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local HandleCompactUnitFrame = function(frame, pattern)
|
||||||
|
if SetFrameUp[frame] ~= pattern then
|
||||||
|
SetFrameUp[frame] = pattern
|
||||||
|
end
|
||||||
|
HandleFrame(frame)
|
||||||
|
end
|
||||||
|
|
||||||
function ElvUF:DisableBlizzard(unit)
|
function ElvUF:DisableBlizzard(unit)
|
||||||
if (not unit) or InCombatLockdown() then return end
|
if (not unit) or InCombatLockdown() then return end
|
||||||
|
|
||||||
@@ -1125,6 +1163,7 @@ function ElvUF:DisableBlizzard(unit)
|
|||||||
end
|
end
|
||||||
elseif (unit:match"(party)%d?$" == "party") and E.private.unitframe.disabledBlizzardFrames.party then
|
elseif (unit:match"(party)%d?$" == "party") and E.private.unitframe.disabledBlizzardFrames.party then
|
||||||
local id = unit:match"party(%d)"
|
local id = unit:match"party(%d)"
|
||||||
|
HandleCompactUnitFrame("CompactPartyFrame", '^CompactPartyFrameMember%d+$')
|
||||||
|
|
||||||
if id then
|
if id then
|
||||||
HandleFrame("PartyMemberFrame"..id)
|
HandleFrame("PartyMemberFrame"..id)
|
||||||
@@ -1146,6 +1185,14 @@ function ElvUF:DisableBlizzard(unit)
|
|||||||
HandleFrame(format("ArenaEnemyFrame%dPetFrame", i))
|
HandleFrame(format("ArenaEnemyFrame%dPetFrame", i))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
elseif (unit:match("(raid)%d?$") == "raid") and E.private.unitframe.disabledBlizzardFrames.raid then
|
||||||
|
HandleCompactUnitFrame("CompactPartyFrame", '^CompactRaidGroup%d+Member%d+$')
|
||||||
|
|
||||||
|
if CompactRaidFrameManager then
|
||||||
|
CompactRaidFrameManager:UnregisterAllEvents()
|
||||||
|
CompactRaidFrameManager:SetParent(E.HiddenFrame)
|
||||||
|
CompactRaidFrameManager:SetSetting('IsShown', '0')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1377,6 +1424,11 @@ function UF:Initialize()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if CompactUnitMixin then
|
||||||
|
hooksecurefunc(CompactUnitMixin, "SetUpFrame", UF.DisableBlizzard_SetUpFrame)
|
||||||
|
hooksecurefunc(CompactUnitMixin, "SetUnit", UF.DisableBlizzard_SetUnit)
|
||||||
|
end
|
||||||
|
|
||||||
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)
|
InterfaceOptionsFrameCategoriesButton10:SetScale(0.0001)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ V.unitframe = {
|
|||||||
boss = true,
|
boss = true,
|
||||||
arena = true,
|
arena = true,
|
||||||
party = true,
|
party = true,
|
||||||
|
raid = true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4026,6 +4026,11 @@ E.Options.args.unitframe = {
|
|||||||
order = 7,
|
order = 7,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["PARTY"]
|
name = L["PARTY"]
|
||||||
|
},
|
||||||
|
raid = {
|
||||||
|
order = 8,
|
||||||
|
type = "toggle",
|
||||||
|
name = L["RAID"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user