public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { pb::UnknownFieldSet.Builder unknownFields = null; while (true) { uint tag = input.ReadTag(); switch (tag) { case 0: { if (unknownFields != null) { this.UnknownFields = unknownFields.Build(); } return(this); } 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); break; } case 8: { XpGranted = input.ReadInt32(); break; } case 16: { GoldGranted = input.ReadInt32(); break; } case 26: { global::D3.Items.Generator.Builder subBuilder = global::D3.Items.Generator.CreateBuilder(); if (HasItem) { subBuilder.MergeFrom(Item); } input.ReadMessage(subBuilder, extensionRegistry); Item = subBuilder.BuildPartial(); break; } } } }
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); }