/** * {@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->pokemon_id = \POGOProtos\Enums\PokemonId::valueOf($reader->readVarint($stream)); continue; } if ($tag === 3) { \Protobuf\WireFormat::assertWireType($wire, 2); $this->model_scale = $reader->readFloat($stream); continue; } if ($tag === 4) { \Protobuf\WireFormat::assertWireType($wire, 14); $this->type = \POGOProtos\Enums\PokemonType::valueOf($reader->readVarint($stream)); continue; } if ($tag === 5) { \Protobuf\WireFormat::assertWireType($wire, 14); $this->type_2 = \POGOProtos\Enums\PokemonType::valueOf($reader->readVarint($stream)); continue; } if ($tag === 6) { \Protobuf\WireFormat::assertWireType($wire, 11); $innerSize = $reader->readVarint($stream); $innerMessage = new \POGOProtos\Settings\Master\Pokemon\CameraAttributes(); $this->camera = $innerMessage; $context->setLength($innerSize); $innerMessage->readFrom($context); $context->setLength($length); continue; } if ($tag === 7) { \Protobuf\WireFormat::assertWireType($wire, 11); $innerSize = $reader->readVarint($stream); $innerMessage = new \POGOProtos\Settings\Master\Pokemon\EncounterAttributes(); $this->encounter = $innerMessage; $context->setLength($innerSize); $innerMessage->readFrom($context); $context->setLength($length); continue; } if ($tag === 8) { \Protobuf\WireFormat::assertWireType($wire, 11); $innerSize = $reader->readVarint($stream); $innerMessage = new \POGOProtos\Settings\Master\Pokemon\StatsAttributes(); $this->stats = $innerMessage; $context->setLength($innerSize); $innerMessage->readFrom($context); $context->setLength($length); continue; } if ($tag === 9) { $innerSize = $reader->readVarint($stream); $innerLimit = $stream->tell() + $innerSize; if ($this->quick_moves === null) { $this->quick_moves = new \Protobuf\EnumCollection(); } while ($stream->tell() < $innerLimit) { $this->quick_moves->add(\POGOProtos\Enums\PokemonMove::valueOf($reader->readVarint($stream))); } continue; } if ($tag === 10) { $innerSize = $reader->readVarint($stream); $innerLimit = $stream->tell() + $innerSize; if ($this->cinematic_moves === null) { $this->cinematic_moves = new \Protobuf\EnumCollection(); } while ($stream->tell() < $innerLimit) { $this->cinematic_moves->add(\POGOProtos\Enums\PokemonMove::valueOf($reader->readVarint($stream))); } continue; } if ($tag === 11) { $innerSize = $reader->readVarint($stream); $innerLimit = $stream->tell() + $innerSize; if ($this->animation_time === null) { $this->animation_time = new \Protobuf\ScalarCollection(); } while ($stream->tell() < $innerLimit) { $this->animation_time->add($reader->readFloat($stream)); } continue; } if ($tag === 12) { $innerSize = $reader->readVarint($stream); $innerLimit = $stream->tell() + $innerSize; if ($this->evolution_ids === null) { $this->evolution_ids = new \Protobuf\EnumCollection(); } while ($stream->tell() < $innerLimit) { $this->evolution_ids->add(\POGOProtos\Enums\PokemonId::valueOf($reader->readVarint($stream))); } continue; } if ($tag === 13) { \Protobuf\WireFormat::assertWireType($wire, 5); $this->evolution_pips = $reader->readVarint($stream); continue; } if ($tag === 14) { \Protobuf\WireFormat::assertWireType($wire, 14); $this->rarity = \POGOProtos\Enums\PokemonRarity::valueOf($reader->readVarint($stream)); continue; } if ($tag === 15) { \Protobuf\WireFormat::assertWireType($wire, 2); $this->pokedex_height_m = $reader->readFloat($stream); continue; } if ($tag === 16) { \Protobuf\WireFormat::assertWireType($wire, 2); $this->pokedex_weight_kg = $reader->readFloat($stream); continue; } if ($tag === 17) { \Protobuf\WireFormat::assertWireType($wire, 14); $this->parent_pokemon_id = \POGOProtos\Enums\PokemonId::valueOf($reader->readVarint($stream)); continue; } if ($tag === 18) { \Protobuf\WireFormat::assertWireType($wire, 2); $this->height_std_dev = $reader->readFloat($stream); continue; } if ($tag === 19) { \Protobuf\WireFormat::assertWireType($wire, 2); $this->weight_std_dev = $reader->readFloat($stream); continue; } if ($tag === 20) { \Protobuf\WireFormat::assertWireType($wire, 2); $this->km_distance_to_hatch = $reader->readFloat($stream); continue; } if ($tag === 21) { \Protobuf\WireFormat::assertWireType($wire, 14); $this->family_id = \POGOProtos\Enums\PokemonFamilyId::valueOf($reader->readVarint($stream)); continue; } if ($tag === 22) { \Protobuf\WireFormat::assertWireType($wire, 5); $this->candy_to_evolve = $reader->readVarint($stream); continue; } if ($tag === 23) { \Protobuf\WireFormat::assertWireType($wire, 2); $this->km_buddy_distance = $reader->readFloat($stream); continue; } if ($tag === 24) { \Protobuf\WireFormat::assertWireType($wire, 14); $this->buddy_size = \POGOProtos\Settings\Master\PokemonSettings\BuddySize::valueOf($reader->readVarint($stream)); continue; } if ($tag === 25) { \Protobuf\WireFormat::assertWireType($wire, 2); $this->model_height = $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); } }
/** * {@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); } }
/** * {@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->attack_scalar === null) { $this->attack_scalar = new \Protobuf\ScalarCollection(); } while ($stream->tell() < $innerLimit) { $this->attack_scalar->add($reader->readFloat($stream)); } continue; } if ($tag === 2) { \Protobuf\WireFormat::assertWireType($wire, 14); $this->attack_type = \POGOProtos\Enums\PokemonType::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); } }
/** * {@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->incense_lifetime_seconds = $reader->readVarint($stream); continue; } if ($tag === 2) { $innerSize = $reader->readVarint($stream); $innerLimit = $stream->tell() + $innerSize; if ($this->pokemon_type === null) { $this->pokemon_type = new \Protobuf\EnumCollection(); } while ($stream->tell() < $innerLimit) { $this->pokemon_type->add(\POGOProtos\Enums\PokemonType::valueOf($reader->readVarint($stream))); } continue; } if ($tag === 3) { \Protobuf\WireFormat::assertWireType($wire, 2); $this->pokemon_incense_type_probability = $reader->readFloat($stream); continue; } if ($tag === 4) { \Protobuf\WireFormat::assertWireType($wire, 5); $this->standing_time_between_encounters_seconds = $reader->readVarint($stream); continue; } if ($tag === 5) { \Protobuf\WireFormat::assertWireType($wire, 5); $this->moving_time_between_encounter_seconds = $reader->readVarint($stream); continue; } if ($tag === 6) { \Protobuf\WireFormat::assertWireType($wire, 5); $this->distance_required_for_shorter_interval_meters = $reader->readVarint($stream); continue; } if ($tag === 7) { \Protobuf\WireFormat::assertWireType($wire, 5); $this->pokemon_attracted_length_sec = $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); } }