Beispiel #1
0
 def _packBlocks(self, *args, **kwargs):
     items = super(RankedQuestsPreviewTooltip, self)._packBlocks()
     quests = self.__eventsCache.getActiveQuests(
         lambda quest: isRankedDaily(quest.getID())).values()
     quests.sort(key=lambda q: (q.isCompleted(), not q.isAvailable().
                                isValid, -q.getPriority()))
     season = self.__rankedController.getCurrentSeason()
     if quests and season is not None:
         isLeagues = self.__rankedController.isAccountMastered()
         isAnyPrimeNow = self.__rankedController.hasAvailablePrimeTimeServers(
         )
         isAnyPrimeLeftTotal = self.__rankedController.hasPrimeTimesTotalLeft(
         )
         isGlobalAvailable = not isLeagues or not isAnyPrimeNow or not isAnyPrimeLeftTotal
         diff = len(quests) - _MAX_VISIBLE_QUESTS
         visibleQuests = quests[:_MAX_VISIBLE_QUESTS]
         awardsFormatter = getDefaultAwardFormatter()
         description = self.__packDescription(quests, season, isLeagues,
                                              isAnyPrimeNow,
                                              isAnyPrimeLeftTotal)
         items.append(self.__packHeader(description))
         items.extend([
             self.__packQuest(q, isGlobalAvailable, awardsFormatter)
             for q in visibleQuests
         ])
         items.extend(self.__packBottom(diff))
     return items
Beispiel #2
0
 def __init__(self):
     super(LinkedSetDetailsOverlay, self).__init__()
     self._quests = None
     self.__opener = None
     self._missionID = None
     self._selectedQuestID = 0
     self._pageCount = 0
     self._isSetupedFlashAnimTexts = False
     self._formatter = getDefaultAwardFormatter()
     self.unSeenQuestsCount = 0
     return
Beispiel #3
0
 def _getAwardComposer(self):
     return CurtailingAwardsComposer(_ADDITIONAL_AWARDS_COUNT,
                                     getDefaultAwardFormatter())
Beispiel #4
0
 def _getAwardComposer(self):
     return RawLabelBonusComposer(getDefaultAwardFormatter())