From 76064358c8ffc2eff9c5d1c92ddb4dc1da1401e1 Mon Sep 17 00:00:00 2001 From: ackis Date: Wed, 13 May 2009 18:18:03 +0000 Subject: [PATCH] Add functionality so that you can filter out based on expansion. --- ARLConfig.lua | 24 ++++++++++++++++++++++++ AckisRecipeList.lua | 15 +++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/ARLConfig.lua b/ARLConfig.lua index 493d0eb..b9a9973 100644 --- a/ARLConfig.lua +++ b/ARLConfig.lua @@ -199,6 +199,30 @@ local function giveFilter() get = function() return addon.db.profile.filters.classes.warrior end, set = function() addon.db.profile.filters.classes.warrior = not addon.db.profile.filters.classes.warrior end, }, + originalwow = { + order = 20, + type = "toggle", + name = L["Original WoW"], + desc = L["ORIGINAL_WOW_DESC"], + get = function() return addon.db.profile.filters.obtain.originalwow end, + set = function() addon.db.profile.filters.obtain.originalwow = not addon.db.profile.filters.obtain.originalwow end, + }, + bc = { + order = 21, + type = "toggle", + name = L["Burning Crusade"], + desc = L["BC_WOW_DESC"], + get = function() return addon.db.profile.filters.obtain.bc end, + set = function() addon.db.profile.filters.obtain.bc = not addon.db.profile.filters.obtain.bc end, + }, + wrath = { + order = 22, + type = "toggle", + name = L["Wrath of the Lich King"], + desc = L["LK_WOW_DESC"], + get = function() return addon.db.profile.filters.obtain.wrath end, + set = function() addon.db.profile.filters.obtain.wrath = not addon.db.profile.filters.obtain.wrath end, + }, }, }, obtain = { diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua index fdd25c2..fec63db 100644 --- a/AckisRecipeList.lua +++ b/AckisRecipeList.lua @@ -179,6 +179,9 @@ function addon:OnInitialize() skill = true, known = false, unknown = true, + originalwow = true, + bc = true, + wrath = true, }, -- Obtain Options obtain = { @@ -1030,6 +1033,18 @@ do end end + -- Filter out "era" recipes + + if ((generaldb.originalwow == false) and (Recipe["Game"] == 0)) then + return false + end + if ((generaldb.bc == false) and (Recipe["Game"] == 1)) then + return false + end + if ((generaldb.wrath == false) and (Recipe["Game"] == 2)) then + return false + end + local bindingdb = filterdb.binding -- Include BoE Items in the scan? (if I want to see BoE items, only filter those that are not BoE) -- 1.7.9.5