1
0
Fork 0

Compare commits

...

3 Commits

1 changed files with 10 additions and 3 deletions

View File

@ -155,8 +155,10 @@ function core:OnInitialize()
self.db.global[self.character.realm][self.character.name].lockouts = {}
end
if self.db.global[self.character.realm][self.character.name].lfrs == nil and self.character.level == CURRENT_MAX_LEVEL then
self.db.global[self.character.realm][self.character.name].lfrs = {}
if self.db.global[self.character.realm][self.character.name] ~= nil then
if self.db.global[self.character.realm][self.character.name].lfrs == nil and self.character.level == CURRENT_MAX_LEVEL then
self.db.global[self.character.realm][self.character.name].lfrs = {}
end
end
-- Add LFR stuff to profile if it isn't there already
@ -254,6 +256,7 @@ function core:OnEnable()
self:RegisterEvent('LFG_LOCK_INFO_RECEIVED')
self:RegisterEvent('UPDATE_INSTANCE_INFO')
self:RegisterEvent('CURRENCY_DISPLAY_UPDATE')
self:RegisterEvent('CHAT_MSG_CURRENCY')
self:RegisterEvent('INSTANCE_ENCOUNTER_ENGAGE_UNIT')
end
@ -264,6 +267,7 @@ function core:OnEnable()
-- Reset data if necessary
core:ResetRaidLockouts()
core:ResetValorPoints()
core:ResetLFRLockouts()
end
@ -291,6 +295,10 @@ function core:LFG_LOCK_INFO_RECEIVED()
core:UpdateLFRLockouts()
end
function core:CURRENCY_DISPLAY_UPDATE()
core:UpdateValorPoints()
end
function core:CHAT_MSG_CURRENCY()
RequestRaidInfo()
RequestLFDPlayerLockInfo()
@ -383,7 +391,6 @@ function core:ResetLFRLockouts()
end
end
function core:DrawInstanceOptions()
-- Redraw our instance options everytime they are updated.
options.args.instances.args = {