1
0
Fork 0

Only store Valor Points if the reset time can be retrieved.

This commit is contained in:
Andrew Tomaka 2011-08-31 12:51:17 -04:00
parent 30ba107491
commit b37b1baac0

View file

@ -158,9 +158,11 @@ function core:UpdateChores()
local vpReset = core:GetNextVPReset() local vpReset = core:GetNextVPReset()
--store Valor Points --store Valor Points
if vpReset ~= nil then
self.db.global.valorPoints[name] = {} self.db.global.valorPoints[name] = {}
self.db.global.valorPoints[name].points = earnedThisWeek self.db.global.valorPoints[name].points = earnedThisWeek
self.db.global.valorPoints[name].resetTime = vpReset self.db.global.valorPoints[name].resetTime = vpReset
end
--store Saved Instances --store Saved Instances
local savedInstances = GetNumSavedInstances() local savedInstances = GetNumSavedInstances()
@ -228,7 +230,7 @@ function core:GetNextVPReset()
local title,hour,minute = CalendarGetDayEvent(monthOffset, day, i) local title,hour,minute = CalendarGetDayEvent(monthOffset, day, i)
if(title == 'Baradin Hold') then if title == 'Baradin Hold' then
resetDate = { year = year, month = month + monthOffset, day = day } resetDate = { year = year, month = month + monthOffset, day = day }
end end
end end
@ -251,5 +253,7 @@ function core:GetNextVPReset()
resetDate.sec = resetTime.sec resetDate.sec = resetTime.sec
return time(resetDate) return time(resetDate)
else
return nil
end end
end end