Exemplo n.º 1
0
 def _packBlocks(self, *args, **kwargs):
     source = self._eventsCache.getQuests()
     quest = source.get(args[0])
     items = super(UnavailableQuestTooltipData, self)._packBlocks()
     questID = quest.getID()
     if questID in self.__eventProgressionController.questIDs:
         eventProgressionOverrides = self.__getEventProgressionOverrides()
         if eventProgressionOverrides is not None:
             items.append(eventProgressionOverrides)
             return items
     if isRankedQuestID(questID):
         rankedOverrides = self.__getRankedOverrides(quest)
         if rankedOverrides:
             items.extend(rankedOverrides)
             return items
     accountRequirementsFormatter = MissionsAccountRequirementsFormatter()
     requirements = accountRequirementsFormatter.format(
         quest.accountReqs, quest)
     reqList = self.__getList(requirements)
     if reqList:
         items.extend(
             self.__getListBlock(
                 TOOLTIPS.QUESTS_UNAVAILABLE_REQUIREMENT_HEADER, reqList))
     if not (quest.vehicleReqs.isAnyVehicleAcceptable()
             or quest.vehicleReqs.getSuitableVehicles()):
         items.extend(self.__getNotVehicle())
     items.append(
         self.__getBootom(
             backport.text(R.strings.tooltips.quests.unavailable.bottom())))
     return items
Exemplo n.º 2
0
 def _packBlocks(self, *args, **kwargs):
     source = self._eventsCache.getQuests()
     quest = source.get(args[0])
     items = super(UnavailableQuestTooltipData, self)._packBlocks()
     accountRequirementsFormatter = MissionsAccountRequirementsFormatter()
     requirements = accountRequirementsFormatter.format(
         quest.accountReqs, quest)
     reqList = self._getList(requirements)
     if reqList:
         items.extend(
             self._getListBlock(
                 TOOLTIPS.QUESTS_UNAVAILABLE_REQUIREMENT_HEADER, reqList))
     if not quest.vehicleReqs.isAnyVehicleAcceptable(
     ) or quest.vehicleReqs.getSuitableVehicles():
         items.extend(self._notVehicle())
     items.append(self._getBootom())
     return items