PermoksAccountManager

PermoksAccountManager

19.8k Downloads

Biweekly reset check not working

Lardeck opened this issue ยท 1 comments

commented

Somehow the check for the biweekly reset returns true every day.

commented

function PermoksAccountManager:CheckForReset()
local db = self.db.global
local currentTime = time()
local resetDaily = currentTime > (db.dailyReset or 0)
local resetWeekly = currentTime > (db.weeklyReset or 0)
local resetBiweekly = currentTime > (db.biweeklyReset or 0)
wipe(db.completionData)
for account, accountData in pairs(db.accounts) do
self:ResetAccount(db, accountData, resetDaily, resetWeekly, resetBiweekly)
end
db.weeklyReset = resetWeekly and currentTime + self:GetNextWeeklyResetTime() or db.weeklyReset
db.dailyReset = resetDaily and currentTime + self:GetNextDailyResetTime() or db.dailyReset
db.biweeklyReset = resetBiweekly and currentTime + self:GetNextBiWeeklyResetTime() or db.resetBiweekly
end