From 5d45e5975f33041be0c1d5091722b5cb7cb67772 Mon Sep 17 00:00:00 2001 From: Bunny67 Date: Sat, 13 Jun 2020 18:35:20 +0300 Subject: [PATCH] change C_Timer.After --- WeakAuras/GenericTrigger.lua | 3 +++ WeakAuras/compat.lua | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index 9ccc81d..38150e9 100644 --- a/WeakAuras/GenericTrigger.lua +++ b/WeakAuras/GenericTrigger.lua @@ -1234,6 +1234,9 @@ function GenericTrigger.Add(data, region) triggerFunc = WeakAuras.LoadFunction("return "..(trigger.custom or ""), id); if (trigger.custom_type == "stateupdate") then tsuConditionVariables = WeakAuras.LoadFunction("return function() return \n" .. (trigger.customVariables or "") .. "\n end"); + if not tsuConditionVariables then + tsuConditionVariables = function() return end + end end if(trigger.custom_type == "status" or trigger.custom_type == "event" and trigger.custom_hide == "custom") then diff --git a/WeakAuras/compat.lua b/WeakAuras/compat.lua index 197a145..f7ac9be 100644 --- a/WeakAuras/compat.lua +++ b/WeakAuras/compat.lua @@ -238,7 +238,11 @@ if not C_Timer or C_Timer._version ~= 2 then end function C_Timer.After(duration, callback) - return CreateTicker(duration, callback, 1) + AddDelayedCall({ + _remainingIterations = 1, + _delay = duration, + _callback = callback + }) end function C_Timer.NewTimer(duration, callback)