def __updateVehicleDossierImpl(vehTypeCompDescr, dossierDescr, results): bonusType = results['bonusType'] if BONUS_CAPS.checkAny(bonusType, BONUS_CAPS.DOSSIER_ACHIEVEMENTS_7X7): _updatePerBattleSeries(dossierDescr['achievements7x7'], 'tacticalBreakthroughSeries', results['winnerTeam'] == results['team']) if not BONUS_CAPS.checkAny(bonusType, BONUS_CAPS.DOSSIER_ACHIEVEMENTS_15X15): return achievements = dossierDescr['achievements'] if achievements['markOfMastery'] < results['markOfMastery']: achievements['markOfMastery'] = results['markOfMastery'] damageRating = int(results['damageRating'] * 100) if damageRating != 0: achievements['damageRating'] = damageRating achievements['movingAvgDamage'] = results['movingAvgDamage'] if achievements['marksOnGun'] < results['marksOnGun']: achievements['marksOnGun'] = results['marksOnGun'] if results['winnerTeam'] == results['team'] and results['aimerSeries'] > 0: dossierDescr['singleAchievements']['aimer'] = 1 if achievements['maxAimerSeries'] < results['aimerSeries']: achievements['maxAimerSeries'] = results['aimerSeries'] isSPG = isVehicleSPG(vehTypeCompDescr) _updatePerBattleSeries( achievements, 'invincibleSeries', results['deathCount'] == 0 and results['damageReceived'] == 0 and not isSPG) _updatePerBattleSeries(achievements, 'diehardSeries', results['deathCount'] == 0 and not isSPG) _updateInBattleSeries(achievements, 'sniper', results) _updateInBattleSeries(achievements, 'killing', results) _updateInBattleSeries(achievements, 'piercing', results)
def __updateVehicleDossierImpl(vehTypeCompDescr, dossierDescr, results): bonusCaps = BONUS_CAPS.get(results["bonusType"]) if bool(bonusCaps & BONUS_CAPS.DOSSIER_ACHIEVEMENTS_7X7): _updatePerBattleSeries( dossierDescr["achievements7x7"], "tacticalBreakthroughSeries", results["winnerTeam"] == results["team"] ) if not bool(bonusCaps & BONUS_CAPS.DOSSIER_ACHIEVEMENTS_15X15): return achievements = dossierDescr["achievements"] if achievements["markOfMastery"] < results["markOfMastery"]: achievements["markOfMastery"] = results["markOfMastery"] damageRating = int(results["damageRating"] * 100) achievements["damageRating"] = damageRating achievements["movingAvgDamage"] = results["movingAvgDamage"] if achievements["marksOnGun"] < results["marksOnGun"]: achievements["marksOnGun"] = results["marksOnGun"] if results["winnerTeam"] == results["team"] and results["aimerSeries"] > 0: if achievements["maxAimerSeries"] < results["aimerSeries"]: achievements["maxAimerSeries"] = results["aimerSeries"] isSPG = isVehicleSPG(vehTypeCompDescr) _updatePerBattleSeries( achievements, "invincibleSeries", results["deathCount"] == 0 and results["damageReceived"] == 0 and not isSPG ) _updatePerBattleSeries(achievements, "diehardSeries", results["deathCount"] == 0 and not isSPG) _updateInBattleSeries(achievements, "sniper", results) _updateInBattleSeries(achievements, "killing", results) _updateInBattleSeries(achievements, "piercing", results)
def __updateVehicleDossierImpl(vehTypeCompDescr, dossierDescr, results, dossierXP): bonusType = results['bonusType'] if BONUS_CAPS.checkAny(bonusType, BONUS_CAPS.DOSSIER_ACHIEVEMENTS_7X7): _updatePerBattleSeries(dossierDescr['achievements7x7'], 'tacticalBreakthroughSeries', results['winnerTeam'] == results['team']) return if BONUS_CAPS.checkAny(bonusType, BONUS_CAPS.DOSSIER_RANKED): __updateAggregatedValues(dossierDescr.expand('ranked_10x10'), dossierDescr.expand('ranked_10x10'), results, dossierXP, 0) if BONUS_CAPS.checkAny(bonusType, BONUS_CAPS.DOSSIER_MAXRANKED): __updateMaxValues(dossierDescr.expand('maxRanked_10x10'), results, dossierXP) __updateMarksOnGun(dossierDescr, results) __updateMarkOfMastery(dossierDescr, results) if not BONUS_CAPS.checkAny(bonusType, BONUS_CAPS.DOSSIER_ACHIEVEMENTS_15X15): return achievements = dossierDescr['achievements'] if results['winnerTeam'] == results['team'] and results['aimerSeries'] > 0: dossierDescr['singleAchievements']['aimer'] = 1 if achievements['maxAimerSeries'] < results['aimerSeries']: achievements['maxAimerSeries'] = results['aimerSeries'] isSPG = isVehicleSPG(vehTypeCompDescr) _updatePerBattleSeries( achievements, 'invincibleSeries', results['deathCount'] == 0 and results['damageReceived'] == 0 and not isSPG) _updatePerBattleSeries(achievements, 'diehardSeries', results['deathCount'] == 0 and not isSPG) _updateInBattleSeries(achievements, 'sniper', results) _updateInBattleSeries(achievements, 'killing', results) _updateInBattleSeries(achievements, 'piercing', results)
def __updateVehicleDossierImpl(vehTypeCompDescr, dossierDescr, results): if bool(BONUS_CAPS.get(results['bonusType']) & BONUS_CAPS.DOSSIER_ACHIEVEMENTS_7X7): _updatePerBattleSeries(dossierDescr['achievements7x7'], 'tacticalBreakthroughSeries', results['winnerTeam'] == results['team']) if not bool(BONUS_CAPS.get(results['bonusType']) & BONUS_CAPS.DOSSIER_ACHIEVEMENTS_15X15): return achievements = dossierDescr['achievements'] if achievements['markOfMastery'] < results['markOfMastery']: achievements['markOfMastery'] = results['markOfMastery'] damageRating = int(results['damageRating'] * 100) achievements['damageRating'] = damageRating achievements['movingAvgDamage'] = results['movingAvgDamage'] if achievements['marksOnGun'] < results['marksOnGun']: achievements['marksOnGun'] = results['marksOnGun'] if results['winnerTeam'] == results['team'] and results['aimerSeries'] > 0: dossierDescr['singleAchievements']['aimer'] = 1 if achievements['maxAimerSeries'] < results['aimerSeries']: achievements['maxAimerSeries'] = results['aimerSeries'] isSPG = isVehicleSPG(vehTypeCompDescr) _updatePerBattleSeries(achievements, 'invincibleSeries', results['killerID'] == 0 and results['damageReceived'] == 0 and not isSPG) _updatePerBattleSeries(achievements, 'diehardSeries', results['killerID'] == 0 and not isSPG) _updateInBattleSeries(achievements, 'sniper', results) _updateInBattleSeries(achievements, 'killing', results) _updateInBattleSeries(achievements, 'piercing', results)