internal static string ToSerializedValue(this TierType value) { switch (value) { case TierType.Consumption: return("Consumption"); case TierType.Commitment1TB: return("Commitment_1TB"); case TierType.Commitment10TB: return("Commitment_10TB"); case TierType.Commitment100TB: return("Commitment_100TB"); case TierType.Commitment500TB: return("Commitment_500TB"); case TierType.Commitment1PB: return("Commitment_1PB"); case TierType.Commitment5PB: return("Commitment_5PB"); } return(null); }
public Item(string name, ItemSlot.SlotHashes slot, int powerLevel, TierType tier = TierType.Superior, DestinyClass classType = DestinyClass.Unknown) { Name = name; Slot = new ItemSlot(slot.ToString(), slot); PowerLevel = powerLevel; Tier = tier; ClassType = classType; }
public bool Equals(DestinyItemInventoryBlockDefinition input) { if (input == null) { return(false); } return (( StackUniqueLabel == input.StackUniqueLabel || (StackUniqueLabel != null && StackUniqueLabel.Equals(input.StackUniqueLabel)) ) && ( MaxStackSize == input.MaxStackSize || (MaxStackSize.Equals(input.MaxStackSize)) ) && ( BucketTypeHash == input.BucketTypeHash || (BucketTypeHash.Equals(input.BucketTypeHash)) ) && ( RecoveryBucketTypeHash == input.RecoveryBucketTypeHash || (RecoveryBucketTypeHash.Equals(input.RecoveryBucketTypeHash)) ) && ( TierTypeHash == input.TierTypeHash || (TierTypeHash.Equals(input.TierTypeHash)) ) && ( IsInstanceItem == input.IsInstanceItem || (IsInstanceItem != null && IsInstanceItem.Equals(input.IsInstanceItem)) ) && ( TierTypeName == input.TierTypeName || (TierTypeName != null && TierTypeName.Equals(input.TierTypeName)) ) && ( TierType == input.TierType || (TierType != null && TierType.Equals(input.TierType)) ) && ( ExpirationTooltip == input.ExpirationTooltip || (ExpirationTooltip != null && ExpirationTooltip.Equals(input.ExpirationTooltip)) ) && ( ExpiredInActivityMessage == input.ExpiredInActivityMessage || (ExpiredInActivityMessage != null && ExpiredInActivityMessage.Equals(input.ExpiredInActivityMessage)) ) && ( ExpiredInOrbitMessage == input.ExpiredInOrbitMessage || (ExpiredInOrbitMessage != null && ExpiredInOrbitMessage.Equals(input.ExpiredInOrbitMessage)) ) && ( SuppressExpirationWhenObjectivesComplete == input.SuppressExpirationWhenObjectivesComplete || (SuppressExpirationWhenObjectivesComplete != null && SuppressExpirationWhenObjectivesComplete.Equals(input.SuppressExpirationWhenObjectivesComplete)) )); }
public Crew(CrewBackground background, CrewPreference preference, CrewSkill skills, TierType tier, LevelType level) : base (ItemType.Crew, tier, level) { if (background == CrewBackground.Undefined) throw new ArgumentException("The crew background is undefined.", nameof(background)); if (preference == CrewPreference.Undefined) throw new ArgumentException("The crew preference is undefined.", nameof(preference)); Background = background; Preference = preference; Skills = skills; }
public ActionResult AllByTierType(TierType tierType, string sortValue, string sortOrder) { var userId = this.GetCurrentUserId(); var events = db.Events.Where(e => e.EventAdmins.Any(ea => ea.Id == userId && e.TierType == tierType)).ToList(); var model = Mapper.Map <IEnumerable <Event>, IEnumerable <EventViewModel> >(events); this.ViewBag.SortValue = sortValue; this.ViewBag.SortOrder = sortOrder; switch (sortValue) { case null: { model = model.OrderBy(m => m.Name); this.ViewBag.SortValue = "Name"; this.ViewBag.SortOrder = "Asc"; } break; case "Name": { model = sortOrder.Equals("Asc") ? model.OrderBy(m => m.Name) : model.OrderByDescending(m => m.Name); } break; case "Location": { model = sortOrder.Equals("Asc") ? model.OrderBy(m => m.Location) : model.OrderByDescending(m => m.Location); } break; case "Venue": { model = sortOrder.Equals("Asc") ? model.OrderBy(m => m.Venue.Name) : model.OrderByDescending(m => m.Venue.Name); } break; case "PrizePool": { model = sortOrder.Equals("Asc") ? model.OrderBy(m => m.PrizePool) : model.OrderByDescending(m => m.PrizePool); } break; case "Season": { model = sortOrder.Equals("Asc") ? model.OrderBy(m => m.Season.Year) : model.OrderByDescending(m => m.Season.Year); } break; default: { throw new InvalidOperationException("Invalid sort parameters"); } } ViewBag.TierType = tierType.ToString(); return(View(model)); }
public void SetInfoTier(TierType type) { var tierSprite = tierSpriteList.Find(x => x.tier == type); if (tierSprite == null) { return; } tierImage.sprite = tierSprite.sprite; }
public Item(long id, long hash, string name, bool equippable, TierType tier, DestinyItemType type, DestinyItemSubType subType) { Id = id; Hash = hash; Name = name; Equippable = equippable; Tier = tier; Type = type; SubType = subType; }
public Gear(GearType gearType, JobType job, GearState state, GearElementary elementary, TierType tier, LevelType level) : base (ItemType.Gear, tier, level) { if (gearType == GearType.Undefined) throw new ArgumentException("The gear type is undefined.", nameof(gearType)); if (job == JobType.Undefined) throw new ArgumentException("The job is undefined.", nameof(job)); if (state == GearState.Undefined) throw new ArgumentException("The gear state is undefined.", nameof(state)); Elementary = elementary; State = state; GearType = gearType; Job = job; }
protected Item(Game1 Game) { this.Game = Game; Weight = 1.0f; Value = 0; Tier = TierType.None; Name = ""; Kind = ""; random = new Random(); }
private Affix ModJsonToAffix( ModsJson modsJson, int modTier, TierType tierType) { Affix affix = new Affix(); affix.GenerationType = modsJson.GenerationType; affix.Group = modsJson.Group; affix.Name = modsJson.Name; affix.FullName = modsJson.FullName; affix.RequiredLevel = (int)modsJson.RequiredLevel; affix.Type = modsJson.Type; affix.Tier = modTier; affix.TierType = tierType; affix.Tags = _modTypeToTags[modsJson.Type]; affix.AddsTags = modsJson.AddsTags; affix.SpawnWeights = modsJson.SpawnWeights.ToDictionary(x => x.Tag, x => (int)x.Weight); affix.GenerationWeights = modsJson.GenerationWeights.ToDictionary(x => x.Tag, x => (int)x.Weight); if (modsJson.Stats.Count > 0) { int sMin = (int)Math.Abs(modsJson.Stats[0].Min); int sMax = (int)Math.Abs(modsJson.Stats[0].Max); affix.StatMin1 = sMin <= sMax ? sMin : sMax; affix.StatMax1 = sMax >= sMin ? sMax : sMin; affix.StatName1 = modsJson.Stats[0].Id; } if (modsJson.Stats.Count > 1) { int sMin = (int)Math.Abs(modsJson.Stats[1].Min); int sMax = (int)Math.Abs(modsJson.Stats[1].Max); affix.StatMin2 = sMin <= sMax ? sMin : sMax; affix.StatMax2 = sMax >= sMin ? sMax : sMin; affix.StatName2 = modsJson.Stats[1].Id; } if (modsJson.Stats.Count > 2) { int sMin = (int)Math.Abs(modsJson.Stats[2].Min); int sMax = (int)Math.Abs(modsJson.Stats[2].Max); affix.StatMin3 = sMin <= sMax ? sMin : sMax; affix.StatMax3 = sMax >= sMin ? sMax : sMin; affix.StatName3 = modsJson.Stats[2].Id; } return(affix); }
public bool DeepEquals(InventoryItemInventoryBlock other) { return(other != null && StackUniqueLabel == other.StackUniqueLabel && BucketType.DeepEquals(other.BucketType) && ExpirationTooltip == other.ExpirationTooltip && ExpiredInActivityMessage == other.ExpiredInActivityMessage && ExpiredInOrbitMessage == other.ExpiredInOrbitMessage && IsInstanceItem == other.IsInstanceItem && MaxStackSize == other.MaxStackSize && NonTransferrableOriginal == other.NonTransferrableOriginal && RecoveryBucketType.DeepEquals(other.RecoveryBucketType) && SuppressExpirationWhenObjectivesComplete == other.SuppressExpirationWhenObjectivesComplete && TierTypeEnumValue == other.TierTypeEnumValue && TierType.DeepEquals(other.TierType) && TierTypeName == other.TierTypeName); }
private Affix ModJsonToAffix( ModsJson modsJson, int modTier, TierType tierType, Faction faction = Faction.None) { Affix affix = new Affix(); affix.GenerationType = modsJson.GenerationType; affix.Group = modsJson.Group; affix.Name = modsJson.Name; affix.FullName = modsJson.FullName; affix.RequiredLevel = (int)modsJson.RequiredLevel; affix.Type = modsJson.Type; affix.Tier = modTier; affix.TierType = tierType; affix.Faction = faction; affix.Tags = _modTypeToTags[modsJson.Type]; affix.AddsTags = modsJson.AddsTags; affix.SpawnWeights = modsJson.SpawnWeights.ToDictionary(x => x.Tag, x => (int)x.Weight); affix.GenerationWeights = modsJson.GenerationWeights.ToDictionary(x => x.Tag, x => (int)x.Weight); if (modsJson.Stats.Count > 0) { affix.StatMax1 = (int)modsJson.Stats[0].Max; affix.StatMax1 = (int)modsJson.Stats[0].Min; affix.StatName1 = modsJson.Stats[0].Id; } if (modsJson.Stats.Count > 1) { affix.StatMax2 = (int)modsJson.Stats[1].Max; affix.StatMax2 = (int)modsJson.Stats[1].Min; affix.StatName2 = modsJson.Stats[1].Id; } if (modsJson.Stats.Count > 2) { affix.StatMax3 = (int)modsJson.Stats[2].Max; affix.StatMax3 = (int)modsJson.Stats[2].Min; affix.StatName3 = modsJson.Stats[2].Id; } return(affix); }
Tier(TierType t, int plvl, int dv) { Type = t; PreciseLevel = plvl; DvMod = dv; }
public Tier() { type = TierType.Normie; }
public Crystal(CrystalType crystalType, TierType tier, LevelType level) : base(ItemType.Crystal, tier, level) { if (crystalType == CrystalType.Undefined) throw new ArgumentException("The crystal type is undefined.", nameof(crystalType)); CrystalType = crystalType; }
public TierInfo(TierType type, int level) { this.type = type; this.level = level; }
/// <summary> /// Creates a new instance configured for the specified graph. /// </summary> /// <param name="graph">The graph to configure the layout data for</param> /// <param name="fromSketch"/> Whether the <see cref="HierarchicLayout"/> shall be run in incremental layout mode. public LayoutData(IGraph graph, bool fromSketch) { // set up port candidates for edges (edges should be attached to the left/right side of the corresponding node var candidates = new List <PortCandidate> { PortCandidate.CreateCandidate(PortDirections.West), PortCandidate.CreateCandidate(PortDirections.East) }; // configure the different sub group layout settings var leftToRightTreeLayout = new TreeReductionStage(); leftToRightTreeLayout.NonTreeEdgeRouter = leftToRightTreeLayout.CreateStraightLineRouter(); leftToRightTreeLayout.CoreLayout = new TreeLayout { LayoutOrientation = LayoutOrientation.LeftToRight, }; var rightToLeftTreeLayout = new TreeReductionStage(); rightToLeftTreeLayout.NonTreeEdgeRouter = rightToLeftTreeLayout.CreateStraightLineRouter(); rightToLeftTreeLayout.CoreLayout = new TreeLayout { LayoutOrientation = LayoutOrientation.RightToLeft, }; var view = graph.Lookup <IFoldingView>(); Items.Add(new RecursiveGroupLayoutData { SourcePortCandidates = { Constant = candidates }, TargetPortCandidates = { Constant = candidates }, // map each group node to the layout algorithm that should be used for its content GroupNodeLayouts = { Delegate = node => { switch (GetTierType(node, view, graph)) { case TierType.LeftTreeGroupNode: return(leftToRightTreeLayout); case TierType.RightTreeGroupNode: return(rightToLeftTreeLayout); default: return(null); } } } }); var hlData = new HierarchicLayoutData { NodeLayoutDescriptors = { Delegate = node => { // align tree group nodes within their layer switch (GetTierType(node, view, graph)) { case TierType.LeftTreeGroupNode: return(new NodeLayoutDescriptor { LayerAlignment = 1 }); case TierType.RightTreeGroupNode: return(new NodeLayoutDescriptor { LayerAlignment = 0 }); default: return(null); } } } }; if (!fromSketch) { // insert layer constraints to guarantee the desired placement for "left" and "right" group nodes var layerConstraintData = hlData.LayerConstraints; foreach (var node in graph.Nodes) { // align tree group nodes within their layer TierType type = GetTierType(node, view, graph); if (type == TierType.LeftTreeGroupNode) { layerConstraintData.PlaceAtTop(node); } else if (type == TierType.RightTreeGroupNode) { layerConstraintData.PlaceAtBottom(node); } } } Items.Add(hlData); }
public BigInteger GetReward(TierType tier) { return(_rewardMap[tier]); }