diff --git a/core/Callbacks/Callbacks.php b/core/Callbacks/Callbacks.php index f53e889b..c6363971 100644 --- a/core/Callbacks/Callbacks.php +++ b/core/Callbacks/Callbacks.php @@ -61,6 +61,10 @@ interface Callbacks { const MP_PODIUMSTART = 'Maniaplanet.Podium_Start'; const MP_PODIUMEND = 'Maniaplanet.Podium_End'; + const MP_WARMUP_START = 'Maniaplanet.WarmUp.Start'; + const MP_WARMUP_END = 'Maniaplanet.WarmUp.End'; + const MP_WARMUP_STATUS = 'Maniaplanet.WarmUp.Status'; + const SM_SCORES = "Shootmania.Scores"; const SM_ONEVENTDEFAULT = "Shootmania.Event.Default"; @@ -81,8 +85,18 @@ interface Callbacks { const SM_ONPLAYERTHROWSOBJECT = "Shootmania.Event.OnPlayerThrowsObject"; const SM_ONPLAYERREQUESTACTIONCHANGE = "Shootmania.Event.OnPlayerRequestActionChange"; - // New TM Callbacks + //SM GameMode Callbacks + const SM_COMBO_PAUSE = 'Shootmania.Combo.Pause'; + const SM_ELITE_STARTTURN = 'Shootmania.Elite.StartTurn'; + const SM_ELITE_ENDTURN = 'Shootmania.Elite.EndTurn'; + const SM_JOUST_ONRELOAD = 'Shootmania.Joust.OnReload'; + const SM_JOUST_SELECTEDPLAYERS = 'Shootmania.Joust.SelectedPlayers'; + const SM_JOUST_ROUNDRESULT = 'Shootmania.Joust.RoundResult'; + const SM_ROYAL_POINTS = 'Shootmania.Royal.Points'; + const SM_ROYAL_PLAYERSPAWN = 'Shootmania.Royal.PlayerSpawn'; + const SM_ROYAL_ROUNDWINNER = 'Shootmania.Royal.RoundWinner'; + // New TM Callbacks const TM_ONEVENTDEFAULT = "Trackmania.Event.Default"; const TM_ONEVENTSTARTLINE = "Trackmania.Event.StartLine"; const TM_ONCOMMAND = "Trackmania.Event.OnCommand"; diff --git a/core/Callbacks/LibXmlRpcCallbacks.php b/core/Callbacks/LibXmlRpcCallbacks.php index caf6242b..01ea9233 100644 --- a/core/Callbacks/LibXmlRpcCallbacks.php +++ b/core/Callbacks/LibXmlRpcCallbacks.php @@ -142,6 +142,15 @@ class LibXmlRpcCallbacks implements CallbackListener { case Callbacks::MP_PODIUMEND: $this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::MP_PODIUMEND); break; + case Callbacks::MP_WARMUP_START: + $this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::MP_WARMUP_START); + break; + case Callbacks::MP_WARMUP_END: + $this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::MP_WARMUP_END); + break; + case Callbacks::MP_WARMUP_STATUS: + //TODO + break; //OLD Callbacks case 'LibXmlRpc_BeginMatch': diff --git a/core/Callbacks/ShootManiaCallbacks.php b/core/Callbacks/ShootManiaCallbacks.php index 93ccbba7..3434b698 100644 --- a/core/Callbacks/ShootManiaCallbacks.php +++ b/core/Callbacks/ShootManiaCallbacks.php @@ -117,6 +117,34 @@ class ShootManiaCallbacks implements CallbackListener { case Callbacks::SM_ONPLAYERREQUESTACTIONCHANGE: $this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::SM_ONPLAYERREQUESTACTIONCHANGE, new OnPlayerRequestActionChange($this->maniaControl, $data)); break; + case Callbacks::SM_COMBO_PAUSE: + //TODO + break; + case Callbacks::SM_ELITE_STARTTURN: + //TODO + break; + case Callbacks::SM_ELITE_ENDTURN: + //TODO + break; + case Callbacks::SM_JOUST_ONRELOAD: + //TODO + break; + case Callbacks::SM_JOUST_SELECTEDPLAYERS: + //TODO + break; + case Callbacks::SM_JOUST_ROUNDRESULT: + //TODO + break; + case Callbacks::SM_ROYAL_POINTS: + //TODO + break; + case Callbacks::SM_ROYAL_PLAYERSPAWN: + //TODO + break; + case Callbacks::SM_ROYAL_ROUNDWINNER: + //TODO + break; + //Old Callbacks case 'LibXmlRpc_Rankings': $this->maniaControl->getServer()->getRankingManager()->updateRankings($data[0]); diff --git a/core/Callbacks/Structures/TrackMania/Models/PlayerScore.php b/core/Callbacks/Structures/TrackMania/Models/PlayerScore.php index c955172c..bc4b1f71 100644 --- a/core/Callbacks/Structures/TrackMania/Models/PlayerScore.php +++ b/core/Callbacks/Structures/TrackMania/Models/PlayerScore.php @@ -18,7 +18,10 @@ class PlayerScore extends CommonPlayerScore { private $bestRaceTime; private $bestLapTime; private $stuntScore; - + private $bestRaceRespawns; + private $bestRaceCheckpoints; + private $bestLapRespawns; + private $bestLapCheckpoints; /** * Returns the Rank @@ -88,4 +91,61 @@ class PlayerScore extends CommonPlayerScore { $this->stuntScore = $stuntScore; } + /** + * @return mixed + */ + public function getBestRaceRespawns() { + return $this->bestRaceRespawns; + } + + /** + * @param mixed $bestRaceRespawns + */ + public function setBestRaceRespawns($bestRaceRespawns) { + $this->bestRaceRespawns = $bestRaceRespawns; + } + + /** + * @return mixed + */ + public function getBestRaceCheckpoints() { + return $this->bestRaceCheckpoints; + } + + /** + * @param mixed $bestRaceCheckpoints + */ + public function setBestRaceCheckpoints($bestRaceCheckpoints) { + $this->bestRaceCheckpoints = $bestRaceCheckpoints; + } + + /** + * @return mixed + */ + public function getBestLapRespawns() { + return $this->bestLapRespawns; + } + + /** + * @param mixed $bestLapRespawns + */ + public function setBestLapRespawns($bestLapRespawns) { + $this->bestLapRespawns = $bestLapRespawns; + } + + /** + * @return mixed + */ + public function getBestLapCheckpoints() { + return $this->bestLapCheckpoints; + } + + /** + * @param mixed $bestLapCheckpoints + */ + public function setBestLapCheckpoints($bestLapCheckpoints) { + $this->bestLapCheckpoints = $bestLapCheckpoints; + } + + } \ No newline at end of file diff --git a/core/Callbacks/Structures/TrackMania/OnScoresStructure.php b/core/Callbacks/Structures/TrackMania/OnScoresStructure.php index edb1ab66..0cad0960 100644 --- a/core/Callbacks/Structures/TrackMania/OnScoresStructure.php +++ b/core/Callbacks/Structures/TrackMania/OnScoresStructure.php @@ -30,11 +30,12 @@ class OnScoresStructure extends CommonScoresStructure { $playerScore->setBestRaceTime($jsonPlayer->bestracetime); $playerScore->setBestLapTime($jsonPlayer->bestlaptime); $playerScore->setStuntScore($jsonPlayer->stuntscore); + $playerScore->setBestRaceRespawns($jsonPlayer->bestracerespawns); + $playerScore->setBestRaceCheckpoints($jsonPlayer->bestracecheckpoints); + $playerScore->setBestLapRespawns($jsonPlayer->bestlaprespawns); + $playerScore->setBestLapCheckpoints($jsonPlayer->bestlapcheckpoints); $this->playerScores[$jsonPlayer->login] = $playerScore; } - } - - } \ No newline at end of file