Beispiel #1
0
            public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry)
            {
                pb::UnknownFieldSet.Builder unknownFields = null;
                uint   tag;
                string field_name;

                while (input.ReadTag(out tag, out field_name))
                {
                    if (tag == 0 && field_name != null)
                    {
                        int field_ordinal = global::System.Array.BinarySearch(_handleFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _handleFieldTags[field_ordinal];
                        }
                        else
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
                            continue;
                        }
                    }
                    switch (tag)
                    {
                    case 0: {
                        throw pb::InvalidProtocolBufferException.InvalidTag();
                    }

                    default: {
                        if (pb::WireFormat.IsEndGroupTag(tag))
                        {
                            if (unknownFields != null)
                            {
                                this.UnknownFields = unknownFields.Build();
                            }
                            return(this);
                        }
                        if (unknownFields == null)
                        {
                            unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
                        break;
                    }

                    case 8: {
                        result.hasGameBalanceType = input.ReadSInt32(ref result.gameBalanceType_);
                        break;
                    }

                    case 21: {
                        result.hasGbid = input.ReadSFixed32(ref result.gbid_);
                        break;
                    }
                    }
                }

                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
Beispiel #2
0
            public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry)
            {
                PrepareBuilder();
                pb::UnknownFieldSet.Builder unknownFields = null;
                uint   tag;
                string field_name;

                while (input.ReadTag(out tag, out field_name))
                {
                    if (tag == 0 && field_name != null)
                    {
                        int field_ordinal = global::System.Array.BinarySearch(_infoFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _infoFieldTags[field_ordinal];
                        }
                        else
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
                            continue;
                        }
                    }
                    switch (tag)
                    {
                    case 0: {
                        throw pb::InvalidProtocolBufferException.InvalidTag();
                    }

                    default: {
                        if (pb::WireFormat.IsEndGroupTag(tag))
                        {
                            if (unknownFields != null)
                            {
                                this.UnknownFields = unknownFields.Build();
                            }
                            return(this);
                        }
                        if (unknownFields == null)
                        {
                            unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
                        break;
                    }

                    case 8: {
                        result.hasHirelingClass = input.ReadSInt32(ref result.hirelingClass_);
                        break;
                    }

                    case 21: {
                        result.hasGbidName = input.ReadSFixed32(ref result.gbidName_);
                        break;
                    }

                    case 24: {
                        result.hasLevel = input.ReadSInt32(ref result.level_);
                        break;
                    }

                    case 32: {
                        result.hasAttributeExperienceNext = input.ReadUInt32(ref result.attributeExperienceNext_);
                        break;
                    }

                    case 90:
                    case 88: {
                        input.ReadSInt32Array(tag, field_name, result.powerKeyParams_);
                        break;
                    }

                    case 96: {
                        result.hasDead = input.ReadBool(ref result.dead_);
                        break;
                    }
                    }
                }

                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
Beispiel #3
0
            public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry)
            {
                PrepareBuilder();
                pb::UnknownFieldSet.Builder unknownFields = null;
                uint   tag;
                string field_name;

                while (input.ReadTag(out tag, out field_name))
                {
                    if (tag == 0 && field_name != null)
                    {
                        int field_ordinal = global::System.Array.BinarySearch(_questRewardFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _questRewardFieldTags[field_ordinal];
                        }
                        else
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
                            continue;
                        }
                    }
                    switch (tag)
                    {
                    case 0: {
                        throw pb::InvalidProtocolBufferException.InvalidTag();
                    }

                    default: {
                        if (pb::WireFormat.IsEndGroupTag(tag))
                        {
                            if (unknownFields != null)
                            {
                                this.UnknownFields = unknownFields.Build();
                            }
                            return(this);
                        }
                        if (unknownFields == null)
                        {
                            unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
                        break;
                    }

                    case 8: {
                        result.hasXpGranted = input.ReadInt32(ref result.xpGranted_);
                        break;
                    }

                    case 16: {
                        result.hasGoldGranted = input.ReadInt32(ref result.goldGranted_);
                        break;
                    }

                    case 26: {
                        global::D3.Items.Generator.Builder subBuilder = global::D3.Items.Generator.CreateBuilder();
                        if (result.hasItemGranted)
                        {
                            subBuilder.MergeFrom(ItemGranted);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        ItemGranted = subBuilder.BuildPartial();
                        break;
                    }

                    case 37: {
                        result.hasSnoQuest = input.ReadSFixed32(ref result.snoQuest_);
                        break;
                    }
                    }
                }

                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }