def _getValue(self): result = [[]] achievement = self._tooltip.item if achievement is None: LOG_ERROR('There is error while building achievement tooltip', achievement) return result else: label, lvlUpValue = achievement.getNextLevelInfo() if label and lvlUpValue and lvlUpValue > 0: result[-1].append([label, lvlUpValue]) if isSeriesAchievement(achievement): record, maxSeries = achievement.getMaxSeriesInfo() if record is not None and maxSeries: result[-1].append([record[1], maxSeries]) if achievementHasVehiclesList(achievement): vehiclesList = achievement.getVehiclesData() fullVehListLen = len(vehiclesList) if fullVehListLen >= _ACHIEVEMENT_VEHICLES_MAX: vehiclesList = vehiclesList[:_ACHIEVEMENT_VEHICLES_SHOW] if fullVehListLen: result[-1].append([ achievement.getVehiclesListTitle(), vehiclesList, fullVehListLen ]) return result
def _getValue(self): result = [[]] achievement = self._tooltip.item if achievement is None: LOG_ERROR('There is error while building achievement tooltip', achievement) return result label, lvlUpValue = achievement.getNextLevelInfo() if label and lvlUpValue and lvlUpValue > 0: result[-1].append([label, lvlUpValue]) if isSeriesAchievement(achievement): record, maxSeries = achievement.getMaxSeriesInfo() if record is not None and maxSeries: result[-1].append([record[1], maxSeries]) if achievementHasVehiclesList(achievement): vehiclesList = achievement.getVehiclesData() fullVehListLen = len(vehiclesList) if fullVehListLen >= _ACHIEVEMENT_VEHICLES_MAX: vehiclesList = vehiclesList[:_ACHIEVEMENT_VEHICLES_SHOW] if fullVehListLen: result[-1].append([achievement.getVehiclesListTitle(), vehiclesList, fullVehListLen]) return result