當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。