/**
  * @return ScriptInfo
  */
 public static function fromArray($array)
 {
     $object = parent::fromArray($array);
     $object->paramDescs = ScriptSettings::fromArrayOfArray($object->paramDescs);
     $object->commandDescs = Command::fromArrayOfArray($object->commandDescs);
     return $object;
 }
Beispiel #2
0
 public static function fromArray($array)
 {
     $object = parent::fromArray($array);
     if ($object->paramDescs) {
         $object->paramDescs = ScriptSettings::fromArrayOfArray($object->paramDescs);
     }
     return $object;
 }
Beispiel #3
0
 /**
  * @return Player
  */
 public static function fromArray($array)
 {
     $object = parent::fromArray($array);
     $object->skins = Skin::fromArrayOfArray($object->skins);
     //Detail flags
     $object->forceSpectator = $object->flags % 10;
     // 0, 1 or 2
     $object->isReferee = (bool) (intval($object->flags / 10) % 10);
     $object->isPodiumReady = (bool) (intval($object->flags / 100) % 10);
     $object->isUsingStereoscopy = (bool) (intval($object->flags / 1000) % 10);
     $object->isManagedByAnOtherServer = (bool) (intval($object->flags / 10000) % 10);
     $object->isServer = (bool) (intval($object->flags / 100000) % 10);
     $object->hasPlayerSlot = (bool) (intval($object->flags / 1000000) % 10);
     $object->isBroadcasting = (bool) (intval($object->flags / 10000000) % 10);
     $object->hasJoinedGame = (bool) (intval($object->flags / 100000000) % 10);
     //Details spectatorStatus
     $object->spectator = (bool) ($object->spectatorStatus % 10);
     $object->temporarySpectator = (bool) (intval($object->spectatorStatus / 10) % 10);
     $object->pureSpectator = (bool) (intval($object->spectatorStatus / 100) % 10);
     $object->autoTarget = (bool) (intval($object->spectatorStatus / 1000) % 10);
     $object->currentTargetId = intval($object->spectatorStatus / 10000);
     return $object;
 }
 /**
  * @return LadderStats
  */
 static function fromArray($array)
 {
     $object = parent::fromArray($array);
     $object->playerRankings = ZoneRanking::fromArrayOfArray($object->playerRankings);
     return $object;
 }
Beispiel #5
0
 public static function fromArray($array)
 {
     $object = parent::fromArray($array);
     $object->playerNetInfos = Player::fromArrayOfArray($object->playerNetInfos);
     return $object;
 }
 /**
  * @return Map
  */
 public static function fromArray($array)
 {
     $object = parent::fromArray($array);
     $object->fileName = str_replace("", '', $object->fileName);
     return $object;
 }
 /**
  * @return Skin
  */
 public static function fromArray($array)
 {
     $object = parent::fromArray($array);
     $object->packDesc = FileDesc::fromArray($object->packDesc);
     return $object;
 }