c2ephp

agents/CreatureHistory/CreatureHistoryEvent.php

Go to the documentation of this file.
00001 <?php
00002 require_once(dirname(__FILE__).'/../PRAY/GLSTBlock.php');
00003 
00018 define('CREATUREHISTORY_EVENT_CONCEIVED',0);
00021 define('CREATUREHISTORY_EVENT_SPLICED',1);
00024 define('CREATUREHISTORY_EVENT_ENGINEERED',2);
00027 define('CREATUREHISTORY_EVENT_HATCHED',3);
00033 define('CREATUREHISTORY_EVENT_AGED',4);
00036 define('CREATUREHISTORY_EVENT_EXPORTED',5);
00039 define('CREATUREHISTORY_EVENT_IMPORTED',6);
00042 define('CREATUREHISTORY_EVENT_DIED',7);
00045 define('CREATUREHISTORY_EVENT_BECAMEPREGNANT',8);
00048 define('CREATUREHISTORY_EVENT_IMPREGNATED',9);
00051 define('CREATUREHISTORY_EVENT_CHILDBORN',10);
00054 define('CREATUREHISTORY_EVENT_MUMLAIDMYEGG',11);
00057 define('CREATUREHISTORY_EVENT_LAIDEGG',12);
00060 define('CREATUREHISTORY_EVENT_PHOTOTAKEN',13);
00067 define('CREATUREHISTORY_EVENT_IAMCLONED',14); 
00073 define('CREATUREHISTORY_EVENT_CLONEDME',15);
00076 define('CREATUREHISTORY_EVENT_WARPEDOUT',16);
00079 define('CREATUREHISTORY_EVENT_WARPEDIN',17);
00081 
00082 
00084 class CreatureHistoryEvent {
00085 
00087     
00088     private $eventtype;
00089     private $worldtime;
00090     private $creatureage;
00091     private $timestamp;
00092     private $lifestage;
00093     private $moniker1;
00094     private $moniker2;
00095     private $usertext;
00096     private $photograph;
00097     private $worldname;
00098     private $worldUID;
00099     private $dockingstationuser; 
00100     
00101     private $unknown1; 
00102     private $unknown2; 
00103 
00105 
00107 
00129     public function CreatureHistoryEvent($eventtype,$worldtime,$creatureage,$timestamp,$lifestage,$moniker1,$moniker2,$usertext,$photograph,$worldname,$worldUID) {
00130         $this->eventtype = $eventtype;
00131         $this->worldtime = $worldtime;
00132         $this->creatureage = $creatureage;
00133         $this->timestamp = $timestamp;
00134         $this->lifestage = $lifestage;
00135         $this->moniker1 = $moniker1;
00136         $this->moniker2 = $moniker2;
00137         $this->usertext = $usertext;
00138         $this->photograph = $photograph;
00139         $this->worldname = $worldname;
00140         $this->worldUID = $worldUID;
00141     }
00142 
00144 
00149     public function AddDSInfo($DSUserID,$unknown1,$unknown2) {
00150         $this->dockingstationuser = $DSUserID;
00151         $this->unknown1 = $unknown1;
00152         $this->unknown2 = $unknown2;
00153     }
00154 
00157 
00163     public function Compile($format) {
00164         $data = pack('VVVVV',$this->eventtype,$this->worldtime,$this->creatureage,$this->timestamp,$this->lifestage);
00165         $data .= pack('V',strlen($this->moniker1)).$this->moniker1;
00166         $data .= pack('V',strlen($this->moniker2)).$this->moniker2;
00167         $data .= pack('V',strlen($this->usertext)).$this->usertext;
00168         $data .= pack('V',strlen($this->photograph)).$this->photograph;
00169         $data .= pack('V',strlen($this->worldname)).$this->worldname;
00170         $data .= pack('V',strlen($this->worldUID)).$this->worldUID;
00171         if($format == GLST_FORMAT_DS) {
00172             $data .= pack('V',strlen($this->dockingstationuser)).$this->dockingstationuser;
00173             $data .= pack('VV',$this->unknown1,$this->unknown2);
00174         }
00175         return $data;
00176     }
00177 
00179 
00182     public function GetEventType() {
00183         return $this->eventtype;
00184     }
00185 
00187 
00190     public function GetWorldTime() {
00191         return $this->worldtime;
00192     }
00194 
00197     public function GetCreatureAge() {
00198         return $this->creatureage;
00199     }
00200 
00202 
00205     public function GetTimestamp() {
00206         return $this->timestamp;
00207     }
00208 
00210 
00215     public function GetLifeStage() {
00216         return $this->lifestage;
00217     }
00218 
00220 
00233     public function GetMoniker1() {
00234         return $this->moniker1;
00235     }
00236 
00238 
00247     public function GetMoniker2() {
00248         return $this->moniker2;
00249     }
00250 
00252 
00263     public function GetUserText() {
00264         return $this->usertext;
00265     }
00266 
00268 
00280     public function GetPhotograph() {
00281         return $this->photograph;
00282     }
00284 
00287     public function GetWorldName() {
00288         return $this->worldname;
00289     }
00290 
00292 
00295     public function GetWorldUID() {
00296         return $this->worldUID;
00297     }
00298 }
00299 ?>
 All Classes Files Functions Variables Enumerations