cooldowns test only active icons
This commit is contained in:
parent
c6c3d23074
commit
10caa05e31
@ -311,13 +311,17 @@ end
|
|||||||
function Cooldowns:UpdateTestCooldowns(unit)
|
function Cooldowns:UpdateTestCooldowns(unit)
|
||||||
local button = Gladdy.buttons[unit]
|
local button = Gladdy.buttons[unit]
|
||||||
self:UpdateCooldowns(button)
|
self:UpdateCooldowns(button)
|
||||||
-- use class spells
|
|
||||||
for spellId,_ in pairs(Gladdy:GetCooldownList()[button.class]) do
|
local orderedIcons = {}
|
||||||
self:CooldownUsed(unit, button.class, spellId)
|
for _,icon in pairs(button.spellCooldownFrame.icons) do
|
||||||
|
tinsert(orderedIcons, icon)
|
||||||
end
|
end
|
||||||
-- use race spells
|
tbl_sort(orderedIcons, function(a, b)
|
||||||
for spellId,_ in pairs(Gladdy:GetCooldownList()[button.race]) do
|
return Gladdy.db.cooldownCooldownsOrder[button.class][tostring(a.spellId)] < Gladdy.db.cooldownCooldownsOrder[button.class][tostring(b.spellId)]
|
||||||
self:CooldownUsed(unit, button.race, spellId)
|
end)
|
||||||
|
|
||||||
|
for _,icon in ipairs(orderedIcons) do
|
||||||
|
self:CooldownUsed(unit, button.class, icon.spellId)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user