From e41918854764c99a18f5177ac789ee47ef603155 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Thu, 11 Oct 2012 11:34:06 +0400 Subject: [PATCH] Some tweaks to rep bar. no more 25k out of 42k texts now it will look like nornal blizz one (4k out of 21k) --- ElvUI_SLE/modules/exprepbar/exprepbar.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ElvUI_SLE/modules/exprepbar/exprepbar.lua b/ElvUI_SLE/modules/exprepbar/exprepbar.lua index d438772..ead4297 100644 --- a/ElvUI_SLE/modules/exprepbar/exprepbar.lua +++ b/ElvUI_SLE/modules/exprepbar/exprepbar.lua @@ -85,8 +85,8 @@ function M:UpdateReputation(event) local color = FACTION_BAR_COLORS[reaction] bar.statusBar:SetStatusBarColor(color.r, color.g, color.b) - bar.statusBar:SetMinMaxValues(min, max) - bar.statusBar:SetValue(value) + bar.statusBar:SetMinMaxValues(0, max - min) + bar.statusBar:SetValue(value - min) for i=1, numFactions do local factionName, _, standingID = GetFactionInfo(i); @@ -100,17 +100,17 @@ function M:UpdateReputation(event) if textFormat == 'PERCENT' then 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]) + text = string.format('%s - %s [%s]', value - min, max - min, _G['FACTION_STANDING_LABEL'..ID]) elseif textFormat == 'CURPERC' then - text = string.format('%s - %d%% [%s]', value, ((value - min) / (max - min) * 100), _G['FACTION_STANDING_LABEL'..ID]) + text = string.format('%s - %d%% [%s]', value - min, ((value - min) / (max - min) * 100), _G['FACTION_STANDING_LABEL'..ID]) end else if textFormat == 'PERCENT' then 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]) + text = string.format('%s - %s [%s]', E:ShortValue(value - min), E:ShortValue(max - min), _G['FACTION_STANDING_LABEL'..ID]) elseif textFormat == 'CURPERC' then - text = string.format('%s: %s - %d%% [%s]', name, E:ShortValue(value), ((value - min) / (max - min) * 100), _G['FACTION_STANDING_LABEL'..ID]) + text = string.format('%s: %s - %d%% [%s]', name, E:ShortValue(value - min), ((value - min) / (max - min) * 100), _G['FACTION_STANDING_LABEL'..ID]) end end -- 1.7.9.5