HotFix release v1.7.6 additionalShooter array check

pull/44/head v1.7.6
HardiReady 2018-06-10 19:58:37 +02:00
parent 1ac58ea71a
commit bf8ff5d2f6
1 changed files with 9 additions and 9 deletions

View File

@ -223,19 +223,19 @@ const parseWarLog = (lineArray, war) => {
// TODO: use vehicle class description from enum
stats.players[i]['vehicleLight'] = stats.vehicles.filter(
(vehicle) => (vehicle.shooter === playerName || vehicle.additionalShooter.indexOf(playerName) > -1) &&
vehicle.vehicleClass === 'LIGHT' &&
VEHICLE_BLACKLIST.indexOf(vehicle.target) < 0).length;
(vehicle) => (vehicle.shooter === playerName ||
(vehicle.additionalShooter && vehicle.additionalShooter.indexOf(playerName)) > -1) && vehicle.vehicleClass ===
'LIGHT' && VEHICLE_BLACKLIST.indexOf(vehicle.target) < 0).length;
stats.players[i]['vehicleHeavy'] = stats.vehicles.filter(
(vehicle) => (vehicle.shooter === playerName || vehicle.additionalShooter.indexOf(playerName) > -1) &&
vehicle.vehicleClass === 'HEAVY' &&
VEHICLE_BLACKLIST.indexOf(vehicle.target) < 0).length;
(vehicle) => (vehicle.shooter === playerName ||
(vehicle.additionalShooter && vehicle.additionalShooter.indexOf(playerName)) > -1) && vehicle.vehicleClass ===
'HEAVY' && VEHICLE_BLACKLIST.indexOf(vehicle.target) < 0).length;
stats.players[i]['vehicleAir'] = stats.vehicles.filter(
(vehicle) => (vehicle.shooter === playerName || vehicle.additionalShooter.indexOf(playerName) > -1) &&
vehicle.vehicleClass === 'AIR' &&
VEHICLE_BLACKLIST.indexOf(vehicle.target) < 0).length;
(vehicle) => (vehicle.shooter === playerName ||
(vehicle.additionalShooter && vehicle.additionalShooter.indexOf(playerName)) > -1) && vehicle.vehicleClass ===
'AIR' && VEHICLE_BLACKLIST.indexOf(vehicle.target) < 0).length;
stats.players[i]['friendlyFire'] = stats.kills.filter(
(kill) => kill.shooter === playerName && kill.friendlyFire).length;