Esempio n. 1
0
 def _sendAccountData(self, targetData, accountDossier):
     super(ProfileSummary, self)._sendAccountData(targetData,
                                                  accountDossier)
     outcome = ProfileUtils.packProfileDossierInfo(targetData,
                                                   accountDossier)
     outcome['avgDamage'] = ProfileUtils.getValueOrUnavailable(
         targetData.getAvgDamage())
     outcome['maxDestroyed'] = targetData.getMaxFrags()
     vehicle = self.itemsCache.items.getItemByCD(
         targetData.getMaxFragsVehicle())
     outcome[
         'maxDestroyedByVehicle'] = vehicle.shortUserName if vehicle is not None else ''
     outcome['globalRating'] = self.getGlobalRating(self._databaseID)
     totalStats = accountDossier.getTotalStats()
     outcome[
         'significantAchievements'] = AchievementsUtils.packAchievementList(
             totalStats.getSignificantAchievements(),
             accountDossier.getDossierType(), dumpDossier(accountDossier),
             self._userID is None, False)
     outcome['nearestAchievements'] = AchievementsUtils.packAchievementList(
         totalStats.getNearestAchievements(),
         accountDossier.getDossierType(), dumpDossier(accountDossier),
         self._userID is None, True)
     self.as_responseDossierS(self._battlesType, outcome, '', '')
     return
Esempio n. 2
0
 def _sendAccountData(self, targetData, accountDossier):
     outcome = ProfileUtils.packProfileDossierInfo(targetData)
     outcome['avgDamage'] = ProfileUtils.getValueOrUnavailable(targetData.getAvgDamage())
     outcome['maxDestroyed'] = targetData.getMaxFrags()
     vehicle = g_itemsCache.items.getItemByCD(targetData.getMaxFragsVehicle())
     outcome['maxDestroyedByVehicle'] = vehicle.shortUserName if vehicle is not None else ''
     outcome['globalRating'] = self.getGlobalRating(self._databaseID)
     totalStats = accountDossier.getTotalStats()
     outcome['significantAchievements'] = AchievementsUtils.packAchievementList(totalStats.getSignificantAchievements(), accountDossier, self._userID is None, False)
     outcome['nearestAchievements'] = AchievementsUtils.packAchievementList(totalStats.getNearestAchievements(), accountDossier, self._userID is None, True)
     self.as_responseDossierS(self._battlesType, outcome)
     return
    def _sendAccountData(self, targetData, accountDossier):
        super(ProfileAwards, self)._sendAccountData(targetData, accountDossier)
        achievements = targetData.getAchievements(showHidden=False)
        totalItemsList = []
        for block in achievements:
            totalItemsList.append(len(block))

        if self.__achievementsFilter == PROFILE.SECTION_AWARDS_DROPDOWN_LABELS_INPROCESS:
            achievements = targetData.getAchievements(isInDossier=True,
                                                      showHidden=False)
        elif self.__achievementsFilter == PROFILE.SECTION_AWARDS_DROPDOWN_LABELS_NONE:
            achievements = targetData.getAchievements(isInDossier=False,
                                                      showHidden=False)
        packedList = []
        for achievementBlockList in achievements:
            packedList.append(
                AchievementsUtils.packAchievementList(
                    achievementBlockList, accountDossier.getDossierType(),
                    dumpDossier(accountDossier), self._userID is None))

        self.as_responseDossierS(
            self._battlesType, {
                'achievementsList': packedList,
                'totalItemsList': totalItemsList,
                'battlesCount': targetData.getBattlesCount()
            }, '', '')
        return
Esempio n. 4
0
    def __getAchievementsList(self, targetData, vehDossier):
        packedList = []
        achievements = targetData.getAchievements(True)
        for achievementBlockList in achievements:
            packedList.append(AchievementsUtils.packAchievementList(achievementBlockList, vehDossier.getDossierType(), dumpDossier(vehDossier), self._userID is None, True, ACHIEVEMENTS_ALIASES.GREY_COUNTER))

        return packedList
