From be94690b170db4a81e8fd60be737d3aad1d52109 Mon Sep 17 00:00:00 2001 From: GryllsAddons <107083057+GryllsAddons@users.noreply.github.com> Date: Sun, 19 Feb 2023 17:19:50 +0000 Subject: [PATCH] Add files via upload --- unitscan.lua | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/unitscan.lua b/unitscan.lua index 4c49226..c96bd62 100644 --- a/unitscan.lua +++ b/unitscan.lua @@ -35,10 +35,8 @@ do end function unitscan.load_zonetargets() - unitscan.reloading = true unitscan_zone_targets() unitscan.reloadtimer = nil - unitscan.reloading = nil -- DEFAULT_CHAT_FRAME:AddMessage("DEBUG: unitscan: reloaded zone targets") end @@ -336,12 +334,10 @@ do unitscan.load_zonetargets() end - if not unitscan.reloading then - if GetTime() - unitscan.last_check >= CHECK_INTERVAL then - unitscan.last_check = GetTime() - unitscan.check_for_targets() - unitscan.check_for_zonetargets() - end + if GetTime() - unitscan.last_check >= CHECK_INTERVAL then + unitscan.last_check = GetTime() + unitscan.check_for_targets() + unitscan.check_for_zonetargets() end end end @@ -362,7 +358,8 @@ function unitscan.sorted_targets() end function unitscan.toggle_target(name) - local key = strupper(name) + -- local key = strupper(name) + local key = name if unitscan_targets[key] then unitscan_targets[key] = nil unitscan.print('- ' .. key)