本文整理汇总了Python中gui.Scaleform.daapi.view.AchievementsUtils.AchievementsUtils.packAchievement方法的典型用法代码示例。如果您正苦于以下问题:Python AchievementsUtils.packAchievement方法的具体用法?Python AchievementsUtils.packAchievement怎么用?Python AchievementsUtils.packAchievement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gui.Scaleform.daapi.view.AchievementsUtils.AchievementsUtils
的用法示例。
在下文中一共展示了AchievementsUtils.packAchievement方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _receiveVehicleDossier
# 需要导入模块: from gui.Scaleform.daapi.view.AchievementsUtils import AchievementsUtils [as 别名]
# 或者: from gui.Scaleform.daapi.view.AchievementsUtils.AchievementsUtils import packAchievement [as 别名]
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
示例2: _receiveVehicleDossier
# 需要导入模块: from gui.Scaleform.daapi.view.AchievementsUtils import AchievementsUtils [as 别名]
# 或者: from gui.Scaleform.daapi.view.AchievementsUtils.AchievementsUtils import packAchievement [as 别名]
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