Detect SnD max changing more reliably

This commit is contained in:
Parnic
2022-09-18 15:34:09 -05:00
parent a259db6b8a
commit 9e68edbc43

View File

@ -85,6 +85,10 @@ function SliceAndDice.prototype:Enable(core)
self:CheckMaxComboPoints()
end
if IceHUD.EventExistsUnitMaxPower then
self:RegisterEvent("UNIT_MAXPOWER", "CheckMaxComboPoints")
end
if not self.moduleSettings.alwaysFullAlpha then
self:Show(false)
else
@ -419,13 +423,11 @@ function SliceAndDice.prototype:UpdateDurationBar(event, unit)
end
function SliceAndDice.prototype:GetMaxBuffTime(numComboPoints)
local maxduration
if numComboPoints == 0 then
return 0
end
maxduration = baseTime + ((numComboPoints - 1) * gapPerComboPoint)
local maxduration = baseTime + ((numComboPoints - 1) * gapPerComboPoint)
if self:HasNetherbladeBonus() then
maxduration = maxduration + netherbladeBonus