MapList fixed
This commit is contained in:
committed by
Steffen Schröder
parent
adfecf734e
commit
9b965a1720
@ -200,9 +200,6 @@ class Dedimania implements CallbackListener, CommandListener, TimerListener, Plu
|
||||
* @param \ManiaControl\Players\Player $player
|
||||
*/
|
||||
public function handlePlayerConnect(Player $player) {
|
||||
if (!$this->init) {
|
||||
return;
|
||||
}
|
||||
// Send Dedimania request
|
||||
$data = array($this->dedimaniaData->sessionId, $player->login, $player->rawNickname, $player->path, $player->isSpectator);
|
||||
$content = $this->encode_request(self::DEDIMANIA_PLAYERCONNECT, $data);
|
||||
@ -248,9 +245,6 @@ class Dedimania implements CallbackListener, CommandListener, TimerListener, Plu
|
||||
* @param \ManiaControl\Players\Player $player
|
||||
*/
|
||||
public function handlePlayerDisconnect(Player $player) {
|
||||
if (!$this->init) {
|
||||
return;
|
||||
}
|
||||
$this->dedimaniaData->removePlayer($player->login);
|
||||
|
||||
// Send Dedimania request
|
||||
@ -286,9 +280,6 @@ class Dedimania implements CallbackListener, CommandListener, TimerListener, Plu
|
||||
* @param $callback
|
||||
*/
|
||||
public function handleBeginMap($callback) {
|
||||
if (!$this->init) {
|
||||
return;
|
||||
}
|
||||
unset($this->dedimaniaData->records);
|
||||
$this->fetchDedimaniaRecords(true);
|
||||
}
|
||||
@ -300,9 +291,6 @@ class Dedimania implements CallbackListener, CommandListener, TimerListener, Plu
|
||||
* @param $callback
|
||||
*/
|
||||
public function handleMapEnd($callback) {
|
||||
if (!$this->init) {
|
||||
return;
|
||||
}
|
||||
if (!$this->dedimaniaData || !$this->dedimaniaData->records) {
|
||||
return;
|
||||
}
|
||||
@ -381,9 +369,6 @@ class Dedimania implements CallbackListener, CommandListener, TimerListener, Plu
|
||||
* @param $callback
|
||||
*/
|
||||
public function updatePlayerList($callback) {
|
||||
if (!$this->init) {
|
||||
return;
|
||||
}
|
||||
$serverInfo = $this->getServerInfo();
|
||||
$playerList = $this->getPlayerList();
|
||||
$votesInfo = $this->getVotesInfo();
|
||||
@ -424,9 +409,6 @@ class Dedimania implements CallbackListener, CommandListener, TimerListener, Plu
|
||||
* @param $callback
|
||||
*/
|
||||
public function handlePlayerCheckpoint($callback) {
|
||||
if (!$this->init) {
|
||||
return;
|
||||
}
|
||||
$data = $callback[1];
|
||||
$login = $data[1];
|
||||
$time = $data[2];
|
||||
@ -444,9 +426,6 @@ class Dedimania implements CallbackListener, CommandListener, TimerListener, Plu
|
||||
* @param $callback
|
||||
*/
|
||||
public function handlePlayerFinished($callback) {
|
||||
if (!$this->init) {
|
||||
return;
|
||||
}
|
||||
//var_dump($callback);
|
||||
$data = $callback[1];
|
||||
if ($data[0] <= 0 || $data[2] <= 0) {
|
||||
@ -619,10 +598,6 @@ class Dedimania implements CallbackListener, CommandListener, TimerListener, Plu
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->init) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Reset records
|
||||
if ($reset) {
|
||||
$this->dedimaniaData->records = array();
|
||||
@ -948,10 +923,6 @@ class Dedimania implements CallbackListener, CommandListener, TimerListener, Plu
|
||||
* @return array|RecordData
|
||||
*/
|
||||
public function getDedimaniaRecords() {
|
||||
if (!$this->init) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->dedimaniaData->records) {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user