diff --git a/api/unitframes.lua b/api/unitframes.lua index 8f959d4b..91ad2251 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -500,7 +500,7 @@ function pfUI.uf:UpdateConfig() local cooldown_text = tonumber(f.config.cooldown_text) local cooldown_anim = tonumber(f.config.cooldown_anim) - local cooldown_reverse = tonumber(f.config.cooldown_reverse) or 0 + local cooldown_reverse = f.config.cooldown_reverse == "1" local relative_point = "BOTTOM" if f.config.panchor == "TOPLEFT" then @@ -862,8 +862,9 @@ function pfUI.uf:UpdateConfig() f.buffs[i].cd.pfCooldownType = "ALL" f.buffs[i].cd.pfCooldownStyleText = cooldown_text f.buffs[i].cd.pfCooldownStyleAnimation = cooldown_anim - f.buffs[i].cd.pfCooldownReverse = cooldown_reverse - f.buffs[i].cd:SetAlpha(cooldown_anim == 1 and 1 or 0) + f.buffs[i].cd:SetDrawSwipe(cooldown_anim == 1) + f.buffs[i].cd:SetDrawBling(cooldown_anim == 1) + f.buffs[i].cd:SetReverse(cooldown_reverse) -- immediately show/hide existing cooldown text if f.buffs[i].cd.pfCooldownText then @@ -923,8 +924,9 @@ function pfUI.uf:UpdateConfig() f.debuffs[i].cd.pfCooldownType = "ALL" f.debuffs[i].cd.pfCooldownStyleText = cooldown_text f.debuffs[i].cd.pfCooldownStyleAnimation = cooldown_anim - f.debuffs[i].cd.pfCooldownReverse = cooldown_reverse - f.debuffs[i].cd:SetAlpha(cooldown_anim == 1 and 1 or 0) + f.debuffs[i].cd:SetDrawSwipe(cooldown_anim == 1) + f.debuffs[i].cd:SetDrawBling(cooldown_anim == 1) + f.debuffs[i].cd:SetReverse(cooldown_reverse) -- immediately show/hide existing cooldown text if f.debuffs[i].cd.pfCooldownText then @@ -2269,6 +2271,8 @@ function pfUI.uf:AddIcon(frame, pos, icon, timeleft, stacks, start, duration) frame.icon[pos].cd = CreateFrame("Cooldown", nil, frame.icon[pos], "CooldownFrameTemplate") frame.icon[pos].cd.pfCooldownStyleAnimation = 0 + frame.icon[pos].cd:SetDrawSwipe(false) + frame.icon[pos].cd:SetDrawBling(false) frame.icon[pos].cd.pfCooldownType = "ALL" frame.icon[pos].cd:SetFrameLevel(48) end diff --git a/modules/actionbar.lua b/modules/actionbar.lua index 1dd1de95..bd12bbc3 100644 --- a/modules/actionbar.lua +++ b/modules/actionbar.lua @@ -1035,7 +1035,7 @@ pfUI:RegisterModule("actionbar", function () -- cooldown f.cd = CreateFrame("Cooldown", f:GetName() .. "Cooldown", f, "CooldownFrameTemplate") f.cd.pfCooldownStyleAnimation = 1 - f.cd.pfCooldownReverse = tonumber(C.bars.cooldown_reverse) or 0 + f.cd:SetReverse(C.bars.cooldown_reverse == "1") f.cd.pfCooldownType = "NOGCD" f.cd.pfCooldownSize = cd_size diff --git a/modules/bags.lua b/modules/bags.lua index fe6f2f4f..8510f715 100644 --- a/modules/bags.lua +++ b/modules/bags.lua @@ -415,20 +415,15 @@ pfUI:RegisterModule("bags", function () pfUI.bags[bag].slots[slot].slot = slot pfUI.bags[bag].slots[slot].frame:SetID(slot) - -- add cooldown frame to bankslots - if tpl == "BankItemButtonGenericTemplate" then - local bankslot = pfUI.bags[bag].slots[slot].frame - local name = "pfBag" .. bag .. "item" .. slot .. "Cooldown" - bankslot.cd = CreateFrame("Cooldown", name, bankslot, "CooldownFrameTemplate") - bankslot.cd.pfCooldownStyleAnimation = 1 - bankslot.cd.pfCooldownReverse = tonumber(C.appearance.bags.cooldown_reverse) or 0 - bankslot.cd.pfCooldownType = "NOGCD" - else - local bagslot = pfUI.bags[bag].slots[slot].frame - bagslot.cd = _G[bagslot:GetName().."Cooldown"] - bagslot.cd.pfCooldownType = "NOGCD" - bagslot.cd.pfCooldownReverse = tonumber(C.appearance.bags.cooldown_reverse) or 0 - end + -- native cooldown frame: the bank template has none and the bag + -- template's is 1.12's indicator Model, which can't reverse. Taking the + -- "