diff --git a/ARLConfig.lua b/ARLConfig.lua index 106cfdc..c5b0a5c 100644 --- a/ARLConfig.lua +++ b/ARLConfig.lua @@ -1299,8 +1299,38 @@ local function giveDatamine() desc = L["COMPARE_TRAINER_ACQUIRE_DESC"], func = function() addon:ScanTrainerData() end, }, + scanentiredatabase = { + order = 77, + type = "execute", + name = L["Scan Entire Database"], + desc = L["SCAN_ENTIRE_DB_DESC"], + func = function() addon:TooltipScanDatabase() end, + }, + scanvendor = { + order = 78, + type = "execute", + name = L["Scan Vendor"], + desc = L["SCAN_VENDOR_DESC"], + func = function() addon:ScanVendor() end, + }, + scanprofessiontooltip = { + type = "input", + name = L["Scan Professions"], + desc = L["SCAN_PROF_DB_DESC"], + get = false, + set = function(info, v) addon:ScanProfession(v) end, + order = 79, + }, + scanspellid = { + type = "input", + name = L["Scan Spell ID"], + desc = L["SCAN_SPELL_ID_DESC"], + get = false, + set = function(info, v) addon:TooltipScanRecipe(v) end, + order = 80, + }, scantrainers = { - order = 80, + order = 90, type = "toggle", name = L["Auto Scan Trainers"], desc = L["AUTOSCAN_TRAINERS_DESC"], @@ -1314,8 +1344,23 @@ local function giveDatamine() addon.db.profile.scantrainers = not addon.db.profile.scantrainers end, }, + scanvendors = { + order = 91, + type = "toggle", + name = L["Auto Scan Vendors"], + desc = L["AUTOSCAN_VENDORS_DESC"], + get = function() return addon.db.profile.scanvendors end, + set = function() + if (addon.db.profile.scanvendors) then + addon:UnregisterEvent("MERCHANT_SHOW") + else + addon:RegisterEvent("MERCHANT_SHOW") + end + addon.db.profile.scanvendors = not addon.db.profile.scanvendors + end, + }, autoloaddb = { - order = 81, + order = 100, type = "toggle", name = L["Auto Load Recipe Database"], desc = L["AUTOLOAD_DB_DESC"], diff --git a/ARLDatamine.lua b/ARLDatamine.lua index cbab34c..9c31de2 100644 --- a/ARLDatamine.lua +++ b/ARLDatamine.lua @@ -1530,6 +1530,7 @@ end -- Creates a reverse lookup for a recipe list ------------------------------------------------------------------------------- local CreateReverseLookup + do local reverse_lookup = {} diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua index 1eb61d7..7351199 100644 --- a/AckisRecipeList.lua +++ b/AckisRecipeList.lua @@ -148,6 +148,7 @@ function addon:OnInitialize() worldmap = true, autoscanmap = false, scantrainers = false, + scanvendors = false, autoloaddb = false, -- Recipe Exclusion @@ -300,6 +301,10 @@ function addon:OnEnable() self:RegisterEvent("TRAINER_SHOW") end + if (addon.db.profile.scanvendors) then + self:RegisterEvent("MERCHANT_SHOW") + end + -- Add an option so that ARL will work with Manufac if (Manufac) then Manufac.options.args.ARLScan = { @@ -363,6 +368,12 @@ function addon:TRAINER_SHOW() end +function addon:MERCHANT_SHOW() + + addon:ScanVendor() + +end + do local GetTradeSkillListLink = GetTradeSkillListLink diff --git a/Locals/testenUS.lua b/Locals/testenUS.lua index faf2db3..92f655d 100644 --- a/Locals/testenUS.lua +++ b/Locals/testenUS.lua @@ -1769,3 +1769,13 @@ L["ALT_TRADESKILL_DESC"] = "This will display a list of alts which have had trad L["Other Realms"] = true L["DATAMINE_WARNING_DESC"] = "Please note that enabling Auto Load Recipe Database will increase the amount of memory used by ARL. Enabling Auto Scan Trainers may cause a slight bit of lag when the trainer is opened. This will be more noticeable on the first scan of a trainer." L["Anuur"] = true +L["Scan Entire Database"] = true +L["SCAN_ENTIRE_DB_DESC"] = "Loads the entire recipe database, and scans every single recipes tooltip checking the flags. This will lag your computer and use a lot of memory." +L["Scan Vendor"] = true +L["SCAN_VENDOR_DESC"] = "Scans the currently opened vendor for recipes and compares the information with the internal database." +L["Scan Professions"] = true +L["SCAN_PROF_DB_DESC"] = "Scans a specified profession (lower case name or spell id) in the recipe database, scanning the tooltips and comparing them with the internal database." +L["Scan Spell ID"] = true +L["SCAN_SPELL_ID_DESC"] = "Scans a specified spell ID, scanning its tooltip and comparing it with the internal database." +L["Auto Scan Vendors"] = true +L["AUTOSCAN_VENDORS_DESC"] = "Turns on scanning at vendors to compare skill levels, and recipe acquire methods."