From 2196ddb7031153789bc24b7283b8eceb7fad7ab2 Mon Sep 17 00:00:00 2001 From: Ackis Date: Wed, 10 Dec 2008 19:30:22 +0000 Subject: [PATCH] Change the way defaults are given to Ace3DB which after looking at the DB code will speed things up a bit. --- ARLConfig.lua | 6 +----- AckisRecipeList.lua | 35 +++++++++++++++++++---------------- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/ARLConfig.lua b/ARLConfig.lua index ce48267..6febc9c 100644 --- a/ARLConfig.lua +++ b/ARLConfig.lua @@ -1208,13 +1208,9 @@ function addon:SetupOptions() -- Add in the about panel to the Bliz options (but not the ace3 config) if LibStub:GetLibrary("LibAboutPanel", true) then - self.optionsFrame["About"] = LibStub:GetLibrary("LibAboutPanel").new(MODNAME, MODNAME) - else - - self:Print("Lib About Panel not loaded.") - + self:Print("Lib AboutPanel not loaded.") end -- Fill up our modular options... diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua index b573c29..d46bcd4 100644 --- a/AckisRecipeList.lua +++ b/AckisRecipeList.lua @@ -123,17 +123,8 @@ end function addon:OnInitialize() - self.db = LibStub("AceDB-3.0"):New("ARLDB2") - - self:SetupOptions() - - -- Register slash commands - self:RegisterChatCommand("arl", "ChatCommand") - self:RegisterChatCommand("ackisrecipelist", "ChatCommand") - -- Set default options, which are to include everything in the scan - self.db:RegisterDefaults( - { + local defaults = { profile = { -- Frame options @@ -161,7 +152,8 @@ function addon:OnInitialize() -- Filter Options filters = { - general = { -- General Filters + -- General Filters + general = { faction = true, class = false, specialty = false, @@ -169,7 +161,8 @@ function addon:OnInitialize() known = false, unknown = true, }, - obtain = { -- Obtain Options + -- Obtain Options + obtain = { trainer = true, vendor = true, instance = true, @@ -181,7 +174,8 @@ function addon:OnInitialize() worlddrop = true, mobdrop = true, }, - item = { -- Item Filters (Armor/Weapon) + -- Item Filters (Armor/Weapon) + item = { armor = { cloth = true, leather = true, @@ -222,7 +216,8 @@ function addon:OnInitialize() healer = true, caster = true, }, - rep = { -- Reputation Options + -- Reputation Options + rep = { aldor = true, scryer = true, argentdawn = true, @@ -242,7 +237,7 @@ function addon:OnInitialize() timbermaw = true, violeteye = true, zandalar = true, --- Below this is WotLK stuff. May need to be changed post beta. + -- Below this is WotLK stuff. May need to be changed post beta. argentcrusade = true, frenzyheart = true, ebonblade = true, @@ -263,7 +258,15 @@ function addon:OnInitialize() } } } - }) + } + + addon.db = LibStub("AceDB-3.0"):New("ARLDB2",defaults) + + self:SetupOptions() + + -- Register slash commands + self:RegisterChatCommand("arl", "ChatCommand") + self:RegisterChatCommand("ackisrecipelist", "ChatCommand") end -- 1.7.9.5