diff --git a/State.lua b/State.lua index d0a226c0f..040e991c9 100644 --- a/State.lua +++ b/State.lua @@ -1210,11 +1210,12 @@ state.interrupt = interrupt -- Use this for readyTime in an interrupt action; will interrupt casts at end of cast and channels ASAP. -local function timeToInterrupt() +local function timeToInterrupt( offset ) + offset = offset or 0 local casting = state.debuff.casting if casting.down or casting.v2 == 1 then return 3600 end if casting.v3 == 1 then return 0 end - return max( 0, casting.remains - 0.25 ) + return max( 0, casting.remains - 0.25 - offset ) end state.timeToInterrupt = timeToInterrupt diff --git a/TheWarWithin/DeathKnightBlood.lua b/TheWarWithin/DeathKnightBlood.lua index 397cee08a..c6cde49b0 100644 --- a/TheWarWithin/DeathKnightBlood.lua +++ b/TheWarWithin/DeathKnightBlood.lua @@ -1286,7 +1286,7 @@ spec:RegisterAbilities( { toggle = "interrupts", debuff = "casting", - readyTime = state.timeToInterrupt, + readyTime = state.timeToInterrupt( gcd.max ), handler = function () interrupt() diff --git a/TheWarWithin/DeathKnightFrost.lua b/TheWarWithin/DeathKnightFrost.lua index 4ccfa85a0..66b3b83b5 100644 --- a/TheWarWithin/DeathKnightFrost.lua +++ b/TheWarWithin/DeathKnightFrost.lua @@ -1108,7 +1108,7 @@ spec:RegisterAbilities( { toggle = "interrupts", debuff = "casting", - readyTime = state.timeToInterrupt, + readyTime = state.timeToInterrupt( gcd.max ), handler = function () applyDebuff( "target", "asphyxiate" ) diff --git a/TheWarWithin/DeathKnightUnholy.lua b/TheWarWithin/DeathKnightUnholy.lua index 476d7f6fa..147ae1b1f 100644 --- a/TheWarWithin/DeathKnightUnholy.lua +++ b/TheWarWithin/DeathKnightUnholy.lua @@ -1427,7 +1427,7 @@ me:RegisterAbilities( { toggle = "interrupts", debuff = "casting", - readyTime = state.timeToInterrupt, + readyTime = state.timeToInterrupt( gcd.max ), handler = function () applyDebuff( "target", "asphyxiate" ) diff --git a/TheWarWithin/HunterBeastMastery.lua b/TheWarWithin/HunterBeastMastery.lua index bd46e46ba..8886c8f33 100644 --- a/TheWarWithin/HunterBeastMastery.lua +++ b/TheWarWithin/HunterBeastMastery.lua @@ -1962,7 +1962,7 @@ spec:RegisterAbilities( { toggle = "interrupts", debuff = "casting", - readyTime = state.timeToInterrupt, + readyTime = state.timeToInterrupt( gcd.max ), usable = function () return not boss end, handler = function () diff --git a/TheWarWithin/PaladinRetribution.lua b/TheWarWithin/PaladinRetribution.lua index a5dd78760..364044238 100644 --- a/TheWarWithin/PaladinRetribution.lua +++ b/TheWarWithin/PaladinRetribution.lua @@ -1334,7 +1334,7 @@ spec:RegisterAbilities( { toggle = "interrupts", debuff = "casting", - readyTime = state.timeToInterrupt, + readyTime = state.timeToInterrupt( gcd.max ), handler = function () interrupt() diff --git a/TheWarWithin/WarlockDemonology.lua b/TheWarWithin/WarlockDemonology.lua index 46f197253..4efa40dc4 100644 --- a/TheWarWithin/WarlockDemonology.lua +++ b/TheWarWithin/WarlockDemonology.lua @@ -1657,7 +1657,7 @@ spec:RegisterAbilities( { interrupt = true, debuff = "casting", - readyTime = state.timeToInterrupt, + readyTime = state.timeToInterrupt( gcd.max ), usable = function () return pet.exists, "requires felguard" end, handler = function () @@ -1721,7 +1721,7 @@ spec:RegisterAbilities( { interrupt = true, debuff = "casting", - readyTime = state.timeToInterrupt, + readyTime = state.timeToInterrupt( gcd.max ), handler = function () interrupt() diff --git a/TheWarWithin/WarriorArms.lua b/TheWarWithin/WarriorArms.lua index aa518a90b..1079aeb58 100644 --- a/TheWarWithin/WarriorArms.lua +++ b/TheWarWithin/WarriorArms.lua @@ -1435,7 +1435,7 @@ spec:RegisterAbilities( { toggle = "interrupts", debuff = function () return settings.shockwave_interrupt and "casting" or nil end, - readyTime = function () return settings.shockwave_interrupt and timeToInterrupt() or nil end, + readyTime = function () return settings.shockwave_interrupt and state.timeToInterrupt( gcd.max ) or nil end, usable = function () return not target.is_boss end, diff --git a/TheWarWithin/WarriorFury.lua b/TheWarWithin/WarriorFury.lua index 218e113fe..6289d5bfe 100644 --- a/TheWarWithin/WarriorFury.lua +++ b/TheWarWithin/WarriorFury.lua @@ -1709,7 +1709,7 @@ spec:RegisterAbilities( { toggle = "interrupts", debuff = function () return settings.shockwave_interrupt and "casting" or nil end, - readyTime = function () return settings.shockwave_interrupt and timeToInterrupt() or nil end, + readyTime = function () return settings.shockwave_interrupt and state.timeToInterrupt( gcd.max ) or nil end, usable = function () return not target.is_boss end, diff --git a/TheWarWithin/WarriorProtection.lua b/TheWarWithin/WarriorProtection.lua index 4fcbf3d05..1a8b37212 100644 --- a/TheWarWithin/WarriorProtection.lua +++ b/TheWarWithin/WarriorProtection.lua @@ -1274,7 +1274,7 @@ spec:RegisterAbilities( { toggle = "interrupts", debuff = function () return "casting" end, - readyTime = function () return timeToInterrupt() end, + readyTime = function () return state.timeToInterrupt( gcd.max ) end, usable = function () return not target.is_boss and target.maxR < 8 end, handler = function () @@ -1660,7 +1660,7 @@ spec:RegisterAbilities( { toggle = "interrupts", debuff = function () return settings.shockwave_interrupt and "casting" or nil end, - readyTime = function () return settings.shockwave_interrupt and timeToInterrupt() or nil end, + readyTime = function () return settings.shockwave_interrupt and state.timeToInterrupt( gcd.max ) or nil end, usable = function () return not target.is_boss and target.maxR < 10 end, @@ -1733,7 +1733,7 @@ spec:RegisterAbilities( { toggle = "interrupts", debuff = function () return "casting" end, - readyTime = function () return timeToInterrupt() end, + readyTime = function () return state.timeToInterrupt( gcd.max ) end, handler = function () applyDebuff( "target", "storm_bolt" )