コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->success = $reader->readBool($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->item_capture_mult = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->item_flee_mult = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->stop_movement = $reader->readBool($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->stop_attack = $reader->readBool($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->target_max = $reader->readBool($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->target_slow = $reader->readBool($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->success = $reader->readBool($stream);
             continue;
         }
         if ($tag === 2) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->awarded_badges === null) {
                 $this->awarded_badges = new \Protobuf\EnumCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->awarded_badges->add(\POGOProtos\Enums\BadgeType::valueOf($reader->readVarint($stream)));
             }
             continue;
         }
         if ($tag === 3) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->awarded_badge_levels === null) {
                 $this->awarded_badge_levels = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->awarded_badge_levels->add($reader->readVarint($stream));
             }
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #3
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 4);
             $this->start_time_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->unknown_status = $reader->readBool($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->walking = $reader->readBool($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->running = $reader->readBool($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->stationary = $reader->readBool($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->automotive = $reader->readBool($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->tilting = $reader->readBool($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->cycling = $reader->readBool($stream);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 12);
             $this->status = $reader->readByteStream($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #4
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->daily_bonus_coins = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 2) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->daily_defender_bonus_per_pokemon === null) {
                 $this->daily_defender_bonus_per_pokemon = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->daily_defender_bonus_per_pokemon->add($reader->readVarint($stream));
             }
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->daily_defender_bonus_max_defenders = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             if ($this->daily_defender_bonus_currency === null) {
                 $this->daily_defender_bonus_currency = new \Protobuf\ScalarCollection();
             }
             $this->daily_defender_bonus_currency->add($reader->readString($stream));
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->min_time_between_claims_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->daily_bonus_enabled = $reader->readBool($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->daily_defender_bonus_enabled = $reader->readBool($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #5
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->energy_per_sec = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->dodge_energy_cost = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->retarget_seconds = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->enemy_attack_interval = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->attack_server_interval = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->round_duration_seconds = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->bonus_time_per_ally_seconds = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->maximum_attackers_per_battle = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->same_type_attack_bonus_multiplier = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->maximum_energy = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 11) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->energy_delta_per_health_lost = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 12) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->dodge_duration_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 13) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->minimum_player_level = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 14) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->swap_duration_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 15) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->dodge_damage_reduction_percent = $reader->readFloat($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #6
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 6);
             $this->encounter_id = $reader->readFixed64($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->pokeball = \POGOProtos\Inventory\Item\ItemId::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->normalized_reticle_size = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->spawn_point_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->hit_pokemon = $reader->readBool($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->spin_modifier = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->normalized_hit_position = $reader->readDouble($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #7
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->device_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->android_board_name = $reader->readString($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->android_bootloader = $reader->readString($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->device_brand = $reader->readString($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->device_model = $reader->readString($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->device_model_identifier = $reader->readString($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->device_model_boot = $reader->readString($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->hardware_manufacturer = $reader->readString($stream);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->hardware_model = $reader->readString($stream);
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->firmware_brand = $reader->readString($stream);
             continue;
         }
         if ($tag === 12) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->firmware_tags = $reader->readString($stream);
             continue;
         }
         if ($tag === 13) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->firmware_type = $reader->readString($stream);
             continue;
         }
         if ($tag === 14) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->firmware_fingerprint = $reader->readString($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #8
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 4);
             $this->timestamp_snapshot = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->linear_acceleration_x = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->linear_acceleration_y = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->linear_acceleration_z = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->magnetic_field_x = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->magnetic_field_y = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->magnetic_field_z = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->magnetic_field_accuracy = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->attitude_pitch = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 11) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->attitude_yaw = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 12) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->attitude_roll = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 13) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->rotation_rate_x = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 14) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->rotation_rate_y = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 15) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->rotation_rate_z = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 16) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->gravity_x = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 17) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->gravity_y = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 18) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->gravity_z = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 19) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->status = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #9
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->id = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->item_id = \POGOProtos\Inventory\Item\ItemId::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->incubator_type = \POGOProtos\Inventory\EggIncubatorType::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->uses_remaining = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 4);
             $this->pokemon_id = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->start_km_walked = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->target_km_walked = $reader->readDouble($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #10
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->result = \POGOProtos\Networking\Responses\DownloadRemoteConfigVersionResponse\Result::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 4);
             $this->item_templates_timestamp_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 4);
             $this->asset_digest_timestamp_ms = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #11
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 6);
             $this->pokemon_id = $reader->readFixed64($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->item = \POGOProtos\Inventory\Item\ItemId::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->pokedex_entry_id = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->player_stats = $reader->readBool($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->player_currency = $reader->readBool($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->player_camera = $reader->readBool($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->inventory_upgrades = $reader->readBool($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->applied_items = $reader->readBool($stream);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->egg_incubators = $reader->readBool($stream);
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->pokemon_family_id = \POGOProtos\Enums\PokemonFamilyId::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 11) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->quest_type = \POGOProtos\Enums\QuestType::valueOf($reader->readVarint($stream));
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #12
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->rank_num === null) {
                 $this->rank_num = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->rank_num->add($reader->readVarint($stream));
             }
             continue;
         }
         if ($tag === 2) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->required_experience === null) {
                 $this->required_experience = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->required_experience->add($reader->readVarint($stream));
             }
             continue;
         }
         if ($tag === 3) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->cp_multiplier === null) {
                 $this->cp_multiplier = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->cp_multiplier->add($reader->readFloat($stream));
             }
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->max_egg_player_level = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->max_encounter_player_level = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #13
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 6);
             $this->id = $reader->readFixed64($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->pokemon_id = \POGOProtos\Enums\PokemonId::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->cp = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->stamina = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->stamina_max = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->move_1 = \POGOProtos\Enums\PokemonMove::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->move_2 = \POGOProtos\Enums\PokemonMove::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->deployed_fort_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->owner_name = $reader->readString($stream);
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->is_egg = $reader->readBool($stream);
             continue;
         }
         if ($tag === 11) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->egg_km_walked_target = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 12) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->egg_km_walked_start = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 14) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->origin = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 15) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->height_m = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 16) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->weight_kg = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 17) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->individual_attack = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 18) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->individual_defense = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 19) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->individual_stamina = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 20) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->cp_multiplier = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 21) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->pokeball = \POGOProtos\Inventory\Item\ItemId::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 22) {
             \Protobuf\WireFormat::assertWireType($wire, 4);
             $this->captured_cell_id = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 23) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->battles_attacked = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 24) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->battles_defended = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 25) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->egg_incubator_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 26) {
             \Protobuf\WireFormat::assertWireType($wire, 4);
             $this->creation_time_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 27) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->num_upgrades = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 28) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->additional_cp_multiplier = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 29) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->favorite = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 30) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->nickname = $reader->readString($stream);
             continue;
         }
         if ($tag === 31) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->from_fort = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 32) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->buddy_candy_awarded = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 33) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->buddy_total_km_walked = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 34) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->display_pokemon_id = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 35) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->display_cp = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #14
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 4);
             $this->time_to_fix = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 2) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->satellites_prn === null) {
                 $this->satellites_prn = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->satellites_prn->add($reader->readVarint($stream));
             }
             continue;
         }
         if ($tag === 3) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->azimuth === null) {
                 $this->azimuth = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->azimuth->add($reader->readFloat($stream));
             }
             continue;
         }
         if ($tag === 4) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->elevation === null) {
                 $this->elevation = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->elevation->add($reader->readFloat($stream));
             }
             continue;
         }
         if ($tag === 5) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->snr === null) {
                 $this->snr = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->snr->add($reader->readFloat($stream));
             }
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             if ($this->has_almanac === null) {
                 $this->has_almanac = new \Protobuf\ScalarCollection();
             }
             $this->has_almanac->add($reader->readBool($stream));
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             if ($this->has_ephemeris === null) {
                 $this->has_ephemeris = new \Protobuf\ScalarCollection();
             }
             $this->has_ephemeris->add($reader->readBool($stream));
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             if ($this->used_in_fix === null) {
                 $this->used_in_fix = new \Protobuf\ScalarCollection();
             }
             $this->used_in_fix->add($reader->readBool($stream));
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #15
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->pokemon_visible_range = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->poke_nav_range_meters = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->encounter_range_meters = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->get_map_objects_min_refresh_seconds = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->get_map_objects_max_refresh_seconds = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->get_map_objects_min_distance_meters = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->google_maps_api_key = $reader->readString($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #16
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->platform = \POGOProtos\Enums\Platform::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->device_manufacturer = $reader->readString($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->device_model = $reader->readString($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->locale = $reader->readString($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 13);
             $this->app_version = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #17
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->codename = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->user_message = $reader->readString($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->is_assignable = $reader->readBool($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->status = \POGOProtos\Networking\Responses\CheckCodenameAvailableResponse\Status::valueOf($reader->readVarint($stream));
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #18
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->pokeball_type === null) {
                 $this->pokeball_type = new \Protobuf\EnumCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->pokeball_type->add(\POGOProtos\Inventory\Item\ItemId::valueOf($reader->readVarint($stream)));
             }
             continue;
         }
         if ($tag === 2) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->capture_probability === null) {
                 $this->capture_probability = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->capture_probability->add($reader->readFloat($stream));
             }
             continue;
         }
         if ($tag === 12) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->reticle_difficulty_scale = $reader->readDouble($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #19
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->skin = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->hair = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->shirt = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->pants = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->hat = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->shoes = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->gender = \POGOProtos\Enums\Gender::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->eyes = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->backpack = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #20
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->equip_badge_cooldown_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 2) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->catch_probability_bonus === null) {
                 $this->catch_probability_bonus = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->catch_probability_bonus->add($reader->readFloat($stream));
             }
             continue;
         }
         if ($tag === 3) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->flee_probability_bonus === null) {
                 $this->flee_probability_bonus = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->flee_probability_bonus->add($reader->readFloat($stream));
             }
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #21
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->result = \POGOProtos\Networking\Responses\CollectDailyDefenderBonusResponse\Result::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             if ($this->currency_type === null) {
                 $this->currency_type = new \Protobuf\ScalarCollection();
             }
             $this->currency_type->add($reader->readString($stream));
             continue;
         }
         if ($tag === 3) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->currency_awarded === null) {
                 $this->currency_awarded = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->currency_awarded->add($reader->readVarint($stream));
             }
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->defenders_count = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #22
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->asset_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->bundle_name = $reader->readString($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->version = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 7);
             $this->checksum = $reader->readFixed32($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->size = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 12);
             $this->key = $reader->readByteStream($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #23
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 6);
             $this->encounter_id = $reader->readFixed64($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->spawn_point_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->player_latitude = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->player_longitude = $reader->readDouble($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #24
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->level = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->experience = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->prev_level_xp = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->next_level_xp = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->km_walked = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->pokemons_encountered = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->unique_pokedex_entries = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->pokemons_captured = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->evolutions = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->poke_stop_visits = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 11) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->pokeballs_thrown = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 12) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->eggs_hatched = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 13) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->big_magikarp_caught = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 14) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->battle_attack_won = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 15) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->battle_attack_total = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 16) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->battle_defended_won = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 17) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->battle_training_won = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 18) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->battle_training_total = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 19) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->prestige_raised_total = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 20) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->prestige_dropped_total = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 21) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->pokemon_deployed = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 22) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->pokemon_caught_by_type === null) {
                 $this->pokemon_caught_by_type = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->pokemon_caught_by_type->add($reader->readVarint($stream));
             }
             continue;
         }
         if ($tag === 23) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->small_rattata_caught = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #25
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->fort_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 6);
             $this->encounter_id = $reader->readFixed64($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->active_pokemon_id = \POGOProtos\Enums\PokemonId::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->lure_expires_timestamp_ms = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #26
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->path === null) {
                 $this->path = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->path->add($reader->readVarint($stream));
             }
             continue;
         }
         if ($tag === 2) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->span === null) {
                 $this->span = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->span->add($reader->readVarint($stream));
             }
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->leading_comments = $reader->readString($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->trailing_comments = $reader->readString($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             if ($this->leading_detached_comments === null) {
                 $this->leading_detached_comments = new \Protobuf\ScalarCollection();
             }
             $this->leading_detached_comments->add($reader->readString($stream));
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #27
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->buckets_per_day = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->streak_length = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->bonus_multiplier = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->streak_bonus_multiplier = $reader->readFloat($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #28
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->interaction_range_meters = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->max_total_deployed_pokemon = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->max_player_deployed_pokemon = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->deploy_stamina_multiplier = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->deploy_attack_multiplier = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->far_interaction_range_meters = $reader->readDouble($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #29
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->incense_type = \POGOProtos\Inventory\Item\ItemId::valueOf($reader->readVarint($stream));
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #30
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->movement_id = \POGOProtos\Enums\PokemonMove::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->animation_id = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->pokemon_type = \POGOProtos\Enums\PokemonType::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->power = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->accuracy_chance = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->critical_chance = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->heal_scalar = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->stamina_loss_scalar = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->trainer_level_min = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->trainer_level_max = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 11) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->vfx_name = $reader->readString($stream);
             continue;
         }
         if ($tag === 12) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->duration_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 13) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->damage_window_start_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 14) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->damage_window_end_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 15) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->energy_delta = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }