def _packConditions(self, svrEvents):
     result = super(_MotiveQuestInfo, self)._packConditions(svrEvents)
     descr = self.event.getDescription()
     if descr:
         result.append(
             formatters.packTextBlock(formatters.formatGray(descr)))
     return result
Example #2
0
 def _getTopConditions(self, svrEvents):
     result = []
     preBattleFmt = self.event.preBattleCond.format(svrEvents, self.event)
     if preBattleFmt is not None:
         result.extend(preBattleFmt)
     descr = self.event.getDescription()
     if descr:
         result.append(formatters.packTextBlock(formatters.formatGray(descr)))
     return formatters.todict(result)
Example #3
0
 def _getTopConditions(self, svrEvents):
     result = []
     preBattleFmt = self.event.preBattleCond.format(svrEvents, self.event)
     if preBattleFmt is not None:
         result.extend(preBattleFmt)
     descr = self.event.getDescription()
     if descr:
         result.append(formatters.packTextBlock(formatters.formatGray(descr)))
     return formatters.todict(result)
 def getDetails(self, svrEvents):
     infoList = []
     conditions = [
         formatters.todict(formatters.packQuestDetailsSeparator(
             0, 0, 5, 10))
     ]
     conditions.extend(self._getTopConditions(svrEvents))
     conditions.append(
         formatters.todict(formatters.packQuestDetailsSeparator(
             0, 0, 10, 5)))
     conditions.extend(self._getConditions(svrEvents))
     conditionsContainer = formatters.todict(
         formatters.packMotiveContainer(
             title=i18n.makeString('#quests:quests/conditions'),
             subBlocks=conditions))
     infoList.append(conditionsContainer)
     requirementContainer = formatters.todict(
         formatters.packTopLevelContainer(
             title=i18n.makeString('#quests:quests/requirements'),
             subBlocks=[
                 formatters.packTextBlock(
                     formatters.formatGray(self.event.getRequirementsStr()))
             ]))
     infoList.append(requirementContainer)
     infoList.append(
         formatters.todict(formatters.packQuestDetailsSeparator(0, 0, 5,
                                                                0)))
     tpsContainer = formatters.todict(
         formatters.packTopLevelContainer(title=i18n.makeString(
             '#quests:QuestTaskDetailsView/description'),
                                          subBlocks=[
                                              formatters.packTextBlock(
                                                  formatters.formatGray(
                                                      self.event.getTips()))
                                          ]))
     infoList.append(tpsContainer)
     return {
         'image': RES_ICONS.MAPS_ICONS_HANGARTUTORIAL_GOALSQUEST,
         'title': text_styles.highTitle(self.event.getUserName()),
         'infoList': infoList,
         'awards': self._getBonuses(svrEvents, useIconFormat=False)
     }
Example #5
0
 def _packConditions(self, svrEvents):
     result = super(_MotiveQuestInfo, self)._packConditions(svrEvents)
     descr = self.event.getDescription()
     if descr:
         result.append(formatters.packTextBlock(formatters.formatGray(descr)))
     return result
Example #6
0
 def getDetails(self, svrEvents):
     infoList = []
     conditions = [formatters.todict(formatters.packQuestDetailsSeparator(0, 0, 5, 10))]
     conditions.extend(self._getTopConditions(svrEvents))
     conditions.append(formatters.todict(formatters.packQuestDetailsSeparator(0, 0, 10, 5)))
     conditions.extend(self._getConditions(svrEvents))
     conditionsContainer = formatters.todict(formatters.packMotiveContainer(title=i18n.makeString('#quests:quests/conditions'), subBlocks=conditions))
     infoList.append(conditionsContainer)
     requirementContainer = formatters.todict(formatters.packTopLevelContainer(title=i18n.makeString('#quests:quests/requirements'), subBlocks=[formatters.packTextBlock(formatters.formatGray(self.event.getRequirementsStr()))]))
     infoList.append(requirementContainer)
     infoList.append(formatters.todict(formatters.packQuestDetailsSeparator(0, 0, 5, 0)))
     tpsContainer = formatters.todict(formatters.packTopLevelContainer(title=i18n.makeString('#quests:QuestTaskDetailsView/description'), subBlocks=[formatters.packTextBlock(formatters.formatGray(self.event.getTips()))]))
     infoList.append(tpsContainer)
     return {'image': RES_ICONS.MAPS_ICONS_HANGARTUTORIAL_GOALSQUEST,
      'title': text_styles.highTitle(self.event.getUserName()),
      'infoList': infoList,
      'awards': self._getBonuses(svrEvents, useIconFormat=False)}