script callback update
This commit is contained in:
parent
1b80befac1
commit
35bb8a1a37
@ -70,6 +70,12 @@ interface Callbacks {
|
|||||||
/** EndWarmup Callback */
|
/** EndWarmup Callback */
|
||||||
const ENDWARMUP = 'Callbacks.EndWarmUp';
|
const ENDWARMUP = 'Callbacks.EndWarmUp';
|
||||||
|
|
||||||
|
/** Scores Callback (returned after LibXmlRpc_PlayerRanking): Scores */
|
||||||
|
const SCORESREADY = 'Callbacks.ScoresReady';
|
||||||
|
|
||||||
|
/** Scores Callback (returned after LibXmlRpc_PlayerRanking in SM, or LibXmlRpc_TeamsScores in Trackmania): Scores */
|
||||||
|
const SCORES = 'Callbacks.Scores';
|
||||||
|
|
||||||
/** PlayerRanking Callback, returned after LibXmlRpc_PlayerRanking
|
/** PlayerRanking Callback, returned after LibXmlRpc_PlayerRanking
|
||||||
* try to avoid to use this, just use the Get function of the RankingsManager instead
|
* try to avoid to use this, just use the Get function of the RankingsManager instead
|
||||||
* param1 Player $player
|
* param1 Player $player
|
||||||
@ -83,8 +89,6 @@ interface Callbacks {
|
|||||||
*/
|
*/
|
||||||
/** RankingsUpdated Callback: SortedRankings */
|
/** RankingsUpdated Callback: SortedRankings */
|
||||||
const RANKINGSUPDATED = 'Callbacks.RankingsUpdated';
|
const RANKINGSUPDATED = 'Callbacks.RankingsUpdated';
|
||||||
/** Scores Callback (returned after LibXmlRpc_PlayerRanking): Scores */
|
|
||||||
const SCORES = 'Callbacks.Scores';
|
|
||||||
|
|
||||||
/** Returns the AFKStatus of an Player, returned after param1 Scores */ //returned after TODO
|
/** Returns the AFKStatus of an Player, returned after param1 Scores */ //returned after TODO
|
||||||
const AFKSTATUS = 'Callbacks.AfkStatus';
|
const AFKSTATUS = 'Callbacks.AfkStatus';
|
||||||
|
@ -149,6 +149,12 @@ class LibXmlRpcCallbacks implements CallbackListener {
|
|||||||
$player = $this->maniaControl->getPlayerManager()->getPlayer($data[0]);
|
$player = $this->maniaControl->getPlayerManager()->getPlayer($data[0]);
|
||||||
$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::ONPLAYERREQUESTRESPAWN, $player);
|
$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::ONPLAYERREQUESTRESPAWN, $player);
|
||||||
break;
|
break;
|
||||||
|
case 'LibXmlRpc_Scores':
|
||||||
|
$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::SCORES, $data);
|
||||||
|
break;
|
||||||
|
case 'LibXmlRpc_ScoresReady':
|
||||||
|
$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::SCORESREADY, $data);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,9 +52,6 @@ class ShootManiaCallbacks implements CallbackListener {
|
|||||||
case 'LibXmlRpc_Rankings':
|
case 'LibXmlRpc_Rankings':
|
||||||
$this->maniaControl->getServer()->getRankingManager()->updateRankings($data[0]);
|
$this->maniaControl->getServer()->getRankingManager()->updateRankings($data[0]);
|
||||||
break;
|
break;
|
||||||
case 'LibXmlRpc_Scores':
|
|
||||||
$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::SCORES, $data);
|
|
||||||
break;
|
|
||||||
case 'LibAFK_IsAFK':
|
case 'LibAFK_IsAFK':
|
||||||
$this->triggerAfkStatus($data[0]);
|
$this->triggerAfkStatus($data[0]);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user