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.Player.PlayerProfile subBuilder = new global::WUProtos.Data.Player.PlayerProfile();
                    if (typeCase_ == TypeOneofCase.Profile)
                    {
                        subBuilder.MergeFrom(Profile);
                    }
                    input.ReadMessage(subBuilder);
                    Profile = subBuilder;
                    break;
                }

                case 18: {
                    global::WUProtos.Inventory.InventoryVaultItem subBuilder = new global::WUProtos.Inventory.InventoryVaultItem();
                    if (typeCase_ == TypeOneofCase.VaultItem)
                    {
                        subBuilder.MergeFrom(VaultItem);
                    }
                    input.ReadMessage(subBuilder);
                    VaultItem = subBuilder;
                    break;
                }

                case 26: {
                    global::WUProtos.Inventory.InventoryCollectionItem subBuilder = new global::WUProtos.Inventory.InventoryCollectionItem();
                    if (typeCase_ == TypeOneofCase.CollectionItem)
                    {
                        subBuilder.MergeFrom(CollectionItem);
                    }
                    input.ReadMessage(subBuilder);
                    CollectionItem = subBuilder;
                    break;
                }

                case 34: {
                    global::WUProtos.Inventory.InventoryCollectionFamily subBuilder = new global::WUProtos.Inventory.InventoryCollectionFamily();
                    if (typeCase_ == TypeOneofCase.CollectionFamily)
                    {
                        subBuilder.MergeFrom(CollectionFamily);
                    }
                    input.ReadMessage(subBuilder);
                    CollectionFamily = subBuilder;
                    break;
                }

                case 42: {
                    global::WUProtos.Inventory.InventoryWalkboxItem subBuilder = new global::WUProtos.Inventory.InventoryWalkboxItem();
                    if (typeCase_ == TypeOneofCase.Walkbox)
                    {
                        subBuilder.MergeFrom(Walkbox);
                    }
                    input.ReadMessage(subBuilder);
                    Walkbox = subBuilder;
                    break;
                }

                case 50: {
                    global::WUProtos.Inventory.InventoryFeatureFlags subBuilder = new global::WUProtos.Inventory.InventoryFeatureFlags();
                    if (typeCase_ == TypeOneofCase.PlayerFlags)
                    {
                        subBuilder.MergeFrom(PlayerFlags);
                    }
                    input.ReadMessage(subBuilder);
                    PlayerFlags = subBuilder;
                    break;
                }

                case 58: {
                    global::WUProtos.Inventory.InventoryPortkeyItem subBuilder = new global::WUProtos.Inventory.InventoryPortkeyItem();
                    if (typeCase_ == TypeOneofCase.Portkey)
                    {
                        subBuilder.MergeFrom(Portkey);
                    }
                    input.ReadMessage(subBuilder);
                    Portkey = subBuilder;
                    break;
                }

                case 66: {
                    global::WUProtos.Data.Buff.ActiveBuffList subBuilder = new global::WUProtos.Data.Buff.ActiveBuffList();
                    if (typeCase_ == TypeOneofCase.PlayerActiveBuffList)
                    {
                        subBuilder.MergeFrom(PlayerActiveBuffList);
                    }
                    input.ReadMessage(subBuilder);
                    PlayerActiveBuffList = subBuilder;
                    break;
                }

                case 74: {
                    global::WUProtos.Inventory.InventoryCollectionPage subBuilder = new global::WUProtos.Inventory.InventoryCollectionPage();
                    if (typeCase_ == TypeOneofCase.CollectionPage)
                    {
                        subBuilder.MergeFrom(CollectionPage);
                    }
                    input.ReadMessage(subBuilder);
                    CollectionPage = subBuilder;
                    break;
                }

                case 90: {
                    global::WUProtos.Inventory.InventoryVaultCapacity subBuilder = new global::WUProtos.Inventory.InventoryVaultCapacity();
                    if (typeCase_ == TypeOneofCase.VaultCapacity)
                    {
                        subBuilder.MergeFrom(VaultCapacity);
                    }
                    input.ReadMessage(subBuilder);
                    VaultCapacity = subBuilder;
                    break;
                }

                case 98: {
                    global::WUProtos.Inventory.InventoryCauldron subBuilder = new global::WUProtos.Inventory.InventoryCauldron();
                    if (typeCase_ == TypeOneofCase.Cauldron)
                    {
                        subBuilder.MergeFrom(Cauldron);
                    }
                    input.ReadMessage(subBuilder);
                    Cauldron = subBuilder;
                    break;
                }

                case 106: {
                    global::WUProtos.Inventory.InventoryEscrowedRewards subBuilder = new global::WUProtos.Inventory.InventoryEscrowedRewards();
                    if (typeCase_ == TypeOneofCase.EscrowedRewards)
                    {
                        subBuilder.MergeFrom(EscrowedRewards);
                    }
                    input.ReadMessage(subBuilder);
                    EscrowedRewards = subBuilder;
                    break;
                }

                case 114: {
                    global::WUProtos.Data.Player.PlayerProfessionsProgressV3 subBuilder = new global::WUProtos.Data.Player.PlayerProfessionsProgressV3();
                    if (typeCase_ == TypeOneofCase.ProfessionsProgressV3)
                    {
                        subBuilder.MergeFrom(ProfessionsProgressV3);
                    }
                    input.ReadMessage(subBuilder);
                    ProfessionsProgressV3 = subBuilder;
                    break;
                }

                case 122: {
                    global::WUProtos.Inventory.InventoryQuestLog subBuilder = new global::WUProtos.Inventory.InventoryQuestLog();
                    if (typeCase_ == TypeOneofCase.QuestLog)
                    {
                        subBuilder.MergeFrom(QuestLog);
                    }
                    input.ReadMessage(subBuilder);
                    QuestLog = subBuilder;
                    break;
                }

                case 130: {
                    global::WUProtos.Data.Player.PlayerAchievement subBuilder = new global::WUProtos.Data.Player.PlayerAchievement();
                    if (typeCase_ == TypeOneofCase.Achievement)
                    {
                        subBuilder.MergeFrom(Achievement);
                    }
                    input.ReadMessage(subBuilder);
                    Achievement = subBuilder;
                    break;
                }
                }
            }
        }
