1
0
Fork 0

Settup lockouts table if not already created.

This commit is contained in:
Andrew Tomaka 2011-08-21 12:23:18 -04:00
parent 49f6b9a70d
commit 8cd87d2029
1 changed files with 8 additions and 5 deletions

View File

@ -11,6 +11,7 @@ local defaults = {
profile = {
valorPoints = {},
lockouts = {},
updated = {},
}
}
@ -19,6 +20,12 @@ function core:OnInitialize()
end
function core:OnEnable()
local name = UnitName('player')
if self.db.profile.lockouts[name] == nil then
self.db.profile.lockouts[name] = {}
end
self:RegisterEvent('UPDATE_INSTANCE_INFO','StoreChores')
end
@ -35,11 +42,7 @@ function core:StoreChores()
for i = 0, savedInstances do
local instanceName,_,instanceReset,_,_,_,_,_,_,_,_,defeatedBosses = GetSavedInstanceInfo(i)
if trackedInstances[instanceName] == true then
if self.db.profile.lockouts[name] == nil then
self.db.profile.lockouts[name] = {}
end
if trackedInstances[instanceName] == true then
if instanceReset > 0 then
self.db.profile.lockouts[name][instanceName] = defeatedBosses
else