def __getBonuses(self, chapter, useIconFormat=False):
        if not chapter.isBonusReceived(g_itemsCache.items.stats.tutorialsCompleted):
            result = []
            iconResult = []
            output = []
            bonus = chapter.getBonus()
            if bonus is not None:
                for n, v in bonus.getValues().iteritems():
                    b = getTutorialBonusObj(n, v)
                    if b is not None:
                        if b.hasIconFormat() and useIconFormat:
                            iconResult.extend(b.getList())
                        else:
                            flist = b.formattedList()
                            if flist:
                                result.extend(flist)

            if len(result):
                output.append(formatters.packSimpleBonusesBlock(result))
            if len(iconResult):
                output.append(formatters.packIconAwardBonusBlock(iconResult))
            return formatters.todict(output)
        else:
            return formatters.todict([formatters.packTextBlock("#quests:beginnerQuests/details/noAward")])
            return
Ejemplo n.º 2
0
    def __getBonuses(self, chapter, useIconFormat = False):
        if not chapter.isBonusReceived(g_itemsCache.items.stats.tutorialsCompleted):
            result = []
            iconResult = []
            output = []
            bonus = chapter.getBonus()
            if bonus is not None:
                for n, v in bonus.getValues().iteritems():
                    b = getTutorialBonusObj(n, v)
                    if b is not None:
                        if b.hasIconFormat() and useIconFormat:
                            iconResult.extend(b.getList())
                        else:
                            flist = b.formattedList()
                            if flist:
                                result.extend(flist)

            if len(result):
                output.append(formatters.packSimpleBonusesBlock(result))
            if len(iconResult):
                output.append(formatters.packIconAwardBonusBlock(iconResult))
            return formatters.todict(output)
        else:
            return formatters.todict([formatters.packTextBlock('#quests:beginnerQuests/details/noAward')])
            return
Ejemplo n.º 3
0
 def _getBonuses(self, svrEvents, bonuses=None):
     bonuses = bonuses or self.event.getBonuses()
     result = OldStyleBonusesFormatter(
         self.event).getFormattedBonuses(bonuses)
     return formatters.todict(result) if result else formatters.todict([
         formatters.packTextBlock(
             text_styles.alert('#quests:bonuses/notAvailable'))
     ])
Ejemplo n.º 4
0
 def _getRequirements(self, svrEvents):
     result = []
     accReqsFmt = self.event.accountReqs.format(svrEvents, self.event)
     if accReqsFmt is not None:
         result.append(formatters.todict(accReqsFmt))
     vehReqsFmt = self.event.vehicleReqs.format(svrEvents, self.event)
     if vehReqsFmt is not None:
         result.append(formatters.todict(vehReqsFmt))
     return result
Ejemplo n.º 5
0
 def _getRequirements(self, svrEvents):
     result = []
     accReqsFmt = self.event.accountReqs.format(svrEvents, self.event)
     if accReqsFmt is not None:
         result.append(formatters.todict(accReqsFmt))
     vehReqsFmt = self.event.vehicleReqs.format(svrEvents, self.event)
     if vehReqsFmt is not None:
         result.append(formatters.todict(vehReqsFmt))
     return result
