示例#1
0
            public override RustProto.Avatar.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                uint   num;
                string str;

                this.PrepareBuilder();
                UnknownFieldSet.Builder builder = null;
                while (input.ReadTag(out num, out str))
                {
                    if (num == 0 && str != null)
                    {
                        int num1 = Array.BinarySearch <string>(RustProto.Avatar._avatarFieldNames, str, StringComparer.Ordinal);
                        if (num1 < 0)
                        {
                            if (builder == null)
                            {
                                builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            this.ParseUnknownField(input, builder, extensionRegistry, num, str);
                            continue;
                        }
                        else
                        {
                            num = RustProto.Avatar._avatarFieldTags[num1];
                        }
                    }
                    uint num2 = num;
                    if (num2 == 0)
                    {
                        throw InvalidProtocolBufferException.InvalidTag();
                    }
                    if (num2 == 10)
                    {
                        Vector.Builder builder1 = Vector.CreateBuilder();
                        if (this.result.hasPos)
                        {
                            builder1.MergeFrom(this.Pos);
                        }
                        input.ReadMessage(builder1, extensionRegistry);
                        this.Pos = builder1.BuildPartial();
                    }
                    else if (num2 == 18)
                    {
                        Quaternion.Builder builder2 = Quaternion.CreateBuilder();
                        if (this.result.hasAng)
                        {
                            builder2.MergeFrom(this.Ang);
                        }
                        input.ReadMessage(builder2, extensionRegistry);
                        this.Ang = builder2.BuildPartial();
                    }
                    else if (num2 == 26)
                    {
                        RustProto.Vitals.Builder builder3 = RustProto.Vitals.CreateBuilder();
                        if (this.result.hasVitals)
                        {
                            builder3.MergeFrom(this.Vitals);
                        }
                        input.ReadMessage(builder3, extensionRegistry);
                        this.Vitals = builder3.BuildPartial();
                    }
                    else if (num2 == 34)
                    {
                        input.ReadMessageArray <RustProto.Blueprint>(num, str, this.result.blueprints_, RustProto.Blueprint.DefaultInstance, extensionRegistry);
                    }
                    else if (num2 == 42)
                    {
                        input.ReadMessageArray <RustProto.Item>(num, str, this.result.inventory_, RustProto.Item.DefaultInstance, extensionRegistry);
                    }
                    else if (num2 == 50)
                    {
                        input.ReadMessageArray <RustProto.Item>(num, str, this.result.wearable_, RustProto.Item.DefaultInstance, extensionRegistry);
                    }
                    else if (num2 == 58)
                    {
                        input.ReadMessageArray <RustProto.Item>(num, str, this.result.belt_, RustProto.Item.DefaultInstance, extensionRegistry);
                    }
                    else if (num2 == 66)
                    {
                        RustProto.AwayEvent.Builder builder4 = RustProto.AwayEvent.CreateBuilder();
                        if (this.result.hasAwayEvent)
                        {
                            builder4.MergeFrom(this.AwayEvent);
                        }
                        input.ReadMessage(builder4, extensionRegistry);
                        this.AwayEvent = builder4.BuildPartial();
                    }
                    else
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            if (builder != null)
                            {
                                this.UnknownFields = builder.Build();
                            }
                            return(this);
                        }
                        if (builder == null)
                        {
                            builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        this.ParseUnknownField(input, builder, extensionRegistry, num, str);
                    }
                }
                if (builder != null)
                {
                    this.UnknownFields = builder.Build();
                }
                return(this);
            }
示例#2
0
            public override Avatar.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                uint   num;
                string str;

                this.PrepareBuilder();
                UnknownFieldSet.Builder builder = null;
                while (input.ReadTag(ref num, ref str))
                {
                    if ((num == 0) && (str != null))
                    {
                        int index = Array.BinarySearch <string>(Avatar._avatarFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = Avatar._avatarFieldTags[index];
                        }
                        else
                        {
                            if (builder == null)
                            {
                                builder = UnknownFieldSet.CreateBuilder(this.get_UnknownFields());
                            }
                            this.ParseUnknownField(input, builder, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 10:
                    {
                        Vector.Builder builder2 = Vector.CreateBuilder();
                        if (this.result.hasPos)
                        {
                            builder2.MergeFrom(this.Pos);
                        }
                        input.ReadMessage(builder2, extensionRegistry);
                        this.Pos = builder2.BuildPartial();
                        continue;
                    }

                    case 0x12:
                    {
                        Quaternion.Builder builder3 = Quaternion.CreateBuilder();
                        if (this.result.hasAng)
                        {
                            builder3.MergeFrom(this.Ang);
                        }
                        input.ReadMessage(builder3, extensionRegistry);
                        this.Ang = builder3.BuildPartial();
                        continue;
                    }

                    case 0x1a:
                    {
                        RustProto.Vitals.Builder builder4 = RustProto.Vitals.CreateBuilder();
                        if (this.result.hasVitals)
                        {
                            builder4.MergeFrom(this.Vitals);
                        }
                        input.ReadMessage(builder4, extensionRegistry);
                        this.Vitals = builder4.BuildPartial();
                        continue;
                    }

                    case 0x22:
                    {
                        input.ReadMessageArray <Blueprint>(num, str, this.result.blueprints_, Blueprint.DefaultInstance, extensionRegistry);
                        continue;
                    }

                    case 0x2a:
                    {
                        input.ReadMessageArray <Item>(num, str, this.result.inventory_, Item.DefaultInstance, extensionRegistry);
                        continue;
                    }

                    case 50:
                    {
                        input.ReadMessageArray <Item>(num, str, this.result.wearable_, Item.DefaultInstance, extensionRegistry);
                        continue;
                    }

                    case 0x3a:
                    {
                        input.ReadMessageArray <Item>(num, str, this.result.belt_, Item.DefaultInstance, extensionRegistry);
                        continue;
                    }

                    case 0x42:
                    {
                        RustProto.AwayEvent.Builder builder5 = RustProto.AwayEvent.CreateBuilder();
                        if (this.result.hasAwayEvent)
                        {
                            builder5.MergeFrom(this.AwayEvent);
                        }
                        input.ReadMessage(builder5, extensionRegistry);
                        this.AwayEvent = builder5.BuildPartial();
                        continue;
                    }
                    }
                    if (WireFormat.IsEndGroupTag(num))
                    {
                        if (builder != null)
                        {
                            this.set_UnknownFields(builder.Build());
                        }
                        return(this);
                    }
                    if (builder == null)
                    {
                        builder = UnknownFieldSet.CreateBuilder(this.get_UnknownFields());
                    }
                    this.ParseUnknownField(input, builder, extensionRegistry, num, str);
                }
                if (builder != null)
                {
                    this.set_UnknownFields(builder.Build());
                }
                return(this);
            }
示例#3
0
            public override objectCoords.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                uint   num;
                string str;

                this.PrepareBuilder();
                UnknownFieldSet.Builder builder = null;
                while (input.ReadTag(out num, out str))
                {
                    if (num == 0 && str != null)
                    {
                        int num1 = Array.BinarySearch <string>(objectCoords._objectCoordsFieldNames, str, StringComparer.Ordinal);
                        if (num1 < 0)
                        {
                            if (builder == null)
                            {
                                builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            this.ParseUnknownField(input, builder, extensionRegistry, num, str);
                            continue;
                        }
                        else
                        {
                            num = objectCoords._objectCoordsFieldTags[num1];
                        }
                    }
                    uint num2 = num;
                    if (num2 == 0)
                    {
                        throw InvalidProtocolBufferException.InvalidTag();
                    }
                    if (num2 == 10)
                    {
                        Vector.Builder builder1 = Vector.CreateBuilder();
                        if (this.result.hasPos)
                        {
                            builder1.MergeFrom(this.Pos);
                        }
                        input.ReadMessage(builder1, extensionRegistry);
                        this.Pos = builder1.BuildPartial();
                    }
                    else if (num2 == 18)
                    {
                        Vector.Builder builder2 = Vector.CreateBuilder();
                        if (this.result.hasOldPos)
                        {
                            builder2.MergeFrom(this.OldPos);
                        }
                        input.ReadMessage(builder2, extensionRegistry);
                        this.OldPos = builder2.BuildPartial();
                    }
                    else if (num2 == 26)
                    {
                        Quaternion.Builder builder3 = Quaternion.CreateBuilder();
                        if (this.result.hasRot)
                        {
                            builder3.MergeFrom(this.Rot);
                        }
                        input.ReadMessage(builder3, extensionRegistry);
                        this.Rot = builder3.BuildPartial();
                    }
                    else if (num2 == 34)
                    {
                        Quaternion.Builder builder4 = Quaternion.CreateBuilder();
                        if (this.result.hasOldRot)
                        {
                            builder4.MergeFrom(this.OldRot);
                        }
                        input.ReadMessage(builder4, extensionRegistry);
                        this.OldRot = builder4.BuildPartial();
                    }
                    else
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            if (builder != null)
                            {
                                this.UnknownFields = builder.Build();
                            }
                            return(this);
                        }
                        if (builder == null)
                        {
                            builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        this.ParseUnknownField(input, builder, extensionRegistry, num, str);
                    }
                }
                if (builder != null)
                {
                    this.UnknownFields = builder.Build();
                }
                return(this);
            }
示例#4
0
            public override objectCoords.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                uint   num;
                string str;

                this.PrepareBuilder();
                UnknownFieldSet.Builder builder = null;
                while (input.ReadTag(ref num, ref str))
                {
                    if ((num == 0) && (str != null))
                    {
                        int index = Array.BinarySearch <string>(objectCoords._objectCoordsFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = objectCoords._objectCoordsFieldTags[index];
                        }
                        else
                        {
                            if (builder == null)
                            {
                                builder = UnknownFieldSet.CreateBuilder(this.get_UnknownFields());
                            }
                            this.ParseUnknownField(input, builder, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 10:
                    {
                        Vector.Builder builder2 = Vector.CreateBuilder();
                        if (this.result.hasPos)
                        {
                            builder2.MergeFrom(this.Pos);
                        }
                        input.ReadMessage(builder2, extensionRegistry);
                        this.Pos = builder2.BuildPartial();
                        continue;
                    }

                    case 0x12:
                    {
                        Vector.Builder builder3 = Vector.CreateBuilder();
                        if (this.result.hasOldPos)
                        {
                            builder3.MergeFrom(this.OldPos);
                        }
                        input.ReadMessage(builder3, extensionRegistry);
                        this.OldPos = builder3.BuildPartial();
                        continue;
                    }

                    case 0x1a:
                    {
                        Quaternion.Builder builder4 = Quaternion.CreateBuilder();
                        if (this.result.hasRot)
                        {
                            builder4.MergeFrom(this.Rot);
                        }
                        input.ReadMessage(builder4, extensionRegistry);
                        this.Rot = builder4.BuildPartial();
                        continue;
                    }

                    case 0x22:
                    {
                        Quaternion.Builder builder5 = Quaternion.CreateBuilder();
                        if (this.result.hasOldRot)
                        {
                            builder5.MergeFrom(this.OldRot);
                        }
                        input.ReadMessage(builder5, extensionRegistry);
                        this.OldRot = builder5.BuildPartial();
                        continue;
                    }
                    }
                    if (WireFormat.IsEndGroupTag(num))
                    {
                        if (builder != null)
                        {
                            this.set_UnknownFields(builder.Build());
                        }
                        return(this);
                    }
                    if (builder == null)
                    {
                        builder = UnknownFieldSet.CreateBuilder(this.get_UnknownFields());
                    }
                    this.ParseUnknownField(input, builder, extensionRegistry, num, str);
                }
                if (builder != null)
                {
                    this.set_UnknownFields(builder.Build());
                }
                return(this);
            }
            // Token: 0x060011E8 RID: 4584 RVA: 0x00041248 File Offset: 0x0003F448
            public override objectCoords.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                this.PrepareBuilder();
                UnknownFieldSet.Builder builder = null;
                uint   num;
                string text;

                while (input.ReadTag(ref num, ref text))
                {
                    if (num == 0u && text != null)
                    {
                        int num2 = Array.BinarySearch <string>(objectCoords._objectCoordsFieldNames, text, StringComparer.Ordinal);
                        if (num2 < 0)
                        {
                            if (builder == null)
                            {
                                builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            this.ParseUnknownField(input, builder, extensionRegistry, num, text);
                            continue;
                        }
                        num = objectCoords._objectCoordsFieldTags[num2];
                    }
                    uint num3 = num;
                    if (num3 == 0u)
                    {
                        throw InvalidProtocolBufferException.InvalidTag();
                    }
                    if (num3 != 10u)
                    {
                        if (num3 != 18u)
                        {
                            if (num3 != 26u)
                            {
                                if (num3 != 34u)
                                {
                                    if (WireFormat.IsEndGroupTag(num))
                                    {
                                        if (builder != null)
                                        {
                                            this.UnknownFields = builder.Build();
                                        }
                                        return(this);
                                    }
                                    if (builder == null)
                                    {
                                        builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                                    }
                                    this.ParseUnknownField(input, builder, extensionRegistry, num, text);
                                }
                                else
                                {
                                    Quaternion.Builder builder2 = Quaternion.CreateBuilder();
                                    if (this.result.hasOldRot)
                                    {
                                        builder2.MergeFrom(this.OldRot);
                                    }
                                    input.ReadMessage(builder2, extensionRegistry);
                                    this.OldRot = builder2.BuildPartial();
                                }
                            }
                            else
                            {
                                Quaternion.Builder builder3 = Quaternion.CreateBuilder();
                                if (this.result.hasRot)
                                {
                                    builder3.MergeFrom(this.Rot);
                                }
                                input.ReadMessage(builder3, extensionRegistry);
                                this.Rot = builder3.BuildPartial();
                            }
                        }
                        else
                        {
                            Vector.Builder builder4 = Vector.CreateBuilder();
                            if (this.result.hasOldPos)
                            {
                                builder4.MergeFrom(this.OldPos);
                            }
                            input.ReadMessage(builder4, extensionRegistry);
                            this.OldPos = builder4.BuildPartial();
                        }
                    }
                    else
                    {
                        Vector.Builder builder5 = Vector.CreateBuilder();
                        if (this.result.hasPos)
                        {
                            builder5.MergeFrom(this.Pos);
                        }
                        input.ReadMessage(builder5, extensionRegistry);
                        this.Pos = builder5.BuildPartial();
                    }
                }
                if (builder != null)
                {
                    this.UnknownFields = builder.Build();
                }
                return(this);
            }