From b214ea42abf4ed2d8bc8b010ab56ae119fadc8e4 Mon Sep 17 00:00:00 2001 From: Xruptor Date: Sat, 30 Jul 2016 17:06:22 -0400 Subject: [PATCH] -debugging possible solutions -keeping a record of changes --- XanDebuffTimers.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/XanDebuffTimers.lua b/XanDebuffTimers.lua index 18a1201..e85f6f9 100644 --- a/XanDebuffTimers.lua +++ b/XanDebuffTimers.lua @@ -264,8 +264,10 @@ local TimerOnUpdate = function(self, time) self.OnUpdateCounter = 0 local beforeEnd = self.endTime - GetTime() - --local percentTotal = (beforeEnd / self.durationTime) - --local percentFinal = ceil(percentTotal * 100) + local percentTotal = (beforeEnd / self.durationTime) + local percentFinal = ceil(percentTotal * 100) + local barLength = ceil( string.len(BAR_TEXT) * percentTotal ) + --calculate the individual bar segments and make the appropriate calculations local totalDuration = (self.endTime - self.startTime) --total duration of the spell @@ -295,7 +297,7 @@ local TimerOnUpdate = function(self, time) self.tmpBL = totalBarLength self.beforeEnd = beforeEnd - self.Bar:SetText( string.sub(BAR_TEXT, 1, totalBarLength) ) + self.Bar:SetText( string.sub(BAR_TEXT, 1, totalBarLength).." | "..barLength.." | ".. totalBarLength) self.Bar:SetTextColor(f:getBarColor(self.durationTime, beforeEnd)) if self.stacks > 0 then self.stacktext:SetText(self.stacks) -- 1.7.9.5