Ejemplo n.º 6
0
    def _getBonuses(self, svrEvents, bonuses=None, useIconFormat=False):
        bonuses = bonuses or self.event.getBonuses()
        result, simpleBonusesList, customizationsList, vehiclesList, iconBonusesList = (
            [], [], [], [], [])
        for b in bonuses:
            if b.isShowInGUI():
                if b.getName() == 'dossier':
                    for achieve in b.getAchievements():
                        result.append(
                            formatters.packAchieveElementByItem(achieve))

                elif b.getName() == 'customizations':
                    customizationsList.extend(b.getList())
                elif b.getName() == 'vehicles':
                    flist = b.formattedList()
                    if flist:
                        vehiclesList.extend(flist)
                elif b.hasIconFormat() and useIconFormat:
                    iconBonusesList.extend(b.getList())
                else:
                    flist = b.formattedList()
                    if flist:
                        simpleBonusesList.extend(flist)

        if len(customizationsList):
            result.append(formatters.packCustomizations(customizationsList))
        if len(iconBonusesList):
            result.append(formatters.packIconAwardBonusBlock(iconBonusesList))
        if len(vehiclesList) > 0:
            vehiclesLbl, _ = self._joinUpToMax(vehiclesList)
            result.append(
                formatters.packVehiclesBonusBlock(vehiclesLbl,
                                                  str(self.event.getID())))
        if len(simpleBonusesList) > 0:
            result.append(formatters.packSimpleBonusesBlock(simpleBonusesList))
        parents = [
            qID for _, qIDs in self.event.getParents().iteritems()
            for qID in qIDs
        ]
        for qID, q in self._getEventsByIDs(parents, svrEvents
                                           or {}).iteritems():
            result.append(
                formatters.packTextBlock(i18n.makeString(
                    '#quests:bonuses/item/task', q.getUserName()),
                                         questID=qID))

        if len(result):
            return formatters.todict(result)
        return formatters.todict([
            formatters.packTextBlock(
                text_styles.alert('#quests:bonuses/notAvailable'))
        ])
Ejemplo n.º 7
0
def __makeAwardsVO(item, level, vehicleIntCD):
    count = item.descriptor.progression.autoGrantCount
    if count < 1:
        return []
    if level > 1:
        bonusDesc = backport.text(
            R.strings.battle_results.customizationProgress.award.newLevel(),
            name=item.userName,
            level=level)
    else:
        bonusDesc = backport.text(
            R.strings.battle_results.customizationProgress.award.received(),
            name=item.userName,
            count=backport.text(
                R.strings.vehicle_customization.elementBonus.factor(),
                count=count))
    award = {
        'intCD': item.intCD,
        'texture': item.icon,
        'value': count,
        'showPrice': False,
        'description': bonusDesc,
        'vehicleIntCD': vehicleIntCD
    }
    return formatters.todict([formatters.packCustomizations([award])])
Ejemplo n.º 8
0
 def _getConditions(self, svrEvents):
     subBlocks = []
     bonus = self.event.bonusCond
     battlesLeft, battlesCount, inrow = None, None, False
     battles = bonus.getConditions().find('battles')
     if battles is not None:
         battlesCount = battles._getTotalValue()
         if not self.event.isCompleted() and bonus.getGroupByValue() is None:
             progress = battles.getProgressPerGroup()
             if None in progress:
                 curProg, totalProg, _, _ = progress[None]
                 battlesLeft = totalProg - curProg
     bonusFmtConds = bonus.format(svrEvents, event=self.event)
     if len(bonusFmtConds):
         subBlocks.extend(formatters.indexing(bonusFmtConds))
     postBattleFmtConds = self.event.postBattleCond.format(svrEvents, event=self.event)
     if len(postBattleFmtConds):
         if len(bonusFmtConds):
             subBlocks.append(formatters.packSeparator(label=i18n.makeString('#quests:details/conditions/postBattle/separator')))
         subBlocks.extend(formatters.indexing(postBattleFmtConds))
     if bonus.isDaily():
         resetHourOffset = (time_utils.ONE_DAY - self._getDailyProgressResetTimeOffset()) / 3600
         if resetHourOffset >= 0:
             subBlocks.append(formatters.packTextBlock(label=formatters.formatYellow('#quests:details/conditions/postBattle/dailyReset') % {'time': time.strftime(i18n.makeString('#quests:details/conditions/postBattle/dailyReset/timeFmt'), time_utils.getTimeStructInLocal(time_utils.getTimeTodayForUTC(hour=resetHourOffset)))}))
     result = []
     if len(subBlocks) or battlesCount:
         if not self.event.isGuiDisabled():
             result.append(formatters.packConditionsBlock(battlesCount, battlesLeft, bonus.isInRow(), conditions=subBlocks))
         else:
             result.append(formatters.packConditionsBlock(conditions=subBlocks))
     if bonus.getGroupByValue() is not None and not self.event.isGuiDisabled():
         progressesFmt = bonus.formatGroupByProgresses(svrEvents, self.event)
         if len(progressesFmt):
             result.append(formatters.packTopLevelContainer(i18n.makeString('#quests:details/conditions/groupBy/%s' % bonus.getGroupByValue()), subBlocks=progressesFmt, isResizable=len(progressesFmt) > 5))
     return formatters.todict(result)
