Skip to content

Commit 726af2b

Browse files
committed
cd: target aura threshold
1 parent cfbf816 commit 726af2b

File tree

15 files changed

+30
-23
lines changed

15 files changed

+30
-23
lines changed

ElvUI/Game/Shared/Defaults/Profile.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3032,12 +3032,12 @@ do
30323032
object.threshold = 300
30333033
object.altBling = useAltBling
30343034
elseif key == 'targetaura' then
3035+
object.threshold = 300
3036+
30353037
local color = object.colors.text
30363038
if color then
30373039
color.r, color.g, color.b = 1, 0.6, 0
30383040
end
3039-
3040-
object.minDuration = 36e5 -- 1 hr
30413041
end
30423042

30433043
P.cooldown[key] = object

ElvUI_Libraries/Game/Shared/LibActionButton-1.0/LibActionButton-1.0.lua

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ local ClearChargeCooldown
143143
local UpdateRange -- Sezz
144144

145145
local UpdateTargetAuras -- Simpy
146-
local TARGETAURA_ENABLED = true
146+
local TARGETAURA_ENABLED = false
147147

148148
local RangeFont
149149
do -- properly support range symbol when it's shown ~Simpy
@@ -1475,8 +1475,6 @@ function InitializeEventHandler()
14751475
lib.eventFrame:RegisterEvent("TRADE_SKILL_CLOSE")
14761476
lib.eventFrame:RegisterEvent("TRADE_CLOSED")
14771477

1478-
lib.eventFrame:RegisterUnitEvent("UNIT_AURA", "target")
1479-
lib.eventFrame:RegisterUnitEvent("UNIT_FACTION", "target")
14801478
lib.eventFrame:RegisterUnitEvent("UNIT_INVENTORY_CHANGED", "player")
14811479
lib.eventFrame:RegisterUnitEvent("UNIT_MODEL_CHANGED", "player")
14821480

@@ -1513,6 +1511,9 @@ function InitializeEventHandler()
15131511
lib.eventFrame:RegisterEvent("ACTION_USABLE_CHANGED")
15141512
lib.eventFrame:RegisterEvent("ACTION_RANGE_CHECK_UPDATE")
15151513
else
1514+
lib.eventFrame:RegisterUnitEvent("UNIT_AURA", "target")
1515+
lib.eventFrame:RegisterUnitEvent("UNIT_FACTION", "target")
1516+
15161517
lib.eventFrame:RegisterEvent("ACTIONBAR_UPDATE_USABLE")
15171518
lib.eventFrame:RegisterEvent("PET_BAR_HIDEGRID") -- Needed for classics show grid.. ACTIONBAR_SHOWGRID fires with PET_BAR_SHOWGRID but ACTIONBAR_HIDEGRID doesn't fire with PET_BAR_HIDEGRID
15181519
end
@@ -1981,9 +1982,11 @@ do
19811982
end
19821983

19831984
function lib:SetTargetAuraCooldowns(enabled)
1984-
TARGETAURA_ENABLED = not WoWRetail and enabled
1985+
local activate = not WoWRetail and enabled
1986+
1987+
TARGETAURA_ENABLED = activate
19851988

1986-
UpdateTargetAuras('SetTargetAuraCooldowns', enabled)
1989+
UpdateTargetAuras('SetTargetAuraCooldowns', activate)
19871990
end
19881991

19891992
-----------------------------------------------------------

ElvUI_Options/Game/Shared/Cooldown.lua

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ local C, L = unpack(E.Config)
33
local AB = E:GetModule('ActionBars')
44
local ACH = E.Libs.ACH
55

6+
local THRESHOLD = { min = 0, softMax = 3600, max = 86400, step = 1 }
7+
local MIN_DURATION = { min = 0, softMax = 60, max = 3600, step = 0.001, bigStep = 1 }
8+
69
local function Group(order, db, label)
710
local main = ACH:Group(label, nil, order, nil, function(info) return E.db.cooldown[db][info[#info]] end, function(info, value) E.db.cooldown[db][info[#info]] = value; E:CooldownSettings(db); end, function() return db == 'cdmanager' and not (E.private.skins.blizzard.enable and E.private.skins.blizzard.cooldownManager) end, function() return (db == 'auraindicator' and E.Retail) or (db == 'cdmanager' and not E.Retail) end)
811
E.Options.args.cooldown.args[db] = main
@@ -13,8 +16,9 @@ local function Group(order, db, label)
1316
local mainArgs = main.args
1417
local targetAura = ACH:Group(L["Target Aura"], nil, 10, nil, function(info) return E.db.cooldown.targetaura[info[#info]] end, function(info, value) E.db.cooldown.targetaura[info[#info]] = value; E:CooldownSettings('targetaura'); end, nil, E.Retail or db ~= 'actionbar')
1518
targetAura.args.enable = ACH:Toggle(L["Enable"], nil, 1, nil, nil, nil, function(info) return E.db.cooldown.targetaura[info[#info]] end, function(info, value) E.db.cooldown.targetaura[info[#info]] = value; AB:SetTargetAuraCooldowns(value) end)
16-
targetAura.args.minDuration = ACH:Range(L["Minimum Duration"], L["Minimum countdown duration (in milliseconds)."], 2, { min = 0, softMax = 18e5, max = 864e5, step = 1 })
17-
targetAura.args.text = ACH:Color(L["Text Color"], nil, 1, nil, nil, function(info) local t = E.db.cooldown.targetaura.colors[info[#info]] local d = P.cooldown.targetaura.colors[info[#info]] return t.r, t.g, t.b, t.a, d.r, d.g, d.b, d.a end, function(info, r, g, b, a) local t = E.db.cooldown.targetaura.colors[info[#info]] t.r, t.g, t.b, t.a = r, g, b, a; E:CooldownSettings('targetaura'); end)
19+
targetAura.args.text = ACH:Color(L["Text Color"], nil, 2, nil, nil, function(info) local t = E.db.cooldown.targetaura.colors[info[#info]] local d = P.cooldown.targetaura.colors[info[#info]] return t.r, t.g, t.b, t.a, d.r, d.g, d.b, d.a end, function(info, r, g, b, a) local t = E.db.cooldown.targetaura.colors[info[#info]] t.r, t.g, t.b, t.a = r, g, b, a; E:CooldownSettings('targetaura'); end)
20+
targetAura.args.threshold = ACH:Range(L["Threshold"], L["Abbreviation threshold (in seconds)."], 3, THRESHOLD, nil, function(info) return E.db.cooldown.targetaura[info[#info]] end, function(info, value) E.db.cooldown.targetaura[info[#info]] = value; E:CooldownSettings('targetaura'); end)
21+
targetAura.args.minDuration = ACH:Range(L["Minimum Duration"], L["Minimum countdown duration (in seconds)."], 4, MIN_DURATION, nil, function(info) return E.db.cooldown.targetaura[info[#info]] * 0.001 end, function(info, value) E.db.cooldown.targetaura[info[#info]] = value * 1000; E:CooldownSettings('targetaura'); end)
1822
targetAura.inline = true
1923
mainArgs.targetAuraGroup = targetAura
2024

@@ -38,8 +42,8 @@ local function Group(order, db, label)
3842
general.args.hideBling = ACH:Toggle(L["Hide Bling"], L["Completion flash when the cooldown finishes."], 11)
3943
general.args.altBling = ACH:Toggle(L["Alternative Bling"], nil, 12)
4044
general.args.spacer1 = ACH:Spacer(20, 'full', db == 'actionbar' or db == 'bossbutton')
41-
general.args.threshold = ACH:Range(L["Threshold"], L["Abbreviation threshold (in seconds)."], 21, { min = 0, softMax = 3600, max = 86400, step = 1 })
42-
general.args.minDuration = ACH:Range(L["Minimum Duration"], L["Minimum countdown duration (in milliseconds)."], 22, { min = 0, softMax = 18e5, max = 864e5, step = 1 })
45+
general.args.threshold = ACH:Range(L["Threshold"], L["Abbreviation threshold (in seconds)."], 21, THRESHOLD)
46+
general.args.minDuration = ACH:Range(L["Minimum Duration"], L["Minimum countdown duration (in seconds)."], 22, MIN_DURATION, nil, function(info) return E.db.cooldown[db][info[#info]] * 0.001 end, function(info, value) E.db.cooldown[db][info[#info]] = value * 1000; E:CooldownSettings(db); end)
4347
-- general.args.rotation = ACH:Range(L["Rotation"], L["Rotates the entire cooldown clockwise."], 23, { min = 0, max = 360, step = 1 })
4448
general.inline = true
4549
mainArgs.generalGroup = general

ElvUI_Options/Locales/deDE.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ L["Min Scale"] = "Minimale Skalierung"
10901090
L["Minimap Buttons"] = "Minimaptasten"
10911091
L["Minimap Mouseover"] = "Minimap Mouseover"
10921092
L["Minimap Panels"] = "Minimapleisten"
1093-
L["Minimum countdown duration (in milliseconds)."] = "Minimale Countdown-Dauer (in Millisekunden)."
1093+
L["Minimum countdown duration (in seconds)."] = true
10941094
L["Minimum Duration"] = "Minimale Dauer"
10951095
L["Minimum Level"] = "Minimale Level"
10961096
L["Minimum Time Left"] = "Min. Zeit verbleibend"

ElvUI_Options/Locales/enUS.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ L["Min Scale"] = true
10901090
L["Minimap Buttons"] = true
10911091
L["Minimap Mouseover"] = true
10921092
L["Minimap Panels"] = true
1093-
L["Minimum countdown duration (in milliseconds)."] = true
1093+
L["Minimum countdown duration (in seconds)."] = true
10941094
L["Minimum Duration"] = true
10951095
L["Minimum Level"] = true
10961096
L["Minimum Time Left"] = true

ElvUI_Options/Locales/esES.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ L["Min Scale"] = true
10901090
L["Minimap Buttons"] = "Botones del Minimapa"
10911091
L["Minimap Mouseover"] = "Ratón por encima del Minimapa"
10921092
L["Minimap Panels"] = "Paneles del Minimapa"
1093-
L["Minimum countdown duration (in milliseconds)."] = true
1093+
L["Minimum countdown duration (in seconds)."] = true
10941094
L["Minimum Duration"] = "Duración Mínima"
10951095
L["Minimum Level"] = "Nivel Mínimo"
10961096
L["Minimum Time Left"] = "Tiempo Mínimo Restante"

ElvUI_Options/Locales/esMX.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ L["Min Scale"] = true
10901090
L["Minimap Buttons"] = true
10911091
L["Minimap Mouseover"] = "Ratón por encima del Minimapa"
10921092
L["Minimap Panels"] = "Paneles del Minimapa"
1093-
L["Minimum countdown duration (in milliseconds)."] = true
1093+
L["Minimum countdown duration (in seconds)."] = true
10941094
L["Minimum Duration"] = true
10951095
L["Minimum Level"] = true
10961096
L["Minimum Time Left"] = true

ElvUI_Options/Locales/frFR.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ L["Min Scale"] = true
10901090
L["Minimap Buttons"] = "Bouton de la minicarte"
10911091
L["Minimap Mouseover"] = "Au survol de la minicarte"
10921092
L["Minimap Panels"] = "Panneaux de la Minicarte"
1093-
L["Minimum countdown duration (in milliseconds)."] = true
1093+
L["Minimum countdown duration (in seconds)."] = true
10941094
L["Minimum Duration"] = "Durée minimum"
10951095
L["Minimum Level"] = "Niveau minimum"
10961096
L["Minimum Time Left"] = "Temps restant minimum"

ElvUI_Options/Locales/itIT.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ L["Min Scale"] = true
10901090
L["Minimap Buttons"] = true
10911091
L["Minimap Mouseover"] = true
10921092
L["Minimap Panels"] = true
1093-
L["Minimum countdown duration (in milliseconds)."] = true
1093+
L["Minimum countdown duration (in seconds)."] = true
10941094
L["Minimum Duration"] = true
10951095
L["Minimum Level"] = true
10961096
L["Minimum Time Left"] = true

ElvUI_Options/Locales/koKR.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ L["Min Scale"] = true
10901090
L["Minimap Buttons"] = "미니맵 버튼"
10911091
L["Minimap Mouseover"] = "마우스오버 때만 표시"
10921092
L["Minimap Panels"] = "미니맵 정보문자 사용"
1093-
L["Minimum countdown duration (in milliseconds)."] = true
1093+
L["Minimum countdown duration (in seconds)."] = true
10941094
L["Minimum Duration"] = "최소 지속시간"
10951095
L["Minimum Level"] = "최소 레벨"
10961096
L["Minimum Time Left"] = "남은 최소 시간"

0 commit comments

Comments
 (0)