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

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

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

            case TypeOneofCase.Permanent:
                if (Permanent == null)
                {
                    Permanent = new global::WUProtos.Data.Buff.PermanentBuffDuration();
                }
                Permanent.MergeFrom(other.Permanent);
                break;

            case TypeOneofCase.Instant:
                if (Instant == null)
                {
                    Instant = new global::WUProtos.Data.Buff.InstantBuffDuration();
                }
                Instant.MergeFrom(other.Instant);
                break;

            case TypeOneofCase.Challenge:
                if (Challenge == null)
                {
                    Challenge = new global::WUProtos.Data.Challenge.ChallengeBuffDuration();
                }
                Challenge.MergeFrom(other.Challenge);
                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.Buff.TimeBuffDuration subBuilder = new global::WUProtos.Data.Buff.TimeBuffDuration();
                    if (typeCase_ == TypeOneofCase.Time)
                    {
                        subBuilder.MergeFrom(Time);
                    }
                    input.ReadMessage(subBuilder);
                    Time = subBuilder;
                    break;
                }

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

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

                case 34: {
                    global::WUProtos.Data.Buff.PermanentBuffDuration subBuilder = new global::WUProtos.Data.Buff.PermanentBuffDuration();
                    if (typeCase_ == TypeOneofCase.Permanent)
                    {
                        subBuilder.MergeFrom(Permanent);
                    }
                    input.ReadMessage(subBuilder);
                    Permanent = subBuilder;
                    break;
                }

                case 42: {
                    global::WUProtos.Data.Buff.InstantBuffDuration subBuilder = new global::WUProtos.Data.Buff.InstantBuffDuration();
                    if (typeCase_ == TypeOneofCase.Instant)
                    {
                        subBuilder.MergeFrom(Instant);
                    }
                    input.ReadMessage(subBuilder);
                    Instant = subBuilder;
                    break;
                }

                case 50: {
                    global::WUProtos.Data.Challenge.ChallengeBuffDuration subBuilder = new global::WUProtos.Data.Challenge.ChallengeBuffDuration();
                    if (typeCase_ == TypeOneofCase.Challenge)
                    {
                        subBuilder.MergeFrom(Challenge);
                    }
                    input.ReadMessage(subBuilder);
                    Challenge = subBuilder;
                    break;
                }
                }
            }
        }