diff --git a/EpicLoot/Crafting/EnchantCostsConfig.cs b/EpicLoot/Crafting/EnchantCostsConfig.cs index 8e3431e4..489ca88f 100644 --- a/EpicLoot/Crafting/EnchantCostsConfig.cs +++ b/EpicLoot/Crafting/EnchantCostsConfig.cs @@ -35,6 +35,7 @@ public class EnchantCostConfig { public ItemRarity Rarity; public List ItemTypes = new List(); + public List ItemNames = new List(); public List Cost = new List(); } @@ -43,6 +44,7 @@ public class AugmentCostConfig { public ItemRarity Rarity; public List ItemTypes = new List(); + public List ItemNames = new List(); public List Cost = new List(); } diff --git a/EpicLoot/Crafting/EnchantCostsHelper.cs b/EpicLoot/Crafting/EnchantCostsHelper.cs index dbcb6899..50a9e1a7 100644 --- a/EpicLoot/Crafting/EnchantCostsHelper.cs +++ b/EpicLoot/Crafting/EnchantCostsHelper.cs @@ -85,6 +85,7 @@ public static List GetSacrificeProducts(bool isMagic, ItemDrop public static List GetEnchantCost(ItemDrop.ItemData item, ItemRarity rarity) { var type = item.m_shared.m_itemType; + var name = item.m_shared.m_name; var configEntry = Config.EnchantCosts.Find(x => { if (x.Rarity != rarity) @@ -97,6 +98,11 @@ public static List GetEnchantCost(ItemDrop.ItemData item, Item return false; } + if (x.ItemNames?.Count > 0 && !x.ItemNames.Contains(name)) + { + return false; + } + return true; }); @@ -106,6 +112,7 @@ public static List GetEnchantCost(ItemDrop.ItemData item, Item public static List GetAugmentCost(ItemDrop.ItemData item, ItemRarity rarity, int recipeEffectIndex) { var type = item.m_shared.m_itemType; + var name = item.m_shared.m_name; var configEntry = Config.AugmentCosts.Find(x => { if (x.Rarity != rarity) @@ -118,6 +125,11 @@ public static List GetAugmentCost(ItemDrop.ItemData item, Item return false; } + if (x.ItemNames?.Count > 0 && !x.ItemNames.Contains(name)) + { + return false; + } + return true; });