1
0
Fork 0

Store Valor Points in DB for later retrieval.

This commit is contained in:
Andrew Tomaka 2011-08-20 07:41:29 -04:00
commit 704bd43c4c
3 changed files with 46 additions and 0 deletions

7
.pkgmeta Normal file
View file

@ -0,0 +1,7 @@
package-as: ChoreTracker
externals:
Libs/LibStub: svn://svn.wowace.com/wow/libstub/mainline/trunk
Libs/AceAddon-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceAddon-3.0
Libs/AceConsole-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConsole-3.0
Libs/AceEvent-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceEvent-3.0

25
ChoreTracker.lua Normal file
View file

@ -0,0 +1,25 @@
ChoreTracker = LibStub('AceAddon-3.0'):NewAddon('ChoreTracker','AceConsole-3.0','AceEvent-3.0')
local core = ChoreTracker
local defaults = {
profile = {
valorPoints = {},
lockouts = {},
}
}
function core:OnInitialize()
self.db = LibStub('AceDB-3.0'):New('ChoreTrackerDB',defaults,'Default')
end
function core:OnEnable()
self:RegisterEvent('PLAYER_ENTERING_WORLD','StoreValorPoints')
end
function core:StoreValorPoints()
local _,_,_,earnedThisWeek = GetCurrencyInfo(396)
local name = UnitName('player')
self.db.profile.valorPoints[name] = earnedThisWeek
print('Storing',earnedThisWeek,'for',name)
end

14
ChoreTracker.toc Normal file
View file

@ -0,0 +1,14 @@
## Interface: 42000
## Title: ChoreTracker
## Version: @project-version@
## Author: Gaffer
## Notes: Reminding you to do your chores just like your mother.
## DefaultState: enabled
## SavedVariables: ChoreTrackerDB
Libs\LibStub\LibStub.lua
Libs\AceAddon-3.0\AceAddon-3.0.xml
Libs\AceConsole-3.0\AceConsole-3.0.xml
Libs\AceEvent-3.0\AceEvent-3.0.xml
ChoreTracker.lua