mc plugin increase

This commit is contained in:
kremsy
2017-05-19 18:35:33 +02:00
parent 2991675094
commit 6193787ee5
3 changed files with 14 additions and 12 deletions

View File

@ -129,7 +129,6 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener
}
}
}
$this->getMXMapsAndShowList($player, $author, $environment, $searchString);
}
@ -142,6 +141,17 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener
* @param string $searchString
*/
private function getMXMapsAndShowList(Player $player, $author = '', $environment = '', $searchString = '') {
//TODO do more clean solution
if($environment == ""){
$titleId = $this->maniaControl->getServer()->titleId;
//Set Environments on Trackmania
$game = explode('@', $titleId);
$envNumber = ManiaExchangeMapSearch::getEnvironment($game[0]); //TODO enviroment as constant
if ($envNumber > -1) {
$environment = $envNumber;
}
}
//Search the Maps
$mxSearch = new ManiaExchangeMapSearch($this->maniaControl);
$mxSearch->setAuthorName($author);