Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions EpicLoot/Crafting/EnchantCostsConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class EnchantCostConfig
{
public ItemRarity Rarity;
public List<string> ItemTypes = new List<string>();
public List<string> ItemNames = new List<string>();
public List<ItemAmountConfig> Cost = new List<ItemAmountConfig>();
}

Expand All @@ -43,6 +44,7 @@ public class AugmentCostConfig
{
public ItemRarity Rarity;
public List<string> ItemTypes = new List<string>();
public List<string> ItemNames = new List<string>();
public List<ItemAmountConfig> Cost = new List<ItemAmountConfig>();
}

Expand Down
12 changes: 12 additions & 0 deletions EpicLoot/Crafting/EnchantCostsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public static List<ItemAmountConfig> GetSacrificeProducts(bool isMagic, ItemDrop
public static List<ItemAmountConfig> 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)
Expand All @@ -97,6 +98,11 @@ public static List<ItemAmountConfig> GetEnchantCost(ItemDrop.ItemData item, Item
return false;
}

if (x.ItemNames?.Count > 0 && !x.ItemNames.Contains(name))
{
return false;
}

return true;
});

Expand All @@ -106,6 +112,7 @@ public static List<ItemAmountConfig> GetEnchantCost(ItemDrop.ItemData item, Item
public static List<ItemAmountConfig> 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)
Expand All @@ -118,6 +125,11 @@ public static List<ItemAmountConfig> GetAugmentCost(ItemDrop.ItemData item, Item
return false;
}

if (x.ItemNames?.Count > 0 && !x.ItemNames.Contains(name))
{
return false;
}

return true;
});

Expand Down