Statslist and Playerlist now have Chunking
This commit is contained in:
@ -4,6 +4,7 @@ namespace ManiaControl\Callbacks\Structures\TrackMania;
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\CommonScoresStructure;
|
||||
use ManiaControl\Callbacks\Structures\TrackMania\Models\PlayerScore;
|
||||
use ManiaControl\Callbacks\Structures\TrackMania\Models\TeamScore;
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
/**
|
||||
@ -26,16 +27,16 @@ class OnScoresStructure extends CommonScoresStructure {
|
||||
parent::__construct($maniaControl, $data);
|
||||
|
||||
$jsonObj = $this->getPlainJsonObject();
|
||||
|
||||
var_dump($jsonObj);
|
||||
foreach ($jsonObj->players as $jsonPlayer) {
|
||||
$player = $this->maniaControl->getPlayerManager()->getPlayer($jsonPlayer->login);
|
||||
if ($player) {
|
||||
$playerScore = new PlayerScore();
|
||||
$playerScore->setPlayer($this->maniaControl->getPlayerManager()->getPlayer($jsonPlayer->login));
|
||||
$playerScore->setRank($jsonPlayer->rank);
|
||||
$playerScore->setRoundPoints($jsonPlayer->roundpoints);
|
||||
$playerScore->setMapPoints($jsonPlayer->mappoints);
|
||||
$playerScore->setMatchPoints($jsonPlayer->matchpoints);
|
||||
$playerScore->setRoundPoints($jsonPlayer->roundpoints);
|
||||
$playerScore->setBestRaceTime($jsonPlayer->bestracetime);
|
||||
$playerScore->setBestLapTime($jsonPlayer->bestlaptime);
|
||||
$playerScore->setStuntScore($jsonPlayer->stuntsscore);
|
||||
|
Reference in New Issue
Block a user