From 6f362b1b770a0ebe94e1211d0426c1416de42a9e Mon Sep 17 00:00:00 2001 From: michaelsp Date: Fri, 22 Nov 2024 01:17:12 +0100 Subject: [PATCH] Fixing a cooldown animation display issue on icons indicators linked to single missing buffs (GH issue #278) --- modules/IndicatorIcons.lua | 8 ++++++-- modules/StatusAurasBuffs.lua | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/IndicatorIcons.lua b/modules/IndicatorIcons.lua index d5c97380..53961e43 100644 --- a/modules/IndicatorIcons.lua +++ b/modules/IndicatorIcons.lua @@ -75,8 +75,12 @@ local function Icon_OnFrameUpdate(f) aura.text:SetText(count>1 and count or "") end if showCool then - local expiration, duration = status:GetExpirationTime(unit) or 0, status:GetDuration(unit) or 0 - aura.cooldown:SetCooldown(expiration - duration, duration) + local expiration, duration = status:GetExpirationTime(unit), status:GetDuration(unit) + if expiration and duration then + aura.cooldown:SetCooldown(expiration - duration, duration) + else + aura.cooldown:SetCooldown(0, 0) + end end aura:Show() i = i + 1 diff --git a/modules/StatusAurasBuffs.lua b/modules/StatusAurasBuffs.lua index 0807ac3b..408bb6f4 100644 --- a/modules/StatusAurasBuffs.lua +++ b/modules/StatusAurasBuffs.lua @@ -21,7 +21,7 @@ local durations = {} -- missing buffs local mcounts = {1} local mexpirations = {0} -local mdurations = {1073741824} +local mdurations = mexpirations -- strict filter management functions local function GenSpellsMask(spells)