public void MergeFrom(ChamberTemplate other) { if (other == null) { return; } if (other.Id.Length != 0) { Id = other.Id; } if (other.unlockRequirements_ != null) { if (unlockRequirements_ == null) { UnlockRequirements = new global::WUProtos.Data.Requirements(); } UnlockRequirements.MergeFrom(other.UnlockRequirements); } if (other.visibilityRequirements_ != null) { if (visibilityRequirements_ == null) { VisibilityRequirements = new global::WUProtos.Data.Requirements(); } VisibilityRequirements.MergeFrom(other.VisibilityRequirements); } if (other.MinRunestoneLevel != 0) { MinRunestoneLevel = other.MinRunestoneLevel; } if (other.MaxRunestoneLevel != 0) { MaxRunestoneLevel = other.MaxRunestoneLevel; } if (other.PlayerCap != 0) { PlayerCap = other.PlayerCap; } if (other.DurationMs != 0L) { DurationMs = other.DurationMs; } if (other.KnockoutTimeMs != 0L) { KnockoutTimeMs = other.KnockoutTimeMs; } playerCountMultipliers_.Add(other.playerCountMultipliers_); if (other.BaseChamberRating != 0) { BaseChamberRating = other.BaseChamberRating; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public void MergeFrom(CollectionItem other) { if (other == null) { return; } if (other.Id.Length != 0) { Id = other.Id; } if (other.FamilyId.Length != 0) { FamilyId = other.FamilyId; } if (other.ShardCount != 0) { ShardCount = other.ShardCount; } if (other.Rarity != 0) { Rarity = other.Rarity; } if (other.oneTimeRewards_ != null) { if (oneTimeRewards_ == null) { OneTimeRewards = new global::WUProtos.Data.Loot.LootCollection(); } OneTimeRewards.MergeFrom(other.OneTimeRewards); } if (other.PageId.Length != 0) { PageId = other.PageId; } if (other.unlockRequirements_ != null) { if (unlockRequirements_ == null) { UnlockRequirements = new global::WUProtos.Data.Requirements(); } UnlockRequirements.MergeFrom(other.UnlockRequirements); } shardCounts_.Add(other.shardCounts_); if (other.StickerDisabled != false) { StickerDisabled = other.StickerDisabled; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (unlockRequirements_ != null) { hash ^= UnlockRequirements.GetHashCode(); } if (visibilityRequirements_ != null) { hash ^= VisibilityRequirements.GetHashCode(); } if (MinRunestoneLevel != 0) { hash ^= MinRunestoneLevel.GetHashCode(); } if (MaxRunestoneLevel != 0) { hash ^= MaxRunestoneLevel.GetHashCode(); } if (PlayerCap != 0) { hash ^= PlayerCap.GetHashCode(); } if (DurationMs != 0L) { hash ^= DurationMs.GetHashCode(); } if (KnockoutTimeMs != 0L) { hash ^= KnockoutTimeMs.GetHashCode(); } hash ^= PlayerCountMultipliers.GetHashCode(); if (BaseChamberRating != 0) { hash ^= BaseChamberRating.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary>Checks wether or not the player has all/any parents (depends on <see cref="RequiresAllParents"/>. If this check passes, it executes the <see cref="UnlockRequirements"/> for any specific requirements.</summary> /// <param name="player"></param> /// <returns>true if the palyer can unlock the transformation; otherwise false.</returns> public bool CanPlayerUnlock(MyPlayer player) { for (int i = 0; i < Parents.Length; i++) { if (RequiresAllParents & !player.HasTransformation(Parents[i])) { return(false); } if (!RequiresAllParents && player.HasTransformation(Parents[i])) { return(true); } } return(UnlockRequirements.Invoke(player)); }
public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (FamilyId.Length != 0) { hash ^= FamilyId.GetHashCode(); } if (ShardCount != 0) { hash ^= ShardCount.GetHashCode(); } if (Rarity != 0) { hash ^= Rarity.GetHashCode(); } if (oneTimeRewards_ != null) { hash ^= OneTimeRewards.GetHashCode(); } if (PageId.Length != 0) { hash ^= PageId.GetHashCode(); } if (unlockRequirements_ != null) { hash ^= UnlockRequirements.GetHashCode(); } hash ^= shardCounts_.GetHashCode(); if (StickerDisabled != false) { hash ^= StickerDisabled.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public void MergeFrom(CollectionFamily other) { if (other == null) { return; } if (other.Id.Length != 0) { Id = other.Id; } if (other.FamilyType != 0) { FamilyType = other.FamilyType; } items_.Add(other.items_); levels_.Add(other.levels_); pages_.Add(other.pages_); if (other.FamilyRuneName.Length != 0) { FamilyRuneName = other.FamilyRuneName; } if (other.FamilyRankTableId.Length != 0) { FamilyRankTableId = other.FamilyRankTableId; } returnedRewards_.Add(other.returnedRewards_); runeId_.Add(other.runeId_); apexItems_.Add(other.apexItems_); if (other.unlockRequirements_ != null) { if (unlockRequirements_ == null) { UnlockRequirements = new global::WUProtos.Data.Requirements(); } UnlockRequirements.MergeFrom(other.UnlockRequirements); } if (other.SubfeatureType != 0) { SubfeatureType = other.SubfeatureType; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (FamilyType != 0) { hash ^= FamilyType.GetHashCode(); } hash ^= items_.GetHashCode(); hash ^= levels_.GetHashCode(); hash ^= pages_.GetHashCode(); if (FamilyRuneName.Length != 0) { hash ^= FamilyRuneName.GetHashCode(); } if (FamilyRankTableId.Length != 0) { hash ^= FamilyRankTableId.GetHashCode(); } hash ^= returnedRewards_.GetHashCode(); hash ^= runeId_.GetHashCode(); hash ^= apexItems_.GetHashCode(); if (unlockRequirements_ != null) { hash ^= UnlockRequirements.GetHashCode(); } if (SubfeatureType != 0) { hash ^= SubfeatureType.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary>The specific transformation requirements, f.e. UI Omen requires the player to be low on health and fighting a boss with substantial health.</summary> /// <param name="player"></param> /// <returns>true if not overriden or if the player meets the transformation requirements; otherwise false.</returns> public virtual bool MeetsTransformationRequirements(MyPlayer player) => UnlockRequirements.Invoke(player);
public virtual bool MeetsSelectionRequirements(MyPlayer player) => PlayerHasTransformation(player) && UnlockRequirements.Invoke(player);