Example #1
0
        public void MergeFrom(LootReward other)
        {
            if (other == null)
            {
                return;
            }
            if (other.bonusMetadata_ != null)
            {
                if (bonusMetadata_ == null)
                {
                    BonusMetadata = new global::WUProtos.Data.BonusMetadata();
                }
                BonusMetadata.MergeFrom(other.BonusMetadata);
            }
            switch (other.RewardDataCase)
            {
            case RewardDataOneofCase.ItemReward:
                if (ItemReward == null)
                {
                    ItemReward = new global::WUProtos.Data.VaultItemLootReward();
                }
                ItemReward.MergeFrom(other.ItemReward);
                break;

            case RewardDataOneofCase.CollectionFamilyReward:
                if (CollectionFamilyReward == null)
                {
                    CollectionFamilyReward = new global::WUProtos.Data.Collection.CollectionFamilyLootReward();
                }
                CollectionFamilyReward.MergeFrom(other.CollectionFamilyReward);
                break;

            case RewardDataOneofCase.CollectionReward:
                if (CollectionReward == null)
                {
                    CollectionReward = new global::WUProtos.Data.Collection.CollectionItemReward();
                }
                CollectionReward.MergeFrom(other.CollectionReward);
                break;

            case RewardDataOneofCase.WalkboxReward:
                if (WalkboxReward == null)
                {
                    WalkboxReward = new global::WUProtos.Data.WalkboxReward();
                }
                WalkboxReward.MergeFrom(other.WalkboxReward);
                break;

            case RewardDataOneofCase.PortkeyReward:
                if (PortkeyReward == null)
                {
                    PortkeyReward = new global::WUProtos.Data.PortkeyReward();
                }
                PortkeyReward.MergeFrom(other.PortkeyReward);
                break;

            case RewardDataOneofCase.LootTableReward:
                if (LootTableReward == null)
                {
                    LootTableReward = new global::WUProtos.Data.Loot.LootTableReward();
                }
                LootTableReward.MergeFrom(other.LootTableReward);
                break;

            case RewardDataOneofCase.VaultCapacityReward:
                if (VaultCapacityReward == null)
                {
                    VaultCapacityReward = new global::WUProtos.Data.VaultCapacityLootReward();
                }
                VaultCapacityReward.MergeFrom(other.VaultCapacityReward);
                break;

            case RewardDataOneofCase.GenericRunestone:
                if (GenericRunestone == null)
                {
                    GenericRunestone = new global::WUProtos.Data.GenericRunestoneReward();
                }
                GenericRunestone.MergeFrom(other.GenericRunestone);
                break;

            case RewardDataOneofCase.PotionReward:
                if (PotionReward == null)
                {
                    PotionReward = new global::WUProtos.Data.Potion.PotionReward();
                }
                PotionReward.MergeFrom(other.PotionReward);
                break;

            case RewardDataOneofCase.PortkeyCollectible:
                if (PortkeyCollectible == null)
                {
                    PortkeyCollectible = new global::WUProtos.Data.PortkeyCollectibleReward();
                }
                PortkeyCollectible.MergeFrom(other.PortkeyCollectible);
                break;

            case RewardDataOneofCase.GenericCollectionFamilyReward:
                if (GenericCollectionFamilyReward == null)
                {
                    GenericCollectionFamilyReward = new global::WUProtos.Data.GenericCollectionFamilyLootReward();
                }
                GenericCollectionFamilyReward.MergeFrom(other.GenericCollectionFamilyReward);
                break;

            case RewardDataOneofCase.CauldronReward:
                if (CauldronReward == null)
                {
                    CauldronReward = new global::WUProtos.Data.CauldronReward();
                }
                CauldronReward.MergeFrom(other.CauldronReward);
                break;

            case RewardDataOneofCase.CurrencyReward:
                if (CurrencyReward == null)
                {
                    CurrencyReward = new global::WUProtos.Data.CurrencyReward();
                }
                CurrencyReward.MergeFrom(other.CurrencyReward);
                break;

            case RewardDataOneofCase.QuestReward:
                if (QuestReward == null)
                {
                    QuestReward = new global::WUProtos.Data.QuestReward();
                }
                QuestReward.MergeFrom(other.QuestReward);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Example #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (rewardDataCase_ == RewardDataOneofCase.ItemReward)
            {
                hash ^= ItemReward.GetHashCode();
            }
            if (rewardDataCase_ == RewardDataOneofCase.CollectionFamilyReward)
            {
                hash ^= CollectionFamilyReward.GetHashCode();
            }
            if (rewardDataCase_ == RewardDataOneofCase.CollectionReward)
            {
                hash ^= CollectionReward.GetHashCode();
            }
            if (rewardDataCase_ == RewardDataOneofCase.WalkboxReward)
            {
                hash ^= WalkboxReward.GetHashCode();
            }
            if (rewardDataCase_ == RewardDataOneofCase.PortkeyReward)
            {
                hash ^= PortkeyReward.GetHashCode();
            }
            if (rewardDataCase_ == RewardDataOneofCase.LootTableReward)
            {
                hash ^= LootTableReward.GetHashCode();
            }
            if (rewardDataCase_ == RewardDataOneofCase.VaultCapacityReward)
            {
                hash ^= VaultCapacityReward.GetHashCode();
            }
            if (rewardDataCase_ == RewardDataOneofCase.GenericRunestone)
            {
                hash ^= GenericRunestone.GetHashCode();
            }
            if (rewardDataCase_ == RewardDataOneofCase.PotionReward)
            {
                hash ^= PotionReward.GetHashCode();
            }
            if (rewardDataCase_ == RewardDataOneofCase.PortkeyCollectible)
            {
                hash ^= PortkeyCollectible.GetHashCode();
            }
            if (rewardDataCase_ == RewardDataOneofCase.GenericCollectionFamilyReward)
            {
                hash ^= GenericCollectionFamilyReward.GetHashCode();
            }
            if (rewardDataCase_ == RewardDataOneofCase.CauldronReward)
            {
                hash ^= CauldronReward.GetHashCode();
            }
            if (rewardDataCase_ == RewardDataOneofCase.CurrencyReward)
            {
                hash ^= CurrencyReward.GetHashCode();
            }
            if (rewardDataCase_ == RewardDataOneofCase.QuestReward)
            {
                hash ^= QuestReward.GetHashCode();
            }
            if (bonusMetadata_ != null)
            {
                hash ^= BonusMetadata.GetHashCode();
            }
            hash ^= (int)rewardDataCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }