private void PopulateCosts() { StaticDataController staticDataController = Service.StaticDataController; this.costs = new CostVO[this.CostStrings.Length]; for (int i = 0; i < this.costs.Length; i++) { this.costs[i] = CostUtils.CombineCurrenciesForShards(staticDataController.Get <CostVO>(this.CostStrings[i])); } }
public static CostVO CalculateCost(int slotIndex, int quantity, ShardShopData data) { Dictionary <string, int> dictionary = data.Purchases[slotIndex]; ShardShopPoolVO pool = data.ActiveSeries.GetPool(slotIndex); int num = 0; foreach (int current in dictionary.Values) { num += current; } CostVO costVO = pool.GetCost(num); if (quantity > 1) { for (int i = 1; i < quantity; i++) { CostVO cost = pool.GetCost(num + i); costVO = CostUtils.Combine(costVO, cost); } } return(CostUtils.CombineCurrenciesForShards(costVO)); }