Exemplo n.º 1
0
        public int CalculateSize()
        {
            int num = 0;

            if (FightId != 0)
            {
                num += 1 + CodedOutputStream.ComputeInt32Size(FightId);
            }
            num += entities_.CalculateSize(_repeated_entities_codec);
            if (TurnIndex != 0)
            {
                num += 1 + CodedOutputStream.ComputeInt32Size(TurnIndex);
            }
            if (TurnRemainingTimeSec != 0)
            {
                num += 1 + CodedOutputStream.ComputeInt32Size(TurnRemainingTimeSec);
            }
            num += playersCompanions_.CalculateSize(_map_playersCompanions_codec);
            num += playersCardsCount_.CalculateSize(_map_playersCardsCount_codec);
            if (_unknownFields != null)
            {
                num += _unknownFields.CalculateSize();
            }
            return(num);
        }
Exemplo n.º 2
0
                public int CalculateSize()
                {
                    int num = 0;

                    if (PlayerId != 0)
                    {
                        num += 1 + CodedOutputStream.ComputeInt32Size(PlayerId);
                    }
                    if (FightId != 0)
                    {
                        num += 1 + CodedOutputStream.ComputeInt32Size(FightId);
                    }
                    num += stats_.CalculateSize(_map_stats_codec);
                    num += titles_.CalculateSize(_repeated_titles_codec);
                    if (_unknownFields != null)
                    {
                        num += _unknownFields.CalculateSize();
                    }
                    return(num);
                }
Exemplo n.º 3
0
                public int CalculateSize()
                {
                    int num = 0;

                    if (EntityId != 0)
                    {
                        num += 1 + CodedOutputStream.ComputeInt32Size(EntityId);
                    }
                    if (EntityType != 0)
                    {
                        num += 1 + CodedOutputStream.ComputeInt32Size(EntityType);
                    }
                    if (name_ != null)
                    {
                        num += _single_name_codec.CalculateSizeWithTag(Name);
                    }
                    if (defId_.HasValue)
                    {
                        num += _single_defId_codec.CalculateSizeWithTag(DefId);
                    }
                    if (weaponId_.HasValue)
                    {
                        num += _single_weaponId_codec.CalculateSizeWithTag(WeaponId);
                    }
                    if (genderId_.HasValue)
                    {
                        num += _single_genderId_codec.CalculateSizeWithTag(GenderId);
                    }
                    if (playerIndexInFight_.HasValue)
                    {
                        num += _single_playerIndexInFight_codec.CalculateSizeWithTag(PlayerIndexInFight);
                    }
                    if (ownerId_.HasValue)
                    {
                        num += _single_ownerId_codec.CalculateSizeWithTag(OwnerId);
                    }
                    if (teamId_.HasValue)
                    {
                        num += _single_teamId_codec.CalculateSizeWithTag(TeamId);
                    }
                    if (level_.HasValue)
                    {
                        num += _single_level_codec.CalculateSizeWithTag(Level);
                    }
                    num += properties_.CalculateSize(_repeated_properties_codec);
                    if (position_ != null)
                    {
                        num += 1 + CodedOutputStream.ComputeMessageSize(Position);
                    }
                    if (direction_.HasValue)
                    {
                        num += _single_direction_codec.CalculateSizeWithTag(Direction);
                    }
                    num += caracs_.CalculateSize(_map_caracs_codec);
                    if (customSkin_ != null)
                    {
                        num += _single_customSkin_codec.CalculateSizeWithTag(CustomSkin);
                    }
                    if (actionDoneThisTurn_.HasValue)
                    {
                        num += _single_actionDoneThisTurn_codec.CalculateSizeWithTag(ActionDoneThisTurn);
                    }
                    if (_unknownFields != null)
                    {
                        num += _unknownFields.CalculateSize();
                    }
                    return(num);
                }
Exemplo n.º 4
0
 public int CalculateSize(MapField <TKey, TValue> .Codec codec)
 {
     return(_internal.CalculateSize(codec));
 }