Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
powerprediction: Update API
Browse files Browse the repository at this point in the history
ls- committed Jun 15, 2024
1 parent b4ec20f commit 9d2853f
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -54,6 +54,7 @@ read_globals = {
'C_IncomingSummon',
'C_NamePlate',
'C_PvP',
'C_Spell',
'C_UnitAuras',

-- API
4 changes: 3 additions & 1 deletion elements/powerprediction.lua
Original file line number Diff line number Diff line change
@@ -71,7 +71,9 @@ local function Update(self, event, unit)
local mainCost, altCost = 0, 0

if(event == 'UNIT_SPELLCAST_START' and startTime ~= endTime) then
local costTable = GetSpellPowerCost(spellID)
local costTable = C_Spell.GetSpellPowerCost(spellID)
if(not costTable) then return end

-- hasRequiredAura is always false if there's only 1 subtable
local checkRequiredAura = #costTable > 1

0 comments on commit 9d2853f

Please sign in to comment.