bug fix own and team dmg

This commit is contained in:
Lanta 2023-09-27 17:03:37 +02:00
parent c4ef2a345a
commit ae4939beec

View file

@ -83,7 +83,7 @@ foreach ($winid in $new_win_matches) {
write-output "creating tble for player $player" write-output "creating tble for player $player"
$win_stats += [PSCustomObject]@{ $win_stats += [PSCustomObject]@{
playername = $player playername = $player
dmg_h = [math]::Round((($telemetry | where-object { $_._T -eq 'LOGPLAYERTAKEDAMAGE' } | where-object { $_.attacker.name -eq $player } | where-object { $_.victim.accountId -notlike "ai.*" } ).damage | Measure-Object -Sum).Sum, 2) dmg_h = [math]::Round((($telemetry | where-object { $_._T -eq 'LOGPLAYERTAKEDAMAGE' } | where-object { $_.attacker.name -eq $player } | where-object { $_.victim.accountId -notlike "ai.*" } | where-object {$_.victim.teamId -ne $_.attacker.teamId } ).damage | Measure-Object -Sum).Sum, 2)
dmg = ($all_winners_of_match | Where-Object { $_.name -eq $player }).damageDealt dmg = ($all_winners_of_match | Where-Object { $_.name -eq $player }).damageDealt
k_h = (($telemetry | where-object { $_._T -eq 'LOGPLAYERKILLV2' } | where-object { $_.killer.name -eq $player } | where-object { $_.victim.accountId -notlike "ai.*" } )).count k_h = (($telemetry | where-object { $_._T -eq 'LOGPLAYERKILLV2' } | where-object { $_.killer.name -eq $player } | where-object { $_.victim.accountId -notlike "ai.*" } )).count
k_a = ($all_winners_of_match | Where-Object { $_.name -eq $player }).kills k_a = ($all_winners_of_match | Where-Object { $_.name -eq $player }).kills