} |
function PostUpdateAuraIcon(self, icons, unit, button, index) |
local name, _, _, _, dtype, duration, expirationTime = UnitAura(unit, index, button.filter) |
|
if button.debuff and -- if aura is a debuff |
(castby[button.owner] or unit == 'player') and -- and aura is cast by me on other units or aura is affecting player |
not(expirationTIme == 0 and duration == 0) -- and aura has a remaining time. |
then |
button.cd:Show() |
else |
button.cd:Hide() |
end |
|
if button.debuff then |
if (castby[button.owner] or unit=='player') and not(expirationTime == 0 and duration == 0) then |
button.cd:Show() |
else |
button.cd:Hide() |
end |
button.icon:SetDesaturated(not (castby[button.owner] or unit == 'player' or unit=='pet' or unit=='vehicle')) |
button.icon:SetPoint('TOPLEFT', 2, -2) |
button.icon:SetPoint('BOTTOMRIGHT', -2, 2) |