Commit add09f09 authored by Ivaria's avatar Ivaria

Fix incoming heal value clamping

parent 0047c670
...@@ -49,6 +49,7 @@ local UnitIsUnit = UnitIsUnit; ...@@ -49,6 +49,7 @@ local UnitIsUnit = UnitIsUnit;
local pairs = pairs; local pairs = pairs;
local twipe = table.wipe; local twipe = table.wipe;
local format = format; local format = format;
local min = math.min;
local sIsOverhealText; local sIsOverhealText;
local sIsAggroText; local sIsAggroText;
local sIsInvertGrowth; local sIsInvertGrowth;
...@@ -211,8 +212,8 @@ function VUHDO_updateShieldBar(aUnit, aHealthPlusIncQuota, aAmountInc) ...@@ -211,8 +212,8 @@ function VUHDO_updateShieldBar(aUnit, aHealthPlusIncQuota, aAmountInc)
tAbsorbAmount = tOverallShieldRemain / tInfo["healthmax"]; tAbsorbAmount = tOverallShieldRemain / tInfo["healthmax"];
tHealthDeficit = tInfo["healthmax"] - tInfo["health"]; tHealthDeficit = tInfo["healthmax"] - tInfo["health"];
tVisibleAmountInc = (aAmountInc <= tHealthDeficit) and aAmountInc or 0; tVisibleAmountInc = min(aAmountInc, tHealthDeficit);
tOverallShieldRemain = (tOverallShieldRemain < tInfo["healthmax"]) and tOverallShieldRemain or tInfo["healthmax"]; tOverallShieldRemain = min(tOverallShieldRemain, tInfo["healthmax"]);
tOvershieldBarSizePercent = (tOverallShieldRemain - tHealthDeficit + tVisibleAmountInc) / tInfo["healthmax"]; tOvershieldBarSizePercent = (tOverallShieldRemain - tHealthDeficit + tVisibleAmountInc) / tInfo["healthmax"];
tOvershieldBarOffsetPercent = (tHealthDeficit - tVisibleAmountInc) / tInfo["healthmax"]; tOvershieldBarOffsetPercent = (tHealthDeficit - tVisibleAmountInc) / tInfo["healthmax"];
...@@ -284,7 +285,7 @@ function VUHDO_updateShieldBar(aUnit, aHealthPlusIncQuota, aAmountInc) ...@@ -284,7 +285,7 @@ function VUHDO_updateShieldBar(aUnit, aHealthPlusIncQuota, aAmountInc)
tOvershieldBar:SetHeight(tOvershieldBarSize); tOvershieldBar:SetHeight(tOvershieldBarSize);
tOvershieldBar:SetTexCoord(0, tHealthBarWidth / tOvershieldBar.tileSize, 0, tOvershieldBarSize / tOvershieldBar.tileSize); tOvershieldBar:SetTexCoord(0, tHealthBarWidth / tOvershieldBar.tileSize, 0, tOvershieldBarSize / tOvershieldBar.tileSize);
else -- not sIsInvertGrowth and tOrientation == "VERTICAL_INV" else -- (not sIsInvertGrowth and tOrientation == "VERTICAL_INV") or (sIsInvertGrowth and tOrientation == "VERTICAL")
-- VUHDO_STATUSBAR_TOP_TO_BOTTOM -- VUHDO_STATUSBAR_TOP_TO_BOTTOM
tOvershieldBarSize = tOvershieldBarSizePercent * tHealthBarHeight; tOvershieldBarSize = tOvershieldBarSizePercent * tHealthBarHeight;
tOvershieldBarOffset = tOvershieldBarOffsetPercent * tHealthBarHeight; tOvershieldBarOffset = tOvershieldBarOffsetPercent * tHealthBarHeight;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment