Use UnitPowerMax where available

This commit is contained in:
Parnic
2022-09-18 15:22:04 -05:00
parent d10586d477
commit a259db6b8a
2 changed files with 17 additions and 9 deletions

View File

@ -95,8 +95,12 @@ function SliceAndDice.prototype:Enable(core)
end
function SliceAndDice.prototype:CheckMaxComboPoints()
local talentID, name, texture, selected, available, spellID, unknown, row, column, known, grantedByAura = GetTalentInfoByID(sixComboPointsTalentID, GetActiveSpecGroup())
maxComboPoints = selected and 6 or 5
if UnitPowerMax then
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
function SliceAndDice.prototype:Disable(core)