Exemplo n.º 2
0
        public void MergeFrom(AtlasInventoryItem other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.TypeCase)
            {
            case TypeOneofCase.Profile:
                if (Profile == null)
                {
                    Profile = new global::WUProtos.Data.Player.PlayerProfile();
                }
                Profile.MergeFrom(other.Profile);
                break;

            case TypeOneofCase.VaultItem:
                if (VaultItem == null)
                {
                    VaultItem = new global::WUProtos.Inventory.InventoryVaultItem();
                }
                VaultItem.MergeFrom(other.VaultItem);
                break;

            case TypeOneofCase.CollectionItem:
                if (CollectionItem == null)
                {
                    CollectionItem = new global::WUProtos.Inventory.InventoryCollectionItem();
                }
                CollectionItem.MergeFrom(other.CollectionItem);
                break;

            case TypeOneofCase.CollectionFamily:
                if (CollectionFamily == null)
                {
                    CollectionFamily = new global::WUProtos.Inventory.InventoryCollectionFamily();
                }
                CollectionFamily.MergeFrom(other.CollectionFamily);
                break;

            case TypeOneofCase.Walkbox:
                if (Walkbox == null)
                {
                    Walkbox = new global::WUProtos.Inventory.InventoryWalkboxItem();
                }
                Walkbox.MergeFrom(other.Walkbox);
                break;

            case TypeOneofCase.PlayerFlags:
                if (PlayerFlags == null)
                {
                    PlayerFlags = new global::WUProtos.Inventory.InventoryFeatureFlags();
                }
                PlayerFlags.MergeFrom(other.PlayerFlags);
                break;

            case TypeOneofCase.Portkey:
                if (Portkey == null)
                {
                    Portkey = new global::WUProtos.Inventory.InventoryPortkeyItem();
                }
                Portkey.MergeFrom(other.Portkey);
                break;

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

            case TypeOneofCase.CollectionPage:
                if (CollectionPage == null)
                {
                    CollectionPage = new global::WUProtos.Inventory.InventoryCollectionPage();
                }
                CollectionPage.MergeFrom(other.CollectionPage);
                break;

            case TypeOneofCase.VaultCapacity:
                if (VaultCapacity == null)
                {
                    VaultCapacity = new global::WUProtos.Inventory.InventoryVaultCapacity();
                }
                VaultCapacity.MergeFrom(other.VaultCapacity);
                break;

            case TypeOneofCase.Cauldron:
                if (Cauldron == null)
                {
                    Cauldron = new global::WUProtos.Inventory.InventoryCauldron();
                }
                Cauldron.MergeFrom(other.Cauldron);
                break;

            case TypeOneofCase.EscrowedRewards:
                if (EscrowedRewards == null)
                {
                    EscrowedRewards = new global::WUProtos.Inventory.InventoryEscrowedRewards();
                }
                EscrowedRewards.MergeFrom(other.EscrowedRewards);
                break;

            case TypeOneofCase.ProfessionsProgressV3:
                if (ProfessionsProgressV3 == null)
                {
                    ProfessionsProgressV3 = new global::WUProtos.Data.Player.PlayerProfessionsProgressV3();
                }
                ProfessionsProgressV3.MergeFrom(other.ProfessionsProgressV3);
                break;

            case TypeOneofCase.QuestLog:
                if (QuestLog == null)
                {
                    QuestLog = new global::WUProtos.Inventory.InventoryQuestLog();
                }
                QuestLog.MergeFrom(other.QuestLog);
                break;

            case TypeOneofCase.Achievement:
                if (Achievement == null)
                {
                    Achievement = new global::WUProtos.Data.Player.PlayerAchievement();
                }
                Achievement.MergeFrom(other.Achievement);
                break;
            }

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