Exemple #1
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);
        }
Exemple #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (typeCase_ == TypeOneofCase.Profile)
            {
                hash ^= Profile.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.VaultItem)
            {
                hash ^= VaultItem.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.CollectionItem)
            {
                hash ^= CollectionItem.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.CollectionFamily)
            {
                hash ^= CollectionFamily.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.Walkbox)
            {
                hash ^= Walkbox.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.PlayerFlags)
            {
                hash ^= PlayerFlags.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.Portkey)
            {
                hash ^= Portkey.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.PlayerActiveBuffList)
            {
                hash ^= PlayerActiveBuffList.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.CollectionPage)
            {
                hash ^= CollectionPage.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.VaultCapacity)
            {
                hash ^= VaultCapacity.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.Cauldron)
            {
                hash ^= Cauldron.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.EscrowedRewards)
            {
                hash ^= EscrowedRewards.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.ProfessionsProgressV3)
            {
                hash ^= ProfessionsProgressV3.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.QuestLog)
            {
                hash ^= QuestLog.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.Achievement)
            {
                hash ^= Achievement.GetHashCode();
            }
            hash ^= (int)typeCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }