Example #1
0
 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}
Example #2
0
 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}
Example #3
0
 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}
Example #6
0
 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}
Example #7
0
 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}
Example #9
0
 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}
Example #10
0
 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}
Example #12
0
 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}