addon.db = LibStub("AceDB-3.0"):New("NightWatchDB", Default_Profile, "Default") |
db = addon.db.profile |
|
addon.db.RegisterCallback( self, "OnNewProfile", "handleProfileChanges" ) |
addon.db.RegisterCallback( self, "OnProfileReset", "handleProfileChanges" ) |
addon.db.RegisterCallback( self, "OnProfileChanged", "handleProfileChanges" ) |
addon.db.RegisterCallback( self, "OnProfileCopied", "handleProfileChanges" ) |
-- addon.db.RegisterCallback( self, "OnNewProfile", "profileChanged" ) -- OnProfileChanged seems to cover new profiles too. |
addon.db.RegisterCallback( self, "OnProfileReset", "profileChanged" ) |
addon.db.RegisterCallback( self, "OnProfileChanged", "profileChanged" ) |
addon.db.RegisterCallback( self, "OnProfileCopied", "profileChanged" ) |
|
LibStub("AceConfig-3.0"):RegisterOptionsTable("NightWatch", addon:makeOptions()) |
LibStub("AceConfigDialog-3.0"):AddToBlizOptions("NightWatch", "NightWatch") |
addon:RegisterChatCommand("nw", "chatCommand") |
addon:RegisterChatCommand("nightwatch", "chatCommand") |
|
for i = 1, #sink do |
sink[i]:SetSinkStorage(db.sinkStorage[i]) |
end |
|
addon:dbUpgrade() |
addon:resetSelected() |
addon:profileChanged() |
end |
|
|