Use LFG_LOCK_INFO_RECEIVED for updating LFR data.
This commit is contained in:
parent
ba5151792f
commit
53974a8640
1 changed files with 7 additions and 3 deletions
|
@ -234,6 +234,7 @@ function core:OnEnable()
|
||||||
self:RegisterEvent('CALENDAR_UPDATE_EVENT_LIST')
|
self:RegisterEvent('CALENDAR_UPDATE_EVENT_LIST')
|
||||||
|
|
||||||
self:RegisterEvent('LFG_UPDATE_RANDOM_INFO')
|
self:RegisterEvent('LFG_UPDATE_RANDOM_INFO')
|
||||||
|
self:RegisterEvent('LFG_LOCK_INFO_RECEIVED')
|
||||||
self:RegisterEvent('UPDATE_INSTANCE_INFO')
|
self:RegisterEvent('UPDATE_INSTANCE_INFO')
|
||||||
|
|
||||||
self:RegisterEvent('CHAT_MSG_CURRENCY')
|
self:RegisterEvent('CHAT_MSG_CURRENCY')
|
||||||
|
@ -263,13 +264,16 @@ end
|
||||||
function core:UPDATE_INSTANCE_INFO()
|
function core:UPDATE_INSTANCE_INFO()
|
||||||
self.instanceInfoTime = time()
|
self.instanceInfoTime = time()
|
||||||
core:UpdateRaidLockouts()
|
core:UpdateRaidLockouts()
|
||||||
core:UpdateLFRLockouts()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function core:LFG_UPDATE_RANDOM_INFO()
|
function core:LFG_UPDATE_RANDOM_INFO()
|
||||||
core:UpdateValorPoints()
|
core:UpdateValorPoints()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function core:LFG_LOCK_INFO_RECEIVED()
|
||||||
|
core:UpdateLFRLockouts()
|
||||||
|
end
|
||||||
|
|
||||||
function core:CHAT_MSG_CURRENCY()
|
function core:CHAT_MSG_CURRENCY()
|
||||||
RequestRaidInfo()
|
RequestRaidInfo()
|
||||||
RequestLFDPlayerLockInfo()
|
RequestLFDPlayerLockInfo()
|
||||||
|
@ -312,7 +316,7 @@ function core:UpdateRaidLockouts()
|
||||||
local savedInstances = GetNumSavedInstances()
|
local savedInstances = GetNumSavedInstances()
|
||||||
for i = 1, savedInstances do
|
for i = 1, savedInstances do
|
||||||
local instanceName, _, instanceReset, _, _, _, _, _, _, _, _, defeatedBosses = GetSavedInstanceInfo(i)
|
local instanceName, _, instanceReset, _, _, _, _, _, _, _, _, defeatedBosses = GetSavedInstanceInfo(i)
|
||||||
|
|
||||||
if self.db.profile.instances[instanceName] ~= nil then
|
if self.db.profile.instances[instanceName] ~= nil then
|
||||||
if instanceReset > 0 then
|
if instanceReset > 0 then
|
||||||
self.db.global[self.character.realm][self.character.name].lockouts[instanceName] = {}
|
self.db.global[self.character.realm][self.character.name].lockouts[instanceName] = {}
|
||||||
|
@ -536,6 +540,7 @@ function core:DrawTooltip()
|
||||||
-- Should not update without being 100% sure our raid info is correct
|
-- Should not update without being 100% sure our raid info is correct
|
||||||
core:UpdateValorPoints()
|
core:UpdateValorPoints()
|
||||||
core:UpdateRaidLockouts()
|
core:UpdateRaidLockouts()
|
||||||
|
core:UpdateLFRLockouts()
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.tooltip then
|
if self.tooltip then
|
||||||
|
@ -704,7 +709,6 @@ end
|
||||||
|
|
||||||
--[[ PROFILE UPDATES ]]--
|
--[[ PROFILE UPDATES ]]--
|
||||||
function core:LFRProfileUpdate()
|
function core:LFRProfileUpdate()
|
||||||
print('updating lfrs')
|
|
||||||
for realm,realmTable in pairs(self.db.global) do
|
for realm,realmTable in pairs(self.db.global) do
|
||||||
for name in pairs(realmTable) do
|
for name in pairs(realmTable) do
|
||||||
if self.db.global[realm][name].lfrs == nil then
|
if self.db.global[realm][name].lfrs == nil then
|
||||||
|
|
Loading…
Reference in a new issue