resolved map class todo

This commit is contained in:
Steffen Schröder 2014-01-05 13:56:05 +01:00
parent 41684c8b59
commit 7aa53eda87

View File

@ -20,8 +20,8 @@ class Map {
public $uid = '';
public $fileName = '';
public $environment = '';
public $goldTime; // TODO: format?
public $copperPrice = 0;
public $goldTime = -1;
public $copperPrice = -1;
public $mapType = '';
public $mapStyle = '';
public $nbCheckpoints = -1;
@ -32,7 +32,7 @@ class Map {
public $authorEInfo = '';
public $comment = '';
public $titleUid = '';
public $startTime = 0;
public $startTime = -1;
public $mapFetcher = null;
/**
@ -50,9 +50,7 @@ class Map {
$this->maniaControl = $maniaControl;
$this->startTime = time();
if (!$rpc_infos) {
return;
}
if (!$rpc_infos) return;
$this->name = $rpc_infos['Name'];
$this->uid = $rpc_infos['UId'];
$this->fileName = $rpc_infos['FileName'];
@ -77,7 +75,6 @@ class Map {
catch (\Exception $e) {
trigger_error($e->getMessage(), E_USER_WARNING);
}
$this->authorNick = FORMATTER::stripDirtyCodes($this->mapFetcher->authorNick);
$this->authorEInfo = $this->mapFetcher->authorEInfo;
$this->authorZone = $this->mapFetcher->authorZone;
@ -88,6 +85,5 @@ class Map {
$serverInfo = $this->maniaControl->server->getSystemInfo();
$title = strtoupper(substr($serverInfo['TitleId'], 0, 2));
$this->mx = new \MXInfoFetcher($title, $this->uid, false);
}
}