Skip to content

Commit

Permalink
let np debuff glow be what the user sets
Browse files Browse the repository at this point in the history
  • Loading branch information
eltreum0 committed Jul 26, 2022
1 parent 31915fa commit ae6fcb5
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions ElvUI_EltreumUI/Modules/Nameplates/NamePlates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,15 @@ function ElvUI_EltreumUI:PostUpdateIconDebuff(unit, button)
button.cd:SetFrameStrata('DIALOG')
local TimeSinceLastUpdate = 0
if not button.cd then
LCG.PixelGlow_Stop(button)
if E.db.ElvUI_EltreumUI.widenameplate.npglow then
if E.db.ElvUI_EltreumUI.glow.pixel then
LCG.PixelGlow_Stop(button)
elseif E.db.ElvUI_EltreumUI.glow.autocast then
LCG.AutoCastGlow_Stop(button)
elseif E.db.ElvUI_EltreumUI.glow.blizzard then
LCG.ButtonGlow_Stop(button)
end
end
else
button.cd:SetScript('OnUpdate', function(self, elapsed)
TimeSinceLastUpdate = TimeSinceLastUpdate + elapsed
Expand All @@ -58,14 +66,33 @@ function ElvUI_EltreumUI:PostUpdateIconDebuff(unit, button)
local debufftime = tonumber(button.cd.timer.text:GetText())
if E.db.ElvUI_EltreumUI.widenameplate.npglow then
if debufftime ~= nil and debufftime <= E.db.ElvUI_EltreumUI.glow.numberdebuff and debufftime > 0 then
LCG.PixelGlow_Start(button, glowcolor, 6, 0.8, 4, 2, 1, 1, false, nil)
if E.db.ElvUI_EltreumUI.glow.pixel then
LCG.PixelGlow_Start(button, glowcolor, 6, 0.8, 4, 2, 1, 1, false, nil)
elseif E.db.ElvUI_EltreumUI.glow.autocast then
--LCG.AutoCastGlow_Start(button, glowcolor, E.db.ElvUI_EltreumUI.glow.numberauto, E.db.ElvUI_EltreumUI.glow.frequencyauto, E.db.ElvUI_EltreumUI.glow.autoscale, E.db.ElvUI_EltreumUI.glow.autoxOffset, E.db.ElvUI_EltreumUI.glow.autoyOffset)
LCG.AutoCastGlow_Start(button, glowcolor, 8, 1, 1.5, 1, 1)
elseif E.db.ElvUI_EltreumUI.glow.blizzard then
LCG.ButtonGlow_Start(button, glowcolor, 0.5)
end
else
LCG.PixelGlow_Stop(button)
if E.db.ElvUI_EltreumUI.glow.pixel then
LCG.PixelGlow_Stop(button)
elseif E.db.ElvUI_EltreumUI.glow.autocast then
LCG.AutoCastGlow_Stop(button)
elseif E.db.ElvUI_EltreumUI.glow.blizzard then
LCG.ButtonGlow_Stop(button)
end
end
end
else
if E.db.ElvUI_EltreumUI.widenameplate.npglow and (button.cd == nil or button.cd.timer == nil) then
LCG.PixelGlow_Stop(button)
if E.db.ElvUI_EltreumUI.glow.pixel then
LCG.PixelGlow_Stop(button)
elseif E.db.ElvUI_EltreumUI.glow.autocast then
LCG.AutoCastGlow_Stop(button)
elseif E.db.ElvUI_EltreumUI.glow.blizzard then
LCG.ButtonGlow_Stop(button)
end
end
end
end
Expand Down

0 comments on commit ae6fcb5

Please sign in to comment.