Exemple #1
0
 /**
  * @return Minimap
  * @throws MapException
  */
 public function getMinimap()
 {
     if ($this->minimap != NULL) {
         return $this->minimap;
     }
     $stream = $this->file->openStream('Minimap.tga');
     if ($stream == NULL) {
         throw new MapException("Minimap.tga file not found on map MPQ file.");
     }
     $this->minimap = new Minimap($stream);
     return $this->minimap;
 }
Exemple #2
0
 /**
  * @return \Generator
  * @throws ReplayException
  */
 public function getTrackerEvents()
 {
     if (!$this->getVersion()->hasTrackerEvents()) {
         throw new ReplayException('Tracker events are not supported on this version.');
     }
     $stream = $this->file->openStream('replay.tracker.events');
     //        echo bin2hex($stream->readBytes(10));
     //        die();
     $stream = new BitStream($stream);
     $parser = new ReplayStreamParser($stream);
     $serializer = new VersionedSerializer($parser, $this->getVersion()->getTree(), $this->hydratorFactory);
     return $this->parseEventStream($serializer, $this->getVersion()->getTrackerEventMapping(), $this->getVersion()->getTrackerEventHeaderNode());
 }