Esempio n. 5
0
 def _receiveVehicleDossier(self, vehicleIntCD, databaseId):
     vehDossier = g_itemsCache.items.getVehicleDossier(vehicleIntCD, databaseId)
     achievementsList = None
     specialMarksStats = []
     if self._battlesType == PROFILE.PROFILE_DROPDOWN_LABELS_ALL:
         stats = vehDossier.getRandomStats()
         achievementsList = self.__getAchievementsList(stats, vehDossier)
         if g_itemsCache.items.getItemByCD(int(vehicleIntCD)).level > 4:
             specialMarksStats.append(AchievementsUtils.packAchievement(stats.getAchievement(MARK_ON_GUN_RECORD), vehDossier.getDossierType(), dumpDossier(vehDossier), self._userID is None))
     elif self._battlesType == PROFILE.PROFILE_DROPDOWN_LABELS_TEAM:
         stats = vehDossier.getTeam7x7Stats()
         achievementsList = self.__getAchievementsList(stats, vehDossier)
     elif self._battlesType == PROFILE.PROFILE_DROPDOWN_LABELS_STATICTEAM:
         stats = vehDossier.getRated7x7Stats()
         achievementsList = self.__getAchievementsList(stats, vehDossier)
     elif self._battlesType == PROFILE.PROFILE_DROPDOWN_LABELS_HISTORICAL:
         stats = vehDossier.getHistoricalStats()
         achievementsList = self.__getAchievementsList(stats, vehDossier)
     elif self._battlesType == PROFILE.PROFILE_DROPDOWN_LABELS_FORTIFICATIONS_SORTIES:
         stats = vehDossier.getFortSortiesStats()
     elif self._battlesType == PROFILE.PROFILE_DROPDOWN_LABELS_FORTIFICATIONS_BATTLES:
         stats = vehDossier.getFortBattlesStats()
     else:
         raise ValueError('Profile Technique: Unknown battle type: ' + self._battlesType)
     if achievementsList is not None:
         achievementsList.insert(0, specialMarksStats)
     preparedStatistics = DetailedStatisticsUtils.getStatistics(stats, self._userID is None)
     if self._battlesType == PROFILE.PROFILE_DROPDOWN_LABELS_FORTIFICATIONS_BATTLES:
         preparedStatistics[0]['data'][0]['tooltip'] = PROFILE.PROFILE_PARAMS_TOOLTIP_DIF_FORT_BATTLESCOUNT
     self.as_responseVehicleDossierS({'detailedData': preparedStatistics,
      'achievements': achievementsList})
     return
Esempio n. 6
0
    def __getAchievementsList(self, targetData, vehDossier):
        packedList = []
        achievements = targetData.getAchievements(True)
        for achievementBlockList in achievements:
            packedList.append(AchievementsUtils.packAchievementList(achievementBlockList, vehDossier.getDossierType(), dumpDossier(vehDossier), self._userID is None, True, ACHIEVEMENTS_ALIASES.GREY_COUNTER))

        return packedList
Esempio n. 7
0
def _makeAchievements(dossier):
    return AchievementsUtils.packAchievementList(
        dossier.getTotalStats().getSignificantAchievements(),
        dossier.getDossierType(),
        dumpDossier(dossier),
        True,
        False,
    )
Esempio n. 8
0
def _makeAchievements(dossier, club):
    achievements = dossier.getTotalStats().getAchievements()
    mergedList = list(itertools.chain(*achievements))
    isForClubMember = club.hasMember(getAccountDatabaseID())
    return AchievementsUtils.packAchievementList(mergedList,
                                                 dossier.getDossierType(),
                                                 dumpDossier(dossier),
                                                 isForClubMember, True)
