コード例 #1
0
    def __extractBonuses(self, data):
        outcome = []
        for k, value in data.iteritems():
            bonusObj = []
            if k == 'completedQuestIDs':
                continue
            elif k == 'vehicles':
                for vehiclesDict in value:
                    bonusObj.extend(getTutorialBonuses(k, vehiclesDict))

            else:
                bonusObj = getTutorialBonuses(k, value)
            outcome.extend(bonusObj)

        return outcome
コード例 #2
0
    def getBonusForBootcampMission(self):
        finalBonuses = []
        for bonusType, bonusValue in self.lobbyContext.getServerSettings(
        ).getBootcampBonuses().iteritems():
            finalBonuses.extend(getTutorialBonuses(bonusType, bonusValue))

        return finalBonuses
コード例 #3
0
    def _getBonuses(self):
        bonuses = self.__content.get('bonuses', {})
        result = []
        for n, v in bonuses.iteritems():
            result.extend(getTutorialBonuses(n, v))

        return result
コード例 #4
0
 def _getBonuses(self):
     if self._quest is not None:
         allBonuses = getMissionInfoData(self._quest).getSubstituteBonuses()
         bonuses = [
             bonus for bonus in allBonuses if bonus.getName() != 'vehicles'
         ]
         vehBonus = getTutorialBonuses('vehicles', self._vehicles)
         bonuses.extend(vehBonus)
         return bonuses
     else:
         return []