From 2614bef4a0ac127be0746ed1aa4158fa48eb9d8e Mon Sep 17 00:00:00 2001 From: GryllsAddons <107083057+GryllsAddons@users.noreply.github.com> Date: Sun, 26 Mar 2023 19:34:08 +0100 Subject: [PATCH] reset reload timer when reloading zone targets target chat msg enabled --- unitscan.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/unitscan.lua b/unitscan.lua index 7bd7a3d..73e4629 100644 --- a/unitscan.lua +++ b/unitscan.lua @@ -354,10 +354,10 @@ end do unitscan.last_check = GetTime() - function unitscan.UPDATE() - -- reload targets for zone - if unitscan.reloadtimer and (GetTime() > unitscan.reloadtimer) then - unitscan.load_zonetargets() + function unitscan.UPDATE() + if unitscan.reloadtimer and (GetTime() > unitscan.reloadtimer) then + unitscan.load_zonetargets() -- reload targets for zone + unitscan.reloadtimer = nil -- reset reload timer end if GetTime() - unitscan.last_check >= CHECK_INTERVAL then @@ -398,7 +398,7 @@ function unitscan.toggle_zonetarget(name) -- DEFAULT_CHAT_FRAME:AddMessage("DEBUG: unitscan: toggle_zonetarget") if unitscan_zonetargets[name] then unitscan_zonetargets[name] = nil - -- unitscan.print(name .. ' was found!') + unitscan.print(name .. ' was found!') unitscan.reloadtimer = GetTime() + 90 -- trigger reload zone timer end end