From a80daface7468cffbbf06bd4049a23d43bada3a2 Mon Sep 17 00:00:00 2001 From: Parnic Date: Fri, 25 Nov 2022 15:31:26 -0600 Subject: [PATCH] Unify low flash and low color thresholds Low Flash was using >= while Low Color was using >, so they would activate at ever-so-slightly different values (0.4 vs 0.39999, for example). --- IceUnitBar.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IceUnitBar.lua b/IceUnitBar.lua index 523083b..c9132bf 100644 --- a/IceUnitBar.lua +++ b/IceUnitBar.lua @@ -278,12 +278,12 @@ function IceUnitBar.prototype:Update() -- This looks slightly quirky. Basically the easiest way for me to achieve this is to have lowThresholdColor override -- the scaled color. You'll need to switch them both on to get things to work. if( self.moduleSettings.lowThresholdColor ) then - if( self.healthPercentage < self.moduleSettings.lowThreshold ) then + if( self.healthPercentage <= self.moduleSettings.lowThreshold ) then self.settings.colors[ "ScaledHealthColor" ] = self.settings.colors[ "MinHealthColor" ] elseif not self.moduleSettings.scaleHealthColor then self.settings.colors[ "ScaledHealthColor" ] = self.settings.colors[ "MaxHealthColor" ] end - if( self.manaPercentage < self.moduleSettings.lowThreshold ) then + if( self.manaPercentage <= self.moduleSettings.lowThreshold ) then self.settings.colors[ "ScaledManaColor" ] = self.settings.colors[ "MinManaColor" ] elseif not self.moduleSettings.scaleManaColor then self.settings.colors[ "ScaledManaColor" ] = self.settings.colors[ "MaxManaColor" ]