Esempio n. 9
0
 def getVO(self, club = None, currentState = None, profile = None):
     if club is None or currentState is None or profile is None:
         return
     else:
         _ms = i18n.makeString
         ladderInfo = club.getLadderInfo()
         if ladderInfo.isInLadder():
             ladderLeagueStr = getLeagueString(ladderInfo.getLeague())
             ladderDivStr = getDivisionString(ladderInfo.getDivision())
             ladderInfoStr = text_styles.middleTitle(_ms(CYBERSPORT.WINDOW_STATICRALLYINFO_LADDERINFO, league=ladderLeagueStr, division=ladderDivStr))
         else:
             ladderInfoStr = ''
         dossier = club.getTotalDossier()
         clubTotalStats = dossier.getTotalStats()
         isButtonDisabled = False
         buttonLabel = '#cyberSport:window/staticRallyInfo/joinBtnLabel'
         buttonTooltip = '#tooltips:cyberSport/staticRallyInfo/joinBtn/join'
         buttonInfo = '#cyberSport:window/staticRallyInfo/joinInfo/join'
         limits = currentState.getLimits()
         canSendApp, appReason = limits.canSendApplication(profile, club)
         if currentState.getStateID() == CLIENT_CLUB_STATE.SENT_APP:
             if currentState.getClubDbID() == club.getClubDbID():
                 buttonLabel = '#cyberSport:window/staticRallyInfo/cancelBtnLabel'
                 buttonTooltip = '#tooltips:cyberSport/staticRallyInfo/joinBtn/inProcess'
                 buttonInfo = '#cyberSport:window/staticRallyInfo/joinInfo/inProcess'
             else:
                 isButtonDisabled = True
                 buttonTooltip = '#tooltips:cyberSport/staticRallyInfo/joinBtn/inProcessOther'
                 buttonInfo = '#cyberSport:window/staticRallyInfo/joinInfo/inProcessOther'
         elif currentState.getStateID() == CLIENT_CLUB_STATE.HAS_CLUB:
             isButtonDisabled = True
             buttonTooltip = '#tooltips:cyberSport/staticRallyInfo/joinBtn/alreadyJoined'
             buttonInfo = '#cyberSport:window/staticRallyInfo/joinInfo/alreadyJoined'
         elif not canSendApp:
             isButtonDisabled = True
             buttonTooltip = '#tooltips:cyberSport/staticRallyInfo/joinBtn/applicationCooldown'
             buttonInfo = '#cyberSport:window/staticRallyInfo/joinInfo/applicationCooldown'
         return {'battlesCount': self.__getIndicatorData(clubTotalStats.getBattlesCount(), BigWorld.wg_getIntegralFormat, _ms(CYBERSPORT.WINDOW_STATICRALLYINFO_STATSBATTLESCOUNT), RES_ICONS.MAPS_ICONS_LIBRARY_DOSSIER_BATTLES40X32, TOOLTIPS.CYBERSPORT_STATICRALLYINFO_STATSBATTLESCOUNT),
          'winsPercent': self.__getIndicatorData(clubTotalStats.getWinsEfficiency(), ProfileUtils.formatFloatPercent, _ms(CYBERSPORT.WINDOW_STATICRALLYINFO_STATICRALLY_STATSWINSPERCENT), RES_ICONS.MAPS_ICONS_LIBRARY_DOSSIER_WINS40X32, TOOLTIPS.CYBERSPORT_STATICRALLYINFO_STATSWINSPERCENT),
          'ladderIcon': getLadderChevron128x128(ladderInfo.getDivision()),
          'ladderInfo': ladderInfoStr,
          'joinInfo': text_styles.main(_ms(buttonInfo)),
          'joinBtnLabel': _ms(buttonLabel),
          'joinBtnTooltip': buttonTooltip,
          'joinBtnDisabled': isButtonDisabled,
          'noAwardsText': CYBERSPORT.WINDOW_STATICRALLYINFO_NOAWARDS,
          'achievements': AchievementsUtils.packAchievementList(clubTotalStats.getTopAchievements(3), dossier.getDossierType(), dumpDossier(dossier), False, False),
          'rallyInfo': {'icon': None,
                        'name': text_styles.highTitle(club.getUserName()),
                        'profileBtnLabel': CYBERSPORT.RALLYINFO_PROFILEBTN_LABEL,
                        'profileBtnTooltip': TOOLTIPS.RALLYINFO_PROFILEBTN,
                        'description': text_styles.main(html.escape(club.getUserShortDescription())),
                        'ladderIcon': None,
                        'id': club.getClubDbID(),
                        'showLadder': False}}
