Updated to XML-RCP Callbacks Version 2.5.0
This commit is contained in:
@ -23,6 +23,10 @@ class PlayerScore extends CommonPlayerScore {
|
||||
private $bestRaceCheckpoints;
|
||||
private $bestLapRespawns;
|
||||
private $bestLapCheckpoints;
|
||||
private $prevRaceTime;
|
||||
private $prevRaceRespawns;
|
||||
private $prevRaceCheckpoints;
|
||||
private $prevStuntsScore;
|
||||
|
||||
/**
|
||||
* Returns the Rank
|
||||
@ -140,6 +144,7 @@ class PlayerScore extends CommonPlayerScore {
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param mixed $bestLapRespawns
|
||||
*/
|
||||
public function setBestLapRespawns($bestLapRespawns) {
|
||||
@ -162,5 +167,69 @@ class PlayerScore extends CommonPlayerScore {
|
||||
$this->bestLapCheckpoints = $bestLapCheckpoints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @return mixed
|
||||
*/
|
||||
public function getPrevRaceTime() {
|
||||
return $this->prevRaceTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param mixed $prevRaceTime
|
||||
*/
|
||||
public function setPrevRaceTime($prevRaceTime) {
|
||||
$this->prevRaceTime = $prevRaceTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @return mixed
|
||||
*/
|
||||
public function getPrevRaceRespawns() {
|
||||
return $this->prevRaceRespawns;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param mixed $prevRaceRespawns
|
||||
*/
|
||||
public function setPrevRaceRespawns($prevRaceRespawns) {
|
||||
$this->prevRaceRespawns = $prevRaceRespawns;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @return mixed
|
||||
*/
|
||||
public function getPrevRaceCheckpoints() {
|
||||
return $this->prevRaceCheckpoints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param mixed $prevRaceCheckpoints
|
||||
*/
|
||||
public function setPrevRaceCheckpoints($prevRaceCheckpoints) {
|
||||
$this->prevRaceCheckpoints = $prevRaceCheckpoints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @return mixed
|
||||
*/
|
||||
public function getPrevStuntsScore() {
|
||||
return $this->prevStuntsScore;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param mixed $prevStuntsScore
|
||||
*/
|
||||
public function setPrevStuntsScore($prevStuntsScore) {
|
||||
$this->prevStuntsScore = $prevStuntsScore;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -4,7 +4,6 @@ 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;
|
||||
|
||||
/**
|
||||
@ -43,6 +42,22 @@ class OnScoresStructure extends CommonScoresStructure {
|
||||
$playerScore->setBestRaceCheckpoints($jsonPlayer->bestracecheckpoints);
|
||||
$playerScore->setBestLapRespawns($jsonPlayer->bestlaprespawns);
|
||||
$playerScore->setBestLapCheckpoints($jsonPlayer->bestlapcheckpoints);
|
||||
//New attributes in 2.5.0
|
||||
if (property_exists($jsonPlayer, 'prevracetime')) {
|
||||
$playerScore->setPrevRaceTime($jsonPlayer->prevracetime);
|
||||
}
|
||||
|
||||
if (property_exists($jsonPlayer, 'prevracerespawns')) {
|
||||
$playerScore->setPrevRaceRespawns($jsonPlayer->prevracerespawns);
|
||||
}
|
||||
|
||||
if (property_exists($jsonPlayer, 'prevracecheckpoints')) {
|
||||
$playerScore->setPrevRaceCheckpoints($jsonPlayer->prevracecheckpoints);
|
||||
}
|
||||
|
||||
if (property_exists($jsonPlayer, 'prevstuntsscore')) {
|
||||
$playerScore->setPrevStuntsScore($jsonPlayer->prevstuntsscore);
|
||||
}
|
||||
|
||||
$this->playerScores[$jsonPlayer->login] = $playerScore;
|
||||
}
|
||||
|
Reference in New Issue
Block a user