All pastes #194100 Raw Edit

Mine

public text v1 · immutable
·published 2006-10-07 15:12 UTC
rendered paste body
Grid = AceLibrary("AceAddon-2.0"):new("AceEvent-2.0", "AceHook-2.0")

function Grid:OnEnable()
   aUF.classes.aUFunit.prototype:Hook(aUF.classes.aUFunit.prototype, "UpdateHealth", "UpdateHealthNew")
end

aUF.classes.aUFunit.prototype:UpdateHealthNew(byevent)
   if type(byevent) =="table" and not byevent[self.unit] then return end

   if UnitHealth(self.unit) == 0 then
      self.frame:SetAlpha(0.2)   
   end


   self.hooks[self]["UpdateHealth"].orig(self,byevent)
end