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

View file

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