def isDailyQuestsRefreshAvailable(self):
     if self.hasPrimeTimesLeftForCurrentCycle():
         return True
     primeTimePeriodsForDay = self.getPrimeTimesForDay(
         time_utils.getCurrentLocalServerTimestamp())
     if primeTimePeriodsForDay:
         _, periodTimeEnd = max(primeTimePeriodsForDay.values(),
                                key=itemgetter(1))
         periodTimeLeft = periodTimeEnd - time_utils.getCurrentLocalServerTimestamp(
         )
         return periodTimeLeft > time_utils.getDayTimeLeft()
     return False
Ejemplo n.º 2
0
 def isDailyQuestsRefreshAvailable(self):
     dayTimeLeft = time_utils.getDayTimeLeft()
     cycleTimeLeft = self.getCurrentCycleTimeLeft()
     currentPrimeTimeEnd = self.getCurrentPrimeTimeEnd()
     if currentPrimeTimeEnd is None:
         return False
     else:
         primeTimeTimeLeft = currentPrimeTimeEnd - time_utils.getCurrentLocalServerTimestamp(
         )
         state1 = self.hasPrimeTimesLeft(
         ) or primeTimeTimeLeft > dayTimeLeft
         state2 = cycleTimeLeft > dayTimeLeft
         return state1 and state2
Ejemplo n.º 3
0
    def isDailyQuestsRefreshAvailable(self):
        if self.hasPrimeTimesLeftForCurrentCycle():
            return True
        serversPeriodsMapping = self.getPrimeTimesForDay(
            time_utils.getCurrentLocalServerTimestamp())
        periods = []
        for _, dayPeriods in serversPeriodsMapping.items():
            periods.append(max([periodEnd for _, periodEnd in dayPeriods]))

        if periods:
            periodTimeLeft = max(
                periods) - time_utils.getCurrentLocalServerTimestamp()
            return periodTimeLeft > time_utils.getDayTimeLeft()
        return False
Ejemplo n.º 4
0
def getTimerGameDayLeft():
    return time_utils.getDayTimeLeft() + 1
Ejemplo n.º 5
0
 def __updateProgressionTimer(self, model=None):
     model.giftsProgression.setResetDelta(getDayTimeLeft())
Ejemplo n.º 6
0
 def __updateClearingTimer(self):
     self.viewModel.setRebootTimer(getDayTimeLeft())