improved map object

This commit is contained in:
kremsy 2013-11-10 19:03:29 +01:00
parent c7e4464f30
commit 2003713ec2

View File

@ -22,13 +22,13 @@ class map {
public $nbchecks = 0; public $nbchecks = 0;
public $score = 0; public $score = 0;
public $starttime = 0; public $starttime = 0;
public $maptype; //format? public $maptype = '';
public $mapstyle; //format? public $mapstyle = '';
public $titleuid; //format? public $titleuid = 0;
public $gbx; //format? // public $gbx; //needed? would be the whole gbx object
public $mx; //format? public $mx; //format?
public $authorNick; //format? public $authorNick = '';
public $authorZone; //format? public $authorZone = '';
public $authorEInfo; //format? public $authorEInfo; //format?
//Todo: check RPC infos //Todo: check RPC infos
@ -59,21 +59,6 @@ class map {
$this->name = 'undefined'; $this->name = 'undefined';
} }
/*
* aseco trash:
* // obtain map's GBX data, MX info & records
$map_item->mx = findMXdata($map_item->uid, true);
// titleuid (is not in the GetMapInfos method..)
$map_item->titleuid = $map_item->gbx->titleUid;
// author Informations from the GBXBaseFetcher
$map_item->authorNick = $map_item->gbx->authorNick;
$map_item->authorZone = $map_item->gbx->authorZone;
$map_item->authorEInfo = $map_item->gbx->authorEInfo;
*
*/
$mapFetcher = new \GBXChallMapFetcher(true); $mapFetcher = new \GBXChallMapFetcher(true);
try{ try{
$mapFetcher->processFile($this->server->mapdir . $this->filename); $mapFetcher->processFile($this->server->mapdir . $this->filename);
@ -81,6 +66,7 @@ class map {
{ {
trigger_error($e->getMessage(), E_USER_WARNING); trigger_error($e->getMessage(), E_USER_WARNING);
} }
$this->authorNick = $mapFetcher->authorNick; $this->authorNick = $mapFetcher->authorNick;
$this->authorEInfo = $mapFetcher->authorEInfo; $this->authorEInfo = $mapFetcher->authorEInfo;
$this->authorZone = $mapFetcher->authorZone; $this->authorZone = $mapFetcher->authorZone;