comparison core.lua @ 98:b5a55c69ef67

Properly switch between profiles.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Fri, 27 Jul 2012 19:09:29 +0000
parents ba5ff82dcf19
children 966d06c8d9c9
comparison
equal deleted inserted replaced
97:ba5ff82dcf19 98:b5a55c69ef67
696 end 696 end
697 end 697 end
698 698
699 699
700 ------ Ace3 framework stuff 700 ------ Ace3 framework stuff
701 function addon:DBProfileRefresh()
702 opts = self.db.profile
703 end
704
701 function addon:OnInitialize() 705 function addon:OnInitialize()
702 if self.author_debug then 706 if self.author_debug then
703 _G.OL = self 707 _G.OL = self
704 _G.g_uniques = g_uniques 708 _G.g_uniques = g_uniques
705 end 709 end
726 else 730 else
727 virgin = nil 731 virgin = nil
728 end 732 end
729 self.db = _G.LibStub("AceDB-3.0"):New("OuroLootOptsDB", 733 self.db = _G.LibStub("AceDB-3.0"):New("OuroLootOptsDB",
730 { profile = option_defaults } , --[[Default=]]true) 734 { profile = option_defaults } , --[[Default=]]true)
731 opts = self.db.profile 735 self.db.RegisterCallback (self, "OnProfileChanged", "DBProfileRefresh")
736 self.db.RegisterCallback (self, "OnProfileCopied", "DBProfileRefresh")
737 self.db.RegisterCallback (self, "OnProfileReset", "DBProfileRefresh")
738 self:DBProfileRefresh()
732 739
733 --[[ 740 --[[
734 local stored_datarev = opts.datarev or 14 741 local stored_datarev = opts.datarev or 14
735 for opt,default in pairs(option_defaults) do 742 for opt,default in pairs(option_defaults) do
736 if opts[opt] == nil then 743 if opts[opt] == nil then