Don't show power if the unit is dead
Adrian L Lange [06-10-10 - 18:22]
Don't show power if the unit is dead
diff --git a/oUF_P3lim.lua b/oUF_P3lim.lua
index 438c02d..052b2e8 100644
--- a/oUF_P3lim.lua
+++ b/oUF_P3lim.lua
@@ -46,7 +46,7 @@ for name, func in pairs({
end,
['power'] = function(unit)
local power = UnitPower(unit)
- if(power > 0) then
+ if(power > 0 and not UnitIsDeadOrGhost(unit)) then
local _, type = UnitPowerType(unit)
local colors = _COLORS.power
return ('%s%d|r'):format(Hex(colors[type] or colors['RUNES']), power)