From 7a247b1f2ea2e9ba200b85bbdbfbdffc19690ee0 Mon Sep 17 00:00:00 2001 From: Kevin Lyles Date: Tue, 6 Jul 2010 12:44:23 -0500 Subject: [PATCH] Added auto-resume logic --- ItemScanner.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ItemScanner.lua b/ItemScanner.lua index d39992f..a1aa139 100644 --- a/ItemScanner.lua +++ b/ItemScanner.lua @@ -185,3 +185,20 @@ end SLASH_ITEMSCANNER1="/is" SLASH_ITEMSCANNER2="/itemscanner" SlashCmdList["ITEMSCANNER"] = commandHandler + +-- Autoresumes on login +local function resume() + if IS_status.items.scan_active then + if IS_status.items.finished then + commandHandler("items next-chunk") + else + commandHandler("items") + end + end + if not frame.itemco then + print("Nothing seems to be active, restarting") + commandHandler("items reset") + end +end + +frame:SetScript("OnUpdate", resume) -- 1.7.9.5