コード例 #1
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'))
     ])
コード例 #2
0
 def _getBonuses(self, svrEvents, bonuses=None):
     bonuses = bonuses or self.event.getBonuses()
     result = OldStyleBonusesFormatter(
         self.event).getFormattedBonuses(bonuses)
     if result:
         return [award.getDict() for award in result]
     return [
         formatters.packTextBlock(
             text_styles.alert(
                 backport.text(
                     R.strings.quests.bonuses.notAvailable()))).getDict()
     ]