I've been at this for hours and I'm not sure why it isn't working. I've been successful with AceDB with my previous Addon, but the only thing ending up in this addon's SavedVariables table is the profile keys; the data shown in the "defaults" table below is nowhere to be found.
File Structure
Code:
[root_folder][Libs][AceAddon-3.0]
[AceConfig-3.0]
[AceConsole-3.0]
[AceDB-3.0]
[AceEvent-3.0]
[AceGUI-3.0]
[AceHook-3.0]
[AceTimer-3.0]
[CallbackHandler-1.0]
[LibStub]
Ace3.lua
Ace3.toc
load_libraries.xml
core.lua
SuperCrits.toc
load_llibraries.xml
xml Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/">
<Script file="LibStub\LibStub.lua"/>
<Include file="CallbackHandler-1.0\CallbackHandler-1.0.xml"/>
<Include file="AceAddon-3.0\AceAddon-3.0.xml"/>
<Include file="AceEvent-3.0\AceEvent-3.0.xml"/>
<Include file="AceConsole-3.0\AceConsole-3.0.xml"/>
<Include file="AceDB-3.0\AceDB-3.0.xml"/>
<Include file="AceTimer-3.0\AceTimer-3.0.xml"/>
<Include file="AceHook-3.0\AceHook-3.0.xml"/>
<Include file="AceConfig-3.0\AceConfig-3.0.xml"/>
<Script file="LibDataBroker\LibDataBroker-1.1.lua"/>
</Ui>
TOC File
Code:
## Interface: 70300
## Title: Super Crits
## Notes: Super Crits Description
## Author: Sweetsour
## Version: r01-beta
## SavedVariables: SCritsDB
## OptionalDeps: Ace3, LibAboutPanel
Libs\load_libraries.xml
core.lua
core.lua
Lua Code:
local FOLDER_NAME, SC = ...
local SCrits = LibStub('AceAddon-3.0'):NewAddon("SuperCrits", 'AceConsole-3.0','AceEvent-3.0','AceHook-3.0','AceTimer-3.0')
local defaults = {
char = {
damaging = {
pet = true,
dots = true,
damage = true,
threshold = {
enabled = false,
value = 2000000,
},
},
},
}
function SCrits:OnInitialize()
self.db = LibStub("AceDB-3.0"):New("SCritsDB",defaults)
end
function SCrits:OnEnable()
self:RegisterEvent("PLAYER_REGEN_DISABLED")
end
function SCrits:PLAYER_REGEN_DISABLED()
self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
self:RegisterEvent("PLAYER_REGEN_ENABLED")
end
function SCrits:PLAYER_REGEN_ENABLED()
self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
self:UnregisterEvent("PLAYER_REGEN_ENABLED")
end
function SCrits:COMBAT_LOG_EVENT_UNFILTERED(event,...)
end