Esempio n. 10
0
 def getVO(self, club = None, currentState = None, profile = None):
     if club is None or currentState is None or profile is None:
         return
     else:
         _ms = i18n.makeString
         ladderInfo = club.getLadderInfo()
         if ladderInfo.isInLadder():
             ladderLeagueStr = getLeagueString(ladderInfo.getLeague())
             ladderDivStr = getDivisionString(ladderInfo.getDivision())
             ladderInfoStr = text_styles.middleTitle(_ms(CYBERSPORT.WINDOW_STATICRALLYINFO_LADDERINFO, league=ladderLeagueStr, division=ladderDivStr))
         else:
             ladderInfoStr = ''
         dossier = club.getTotalDossier()
         clubTotalStats = dossier.getTotalStats()
         isButtonDisabled = False
         buttonLabel = '#cyberSport:window/staticRallyInfo/joinBtnLabel'
         buttonTooltip = '#tooltips:cyberSport/staticRallyInfo/joinBtn/join'
         buttonInfo = '#cyberSport:window/staticRallyInfo/joinInfo/join'
         limits = currentState.getLimits()
         canSendApp, appReason = limits.canSendApplication(profile, club)
         if currentState.getStateID() == CLIENT_CLUB_STATE.SENT_APP:
             if currentState.getClubDbID() == club.getClubDbID():
                 buttonLabel = '#cyberSport:window/staticRallyInfo/cancelBtnLabel'
                 buttonTooltip = '#tooltips:cyberSport/staticRallyInfo/joinBtn/inProcess'
                 buttonInfo = '#cyberSport:window/staticRallyInfo/joinInfo/inProcess'
             else:
                 isButtonDisabled = True
                 buttonTooltip = '#tooltips:cyberSport/staticRallyInfo/joinBtn/inProcessOther'
                 buttonInfo = '#cyberSport:window/staticRallyInfo/joinInfo/inProcessOther'
         elif currentState.getStateID() == CLIENT_CLUB_STATE.HAS_CLUB:
             isButtonDisabled = True
             buttonTooltip = '#tooltips:cyberSport/staticRallyInfo/joinBtn/alreadyJoined'
             buttonInfo = '#cyberSport:window/staticRallyInfo/joinInfo/alreadyJoined'
         elif not canSendApp:
             isButtonDisabled = True
             buttonTooltip = '#tooltips:cyberSport/staticRallyInfo/joinBtn/applicationCooldown'
             buttonInfo = '#cyberSport:window/staticRallyInfo/joinInfo/applicationCooldown'
         return {'battlesCount': self.__getIndicatorData(clubTotalStats.getBattlesCount(), BigWorld.wg_getIntegralFormat, _ms(CYBERSPORT.WINDOW_STATICRALLYINFO_STATSBATTLESCOUNT), RES_ICONS.MAPS_ICONS_LIBRARY_DOSSIER_BATTLES40X32, TOOLTIPS.CYBERSPORT_STATICRALLYINFO_STATSBATTLESCOUNT),
          'winsPercent': self.__getIndicatorData(clubTotalStats.getWinsEfficiency(), ProfileUtils.formatFloatPercent, _ms(CYBERSPORT.WINDOW_STATICRALLYINFO_STATICRALLY_STATSWINSPERCENT), RES_ICONS.MAPS_ICONS_LIBRARY_DOSSIER_WINS40X32, TOOLTIPS.CYBERSPORT_STATICRALLYINFO_STATSWINSPERCENT),
          'ladderIcon': getLadderChevron128x128(ladderInfo.getDivision()),
          'ladderInfo': ladderInfoStr,
          'joinInfo': text_styles.main(_ms(buttonInfo)),
          'joinBtnLabel': _ms(buttonLabel),
          'joinBtnTooltip': buttonTooltip,
          'joinBtnDisabled': isButtonDisabled,
          'noAwardsText': CYBERSPORT.WINDOW_STATICRALLYINFO_NOAWARDS,
          'achievements': AchievementsUtils.packAchievementList(clubTotalStats.getTopAchievements(3), dossier.getDossierType(), dumpDossier(dossier), False, False),
          'rallyInfo': {'icon': None,
                        'name': text_styles.highTitle(club.getUserName()),
                        'profileBtnLabel': CYBERSPORT.RALLYINFO_PROFILEBTN_LABEL,
                        'profileBtnTooltip': TOOLTIPS.RALLYINFO_PROFILEBTN,
                        'description': text_styles.main(html.escape(club.getUserShortDescription())),
                        'ladderIcon': None,
                        'id': club.getClubDbID(),
                        'showLadder': False}}
Esempio n. 11
0
 def __packAchievement(self, stats, vehDossier, record):
     """
     The method packs desired achievement record for the provided vehicle dossier.
     :param stats: vehicle's stats block (_VehiclesStatsBlock instance)
     :param vehDossier: VehicleDossier instance
     :param record: one from dossiers2/ui/achievements.py
     :return: dict
     """
     return AchievementsUtils.packAchievement(stats.getAchievement(record),
                                              vehDossier.getDossierType(),
                                              dumpDossier(vehDossier),
                                              self._userID is None)
