Advertisement
Guest User

Modified ouf_mono

a guest
Dec 3rd, 2012
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1.   local PostUpdateHealth = function(s, unit)
  2.     local r, g, b, t
  3.     if(UnitIsPlayer(unit)) then
  4.       local _, class = UnitClass(unit)
  5.       t = oUF.colors.class[class]
  6.     else
  7.       r, g, b = .2, .9, .1
  8.     end
  9.     if(t) then
  10.       r, g, b = t[1], t[2], t[3]
  11.     end
  12.     if(b) then
  13.       local bg = s.bg
  14.       if UnitIsDeadOrGhost(unit) or not UnitIsConnected(unit) then
  15.         bg:SetVertexColor(r/3, g/3, b/3, 0.8)
  16.       else
  17.         bg:SetVertexColor(0, 0, 0, .8)
  18.       end
  19.       s:SetStatusBarColor(r, g, b, 1)
  20.     end
  21.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement