callback updates
This commit is contained in:
parent
50eaf4b82d
commit
0b08d5371d
@ -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";
|
||||
|
@ -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':
|
||||
|
@ -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]);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user