Exemple #1
0
 public List <PropertyModifier> GetFixedPropertyModifiers()
 {
     return(this.fixedItemModifiers
            .SelectMany(m => m.GetPropertyModifiers(BaseLevel, 0, CraftUtils.GetQualityMultiplier(this)))
            .Concat(BasePropertyModifiers)
            .ToList());
 }
Exemple #2
0
 public List <AttributeModifier> GetFixedAttributeModifiers()
 {
     return(this.fixedItemModifiers
            .SelectMany(m => m.GetAttributeModifiers(BaseLevel, CraftUtils.GetQualityMultiplier(this)))
            .Concat(BaseAttributeModifiers)
            .ToList());
 }
Exemple #3
0
        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);
        }
Exemple #4
0
        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());
        }
Exemple #5
0
        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);
        }