From cba738429fe67966159c38681fb53d5a0af442d8 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Thu, 11 Oct 2012 11:32:41 +0400 Subject: [PATCH] Elv's fix to percent on rep bar --- ElvUI_SLE/modules/exprepbar/exprepbar.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ElvUI_SLE/modules/exprepbar/exprepbar.lua b/ElvUI_SLE/modules/exprepbar/exprepbar.lua index 8b05e47..d438772 100644 --- a/ElvUI_SLE/modules/exprepbar/exprepbar.lua +++ b/ElvUI_SLE/modules/exprepbar/exprepbar.lua @@ -98,19 +98,19 @@ function M:UpdateReputation(event) if E.db.sle.exprep.replong then if textFormat == 'PERCENT' then - text = string.format('%d%% [%s]', value / max * 100, _G['FACTION_STANDING_LABEL'..ID]) + text = string.format('%d%% [%s]', ((value - min) / (max - min) * 100), _G['FACTION_STANDING_LABEL'..ID]) elseif textFormat == 'CURMAX' then text = string.format('%s - %s [%s]', value, max, _G['FACTION_STANDING_LABEL'..ID]) elseif textFormat == 'CURPERC' then - text = string.format('%s - %d%% [%s]', value, value / max * 100, _G['FACTION_STANDING_LABEL'..ID]) + text = string.format('%s - %d%% [%s]', value, ((value - min) / (max - min) * 100), _G['FACTION_STANDING_LABEL'..ID]) end else if textFormat == 'PERCENT' then - text = string.format('%d%% [%s]', value / max * 100, _G['FACTION_STANDING_LABEL'..ID]) + text = string.format('%d%% [%s]', ((value - min) / (max - min) * 100), _G['FACTION_STANDING_LABEL'..ID]) elseif textFormat == 'CURMAX' then text = string.format('%s - %s [%s]', E:ShortValue(value), E:ShortValue(max), _G['FACTION_STANDING_LABEL'..ID]) elseif textFormat == 'CURPERC' then - text = string.format('%s - %d%% [%s]', E:ShortValue(value), value / max * 100, _G['FACTION_STANDING_LABEL'..ID]) + text = string.format('%s: %s - %d%% [%s]', name, E:ShortValue(value), ((value - min) / (max - min) * 100), _G['FACTION_STANDING_LABEL'..ID]) end end -- 1.7.9.5