From f19443af8316b05da58d69497c5809a7a0f0eb6c Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Fri, 20 Jun 2014 01:29:29 +0200 Subject: [PATCH] It's not minimum! --- tags.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tags.lua b/tags.lua index 7447538..de332dc 100644 --- a/tags.lua +++ b/tags.lua @@ -78,18 +78,18 @@ tags.Methods['p3lim:friendly'] = function(unit) end tags.Methods['p3lim:power'] = function(unit) - local power = UnitPower(unit) - if(power > 0 and not UnitIsDeadOrGhost(unit)) then + local cur = UnitPower(unit) + if(cur > 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) + return ('%s%d|r'):format(Hex(colors[type] or colors['RUNES']), cur) end end tags.Methods['p3lim:mana'] = function(unit) - local min, max = UnitPower(unit, 0), UnitPowerMax(unit, 0) - if(UnitPowerType(unit) ~= 0 and min ~= max) then - return ('%d%%'):format(min / max * 100) + local cur, max = UnitPower(unit, 0), UnitPowerMax(unit, 0) + if(UnitPowerType(unit) ~= 0 and cur ~= max) then + return ('%d%%'):format(cur / max * 100) end end -- 1.7.9.5