From 9711937a1e83108031ce1fbeabdac1c12d1bc0c5 Mon Sep 17 00:00:00 2001 From: Alexander Nell Date: Fri, 17 Jul 2020 14:36:18 +0200 Subject: [PATCH] bestracerespawns and bestlaprespawns removed from Scores-Callback in the new game --- .../Structures/TrackMania/OnScoresStructure.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/Callbacks/Structures/TrackMania/OnScoresStructure.php b/core/Callbacks/Structures/TrackMania/OnScoresStructure.php index a15fd7ed..3918930f 100644 --- a/core/Callbacks/Structures/TrackMania/OnScoresStructure.php +++ b/core/Callbacks/Structures/TrackMania/OnScoresStructure.php @@ -38,10 +38,18 @@ class OnScoresStructure extends CommonScoresStructure { $playerScore->setBestRaceTime($jsonPlayer->bestracetime); $playerScore->setBestLapTime($jsonPlayer->bestlaptime); $playerScore->setStuntScore($jsonPlayer->stuntsscore); - $playerScore->setBestRaceRespawns($jsonPlayer->bestracerespawns); $playerScore->setBestRaceCheckpoints($jsonPlayer->bestracecheckpoints); - $playerScore->setBestLapRespawns($jsonPlayer->bestlaprespawns); $playerScore->setBestLapCheckpoints($jsonPlayer->bestlapcheckpoints); + + // removed in TM2020 + if (property_exists($jsonPlayer, 'bestracerespawns')) { + $playerScore->setBestRaceRespawns($jsonPlayer->bestracerespawns); + } + // removed in TM2020 + if (property_exists($jsonPlayer, 'bestlaprespawns')) { + $playerScore->setBestLapRespawns($jsonPlayer->bestlaprespawns); + } + //New attributes in 2.5.0 if (property_exists($jsonPlayer, 'prevracetime')) { $playerScore->setPrevRaceTime($jsonPlayer->prevracetime);