def __makeModulePurchaseVO(self, item, unlockProps, price): return {'title': _ms(BATTLE_RESULTS.COMMON_FITTING_PURCHASE), 'description': text_styles.main(item.userName), 'fittingType': item.itemTypeName, 'lvlIcon': getLevelIconPath(item.level), 'price': getItemPricesVO(ItemPrice(price=price, defPrice=price)), 'linkEvent': PROGRESS_ACTION.PURCHASE_UNLOCK_TYPE, 'linkId': unlockProps.parentID}
def __makeVehiclePurchaseVO(self, item, unlockProps, price): return {'title': _ms(BATTLE_RESULTS.COMMON_VEHICLE_PURCHASE), 'description': self.__makeVehicleDescription(item), 'vehicleIcon': item.iconSmall, 'lvlIcon': getLevelIconPath(item.level), 'price': getItemPricesVO(ItemPrice(price=price, defPrice=price)), 'linkEvent': PROGRESS_ACTION.PURCHASE_UNLOCK_TYPE, 'linkId': unlockProps.parentID}
def __makeUnlockModuleVO(self, item, unlockProps): return {'title': _ms(BATTLE_RESULTS.COMMON_FITTING_RESEARCH), 'description': text_styles.main(item.userName), 'fittingType': item.getGUIEmblemID(), 'lvlIcon': getLevelIconPath(item.level), 'price': getItemUnlockPricesVO(unlockProps), 'linkEvent': PROGRESS_ACTION.RESEARCH_UNLOCK_TYPE, 'linkId': unlockProps.parentID}
def __makeModulePurchaseVO(self, item, unlockProps, creditPrice): formattedPrice = BigWorld.wg_getIntegralFormat(creditPrice) + icons.credits() return {'title': _ms(BATTLE_RESULTS.COMMON_FITTING_PURCHASE), 'description': text_styles.main(item.userName), 'fittingType': item.itemTypeName, 'lvlIcon': getLevelIconPath(item.level), 'price': text_styles.credits(formattedPrice), 'linkEvent': PROGRESS_ACTION.PURCHASE_UNLOCK_TYPE, 'linkId': unlockProps.parentID}
def __makeVehiclePurchaseVO(self, item, unlockProps, creditPrice): formattedPrice = BigWorld.wg_getIntegralFormat(creditPrice) + icons.credits() return {'title': _ms(BATTLE_RESULTS.COMMON_VEHICLE_PURCHASE), 'description': self.__makeVehicleDescription(item), 'vehicleIcon': item.iconSmall, 'lvlIcon': getLevelIconPath(item.level), 'price': text_styles.credits(formattedPrice), 'linkEvent': PROGRESS_ACTION.PURCHASE_UNLOCK_TYPE, 'linkId': unlockProps.parentID}
def __makeUnlockModuleVO(self, item, unlockProps): isEnoughXp = self.__vehicleXp - unlockProps.xpCost >= 0 unlockXp = unlockProps.xpCost formatter = text_styles.expText if isEnoughXp else text_styles.error formattedPrice = BigWorld.wg_getIntegralFormat(unlockXp) + icons.xp() return {'title': _ms(BATTLE_RESULTS.COMMON_FITTING_RESEARCH), 'description': text_styles.main(item.userName), 'fittingType': item.itemTypeName, 'lvlIcon': getLevelIconPath(item.level), 'price': formatter(formattedPrice), 'linkEvent': PROGRESS_ACTION.RESEARCH_UNLOCK_TYPE, 'linkId': unlockProps.parentID}
def __makeUnlockVehicleVO(self, item, unlockProps, avgBattlesTillUnlock): prediction = '' if avgBattlesTillUnlock > 0: prediction = _ms(BATTLE_RESULTS.COMMON_RESEARCHPREDICTION, battles=avgBattlesTillUnlock) return {'title': _ms(BATTLE_RESULTS.COMMON_VEHICLE_RESEARCH), 'description': self.__makeVehicleDescription(item), 'vehicleIcon': item.iconSmall, 'lvlIcon': getLevelIconPath(item.level), 'prediction': prediction, 'price': getItemUnlockPricesVO(unlockProps), 'linkEvent': PROGRESS_ACTION.RESEARCH_UNLOCK_TYPE, 'linkId': unlockProps.parentID}
def __makeUnlockVehicleVO(self, item, unlockProps, avgBattlesTillUnlock): prediction = '' if avgBattlesTillUnlock > 0: prediction = _ms(BATTLE_RESULTS.COMMON_RESEARCHPREDICTION, battles=avgBattlesTillUnlock) isEnoughXp = self.__vehicleXp - unlockProps.xpCost >= 0 unlockXp = unlockProps.xpCost formatter = text_styles.expText if isEnoughXp else text_styles.error formattedPrice = BigWorld.wg_getIntegralFormat(unlockXp) + icons.xp() return {'title': _ms(BATTLE_RESULTS.COMMON_VEHICLE_RESEARCH), 'description': self.__makeVehicleDescription(item), 'vehicleIcon': item.iconSmall, 'lvlIcon': getLevelIconPath(item.level), 'prediction': prediction, 'price': formatter(formattedPrice), 'linkEvent': PROGRESS_ACTION.RESEARCH_UNLOCK_TYPE, 'linkId': unlockProps.parentID}