[CF 1439] Cast-Time / Cast-Time - debuff comparison
tmw-issue-import opened this issue ยท 2 comments
Is there any way to check if i can cast spell X before debuff Y runs out on the target?
Like
if (spellX.castTime > target.debuffY.duration) {true}
If not, would it be possible to implement this in a future update?
Best regards
//Jack
Posted by CurseForge user B1naryher0 | Imported from CurseForge issue #1439 | Raw
I managed to acomplish this using LUA in WeakAuras 2
function()
local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, nameplateShowPersonal, spellID, canApplyAura, isBossDebuff, _, nameplateShowAll, timeMod, value1, value2, value3 = UnitDebuff("Target", "Vulnerable")
local name, rank, icon, castingTime, minRange, maxRange, spellID=GetSpellInfo(19434)
local aimedShotCastTime = castingTime*.001
local vulnTimeLeft = ((expires - GetTime()) / timeMod)
if vulnTimeLeft>aimedShotCastTime then return true
end
end
Seems to be doable to implement this in TMW?
Edited Sep 20, 2017
Posted by CurseForge user B1naryher0
Sure. Put that function into a Lua Snippet (General tab of the options). Make sure to give the function a name. Then, call it from a Lua condition.
Posted by CurseForge user Cybeloras