Esempio n. 12
0
 def _receiveVehicleDossier(self, vehicleIntCD, databaseId):
     vehDossier = g_itemsCache.items.getVehicleDossier(
         vehicleIntCD, databaseId)
     achievementsList = None
     specialMarksStats = []
     if self._battlesType == PROFILE_DROPDOWN_KEYS.ALL:
         stats = vehDossier.getRandomStats()
         achievementsList = self.__getAchievementsList(stats, vehDossier)
         if g_itemsCache.items.getItemByCD(int(vehicleIntCD)).level > 4:
             specialMarksStats.append(
                 AchievementsUtils.packAchievement(
                     stats.getAchievement(MARK_ON_GUN_RECORD),
                     vehDossier.getDossierType(), dumpDossier(vehDossier),
                     self._userID is None))
     elif self._battlesType == PROFILE_DROPDOWN_KEYS.TEAM:
         stats = vehDossier.getTeam7x7Stats()
         achievementsList = self.__getAchievementsList(stats, vehDossier)
     elif self._battlesType == PROFILE_DROPDOWN_KEYS.STATICTEAM:
         stats = vehDossier.getRated7x7Stats()
         achievementsList = self.__getAchievementsList(stats, vehDossier)
     elif self._battlesType == PROFILE_DROPDOWN_KEYS.HISTORICAL:
         stats = vehDossier.getHistoricalStats()
         achievementsList = self.__getAchievementsList(stats, vehDossier)
     elif self._battlesType == PROFILE_DROPDOWN_KEYS.FORTIFICATIONS_SORTIES:
         stats = vehDossier.getFortSortiesStats()
     elif self._battlesType == PROFILE_DROPDOWN_KEYS.FORTIFICATIONS_BATTLES:
         stats = vehDossier.getFortBattlesStats()
     elif self._battlesType == PROFILE_DROPDOWN_KEYS.CLAN:
         stats = vehDossier.getGlobalMapStats()
     elif self._battlesType == PROFILE_DROPDOWN_KEYS.FALLOUT:
         stats = vehDossier.getFalloutStats()
     else:
         raise ValueError('Profile Technique: Unknown battle type: ' +
                          self._battlesType)
     if achievementsList is not None:
         achievementsList.insert(0, specialMarksStats)
     if self._battlesType == PROFILE_DROPDOWN_KEYS.FORTIFICATIONS_BATTLES:
         layout = FORT_STATISTICS_LAYOUT
     elif self._battlesType == PROFILE_DROPDOWN_KEYS.FALLOUT:
         layout = FALLOUT_STATISTICS_LAYOUT
     else:
         layout = STATISTICS_LAYOUT
     preparedStatistics = DetailedStatisticsUtils.getStatistics(
         stats, self._userID is None, layout)
     self.as_responseVehicleDossierS({
         'detailedData': preparedStatistics,
         'achievements': achievementsList
     })
     return
Esempio n. 13
0
    def _sendAccountData(self, targetData, accountDossier):
        super(ProfileAwards, self)._sendAccountData(targetData, accountDossier)
        achievements = targetData.getAchievements()
        totalItemsList = []
        for block in achievements:
            totalItemsList.append(len(block))

        if self.__achievementsFilter == PROFILE.SECTION_AWARDS_DROPDOWN_LABELS_INPROCESS:
            achievements = targetData.getAchievements(isInDossier=True)
        elif self.__achievementsFilter == PROFILE.SECTION_AWARDS_DROPDOWN_LABELS_NONE:
            achievements = targetData.getAchievements(isInDossier=False)
        packedList = []
        for achievementBlockList in achievements:
            packedList.append(AchievementsUtils.packAchievementList(achievementBlockList, accountDossier.getDossierType(), dumpDossier(accountDossier), self._userID is None))

        self.as_responseDossierS(self._battlesType, {'achievementsList': packedList,
         'totalItemsList': totalItemsList,
         'battlesCount': targetData.getBattlesCount()}, '', '')
