Fix Low Threshold and Color By Health % to work together

If Low Threshold was checked, then scaling by health/mana % was getting overridden and forced to the Max Health/Mana Color after being set to the scaled value.
This commit is contained in:
Parnic
2022-11-25 15:30:05 -06:00
parent 5d09cad6cb
commit f6db2f3b7c

View File

@ -280,12 +280,12 @@ function IceUnitBar.prototype:Update()
if( self.moduleSettings.lowThresholdColor ) then
if( self.healthPercentage < self.moduleSettings.lowThreshold ) then
self.settings.colors[ "ScaledHealthColor" ] = self.settings.colors[ "MinHealthColor" ]
else
elseif not self.moduleSettings.scaleHealthColor then
self.settings.colors[ "ScaledHealthColor" ] = self.settings.colors[ "MaxHealthColor" ]
end
if( self.manaPercentage < self.moduleSettings.lowThreshold ) then
self.settings.colors[ "ScaledManaColor" ] = self.settings.colors[ "MinManaColor" ]
else
elseif not self.moduleSettings.scaleManaColor then
self.settings.colors[ "ScaledManaColor" ] = self.settings.colors[ "MaxManaColor" ]
end
end