Exemplo n.º 1
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.Potion.PotionBonusMetadata subBuilder = new global::WUProtos.Data.Potion.PotionBonusMetadata();
                    if (metadataTypeCase_ == MetadataTypeOneofCase.Potion)
                    {
                        subBuilder.MergeFrom(Potion);
                    }
                    input.ReadMessage(subBuilder);
                    Potion = subBuilder;
                    break;
                }

                case 18: {
                    global::WUProtos.Data.WrackspurtBonusMetadata subBuilder = new global::WUProtos.Data.WrackspurtBonusMetadata();
                    if (metadataTypeCase_ == MetadataTypeOneofCase.Wrackspurt)
                    {
                        subBuilder.MergeFrom(Wrackspurt);
                    }
                    input.ReadMessage(subBuilder);
                    Wrackspurt = subBuilder;
                    break;
                }

                case 26: {
                    global::WUProtos.Data.FirstTimeCollectionBonusMetadata subBuilder = new global::WUProtos.Data.FirstTimeCollectionBonusMetadata();
                    if (metadataTypeCase_ == MetadataTypeOneofCase.FirstTimeCollection)
                    {
                        subBuilder.MergeFrom(FirstTimeCollection);
                    }
                    input.ReadMessage(subBuilder);
                    FirstTimeCollection = subBuilder;
                    break;
                }

                case 34: {
                    global::WUProtos.Data.Challenge.ChallengeBonus subBuilder = new global::WUProtos.Data.Challenge.ChallengeBonus();
                    if (metadataTypeCase_ == MetadataTypeOneofCase.Challenge)
                    {
                        subBuilder.MergeFrom(Challenge);
                    }
                    input.ReadMessage(subBuilder);
                    Challenge = subBuilder;
                    break;
                }

                case 42: {
                    global::WUProtos.Data.SpellGameBonusMetadata subBuilder = new global::WUProtos.Data.SpellGameBonusMetadata();
                    if (metadataTypeCase_ == MetadataTypeOneofCase.SpellGame)
                    {
                        subBuilder.MergeFrom(SpellGame);
                    }
                    input.ReadMessage(subBuilder);
                    SpellGame = subBuilder;
                    break;
                }

                case 50: {
                    global::WUProtos.Data.Challenge.ChallengeBonusMetadata subBuilder = new global::WUProtos.Data.Challenge.ChallengeBonusMetadata();
                    if (metadataTypeCase_ == MetadataTypeOneofCase.ChallengeBonus)
                    {
                        subBuilder.MergeFrom(ChallengeBonus);
                    }
                    input.ReadMessage(subBuilder);
                    ChallengeBonus = subBuilder;
                    break;
                }

                case 58: {
                    global::WUProtos.Data.ShardConversionBonusMetadata subBuilder = new global::WUProtos.Data.ShardConversionBonusMetadata();
                    if (metadataTypeCase_ == MetadataTypeOneofCase.ShardConversion)
                    {
                        subBuilder.MergeFrom(ShardConversion);
                    }
                    input.ReadMessage(subBuilder);
                    ShardConversion = subBuilder;
                    break;
                }

                case 66: {
                    global::WUProtos.Data.Challenge.ChallengeChamberBonusMetadata subBuilder = new global::WUProtos.Data.Challenge.ChallengeChamberBonusMetadata();
                    if (metadataTypeCase_ == MetadataTypeOneofCase.ChallengeChamberBonus)
                    {
                        subBuilder.MergeFrom(ChallengeChamberBonus);
                    }
                    input.ReadMessage(subBuilder);
                    ChallengeChamberBonus = subBuilder;
                    break;
                }
                }
            }
        }
Exemplo n.º 2
0
        public void MergeFrom(BonusMetadata other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.MetadataTypeCase)
            {
            case MetadataTypeOneofCase.Potion:
                if (Potion == null)
                {
                    Potion = new global::WUProtos.Data.Potion.PotionBonusMetadata();
                }
                Potion.MergeFrom(other.Potion);
                break;

            case MetadataTypeOneofCase.Wrackspurt:
                if (Wrackspurt == null)
                {
                    Wrackspurt = new global::WUProtos.Data.WrackspurtBonusMetadata();
                }
                Wrackspurt.MergeFrom(other.Wrackspurt);
                break;

            case MetadataTypeOneofCase.FirstTimeCollection:
                if (FirstTimeCollection == null)
                {
                    FirstTimeCollection = new global::WUProtos.Data.FirstTimeCollectionBonusMetadata();
                }
                FirstTimeCollection.MergeFrom(other.FirstTimeCollection);
                break;

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

            case MetadataTypeOneofCase.SpellGame:
                if (SpellGame == null)
                {
                    SpellGame = new global::WUProtos.Data.SpellGameBonusMetadata();
                }
                SpellGame.MergeFrom(other.SpellGame);
                break;

            case MetadataTypeOneofCase.ChallengeBonus:
                if (ChallengeBonus == null)
                {
                    ChallengeBonus = new global::WUProtos.Data.Challenge.ChallengeBonusMetadata();
                }
                ChallengeBonus.MergeFrom(other.ChallengeBonus);
                break;

            case MetadataTypeOneofCase.ShardConversion:
                if (ShardConversion == null)
                {
                    ShardConversion = new global::WUProtos.Data.ShardConversionBonusMetadata();
                }
                ShardConversion.MergeFrom(other.ShardConversion);
                break;

            case MetadataTypeOneofCase.ChallengeChamberBonus:
                if (ChallengeChamberBonus == null)
                {
                    ChallengeChamberBonus = new global::WUProtos.Data.Challenge.ChallengeChamberBonusMetadata();
                }
                ChallengeChamberBonus.MergeFrom(other.ChallengeChamberBonus);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }