From 6538459b7c85f7cb7606042d73246f2fa376e35c Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Tue, 8 Sep 2009 00:17:08 +0200 Subject: [PATCH] Let rested values go through, independant of the rested bar --- oUF_Experience.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/oUF_Experience.lua b/oUF_Experience.lua index 010a17c..b7a6677 100644 --- a/oUF_Experience.lua +++ b/oUF_Experience.lua @@ -43,6 +43,7 @@ local function update(self) local min, max = xp(unit) bar:SetMinMaxValues(0, max) bar:SetValue(min) + bar.exhaustion = unit == 'player' and GetXPExhaustion() if(bar.Text) then if(bar.OverrideText) then @@ -53,12 +54,9 @@ local function update(self) end if(bar.Rested) then - local exhaustion = GetXPExhaustion() - - if(unit == 'player' and exhaustion and exhaustion > 0) then + if(bar.exhaustion and bar.exhaustion > 0) then bar.Rested:SetMinMaxValues(0, max) - bar.Rested:SetValue(math.min(min + exhaustion, max)) - bar.exhaustion = exhaustion + bar.Rested:SetValue(math.min(min + bar.exhaustion, max)) else bar.Rested:SetMinMaxValues(0, 1) bar.Rested:SetValue(0) -- 1.7.9.5