/** * {@inheritdoc} */ public function serializedSize(\Protobuf\ComputeSizeContext $context) { $calculator = $context->getSizeCalculator(); $size = 0; if ($this->quest_type !== null) { $size += 1; $size += $calculator->computeVarintSize($this->quest_type->value()); } if ($this->daily_quest !== null) { $innerSize = $this->daily_quest->serializedSize($context); $size += 1; $size += $innerSize; $size += $calculator->computeVarintSize($innerSize); } 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->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; }