Пример #1
0
 static int CalcCost(Recipe recipe, Character character, out double yield)
 {
     yield = RecipeYieldCalculator.GetYield(recipe, character);
     return
         ((int)
          (recipe.Materials.Sum(p => ItemCostCalculator.GetUnitPrice(p.Key) * p.Value) / yield));
 }
Пример #2
0
 static int CalcCost(Recipe recipe)
 {
     return
         ((int)
          (recipe.Materials.Sum(p => ItemCostCalculator.GetUnitPrice(p.Key) * p.Value) /
           RecipeYieldCalculator.GetYield(recipe)));
 }