From a3d7bdbb8af0d271684f3fe8bbdee72893987dd5 Mon Sep 17 00:00:00 2001 From: Jocy Date: Sun, 14 May 2017 17:12:48 +0200 Subject: [PATCH] Added setMatchPoints() to Trackmania OnScoresStructure, Fixed a Maplist search bug --- core/Callbacks/Structures/TrackMania/OnScoresStructure.php | 1 + core/Maps/MapList.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/Callbacks/Structures/TrackMania/OnScoresStructure.php b/core/Callbacks/Structures/TrackMania/OnScoresStructure.php index 1b90ef49..464a2536 100644 --- a/core/Callbacks/Structures/TrackMania/OnScoresStructure.php +++ b/core/Callbacks/Structures/TrackMania/OnScoresStructure.php @@ -35,6 +35,7 @@ class OnScoresStructure extends CommonScoresStructure { $playerScore->setRank($jsonPlayer->rank); $playerScore->setRoundPoints($jsonPlayer->roundpoints); $playerScore->setMapPoints($jsonPlayer->mappoints); + $playerScore->setMatchPoints($jsonPlayer->matchpoints); $playerScore->setBestRaceTime($jsonPlayer->bestracetime); $playerScore->setBestLapTime($jsonPlayer->bestlaptime); $playerScore->setStuntScore($jsonPlayer->stuntsscore); diff --git a/core/Maps/MapList.php b/core/Maps/MapList.php index c9bec4a2..acf0c810 100644 --- a/core/Maps/MapList.php +++ b/core/Maps/MapList.php @@ -778,7 +778,11 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { $player = $this->maniaControl->getPlayerManager()->getPlayer($login); $searchString = $callback[1][3][0]['Value']; - $maps = $this->maniaControl->getMapManager()->searchMapsByAuthor($searchString); + if ($searchString) { + $maps = $this->maniaControl->getMapManager()->searchMapsByAuthor($searchString); + } else { + $maps = null; + } $this->showMapList($player, $maps); }