本文整理汇总了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
示例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
示例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,
)
示例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}}
示例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()}, '', '')
示例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)
示例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)