Compare Dynamic Cast time and Cool-down progress and display icon if one is greater than the other
vfursov7 opened this issue ยท 1 comments
Is your feature request related to a problem? Please describe.
I cannot seem to find a way to compare a Cast time of an ability to a cool-down of an ability and have an outcome of displaying an icon
Describe the solution you'd like
Trigger 1: Cast time of Shadow Word: Void (Currently will only get cast time if player is casting)
Trigger 2: Cool-Down of Void Bolt
If T1 < T2 than = T3 (Displays icon)
Describe alternatives you've considered
Currently I have a weak aura I made consisting of two separate weak auras
Weak aura 1 : Shows the cast time in seconds of Shadow Word: Void (the cast time is always displayed dynamically changing based on haste) Shadow Priest Haste changes.
function()
local name, rank, icon, castTime, minRange, maxRange, spellId = GetSpellInfo("Shadow Word: Void")
---return (castTime)
seconds = castTime / 1000
return ("%.1f"):format(seconds)
end
Weak aura 2: Displays remaining cool-down of Void Bolt
Status - Cooldown progress - Voidbolt - Display %p
I just have both displayed as a text and cast Shadow Word: Void when the cast time will fit in a window of Void Bolt cooldown so i dont trigger a GCD
Im trying to run this code
function(t)
if t[1] and t[2] then
local a = WeakAuras.GetTriggerStateForTrigger(aura_env.id, 1)
local b = WeakAuras.GetTriggerStateForTrigger(aura_env.id, 2)
return a[""].expirationTime > b[""].expirationTime
else
return t[3] -- whatever you want to return when they're not both running
end
end
Having
Trigger 1 as Status Cast Player Shadow Word: Void
Trigger 2 Status Cooldown Voidbolt
Trigger 3 Event Chat Message say Test, Display Icon
Would be solved by #1236, so closing as duplicate.