mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
Use UnitPowerMax where available
This commit is contained in:
@ -376,14 +376,18 @@ function RollTheBones.prototype:UpdateDurationBar(event, unit)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local points = RTBGetComboPoints(self.unit)
|
local points = RTBGetComboPoints(self.unit)
|
||||||
-- check for Deeper Stratagem
|
if UnitPowerMax then
|
||||||
local _, _, _, DeeperStratagem = GetTalentInfoByID(sixComboPointsTalentID, GetActiveSpecGroup())
|
CurrMaxRtBDuration = self:GetMaxBuffTime(UnitPowerMax(self.unit, SPELL_POWER_COMBO_POINTS))
|
||||||
|
|
||||||
if DeeperStratagem then
|
|
||||||
-- first, set the cached upper limit of RtB duration
|
|
||||||
CurrMaxRtBDuration = self:GetMaxBuffTime(maxComboPoints + 1)
|
|
||||||
else
|
else
|
||||||
CurrMaxRtBDuration = self:GetMaxBuffTime(maxComboPoints)
|
-- check for Deeper Stratagem
|
||||||
|
local _, _, _, DeeperStratagem = GetTalentInfoByID(sixComboPointsTalentID, GetActiveSpecGroup())
|
||||||
|
|
||||||
|
if DeeperStratagem then
|
||||||
|
-- first, set the cached upper limit of RtB duration
|
||||||
|
CurrMaxRtBDuration = self:GetMaxBuffTime(maxComboPoints + 1)
|
||||||
|
else
|
||||||
|
CurrMaxRtBDuration = self:GetMaxBuffTime(maxComboPoints)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if event then
|
if event then
|
||||||
|
@ -95,8 +95,12 @@ function SliceAndDice.prototype:Enable(core)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function SliceAndDice.prototype:CheckMaxComboPoints()
|
function SliceAndDice.prototype:CheckMaxComboPoints()
|
||||||
local talentID, name, texture, selected, available, spellID, unknown, row, column, known, grantedByAura = GetTalentInfoByID(sixComboPointsTalentID, GetActiveSpecGroup())
|
if UnitPowerMax then
|
||||||
maxComboPoints = selected and 6 or 5
|
maxComboPoints = UnitPowerMax(self.unit, SPELL_POWER_COMBO_POINTS)
|
||||||
|
else
|
||||||
|
local talentID, name, texture, selected, available, spellID, unknown, row, column, known, grantedByAura = GetTalentInfoByID(sixComboPointsTalentID, GetActiveSpecGroup())
|
||||||
|
maxComboPoints = selected and 6 or 5
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function SliceAndDice.prototype:Disable(core)
|
function SliceAndDice.prototype:Disable(core)
|
||||||
|
Reference in New Issue
Block a user