def prepareBattleOutfit(outfitCD, vehicleDescriptor, vehicleId):
    vehicleCD = vehicleDescriptor.makeCompactDescr()
    outfitComponent = getOutfitComponent(outfitCD, vehicleDescriptor)
    outfit = Outfit(component=outfitComponent, vehicleCD=vehicleCD)
    player = BigWorld.player()
    if player is not None and hasattr(player, 'customizationDisplayType'):
        localPlayerWantsHistoricallyAccurate = player.customizationDisplayType < outfit.customizationDisplayType(
        )
        isLocalVehicle = player.playerVehicleID != vehicleId
    else:
        localPlayerWantsHistoricallyAccurate = False
        isLocalVehicle = False
    forceHistorical = isLocalVehicle and localPlayerWantsHistoricallyAccurate
    if outfit.style and (outfit.style.isProgression or IS_EDITOR):
        progressionOutfit = getStyleProgressionOutfit(
            outfit, toLevel=outfit.progressionLevel)
        if progressionOutfit is not None:
            outfit = progressionOutfit
    return Outfit(vehicleCD=vehicleCD) if forceHistorical else outfit
Exemplo n.º 2
0
def prepareBattleOutfit(outfitCD, vehicleDescriptor, vehicleId):
    vehicleCD = vehicleDescriptor.makeCompactDescr()
    outfitComponent = getOutfitComponent(outfitCD, vehicleDescriptor)
    outfit = Outfit(component=outfitComponent, vehicleCD=vehicleCD)
    player = BigWorld.player()
    forceHistorical = player.playerVehicleID != vehicleId and player.customizationDisplayType < outfit.customizationDisplayType(
    )
    if outfit.style and (outfit.style.isProgression or IS_EDITOR):
        progressionOutfit = getStyleProgressionOutfit(
            outfit, toLevel=outfit.progressionLevel)
        if progressionOutfit is not None:
            outfit = progressionOutfit
    return Outfit(vehicleCD=vehicleCD) if forceHistorical else outfit