Fix several issues with low thresholds

This addresses a user-reported issue where Low Threshold was not usable with Color By Health/Mana % disabled, due to some internal technical reasons. This was exacerbated by the recent fix that allowed Low Threshold and Color By Health % to work together.

This also fixes the low threshold flash to apply immediately when changing the option, and fixes the Low Threshold % slider to be usable without the Low Flash option set.

Finally, it hides the Low Flash option for bars that don't support it (right now that's just PlayerMana, I think because it only sets the low threshold to the Min Mana Color even if the class uses a different power type...something for future me...).

Fixes wowace ticket #334
This commit is contained in:
Parnic
2022-12-13 20:48:02 -06:00
parent 59f2792ce8
commit c5c44edf64
14 changed files with 36 additions and 2 deletions

View File

@ -841,6 +841,8 @@ function IceTargetHealth.prototype:Update(unit)
if (self.moduleSettings.scaleHealthColor) then
self.color = "ScaledHealthColor"
elseif self.moduleSettings.lowThresholdColor and self.healthPercentage <= self.moduleSettings.lowThreshold then
self.color = "ScaledHealthColor"
end
if (self.tapped) then