public ArtefactStat(CraftBuilding craftingBuilding, CommonItem material, CommonItem[] artefacts) { CraftingBuilding = craftingBuilding; Material = material; Artefacts = artefacts; Material.CostUpdate += MaterialOnCostUpdate; // foreach (var item in Artefacts.Select(x => x.CraftingRequirements[0]).Distinct()) // item.UpdateCost += MaterialOnUpdateCost; foreach (var item in Artefacts) { item.FastSellProfit.Updated += FastSellProfitOnCostUpdate; item.LongSellProfit.Updated += LongSellProfitOnCostUpdate; } FastSellProfitOnCostUpdate(); LongSellProfitOnCostUpdate(); MaterialOnCostUpdate(); }
public void SetFullItem(CommonItem item) { FullItem = item; FullItem.ProfitUpdated += OnProfitUpdate; }
public Journal(CommonItem emptyItem) { EmptyItem = emptyItem; EmptyItem.CostUpdate += OnProfitUpdate; }