@@ -10,11 +10,23 @@ local ipairs = ipairs
1010local pairs = pairs
1111
1212local hookFunctions = {
13- RefreshSpellCooldownInfo = S .CooldownManager_RefreshSpellCooldownInfo ,
14- OnSpellActivationOverlayGlowShowEvent = S .CooldownManager_ShowGlowEvent ,
15- OnSpellActivationOverlayGlowHideEvent = S .CooldownManager_HideGlowEvent ,
16- RefreshOverlayGlow = S .CooldownManager_RefreshOverlayGlow ,
17- SetTimerShown = S .CooldownManager_SetTimerShown ,
13+ RefreshSpellCooldownInfo = ES .CooldownManager_RefreshSpellCooldownInfo ,
14+ OnSpellActivationOverlayGlowShowEvent = function (...)
15+ if not S .db or not S .db .cooldownViewer .general .useBlizzardGlow then
16+ return ES .CooldownManager_ShowGlowEvent (... )
17+ end
18+ end ,
19+ OnSpellActivationOverlayGlowHideEvent = function (...)
20+ if not S .db or not S .db .cooldownViewer .general .useBlizzardGlow then
21+ return ES .CooldownManager_HideGlowEvent (... )
22+ end
23+ end ,
24+ RefreshOverlayGlow = function (...)
25+ if not S .db or not S .db .cooldownViewer .general .useBlizzardGlow then
26+ return ES .CooldownManager_RefreshOverlayGlow (... )
27+ end
28+ end ,
29+ SetTimerShown = ES .CooldownManager_SetTimerShown ,
1830}
1931
2032function ES :CooldownManager_SkinItemFrame (frame )
@@ -39,18 +51,6 @@ function ES:CooldownManager_SkinItemFrame(frame)
3951 end
4052end
4153
42- function S :RefreshElvUICustomGlowOnCooldownManager ()
43- if self .db .cooldownViewer .general .useBlizzardGlow then
44- hookFunctions .OnSpellActivationOverlayGlowHideEvent = nil
45- hookFunctions .OnSpellActivationOverlayGlowShowEvent = nil
46- hookFunctions .RefreshOverlayGlow = nil
47- else
48- hookFunctions .OnSpellActivationOverlayGlowHideEvent = S .CooldownManager_HideGlowEvent
49- hookFunctions .OnSpellActivationOverlayGlowShowEvent = S .CooldownManager_ShowGlowEvent
50- hookFunctions .RefreshOverlayGlow = S .CooldownManager_RefreshOverlayGlow
51- end
52- end
53-
5454local function UpdateFrameAndStrata (frame , config )
5555 frame :SetFrameStrata (S .db .cooldownViewer [config ].frameStrata )
5656 frame :SetFrameLevel (S .db .cooldownViewer [config ].frameLevel )
@@ -187,8 +187,6 @@ function S:Blizzard_CooldownViewer_Modification()
187187 if self .db .cooldownViewer .essential .enable then
188188 self :CooldownManager_HandleViewer (_G .EssentialCooldownViewer )
189189 end
190-
191- self :RefreshElvUICustomGlowOnCooldownManager ()
192190end
193191
194192function S :Blizzard_CooldownViewer ()
0 commit comments