small improvements

This commit is contained in:
kremsy 2014-01-28 17:12:23 +01:00 committed by Steffen Schröder
parent 6b62932ead
commit 769147e7c7
3 changed files with 50 additions and 58 deletions

View File

@ -10,6 +10,7 @@ use ManiaControl\Formatter;
use ManiaControl\ManiaControl;
use ManiaControl\ManiaExchange\ManiaExchangeList;
use ManiaControl\ManiaExchange\ManiaExchangeManager;
use ManiaControl\ManiaExchange\MXMapInfo;
use ManiaControl\Players\Player;
/**

View File

@ -35,10 +35,6 @@ class Player {
public $downloadRate = -1;
public $uploadRate = -1;
public $skins = null;
public $stateUpdateLatency; //TODO format?
public $stateUpdatePeriod; //TODO format?
public $latestNetworkActivity; //TODO format?
public $packetLossRate; //TODO format?
public $maniaPlanetPlayDays = -1;
//Flags details
@ -90,11 +86,6 @@ class Player {
$this->downloadRate = $mpPlayer->downloadRate;
$this->uploadRate = $mpPlayer->uploadRate;
$this->skins = $mpPlayer->skins;
$this->stateUpdateLatency = $mpPlayer->stateUpdateLatency;
$this->stateUpdatePeriod = $mpPlayer->stateUpdatePeriod;
$this->latestNetworkActivity = $mpPlayer->latestNetworkActivity;
$this->packetLossRate = $mpPlayer->packetLossRate;
//Flag Details
$this->forcedSpectatorState = $mpPlayer->forceSpectator;
@ -114,9 +105,7 @@ class Player {
$this->autoTarget = $mpPlayer->autoTarget;
$this->currentTargetId = $mpPlayer->currentTargetId;
$this->joinTime = time();
if ($this->nickname == '') {
$this->nickname = $this->login;
}

View File

@ -120,6 +120,8 @@ class PlayerManager implements CallbackListener {
$playerItem->isSpectator = $detailedPlayerInfo->isSpectator;
$playerItem->avatar = $detailedPlayerInfo->avatar;
$playerItem->ladderStats = $detailedPlayerInfo->ladderStats;
$playerItem->downloadRate = $detailedPlayerInfo->downloadRate;
$playerItem->uploadRate = $detailedPlayerInfo->uploadRate;
$playerItem->hoursSinceZoneInscription = $detailedPlayerInfo->hoursSinceZoneInscription;