public List <PropertyModifier> GetFixedPropertyModifiers() { return(this.fixedItemModifiers .SelectMany(m => m.GetPropertyModifiers(BaseLevel, 0, CraftUtils.GetQualityMultiplier(this))) .Concat(BasePropertyModifiers) .ToList()); }
public List <AttributeModifier> GetFixedAttributeModifiers() { return(this.fixedItemModifiers .SelectMany(m => m.GetAttributeModifiers(BaseLevel, CraftUtils.GetQualityMultiplier(this))) .Concat(BaseAttributeModifiers) .ToList()); }
private void Refresh(Item item) { var upgraded = item.Clone(); upgraded.ForgeLevel += 1; this.ingredients = CraftUtils.GetForgeIngredients(upgraded) .GroupBy(i => i.Id) .Select(group => new RecipeIngredient(group.First(), group.Sum(i => i.StackCount))) .ToList(); View.Refresh(item, upgraded, this.ingredients); }
public List <AttributeModifier> GetAttributeModifiers(bool includeFixed = true) { var modifiers = new List <AttributeModifier>() .Concat(Suffix?.GetAttributeModifiers(Level, CraftUtils.GetQualityMultiplier(this)) ?? new List <AttributeModifier>()) .Concat(this.itemModifiers.SelectMany(m => m.GetAttributeModifiers(Level, CraftUtils.GetQualityMultiplier(this)))) .ToList(); if (includeFixed) { modifiers = modifiers.Concat(GetFixedAttributeModifiers()).ToList(); } return(modifiers.ToList()); }
public List <PropertyModifier> GetPropertyModifiers(bool includeFixed = true) { var modifiers = new List <PropertyModifier>() .Concat(Suffix?.GetPropertyModifiers(BaseLevel, ForgeLevel, CraftUtils.GetQualityMultiplier(this)) ?? new List <PropertyModifier>()) .Concat(this.itemModifiers.SelectMany(m => m.GetPropertyModifiers(BaseLevel, ForgeLevel, CraftUtils.GetQualityMultiplier(this)))) .ToList(); if (includeFixed) { modifiers = modifiers.Concat(GetFixedPropertyModifiers()).ToList(); } return(modifiers); }