Skip to content

Commit c2f276e

Browse files
committed
Merge branch 'main' into classic-beta
2 parents 6cd8527 + 9bb41fe commit c2f276e

File tree

3 files changed

+23
-17
lines changed

3 files changed

+23
-17
lines changed

Diff for: ElvUI/Core/Defaults/Profile.lua

+1
Original file line numberDiff line numberDiff line change
@@ -1348,6 +1348,7 @@ local UF_AuraBars = {
13481348

13491349
local UF_AuraWatch = {
13501350
enable = false,
1351+
petSpecific = E.Retail,
13511352
profileSpecific = false,
13521353
countFont = 'PT Sans Narrow',
13531354
countFontOutline = 'OUTLINE',

Diff for: ElvUI/Core/Modules/UnitFrames/Elements/BuffIndicator.lua

+9-10
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,17 @@ function UF:Configure_AuraWatch(frame, isPet)
2929
frame.AuraWatch.countFontSize = db.countFontSize
3030
frame.AuraWatch.countFontOutline = db.countFontOutline
3131

32-
if frame.unit == 'pet' or isPet then
33-
frame.AuraWatch:SetNewTable(E.global.unitframe.aurawatch.PET)
32+
local auraTable
33+
if (frame.unit == 'pet' or isPet) and db.petSpecific then
34+
auraTable = E.global.unitframe.aurawatch.PET
35+
elseif db.profileSpecific then
36+
auraTable = E.db.unitframe.filters.aurawatch
3437
else
35-
local auraTable
36-
if db.profileSpecific then
37-
auraTable = E.db.unitframe.filters.aurawatch
38-
else
39-
auraTable = E.Filters.Expand({}, E.global.unitframe.aurawatch[E.myclass] or {})
40-
E:CopyTable(auraTable, E.global.unitframe.aurawatch.GLOBAL)
41-
end
42-
frame.AuraWatch:SetNewTable(auraTable)
38+
auraTable = E.Filters.Expand({}, E.global.unitframe.aurawatch[E.myclass] or {})
39+
E:CopyTable(auraTable, E.global.unitframe.aurawatch.GLOBAL)
4340
end
41+
42+
frame.AuraWatch:SetNewTable(auraTable)
4443
elseif frame:IsElementEnabled('AuraWatch') then
4544
frame:DisableElement('AuraWatch')
4645
end

Diff for: ElvUI_Options/Core/UnitFrames.lua

+13-7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ local CopyTable = CopyTable
1515
local NUM_CLASSES = #CLASS_SORT_ORDER
1616
local MAX_BOSS_FRAMES = 8
1717

18+
local petTypes = {
19+
pet = true,
20+
raidpet = true
21+
}
22+
1823
local orientationValues = {
1924
LEFT = L["Left"],
2025
MIDDLE = L["Middle"],
@@ -266,10 +271,10 @@ local function doApplyToAll(db, info, value)
266271
end
267272

268273
local function BuffIndicator_ApplyToAll(info, value, profile, pet)
269-
if profile then
270-
return doApplyToAll(E.db.unitframe.filters.aurawatch, info, value)
271-
elseif pet then
274+
if pet then
272275
return doApplyToAll(E.global.unitframe.aurawatch.PET, info, value)
276+
elseif profile then
277+
return doApplyToAll(E.db.unitframe.filters.aurawatch, info, value)
273278
else
274279
return doApplyToAll(E.global.unitframe.aurawatch[E.myclass], info, value)
275280
end
@@ -280,9 +285,10 @@ local function GetOptionsTable_AuraWatch(updateFunc, groupName, numGroup, subGro
280285
config.args.enable = ACH:Toggle(L["Enable"], nil, 1)
281286

282287
config.args.generalGroup = ACH:Group(' ', nil, 2)
283-
config.args.generalGroup.args.profileSpecific = ACH:Toggle(L["Profile Specific"], L["Use the profile specific filter Aura Indicator (Profile) instead of the global filter Aura Indicator."], 1)
288+
config.args.generalGroup.args.configureButton = ACH:Execute(L["Configure Auras"], nil, 1, function() local configString = format('Aura Indicator (%s)', (petTypes[groupName] and E.db.unitframe.units[groupName].buffIndicator.petSpecific and 'Pet') or (E.db.unitframe.units[groupName].buffIndicator.profileSpecific and 'Profile') or 'Class') C:SetToFilterConfig(configString) end)
284289
config.args.generalGroup.args.size = ACH:Range(L["Size"], nil, 2, { min = 6, max = 48, step = 1 })
285-
config.args.generalGroup.args.configureButton = ACH:Execute(L["Configure Auras"], nil, 3, function() local configString = format('Aura Indicator (%s)', groupName == 'pet' and 'Pet' or E.db.unitframe.units[groupName].buffIndicator.profileSpecific and 'Profile' or 'Class') C:SetToFilterConfig(configString) end)
290+
config.args.generalGroup.args.profileSpecific = ACH:Toggle(L["Profile Specific"], L["Use the profile specific filter Aura Indicator (Profile) instead of the global filter Aura Indicator."], 3)
291+
config.args.generalGroup.args.petSpecific = ACH:Toggle(L["Pet Specific"], L["Use the profile specific filter Aura Indicator (Pet) instead of the global filter Aura Indicator."], 4, nil, nil, nil, nil, nil, nil, function() return not petTypes[groupName] end)
286292
config.args.generalGroup.inline = true
287293

288294
config.args.countGroup = ACH:Group(L["Count Text"], nil, 15)
@@ -295,7 +301,7 @@ local function GetOptionsTable_AuraWatch(updateFunc, groupName, numGroup, subGro
295301
config.get = function(info) return E.db.unitframe.units[groupName][subGroup].buffIndicator[info[#info]] end
296302
config.set = function(info, value) E.db.unitframe.units[groupName][subGroup].buffIndicator[info[#info]] = value updateFunc(UF, groupName, numGroup) end
297303
else
298-
config.args.applyToAll = ACH:Group(L["Apply To All"], nil, 50, nil, function(info) return BuffIndicator_ApplyToAll(info, nil, E.db.unitframe.units[groupName].buffIndicator.profileSpecific, groupName == 'pet') end, function(info, value) BuffIndicator_ApplyToAll(info, value, E.db.unitframe.units[groupName].buffIndicator.profileSpecific, groupName == 'pet') updateFunc(UF, groupName, numGroup) end)
304+
config.args.applyToAll = ACH:Group(L["Apply To All"], nil, 50, nil, function(info) return BuffIndicator_ApplyToAll(info, nil, E.db.unitframe.units[groupName].buffIndicator.profileSpecific, petTypes[groupName] and E.db.unitframe.units[groupName].buffIndicator.petSpecific) end, function(info, value) BuffIndicator_ApplyToAll(info, value, E.db.unitframe.units[groupName].buffIndicator.profileSpecific, petTypes[groupName] and E.db.unitframe.units[groupName].buffIndicator.petSpecific) updateFunc(UF, groupName, numGroup) end)
299305
config.args.applyToAll.inline = true
300306
config.args.applyToAll.args.header = ACH:Description(L["|cffFF3333Warning:|r Changing options in this section will apply to all Aura Indicator auras. To change only one Aura, please click \"Configure Auras\" and change that specific Auras settings. If \"Profile Specific\" is selected it will apply to that filter set."], 1)
301307
config.args.applyToAll.args.style = ACH:Select(L["Style"], nil, 2, { timerOnly = L["Timer Only"], coloredIcon = L["Colored Icon"], texturedIcon = L["Textured Icon"] })
@@ -669,7 +675,7 @@ local function GetOptionsTable_Health(isGroupFrame, updateFunc, groupName, numUn
669675
config.args.orientation = ACH:Select(L["Statusbar Fill Orientation"], L["Direction the health bar moves when gaining/losing health."], 9, { HORIZONTAL = L["Horizontal"], VERTICAL = L["Vertical"] })
670676
end
671677

672-
if groupName == 'pet' or groupName == 'raidpet' then
678+
if petTypes[groupName] then
673679
config.args.colorPetByUnitClass = ACH:Toggle(L["Color by Unit Class"], nil, 2)
674680

675681
if groupName == 'pet' and E.myclass == 'HUNTER' then

0 commit comments

Comments
 (0)