Skip to content

Commit

Permalink
fix LoC option
Browse files Browse the repository at this point in the history
  • Loading branch information
emptyrivers authored and Stanzilla committed Jul 24, 2024
1 parent 75f7932 commit 9b214ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions WeakAuras/GenericTrigger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2611,6 +2611,17 @@ do
end
end


---@param identifier string | number
---@return number? startTime, number? duration
function WeakAuras.GetSpellLossOfControlCooldown(identifier)
if WeakAuras.IsTWW() then
return C_Spell.GetSpellLossOfControlCooldown(identifier)
else
return GetSpellLossOfControlCooldown(identifier)
end
end

---@param id string
---@param ignoreRuneCD boolean
---@param showgcd boolean
Expand Down
2 changes: 1 addition & 1 deletion WeakAuras/Prototypes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5260,7 +5260,7 @@ Private.event_prototypes = {
local charges, maxCharges, spellCount, chargeGainTime, chargeLostTime = WeakAuras.GetSpellCharges(spellname, ignoreSpellKnown, followoverride)
local stacks = maxCharges and maxCharges ~= 1 and charges or (spellCount and spellCount > 0 and spellCount) or nil;
if showlossofcontrol and startTime and duration then
local locStart, locDuration = GetSpellLossOfControlCooldown(spellname);
local locStart, locDuration = WeakAuras.GetSpellLossOfControlCooldown(spellname);
if locStart and locDuration and (locStart + locDuration) > (startTime + duration) then
startTime = locStart
duration = locDuration
Expand Down

0 comments on commit 9b214ef

Please sign in to comment.