Potential fix for an issue when the next vp reset time cannot be calculated.
This commit is contained in:
parent
d6ba74dca0
commit
2417f3b9fe
1 changed files with 9 additions and 2 deletions
|
@ -316,9 +316,14 @@ function core:UpdateChores()
|
|||
local _,_,_,earnedThisWeek = GetCurrencyInfo(396)
|
||||
|
||||
-- Store Valor Points if we were able to establish a reset time.
|
||||
if vpResetTime ~= nil then
|
||||
-- Try to alleviate issues with vpResetTime not getting set
|
||||
-- by updating vp regardless and assuming previous time is still
|
||||
-- correct.
|
||||
if db.global[realm][name].valorPoints == nil then
|
||||
db.global[realm][name].valorPoints = {}
|
||||
end
|
||||
db.global[realm][name].valorPoints.points = earnedThisWeek
|
||||
if vpResetTime ~= nil then
|
||||
db.global[realm][name].valorPoints.resetTime = vpResetTime
|
||||
end
|
||||
|
||||
|
@ -413,7 +418,9 @@ function core:GetNextVPReset()
|
|||
resetDate.sec = resetTime.sec
|
||||
|
||||
vpResetTime = time(resetDate)
|
||||
print(vpResetTime)
|
||||
else
|
||||
print('No Time')
|
||||
vpResetTime = nil
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue