Esempio n. 1
0
 def _getHeaderData(self, data):
     targetData = data[0]
     accountDossier = data[1]
     numTotalRandomVehicles = self._getListOfUniqueVehicles(
         targetData, accountDossier)
     return (PUtils.getTotalBattlesHeaderParam(
         targetData, PROFILE.SECTION_STATISTICS_SCORES_TOTALBATTLES,
         PROFILE.PROFILE_PARAMS_TOOLTIP_BATTLESCOUNT),
             PUtils.packLditItemData(
                 self._formattedWinsEfficiency,
                 PROFILE.SECTION_STATISTICS_SCORES_TOTALWINS,
                 PROFILE.PROFILE_PARAMS_TOOLTIP_WINS, 'wins40x32.png'),
             _packAvgDmgLditItemData(self._avgDmg),
             _packAvgXPLditItemData(self._avgXP),
             PUtils.packLditItemData(
                 self._maxXP_formattedStr,
                 PROFILE.SECTION_STATISTICS_SCORES_MAXEXPERIENCE,
                 PROFILE.PROFILE_PARAMS_TOOLTIP_MAXEXP, 'maxExp40x32.png',
                 PUtils.getVehicleRecordTooltipData(
                     targetData.getMaxXpVehicle)),
             PUtils.packLditItemData(
                 style.makeMarksOfMasteryText(
                     BigWorld.wg_getIntegralFormat(
                         targetData.getMarksOfMastery()[3]),
                     numTotalRandomVehicles),
                 PROFILE.SECTION_STATISTICS_SCORES_COOLSIGNS,
                 PROFILE.PROFILE_PARAMS_TOOLTIP_MARKOFMASTERY,
                 'markOfMastery40x32.png'))
Esempio n. 2
0
 def packProfileDossierInfo(cls, targetData, accountDossier):
     outcome = ProfileUtils.packProfileCommonInfo(targetData)
     epicRandomVehicles = set(accountDossier.getEpicRandomStats().getVehicles().keys())
     totalVehiclesCount = len(epicRandomVehicles.union(set(accountDossier.getRandomStats().getVehicles().keys())))
     vehicle = cls.itemsCache.items.getItemByCD(targetData.getMaxXpVehicle())
     outcome['maxXPByVehicle'] = vehicle.shortUserName if vehicle is not None else ''
     outcome['marksOfMasteryText'] = style.makeMarksOfMasteryText(backport.getIntegralFormat(targetData.getMarksOfMastery()[3]), totalVehiclesCount)
     return outcome
Esempio n. 3
0
 def packProfileDossierInfo(cls, targetData):
     outcome = ProfileUtils.packProfileCommonInfo(targetData)
     vehicle = cls.itemsCache.items.getItemByCD(
         targetData.getMaxXpVehicle())
     outcome[
         'maxXPByVehicle'] = vehicle.shortUserName if vehicle is not None else ''
     outcome['marksOfMasteryText'] = style.makeMarksOfMasteryText(
         BigWorld.wg_getIntegralFormat(targetData.getMarksOfMastery()[3]),
         len(targetData.getVehicles()))
     return outcome