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


Python AchievementsUtils.packAchievement方法代码示例

本文整理汇总了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
开发者ID:krzcho,项目名称:WOTDecompiled,代码行数:34,代码来源:profiletechnique.py

示例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
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:42,代码来源:profiletechnique.py


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