Ejemplo n.º 9
0
    def _getConditions(self, svrEvents):
        modifiers = defaultdict(list)
        for m in self.event.getModifiers():
            fmtResult = m.format(self.event)
            if fmtResult is not None:
                if isinstance(fmtResult, types.DictType):
                    for fDType, fData in fmtResult.iteritems():
                        modifiers[fDType].extend(fData)

                else:
                    modifiers[m.getType()].extend(fmtResult)

        result = []
        if len(modifiers[ACTION_MODIFIER_TYPE.DISCOUNT]):
            result.append(
                formatters.packTopLevelContainer(
                    i18n.makeString(QUESTS.DETAILS_MODIFIERS_TITLE_DISCOUNT),
                    subBlocks=modifiers[ACTION_MODIFIER_TYPE.DISCOUNT]))
        availabilityModifiers = modifiers.get(
            ACTION_MODIFIER_TYPE.AVAILABILITY, [])
        if len(availabilityModifiers):
            result.append(
                formatters.packTopLevelContainer(
                    i18n.makeString(
                        QUESTS.DETAILS_MODIFIERS_TITLE_AVAILABILITY),
                    subBlocks=availabilityModifiers))
        if len(modifiers[ACTION_MODIFIER_TYPE.RENT]):
            result.append(
                formatters.packTopLevelContainer(
                    i18n.makeString(QUESTS.DETAILS_MODIFIERS_TITLE_DISCOUNT),
                    subBlocks=modifiers[ACTION_MODIFIER_TYPE.RENT]))
        for fmtData in modifiers[ACTION_MODIFIER_TYPE.SELLING]:
            result.append(fmtData)

        return formatters.todict(result)
Ejemplo n.º 10
0
 def _getConditions(self, svrEvents):
     subBlocks = []
     bonus = self.event.bonusCond
     battlesLeft, battlesCount, inrow = None, None, False
     battles = bonus.getConditions().find('battles')
     if battles is not None:
         battlesCount = battles._getTotalValue()
         if not self.event.isCompleted() and bonus.getGroupByValue() is None:
             progress = battles.getProgressPerGroup()
             if None in progress:
                 curProg, totalProg, _, _ = progress[None]
                 battlesLeft = totalProg - curProg
     bonusFmtConds = bonus.format(svrEvents, event=self.event)
     if len(bonusFmtConds):
         subBlocks.extend(formatters.indexing(bonusFmtConds))
     postBattleFmtConds = self.event.postBattleCond.format(svrEvents, event=self.event)
     if len(postBattleFmtConds):
         if len(bonusFmtConds):
             subBlocks.append(formatters.packSeparator(label=i18n.makeString('#quests:details/conditions/postBattle/separator')))
         subBlocks.extend(formatters.indexing(postBattleFmtConds))
     if bonus.isDaily():
         resetHourOffset = (time_utils.ONE_DAY - self._getDailyProgressResetTimeOffset()) / 3600
         if resetHourOffset >= 0:
             subBlocks.append(formatters.packTextBlock(label=formatters.formatYellow('#quests:details/conditions/postBattle/dailyReset') % {'time': time.strftime(i18n.makeString('#quests:details/conditions/postBattle/dailyReset/timeFmt'), time_utils.getTimeStructInLocal(time_utils.getTimeTodayForUTC(hour=resetHourOffset)))}))
     result = []
     if len(subBlocks) or battlesCount:
         if not self.event.isGuiDisabled():
             result.append(formatters.packConditionsBlock(battlesCount, battlesLeft, bonus.isInRow(), conditions=subBlocks))
         else:
             result.append(formatters.packConditionsBlock(conditions=subBlocks))
     if bonus.getGroupByValue() is not None and not self.event.isGuiDisabled():
         progressesFmt = bonus.formatGroupByProgresses(svrEvents, self.event)
         if len(progressesFmt):
             result.append(formatters.packTopLevelContainer(i18n.makeString('#quests:details/conditions/groupBy/%s' % bonus.getGroupByValue()), subBlocks=progressesFmt, isResizable=len(progressesFmt) > 5))
     return formatters.todict(result)
