private void CreateSetGroup(int setLevel, IncreasableItemOption option, ICollection <ItemDefinition> group) { var setForDefense = this.Context.CreateNew <ItemSetGroup>(); setForDefense.Name = $"{group.First().Name.Split(' ')[0]} Defense Bonus (Level {setLevel})"; setForDefense.MinimumItemCount = group.Count; setForDefense.Options.Add(option); setForDefense.SetLevel = (byte)setLevel; foreach (var item in group) { var itemOfSet = this.Context.CreateNew <ItemOfItemSet>(); itemOfSet.ItemDefinition = item; setForDefense.Items.Add(itemOfSet); } }
private ItemOptionLink GetOption(AttributeDefinition targetAttribute, float value) { var option = new IncreasableItemOption { OptionType = ItemOptionTypes.Option, PowerUpDefinition = new PowerUpDefinition { TargetAttribute = targetAttribute, Boost = new TestPowerUpDefinitionValue(new SimpleElement { Value = value }), }, }; return(new ItemOptionLink { ItemOption = option, Level = 1 }); }