Replace the AuraUpdate and TotemUpdate functions with this:
Lua Code:
local function AuraUpdate(self)
if self.inactive then return end
-- Update Info
if not(ShroomName) or not(self.texture) then
local name,_,icon = GetSpellInfo(ShroomID)
ShroomName = name
self.activeSpellName = name
self.texture = icon
self.icon:SetTexture(icon)
end
-- Update Frame
local haveTotem, _, startTime, duration = GetTotemInfo(1)
if haveTotem and self.AreShroomsDown then
self.isActive = true
-- Set Icon Desaturated
self.icon:SetDesaturated(nil)
-- Cooldown
self.cd:SetCooldown(startTime, duration)
self.cd:Show()
self.count:SetParent(self.cd)
-- Absorb
if self.CurrentOverheal and (self.CurrentOverheal > 0) then
if self.MaxOverheal > 0 then
local per = self.CurrentOverheal / self.MaxOverheal
-- local per = nibRealUI:Clamp(self.CurrentOverheal / self.MaxOverheal, 0, 1)
self.count:SetFormattedText("%d.", per * 100)
self.count:SetTextColor(nibRealUI:GetDurabilityColor(per))
else
self.count:SetText("100.")
self.count:SetTextColor(nibRealUI:GetDurabilityColor(1))
end
else
self.count:SetText("")
end
-- Show frame
self:Show()
if not self.isStatic then
AuraTracking:FreeIndicatorUpdate(self, true)
end
else
self.isActive = false
if self.isStatic then
self.icon:SetDesaturated(1)
end
self.cd:Hide()
self.count:SetParent(self)
self.count:SetText("")
-- Hide frame
if not self.isStatic then
self:Hide()
AuraTracking:FreeIndicatorUpdate(self, false)
end
end
if self.isStatic then
AuraTracking:StaticIndicatorUpdate(self)
end
end
-- Totem update
-- Reset
local function TotemUpdate(self)
local haveTotem = GetTotemInfo(1)
if not haveTotem then
self.CurrentOverheal = 0
self.AreShroomsDown = false
else
self.AreShroomsDown = true
end
AuraUpdate(self)
end
I don't have a druid to test this with, so let me know if there are issues with it.