View Single Post
03-24-15, 01:12 PM   #3
Gethe
RealUI Developer
 
Gethe's Avatar
Premium Member
Featured
Join Date: Sep 2008
Posts: 942
Replace the AuraUpdate and TotemUpdate functions with this:
Lua Code:
  1. local function AuraUpdate(self)
  2.     if self.inactive then return end
  3.  
  4.     -- Update Info
  5.     if not(ShroomName) or not(self.texture) then
  6.         local name,_,icon = GetSpellInfo(ShroomID)
  7.         ShroomName = name
  8.         self.activeSpellName = name
  9.         self.texture = icon
  10.         self.icon:SetTexture(icon)
  11.     end
  12.  
  13.     -- Update Frame
  14.     local haveTotem, _, startTime, duration = GetTotemInfo(1)
  15.     if haveTotem and self.AreShroomsDown then
  16.         self.isActive = true
  17.  
  18.         -- Set Icon Desaturated
  19.         self.icon:SetDesaturated(nil)
  20.  
  21.         -- Cooldown
  22.         self.cd:SetCooldown(startTime, duration)
  23.         self.cd:Show()
  24.         self.count:SetParent(self.cd)
  25.  
  26.         -- Absorb
  27.         if self.CurrentOverheal and (self.CurrentOverheal > 0) then
  28.             if self.MaxOverheal > 0 then
  29.                 local per = self.CurrentOverheal / self.MaxOverheal
  30.                 -- local per = nibRealUI:Clamp(self.CurrentOverheal / self.MaxOverheal, 0, 1)
  31.                 self.count:SetFormattedText("%d.", per * 100)
  32.                 self.count:SetTextColor(nibRealUI:GetDurabilityColor(per))
  33.             else
  34.                 self.count:SetText("100.")
  35.                 self.count:SetTextColor(nibRealUI:GetDurabilityColor(1))
  36.             end
  37.         else
  38.             self.count:SetText("")
  39.         end
  40.  
  41.         -- Show frame
  42.         self:Show()
  43.         if not self.isStatic then
  44.             AuraTracking:FreeIndicatorUpdate(self, true)
  45.         end
  46.     else
  47.         self.isActive = false
  48.         if self.isStatic then
  49.             self.icon:SetDesaturated(1)
  50.         end
  51.  
  52.         self.cd:Hide()
  53.         self.count:SetParent(self)
  54.         self.count:SetText("")
  55.  
  56.         -- Hide frame
  57.         if not self.isStatic then
  58.             self:Hide()
  59.             AuraTracking:FreeIndicatorUpdate(self, false)
  60.         end
  61.     end
  62.  
  63.     if self.isStatic then
  64.         AuraTracking:StaticIndicatorUpdate(self)
  65.     end
  66. end
  67.  
  68. -- Totem update
  69. -- Reset
  70. local function TotemUpdate(self)
  71.     local haveTotem = GetTotemInfo(1)
  72.     if not haveTotem then
  73.         self.CurrentOverheal = 0
  74.         self.AreShroomsDown = false
  75.     else
  76.         self.AreShroomsDown = true
  77.     end
  78.     AuraUpdate(self)
  79. end

I don't have a druid to test this with, so let me know if there are issues with it.
__________________
Knowledge = Power; Be OP

  Reply With Quote