WoWInterface SVN oUF_P3lim

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 60 to Rev 61
    Reverse comparison

Rev 60 → Rev 61

trunk/oUF_P3lim/oUF_P3lim.lua
47,6 → 47,11
if(type(r) == 'table') then
if(r.r) then r, g, b = r.r, r.g, r.b else r, g, b = unpack(r) end
end
 
if(not r or not g or not b) then
r, g, b = 1, 1, 1
end
 
return string.format('|cff%02x%02x%02x', r*255, g*255, b*255)
end
 
133,11 → 138,15
end
 
local function UpdatePortrait(self)
local min, max = UnitHealth(self.unit), UnitHealthMax(self.unit)
if(UnitIsDeadOrGhost(self.unit)) then
self.Portrait:Hide()
elseif(min <= max) then
self.Portrait:Show()
self.Portrait:SetWidth(230 * min / max)
else
self.Portrait:Show()
self.Portrait:SetWidth(230 * UnitHealth(self.unit) / UnitHealthMax(self.unit))
self.Portrait:SetWidth(230)
end
end