Settup lockouts table if not already created.
This commit is contained in:
parent
49f6b9a70d
commit
8cd87d2029
1 changed files with 8 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
@ -36,10 +43,6 @@ function core:StoreChores()
|
|||
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 instanceReset > 0 then
|
||||
self.db.profile.lockouts[name][instanceName] = defeatedBosses
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue