Exemplo n.º 1
0
 // Token: 0x0600130A RID: 4874 RVA: 0x000439F0 File Offset: 0x00041BF0
 public objectSleepingAvatar.Builder SetVitals(Vitals.Builder builderForValue)
 {
     ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
     this.PrepareBuilder();
     this.result.hasVitals = true;
     this.result.vitals_   = builderForValue.Build();
     return(this);
 }
 // Token: 0x06002D57 RID: 11607 RVA: 0x000AB1AC File Offset: 0x000A93AC
 public void SaveVitals(ref RustProto.Vitals.Builder vitals)
 {
     vitals.SetCalories(this.caloricLevel);
     vitals.SetHydration(this.waterLevelLitre);
     vitals.SetRadiation(this.radiationLevel);
     vitals.SetRadiationAnti(this.antiRads);
     vitals.SetTemperature(this.coreTemperature);
 }
Exemplo n.º 3
0
            // Token: 0x060012EC RID: 4844 RVA: 0x000434D4 File Offset: 0x000416D4
            public override objectSleepingAvatar.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>(objectSleepingAvatar._objectSleepingAvatarFieldNames, text, StringComparer.Ordinal);
                        if (num2 < 0)
                        {
                            if (builder == null)
                            {
                                builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            this.ParseUnknownField(input, builder, extensionRegistry, num, text);
                            continue;
                        }
                        num = objectSleepingAvatar._objectSleepingAvatarFieldTags[num2];
                    }
                    uint num3 = num;
                    if (num3 == 0u)
                    {
                        throw InvalidProtocolBufferException.InvalidTag();
                    }
                    if (num3 != 8u)
                    {
                        if (num3 != 16u)
                        {
                            if (num3 != 24u)
                            {
                                if (num3 != 32u)
                                {
                                    if (num3 != 40u)
                                    {
                                        if (num3 != 50u)
                                        {
                                            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
                                        {
                                            Vitals.Builder builder2 = Vitals.CreateBuilder();
                                            if (this.result.hasVitals)
                                            {
                                                builder2.MergeFrom(this.Vitals);
                                            }
                                            input.ReadMessage(builder2, extensionRegistry);
                                            this.Vitals = builder2.BuildPartial();
                                        }
                                    }
                                    else
                                    {
                                        this.result.hasTimestamp = input.ReadInt32(ref this.result.timestamp_);
                                    }
                                }
                                else
                                {
                                    this.result.hasHeadArmor = input.ReadInt32(ref this.result.headArmor_);
                                }
                            }
                            else
                            {
                                this.result.hasTorsoArmor = input.ReadInt32(ref this.result.torsoArmor_);
                            }
                        }
                        else
                        {
                            this.result.hasLegArmor = input.ReadInt32(ref this.result.legArmor_);
                        }
                    }
                    else
                    {
                        this.result.hasFootArmor = input.ReadInt32(ref this.result.footArmor_);
                    }
                }
                if (builder != null)
                {
                    this.UnknownFields = builder.Build();
                }
                return(this);
            }
Exemplo n.º 4
0
 // Token: 0x06000B92 RID: 2962 RVA: 0x0002D7AC File Offset: 0x0002B9AC
 public virtual void SaveVitals(ref RustProto.Vitals.Builder vitals)
 {
     vitals.SetHealth(this.health);
 }
 // Token: 0x06002D28 RID: 11560 RVA: 0x000A8DC8 File Offset: 0x000A6FC8
 public override void SaveVitals(ref RustProto.Vitals.Builder vitals)
 {
     base.SaveVitals(ref vitals);
     vitals.SetBleedSpeed(this._bleedingLevel);
     vitals.SetHealSpeed(this._healOverTime);
 }