Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->item_id !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->item_id->value());
     }
     if ($this->item_type !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->item_type->value());
     }
     if ($this->expire_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->expire_ms);
     }
     if ($this->applied_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->applied_ms);
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->modifier_type !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->modifier_type->value());
     }
     if ($this->fort_id !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->fort_id);
     }
     if ($this->player_latitude !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->player_longitude !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->pokemon_id !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->item !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->item->value());
     }
     if ($this->pokedex_entry_id !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->pokedex_entry_id);
     }
     if ($this->player_stats !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->player_currency !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->player_camera !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->inventory_upgrades !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->applied_items !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->egg_incubators !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->pokemon_family_id !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->pokemon_family_id->value());
     }
     if ($this->quest_type !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->quest_type->value());
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->item_id !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->item_id->value());
     }
     if ($this->encounter_id !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->spawn_point_id !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->spawn_point_id);
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 5
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->item_id !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->item_id->value());
     }
     if ($this->expiration_timestamp_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->expiration_timestamp_ms);
     }
     if ($this->deployer_player_codename !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->deployer_player_codename);
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->encounter_id !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->pokeball !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->pokeball->value());
     }
     if ($this->normalized_reticle_size !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->spawn_point_id !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->spawn_point_id);
     }
     if ($this->hit_pokemon !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->spin_modifier !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->normalized_hit_position !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 7
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->id !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->id);
     }
     if ($this->item_id !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->item_id->value());
     }
     if ($this->incubator_type !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->incubator_type->value());
     }
     if ($this->uses_remaining !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->uses_remaining);
     }
     if ($this->pokemon_id !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->pokemon_id);
     }
     if ($this->start_km_walked !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->target_km_walked !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 8
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->item_id !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->item_id->value());
     }
     if ($this->item_type !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->item_type->value());
     }
     if ($this->category !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->category->value());
     }
     if ($this->drop_freq !== null) {
         $size += 1;
         $size += 4;
     }
     if ($this->drop_trainer_level !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->drop_trainer_level);
     }
     if ($this->pokeball !== null) {
         $innerSize = $this->pokeball->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->potion !== null) {
         $innerSize = $this->potion->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->revive !== null) {
         $innerSize = $this->revive->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->battle !== null) {
         $innerSize = $this->battle->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->food !== null) {
         $innerSize = $this->food->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->inventory_upgrade !== null) {
         $innerSize = $this->inventory_upgrade->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->xp_boost !== null) {
         $innerSize = $this->xp_boost->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->incense !== null) {
         $innerSize = $this->incense->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->egg_incubator !== null) {
         $innerSize = $this->egg_incubator->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->fort_modifier !== null) {
         $innerSize = $this->fort_modifier->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 9
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->id !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->pokemon_id !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->pokemon_id->value());
     }
     if ($this->cp !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->cp);
     }
     if ($this->stamina !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->stamina);
     }
     if ($this->stamina_max !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->stamina_max);
     }
     if ($this->move_1 !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->move_1->value());
     }
     if ($this->move_2 !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->move_2->value());
     }
     if ($this->deployed_fort_id !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->deployed_fort_id);
     }
     if ($this->owner_name !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->owner_name);
     }
     if ($this->is_egg !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->egg_km_walked_target !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->egg_km_walked_start !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->origin !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->origin);
     }
     if ($this->height_m !== null) {
         $size += 1;
         $size += 4;
     }
     if ($this->weight_kg !== null) {
         $size += 2;
         $size += 4;
     }
     if ($this->individual_attack !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->individual_attack);
     }
     if ($this->individual_defense !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->individual_defense);
     }
     if ($this->individual_stamina !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->individual_stamina);
     }
     if ($this->cp_multiplier !== null) {
         $size += 2;
         $size += 4;
     }
     if ($this->pokeball !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->pokeball->value());
     }
     if ($this->captured_cell_id !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->captured_cell_id);
     }
     if ($this->battles_attacked !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->battles_attacked);
     }
     if ($this->battles_defended !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->battles_defended);
     }
     if ($this->egg_incubator_id !== null) {
         $size += 2;
         $size += $calculator->computeStringSize($this->egg_incubator_id);
     }
     if ($this->creation_time_ms !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->creation_time_ms);
     }
     if ($this->num_upgrades !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->num_upgrades);
     }
     if ($this->additional_cp_multiplier !== null) {
         $size += 2;
         $size += 4;
     }
     if ($this->favorite !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->favorite);
     }
     if ($this->nickname !== null) {
         $size += 2;
         $size += $calculator->computeStringSize($this->nickname);
     }
     if ($this->from_fort !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->from_fort);
     }
     if ($this->buddy_candy_awarded !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->buddy_candy_awarded);
     }
     if ($this->buddy_total_km_walked !== null) {
         $size += 2;
         $size += 4;
     }
     if ($this->display_pokemon_id !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->display_pokemon_id);
     }
     if ($this->display_cp !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->display_cp);
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }