Fix Charged combo points feature flag

This commit is contained in:
Parnic
2022-09-18 22:35:19 -05:00
parent 0af47119e3
commit 9fc90551e2
2 changed files with 30 additions and 39 deletions

View File

@ -6,13 +6,6 @@ if Enum and Enum.PowerType then
SPELL_POWER_COMBO_POINTS = Enum.PowerType.ComboPoints
end
local GetUnitChargedPowerPoints = GetUnitChargedPowerPoints
if not GetUnitChargedPowerPoints then
GetUnitChargedPowerPoints = function()
return nil
end
end
function ComboPointsBar.prototype:init()
ComboPointsBar.super.prototype.init(self, "ComboPointsBar")
@ -98,9 +91,11 @@ function ComboPointsBar.prototype:Enable(core)
end
function ComboPointsBar.prototype:UpdateChargedComboPoints()
local chargedPowerPoints = GetUnitChargedPowerPoints("player")
self.chargedPowerPointIndex = chargedPowerPoints and chargedPowerPoints[1]
self:UpdateComboPoints()
if GetUnitChargedPowerPoints then
local chargedPowerPoints = GetUnitChargedPowerPoints("player")
self.chargedPowerPointIndex = chargedPowerPoints and chargedPowerPoints[1]
self:UpdateComboPoints()
end
end
function ComboPointsBar.prototype:CreateFrame()