Ejemplo n.º 11
0
    def _getBonuses(self, svrEvents, bonuses = None):
        bonuses = bonuses or self.event.getBonuses()
        result, simpleBonusesList, customizationsList = [], [], []
        for b in bonuses:
            if b.isShowInGUI():
                if b.getName() == 'dossier':
                    for record in b.getRecords():
                        if record[0] != ACHIEVEMENT_BLOCK.RARE:
                            result.append(formatters.packAchieveElement(RECORD_DB_IDS[record]))

                elif b.getName() == 'customizations':
                    customizationsList.extend(b.getList())
                else:
                    flist = b.formattedList()
                    if flist:
                        simpleBonusesList.extend(flist)

        label = ', '.join(simpleBonusesList)
        fullLabel = None
        if len(simpleBonusesList) > self.SIMPLE_BONUSES_MAX_ITEMS:
            label = ', '.join(simpleBonusesList[:self.SIMPLE_BONUSES_MAX_ITEMS]) + '..'
            fullLabel = ', '.join(simpleBonusesList)
        result.append(formatters.packTextBlock(label, fullLabel=fullLabel))
        if len(customizationsList):
            result.append(formatters.packCustomizations(customizationsList))
        parents = [ qID for _, qIDs in self.event.getParents().iteritems() for qID in qIDs ]
        for qID, q in self._getEventsByIDs(parents, svrEvents or {}).iteritems():
            result.append(formatters.packTextBlock(i18n.makeString('#quests:bonuses/item/task', q.getUserName()), questID=qID))

        if len(result):
            return formatters.todict(result)
        else:
            return []
Ejemplo n.º 12
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)
Ejemplo n.º 13
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)
Ejemplo n.º 14
0
    def _getBonuses(self, svrEvents, bonuses = None):
        bonuses = bonuses or self.event.getBonuses()
        result = []
        for b in bonuses:
            if b.isShowInGUI():
                result.append(b.format())

        if len(result):
            return formatters.todict([formatters.packTextBlock(', '.join(result))])
        return []
