diff --git a/app/Models/GamePlayer.php b/app/Models/GamePlayer.php index f3238c73..e1b32b5a 100644 --- a/app/Models/GamePlayer.php +++ b/app/Models/GamePlayer.php @@ -151,8 +151,8 @@ public static function fromDotApi(array $payload): ?self $gamePlayer->assists_emp ??= Arr::get($payload, $prefix.'stats.core.breakdown.assists.emp'); $gamePlayer->assists_driver ??= Arr::get($payload, $prefix.'stats.core.breakdown.assists.driver'); $gamePlayer->assists_callout ??= Arr::get($payload, $prefix.'stats.core.breakdown.assists.callouts'); - $gamePlayer->expected_kills ??= Arr::get($payload, $prefix.'performances.kills.expected'); - $gamePlayer->expected_deaths ??= Arr::get($payload, $prefix.'performances.deaths.expected'); + $gamePlayer->expected_kills ??= max(Arr::get($payload, $prefix.'performances.kills.expected'), 0); + $gamePlayer->expected_deaths ??= max(Arr::get($payload, $prefix.'performances.deaths.expected'), 0); if (Arr::has($payload, 'stats.core.breakdown.medals')) { $gamePlayer->medals = collect((array) Arr::get($payload, $prefix.'stats.core.breakdown.medals'))