From 548234aaaa078ac16eda86e0357e4b9892c7c689 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 18 Sep 2021 15:00:16 +0200 Subject: [PATCH] grounding totem effect fix --- Constants.lua | 2 +- Modules/Auras.lua | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Constants.lua b/Constants.lua index cbffad3..5595fe2 100644 --- a/Constants.lua +++ b/Constants.lua @@ -649,7 +649,7 @@ local importantAuras = { -- Grounding Totem Effect [GetSpellInfo(8178)] = { track = AURA_TYPE_BUFF, - duration = 4, + duration = 0, priority = 20, spellID = 8178 }, diff --git a/Modules/Auras.lua b/Modules/Auras.lua index abf93c8..b1f0900 100644 --- a/Modules/Auras.lua +++ b/Modules/Auras.lua @@ -106,8 +106,12 @@ function Auras:CreateFrame(unit) if (self.timeLeft <= 0) then Auras:AURA_FADE(self.unit, self.track) else + if self.spellID == 8178 then + self.text:SetText("") + else + Gladdy:FormatTimer(self.text, self.timeLeft, self.timeLeft < 10) + end self.timeLeft = self.timeLeft - elapsed - Gladdy:FormatTimer(self.text, self.timeLeft, self.timeLeft < 10) end else self:SetAlpha(0.01) @@ -359,7 +363,8 @@ function Auras:AURA_GAIN(unit, auraType, spellID, spellName, icon, duration, exp auraFrame.startTime = expirationTime - duration auraFrame.endTime = expirationTime auraFrame.name = spellName - auraFrame.timeLeft = expirationTime - GetTime() + auraFrame.spellID = spellID + auraFrame.timeLeft = spellID == 8178 and 45 or expirationTime - GetTime() auraFrame.priority = Gladdy.db.auraListDefault[tostring(self.auras[spellName].spellID)].priority auraFrame.icon:SetTexture(Gladdy:GetImportantAuras()[GetSpellInfo(self.auras[spellName].spellID)] and Gladdy:GetImportantAuras()[GetSpellInfo(self.auras[spellName].spellID)].texture or icon) auraFrame.track = auraType @@ -373,9 +378,11 @@ function Auras:AURA_GAIN(unit, auraType, spellID, spellName, icon, duration, exp else auraFrame.icon.overlay:SetVertexColor(Gladdy.db.frameBorderColor.r, Gladdy.db.frameBorderColor.g, Gladdy.db.frameBorderColor.b, Gladdy.db.frameBorderColor.a) end - if not Gladdy.db.auraDisableCircle then + if not Gladdy.db.auraDisableCircle and spellID ~= 8178 then auraFrame.cooldown:Show() auraFrame.cooldown:SetCooldown(auraFrame.startTime, duration) + else + auraFrame.cooldown:Hide() end end