This commit is contained in:
Lanta 2023-11-26 10:32:47 +01:00
parent c566fdf93c
commit 609a227c01

View file

@ -45,14 +45,15 @@ function get-killstats {
$matchType, $matchType,
$gameMode $gameMode
) )
$LOGPLAYERKILLV2 = $telemetry | where-object { $_._T -eq 'LOGPLAYERKILLV2' }
$kills = $telemetry | where-object { $_.killer.name -eq $player_name -and $_._T -eq 'LOGPLAYERKILLV2' } $kills = $LOGPLAYERKILLV2 | where-object { $_.killer.name -eq $player_name}
$deaths = $LOGPLAYERKILLV2 | where-object { $_.victim.name -eq $player_name -and $_.finisher.name.count -ge 1 }
$HumanDmg = $([math]::Round(($telemetry | Where-Object { $_._T -eq 'LOGPLAYERTAKEDAMAGE' -and $_.attacker.name -eq $player_name -and $_.victim.accountId -notlike "ai.*" -and $_.victim.teamId -ne $_.attacker.teamId } | Measure-Object -Property damage -Sum).Sum)) $HumanDmg = $([math]::Round(($telemetry | Where-Object { $_._T -eq 'LOGPLAYERTAKEDAMAGE' -and $_.attacker.name -eq $player_name -and $_.victim.accountId -notlike "ai.*" -and $_.victim.teamId -ne $_.attacker.teamId } | Measure-Object -Property damage -Sum).Sum))
return @{ return @{
playername = $player_name playername = $player_name
humankills = ($kills | where-object { $_.victim.accountId -notlike 'ai.*' }).count humankills = ($kills | where-object { $_.victim.accountId -notlike 'ai.*' }).count
kills = $kills.count kills = $kills.count
deaths = ($kills | where-object { $_.victim.name -eq $player_name }).count deaths = ($deaths).count
gameMode = $gameMode gameMode = $gameMode
matchType = $matchType matchType = $matchType
dbno = ($kills | where-object { $_.dBNOMaker.name -eq $player_name }).count dbno = ($kills | where-object { $_.dBNOMaker.name -eq $player_name }).count