Esempio n. 14
0
 def _receiveVehicleDossier(self, vehicleIntCD, databaseId):
     vehDossier = g_itemsCache.items.getVehicleDossier(vehicleIntCD, databaseId)
     achievementsList = None
     specialMarksStats = []
     if self._battlesType == PROFILE_DROPDOWN_KEYS.ALL:
         stats = vehDossier.getRandomStats()
         achievementsList = self.__getAchievementsList(stats, vehDossier)
         if g_itemsCache.items.getItemByCD(int(vehicleIntCD)).level > 4:
             specialMarksStats.append(AchievementsUtils.packAchievement(stats.getAchievement(MARK_ON_GUN_RECORD), vehDossier.getDossierType(), dumpDossier(vehDossier), self._userID is None))
     elif self._battlesType == PROFILE_DROPDOWN_KEYS.TEAM:
         stats = vehDossier.getTeam7x7Stats()
         achievementsList = self.__getAchievementsList(stats, vehDossier)
     elif self._battlesType == PROFILE_DROPDOWN_KEYS.STATICTEAM:
         stats = vehDossier.getRated7x7Stats()
         achievementsList = self.__getAchievementsList(stats, vehDossier)
     elif self._battlesType == PROFILE_DROPDOWN_KEYS.HISTORICAL:
         stats = vehDossier.getHistoricalStats()
         achievementsList = self.__getAchievementsList(stats, vehDossier)
     elif self._battlesType == PROFILE_DROPDOWN_KEYS.FORTIFICATIONS_SORTIES:
         stats = vehDossier.getFortSortiesStats()
     elif self._battlesType == PROFILE_DROPDOWN_KEYS.FORTIFICATIONS_BATTLES:
         stats = vehDossier.getFortBattlesStats()
     elif self._battlesType == PROFILE_DROPDOWN_KEYS.CLAN:
         stats = vehDossier.getGlobalMapStats()
     elif self._battlesType == PROFILE_DROPDOWN_KEYS.FALLOUT:
         stats = vehDossier.getFalloutStats()
     else:
         raise ValueError('Profile Technique: Unknown battle type: ' + self._battlesType)
     if achievementsList is not None:
         achievementsList.insert(0, specialMarksStats)
     if self._battlesType == PROFILE_DROPDOWN_KEYS.FORTIFICATIONS_BATTLES:
         layout = FORT_STATISTICS_LAYOUT
     elif self._battlesType == PROFILE_DROPDOWN_KEYS.FALLOUT:
         layout = FALLOUT_STATISTICS_LAYOUT
     else:
         layout = STATISTICS_LAYOUT
     preparedStatistics = DetailedStatisticsUtils.getStatistics(stats, self._userID is None, layout)
     self.as_responseVehicleDossierS({'detailedData': preparedStatistics,
      'achievements': achievementsList})
     return
Esempio n. 15
0
 def __packAchievement(achieve, dossierCompDescr):
     commonData = AchievementsUtils.getCommonAchievementData(
         achieve, constants.DOSSIER_TYPE.TANKMAN, dossierCompDescr)
     commonData['counterType'] = AchievementsUtils.getCounterType(achieve)
     return commonData
Esempio n. 16
0
def _makeAchievements(dossier, club):
    achievements = dossier.getTotalStats().getAchievements()
    mergedList = list(itertools.chain(*achievements))
    isForClubMember = club.hasMember(getAccountDatabaseID())
    return AchievementsUtils.packAchievementList(mergedList, dossier.getDossierType(), dumpDossier(dossier), isForClubMember, True)
Esempio n. 17
0
 def __packAchievement(self, stats, vehDossier, record):
     return AchievementsUtils.packAchievement(stats.getAchievement(record),
                                              vehDossier.getDossierType(),
                                              dumpDossier(vehDossier),
                                              self._userID is None)
Esempio n. 18
0
def _makeAchievements(dossier):
    return AchievementsUtils.packAchievementList(
        dossier.getTotalStats().getSignificantAchievements(),
        dossier.getDossierType(), dumpDossier(dossier), True, False)
Esempio n. 19
0
 def __packAchievement(achieve, dossierCompDescr):
     commonData = AchievementsUtils.getCommonAchievementData(achieve, constants.DOSSIER_TYPE.TANKMAN, dossierCompDescr)
     commonData['counterType'] = AchievementsUtils.getCounterType(achieve)
     return commonData
 def _packAchievement(cls, achieve, isUnique=False):
     return AchievementsUtils.getBattleResultAchievementData(
         achieve, achieve.getName(), [], isUnique)
 def _packAchievement(cls, achieve, isUnique = False):
     return AchievementsUtils.getBattleResultAchievementData(achieve, achieve.getName(), [], isUnique)
Esempio n. 22
0
 def __makeAchievements(self, dossier, club):
     achievements = dossier.getTotalStats().getAchievements()
     mergedList = list(itertools.chain(*achievements))
     isForClubMember = club.getMember(getPlayerDatabaseID()) is not None
     return AchievementsUtils.packAchievementList(mergedList, dossier.getDossierType(), dumpDossier(dossier), isForClubMember, True)