Ejemplo n.º 15
0
    def _getBonuses(self, svrEvents, bonuses = None, useIconFormat = False):
        bonuses = bonuses or self.event.getBonuses()
        result, simpleBonusesList, customizationsList, vehiclesList, iconBonusesList = ([],
         [],
         [],
         [],
         [])
        for b in bonuses:
            if b.isShowInGUI():
                if b.getName() == 'dossier':
                    for record in b.getRecords():
                        if record[0] != ACHIEVEMENT_BLOCK.RARE:
                            result.append(formatters.packAchieveElement(RECORD_DB_IDS[record]))

                elif b.getName() == 'customizations':
                    customizationsList.extend(b.getList())
                elif b.getName() == 'vehicles':
                    flist = b.formattedList()
                    if flist:
                        vehiclesList.extend(flist)
                elif b.hasIconFormat() and useIconFormat:
                    iconBonusesList.extend(b.getList())
                else:
                    flist = b.formattedList()
                    if flist:
                        simpleBonusesList.extend(flist)

        if len(customizationsList):
            result.append(formatters.packCustomizations(customizationsList))
        if len(iconBonusesList):
            result.append(formatters.packIconAwardBonusBlock(iconBonusesList))
        if len(vehiclesList) > 0:
            vehiclesLbl, _ = self._joinUpToMax(vehiclesList)
            result.append(formatters.packVehiclesBonusBlock(vehiclesLbl, str(self.event.getID())))
        if len(simpleBonusesList) > 0:
            result.append(formatters.packSimpleBonusesBlock(simpleBonusesList))
        parents = [ qID for _, qIDs in self.event.getParents().iteritems() for qID in qIDs ]
        for qID, q in self._getEventsByIDs(parents, svrEvents or {}).iteritems():
            result.append(formatters.packTextBlock(i18n.makeString('#quests:bonuses/item/task', q.getUserName()), questID=qID))

        if len(result):
            return formatters.todict(result)
        return formatters.todict([formatters.packTextBlock(text_styles.alert('#quests:bonuses/notAvailable'))])
Ejemplo n.º 16
0
    def _getBonuses(self, svrEvents, bonuses = None, useIconFormat = False):
        bonuses = bonuses or self.event.getBonuses()
        result = []
        for b in bonuses:
            if b.isShowInGUI():
                result.append(b.format())

        if len(result):
            return formatters.todict([formatters.packTextBlock(', '.join(result))])
        return []
    def __getBonuses(self, chapter):
        result = []
        bonus = chapter.getBonus()
        if bonus is not None:
            for n, v in bonus.getValues().iteritems():
                b = getTutorialBonusObj(n, v)
                if b is not None:
                    result.append(b.format())

        if len(result):
            return formatters.todict([formatters.packTextBlock(', '.join(result))])
        return []
Ejemplo n.º 18
0
    def _getConditions(self, svrEvents):
        modifiers = defaultdict(list)
        for m in self.event.getModifiers():
            fmtData = m.format(self.event)
            if fmtData is not None:
                modifiers[m.getType()].extend(fmtData)

        result = []
        if len(modifiers[ACTION_MODIFIER_TYPE.DISCOUNT]):
            result.append(formatters.packTopLevelContainer(i18n.makeString(QUESTS.DETAILS_MODIFIERS_TITLE_DISCOUNT), subBlocks=modifiers[ACTION_MODIFIER_TYPE.DISCOUNT]))
        if len(modifiers[ACTION_MODIFIER_TYPE.RENT]):
            result.append(formatters.packTopLevelContainer(i18n.makeString(QUESTS.DETAILS_MODIFIERS_TITLE_DISCOUNT), subBlocks=modifiers[ACTION_MODIFIER_TYPE.RENT]))
        for fmtData in modifiers[ACTION_MODIFIER_TYPE.SELLING]:
            result.append(fmtData)

        return formatters.todict(result)
