当前位置: 首页>>代码示例>>Python>>正文


Python AchievementsUtils.packAchievementList方法代码示例

本文整理汇总了Python中gui.Scaleform.daapi.view.AchievementsUtils.AchievementsUtils.packAchievementList方法的典型用法代码示例。如果您正苦于以下问题:Python AchievementsUtils.packAchievementList方法的具体用法?Python AchievementsUtils.packAchievementList怎么用?Python AchievementsUtils.packAchievementList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gui.Scaleform.daapi.view.AchievementsUtils.AchievementsUtils的用法示例。


在下文中一共展示了AchievementsUtils.packAchievementList方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _sendAccountData

# 需要导入模块: from gui.Scaleform.daapi.view.AchievementsUtils import AchievementsUtils [as 别名]
# 或者: from gui.Scaleform.daapi.view.AchievementsUtils.AchievementsUtils import packAchievementList [as 别名]
 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
开发者ID:webiumsk,项目名称:WoT,代码行数:14,代码来源:profilesummary.py

示例2: __getAchievementsList

# 需要导入模块: from gui.Scaleform.daapi.view.AchievementsUtils import AchievementsUtils [as 别名]
# 或者: from gui.Scaleform.daapi.view.AchievementsUtils.AchievementsUtils import packAchievementList [as 别名]
    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
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:9,代码来源:profiletechnique.py

示例3: _makeAchievements

# 需要导入模块: from gui.Scaleform.daapi.view.AchievementsUtils import AchievementsUtils [as 别名]
# 或者: from gui.Scaleform.daapi.view.AchievementsUtils.AchievementsUtils import packAchievementList [as 别名]
def _makeAchievements(dossier):
    return AchievementsUtils.packAchievementList(
        dossier.getTotalStats().getSignificantAchievements(),
        dossier.getDossierType(),
        dumpDossier(dossier),
        True,
        False,
    )
开发者ID:webiumsk,项目名称:WOT-0.9.12-CT,代码行数:10,代码来源:clubsummaryview.py

示例4: getVO

# 需要导入模块: from gui.Scaleform.daapi.view.AchievementsUtils import AchievementsUtils [as 别名]
# 或者: from gui.Scaleform.daapi.view.AchievementsUtils.AchievementsUtils import packAchievementList [as 别名]
 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}}
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:57,代码来源:rally_dps.py

示例5: _sendAccountData

# 需要导入模块: from gui.Scaleform.daapi.view.AchievementsUtils import AchievementsUtils [as 别名]
# 或者: from gui.Scaleform.daapi.view.AchievementsUtils.AchievementsUtils import packAchievementList [as 别名]
    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()}, '', '')
开发者ID:kblw,项目名称:wot_client,代码行数:20,代码来源:profileawards.py

示例6: _makeAchievements

# 需要导入模块: from gui.Scaleform.daapi.view.AchievementsUtils import AchievementsUtils [as 别名]
# 或者: from gui.Scaleform.daapi.view.AchievementsUtils.AchievementsUtils import packAchievementList [as 别名]
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)
开发者ID:kblw,项目名称:wot_client,代码行数:7,代码来源:clubstatsview.py

示例7: __makeAchievements

# 需要导入模块: from gui.Scaleform.daapi.view.AchievementsUtils import AchievementsUtils [as 别名]
# 或者: from gui.Scaleform.daapi.view.AchievementsUtils.AchievementsUtils import packAchievementList [as 别名]
 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)
开发者ID:krzcho,项目名称:WOTDecompiled,代码行数:7,代码来源:clubstatsview.py


注:本文中的gui.Scaleform.daapi.view.AchievementsUtils.AchievementsUtils.packAchievementList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。