// Token: 0x06001CFF RID: 7423 RVA: 0x0008720C File Offset: 0x0008540C public static void OnPurchase <T>(CharacterBody characterBody, CostType costType, T statDefsToIncrement) where T : IEnumerable <StatDef> { StatSheet statSheet = PlayerStatsComponent.FindBodyStatSheet(characterBody); if (statSheet == null) { return; } StatDef statDef = null; StatDef statDef2 = null; switch (costType) { case CostType.Money: statDef = StatDef.totalGoldPurchases; statDef2 = StatDef.highestGoldPurchases; break; case CostType.PercentHealth: statDef = StatDef.totalBloodPurchases; statDef2 = StatDef.highestBloodPurchases; break; case CostType.Lunar: statDef = StatDef.totalLunarPurchases; statDef2 = StatDef.highestLunarPurchases; break; case CostType.WhiteItem: statDef = StatDef.totalTier1Purchases; statDef2 = StatDef.highestTier1Purchases; break; case CostType.GreenItem: statDef = StatDef.totalTier2Purchases; statDef2 = StatDef.highestTier2Purchases; break; case CostType.RedItem: statDef = StatDef.totalTier3Purchases; statDef2 = StatDef.highestTier3Purchases; break; } statSheet.PushStatValue(StatDef.totalPurchases, 1UL); statSheet.PushStatValue(StatDef.highestPurchases, statSheet.GetStatValueULong(StatDef.totalPurchases)); if (statDef != null) { statSheet.PushStatValue(statDef, 1UL); if (statDef2 != null) { statSheet.PushStatValue(statDef2, statSheet.GetStatValueULong(statDef)); } } if (statDefsToIncrement != null) { foreach (StatDef statDef3 in statDefsToIncrement) { if (statDef3 != null) { statSheet.PushStatValue(statDef3, 1UL); } } } }
// Token: 0x06001D12 RID: 7442 RVA: 0x00087817 File Offset: 0x00085A17 public ulong GetStatPointValue([NotNull] StatDef statDef) { return(this.fields[statDef.index].GetPointValue(statDef.pointValue)); }