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')) ])
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() ]