Exemplo n.º 1
0
        public void MergeFrom(ActiveBuffSource other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.TypeCase)
            {
            case TypeOneofCase.VaultItem:
                if (VaultItem == null)
                {
                    VaultItem = new global::WUProtos.Data.VaultItemActiveBuffSource();
                }
                VaultItem.MergeFrom(other.VaultItem);
                break;

            case TypeOneofCase.Profession:
                if (Profession == null)
                {
                    Profession = new global::WUProtos.Data.Profession.ProfessionActiveBuffSource();
                }
                Profession.MergeFrom(other.Profession);
                break;

            case TypeOneofCase.MapAbility:
                if (MapAbility == null)
                {
                    MapAbility = new global::WUProtos.Map.MapAbilityActiveBuffSource();
                }
                MapAbility.MergeFrom(other.MapAbility);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Exemplo n.º 2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    global::WUProtos.Data.VaultItemActiveBuffSource subBuilder = new global::WUProtos.Data.VaultItemActiveBuffSource();
                    if (typeCase_ == TypeOneofCase.VaultItem)
                    {
                        subBuilder.MergeFrom(VaultItem);
                    }
                    input.ReadMessage(subBuilder);
                    VaultItem = subBuilder;
                    break;
                }

                case 18: {
                    global::WUProtos.Data.Profession.ProfessionActiveBuffSource subBuilder = new global::WUProtos.Data.Profession.ProfessionActiveBuffSource();
                    if (typeCase_ == TypeOneofCase.Profession)
                    {
                        subBuilder.MergeFrom(Profession);
                    }
                    input.ReadMessage(subBuilder);
                    Profession = subBuilder;
                    break;
                }

                case 26: {
                    global::WUProtos.Map.MapAbilityActiveBuffSource subBuilder = new global::WUProtos.Map.MapAbilityActiveBuffSource();
                    if (typeCase_ == TypeOneofCase.MapAbility)
                    {
                        subBuilder.MergeFrom(MapAbility);
                    }
                    input.ReadMessage(subBuilder);
                    MapAbility = subBuilder;
                    break;
                }
                }
            }
        }