View Single Post
02-15-13, 10:44 AM   #9
Wildbreath
A Cyclonian
 
Wildbreath's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 46
about last error - seems you modify code and it tryes to edit raid debuffs, but raid debuffs not have a color border.

about show/hide -
Lua Code:
  1. self.uf = CreateFrame('frame', nil, self)
  2. self.uf:SetScript('OnUpdate', function(ss, elapsed)
  3.     ss = ss:GetParent()
  4.     if not ss:IsShown() then return end
  5.     ss.st = elapsed + (ss.st or 0)
  6.     if ss.st > .2 then
  7.         local h, mh = UnitHealth(ss.unit) or 1, UnitMaxHealth(ss.unit) or 100
  8.         local perc = h/(mh/100)
  9.         print(perc)
  10.         if perc < 100 or InCombatLockdown() or UnitAffectingCombat('player') then
  11.             ss:SetAlpha(1)
  12.         else
  13.             ss:SetAlpha(0)
  14.         end
  15.         ss.st = 0
  16.     end
  17. end)
paste it after
Lua Code:
  1. if self.unit == 'player' and not self.raidbutton then
  Reply With Quote