Example #1
0
        public void MergeFrom(ActiveBuffExpiration other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.TypeCase)
            {
            case TypeOneofCase.Time:
                if (Time == null)
                {
                    Time = new global::WUProtos.Data.TimeActiveBuffExpiration();
                }
                Time.MergeFrom(other.Time);
                break;

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

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

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

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

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Example #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.TimeActiveBuffExpiration subBuilder = new global::WUProtos.Data.TimeActiveBuffExpiration();
                    if (typeCase_ == TypeOneofCase.Time)
                    {
                        subBuilder.MergeFrom(Time);
                    }
                    input.ReadMessage(subBuilder);
                    Time = subBuilder;
                    break;
                }

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

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

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

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