Ejemplo n.º 19
0
    def _getBonuses(self, svrEvents, bonuses = None):
        bonuses = bonuses or self.event.getBonuses()
        result, simpleBonusesList, customizationsList, vehiclesList = ([],
         [],
         [],
         [])
        for b in bonuses:
            if b.isShowInGUI():
                flist = []
                if b.getName() == 'dossier':
                    for record in b.getRecords():
                        if record[0] != ACHIEVEMENT_BLOCK.RARE:
                            result.append(formatters.packAchieveElement(RECORD_DB_IDS[record]))

                elif b.getName() == 'customizations':
                    customizationsList.extend(b.getList())
                elif b.getName() == 'vehicles':
                    flist = b.formattedList()
                    if flist:
                        vehiclesList.extend(flist)
                else:
                    flist = b.formattedList()
                    if flist:
                        simpleBonusesList.extend(flist)

        label = ', '.join(simpleBonusesList)
        fullLabel = None
        if len(simpleBonusesList) > self.SIMPLE_BONUSES_MAX_ITEMS:
            label = ', '.join(simpleBonusesList[:self.SIMPLE_BONUSES_MAX_ITEMS]) + '..'
            fullLabel = ', '.join(simpleBonusesList)
        result.append(formatters.packTextBlock(label, fullLabel=fullLabel))
        vehiclesLbl = ', '.join(vehiclesList)
        if len(vehiclesList) > self.SIMPLE_BONUSES_MAX_ITEMS:
            vehiclesLbl = ', '.join(vehiclesList[:self.SIMPLE_BONUSES_MAX_ITEMS]) + '..'
        result.append(formatters.packVehiclesBonusBlock(vehiclesLbl, str(self.event.getID())))
        if len(customizationsList):
            result.append(formatters.packCustomizations(customizationsList))
        parents = [ qID for _, qIDs in self.event.getParents().iteritems() for qID in qIDs ]
        for qID, q in self._getEventsByIDs(parents, svrEvents or {}).iteritems():
            result.append(formatters.packTextBlock(i18n.makeString('#quests:bonuses/item/task', q.getUserName()), questID=qID))

        if len(result):
            return formatters.todict(result)
        return []
Ejemplo n.º 20
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)}
Ejemplo n.º 21
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)}
Ejemplo n.º 22
0
    def _getConditions(self, svrEvents):
        modifiers = defaultdict(list)
        for m in self.event.getModifiers():
            fmtResult = m.format(self.event)
            if fmtResult is not None:
                if isinstance(fmtResult, types.DictType):
                    for fDType, fData in fmtResult.iteritems():
                        modifiers[fDType].extend(fData)

                else:
                    modifiers[m.getType()].extend(fmtResult)

        result = []
        if len(modifiers[ACTION_MODIFIER_TYPE.DISCOUNT]):
            result.append(
                formatters.packTopLevelContainer(
                    i18n.makeString(QUESTS.DETAILS_MODIFIERS_TITLE_DISCOUNT),
                    subBlocks=modifiers[ACTION_MODIFIER_TYPE.DISCOUNT],
                )
            )
        availabilityModifiers = modifiers.get(ACTION_MODIFIER_TYPE.AVAILABILITY, [])
        if len(availabilityModifiers):
            result.append(
                formatters.packTopLevelContainer(
                    i18n.makeString(QUESTS.DETAILS_MODIFIERS_TITLE_AVAILABILITY), subBlocks=availabilityModifiers
                )
            )
        if len(modifiers[ACTION_MODIFIER_TYPE.RENT]):
            result.append(
                formatters.packTopLevelContainer(
                    i18n.makeString(QUESTS.DETAILS_MODIFIERS_TITLE_DISCOUNT),
                    subBlocks=modifiers[ACTION_MODIFIER_TYPE.RENT],
                )
            )
        for fmtData in modifiers[ACTION_MODIFIER_TYPE.SELLING]:
            result.append(fmtData)

        return formatters.todict(result)
Ejemplo n.º 23
0
 def _getTopConditions(self, svrEvents):
     result = []
     preBattleFmt = self.event.preBattleCond.format(svrEvents, self.event)
     if preBattleFmt is not None:
         result.extend(preBattleFmt)
     return formatters.todict(result)
Ejemplo n.º 24
0
 def _getConditions(self, svrEvents):
     result = self._packConditions(svrEvents)
     return formatters.todict(result)
Ejemplo n.º 25
0
 def _getTopConditions(self, svrEvents):
     result = []
     preBattleFmt = self.event.preBattleCond.format(svrEvents, self.event)
     if preBattleFmt is not None:
         result.extend(preBattleFmt)
     return formatters.todict(result)
Ejemplo n.º 26
0
 def _getConditions(self, svrEvents):
     result = self._packConditions(svrEvents)
     return formatters.todict(result)