Skip to content

Commit

Permalink
Fix onCooldown condition with "Show GCD" enabled
Browse files Browse the repository at this point in the history
If we overwrite a spell's cooldown with the gcd cooldown, we should only
set the gcdCooldown flag if the spell is not on cooldown. As spell that
have the gcdCooldown flag set are considered not on cd

Fixes: WeakAuras#4621
  • Loading branch information
InfusOnWoW committed Oct 15, 2023
1 parent b350cf4 commit 69e8b86
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions WeakAuras/GenericTrigger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2517,10 +2517,12 @@ do

if (showgcd) then
if ((gcdStart or 0) + (gcdDuration or 0) > startTime + duration) then
if startTime == 0 then
gcdCooldown = true
end
startTime = gcdStart;
duration = gcdDuration;
modRate = gcdModrate
gcdCooldown = true;
end
end

Expand Down Expand Up @@ -2549,9 +2551,11 @@ do
end
if (showgcd) then
if ((gcdStart or 0) + (gcdDuration or 0) > startTime + duration) then
if startTime == 0 then
gcdCooldown = true
end
startTime = gcdStart;
duration = gcdDuration;
gcdCooldown = true;
end
end
return startTime, duration, enabled, gcdCooldown;
Expand Down Expand Up @@ -2583,9 +2587,11 @@ do

if (showgcd) then
if ((gcdStart or 0) + (gcdDuration or 0) > startTime + duration) then
if startTime == 0 then
gcdCooldown = true
end
startTime = gcdStart;
duration = gcdDuration;
gcdCooldown = true;
end
end
return startTime, duration, enabled, gcdCooldown;
Expand Down

0 comments on commit 69e8b86

Please sign in to comment.