public int GetTankLevelUpCards(Rarity rarity, int level) { TankRarityProgression tankLevelUpRequirements = GetTankLevelUpRequirements(rarity); if (tankLevelUpRequirements == null || !tankLevelMinMax.ContainsExclusive(level)) { return(-1); } return(tankLevelUpRequirements.levelUpCostCards[level]); }
public int GetMaxTankCardCount(Rarity rarity) { int num = 0; TankRarityProgression tankLevelUpRequirements = GetTankLevelUpRequirements(rarity); for (int i = 0; i != tankLevelUpRequirements.levelUpCostCards.Length; i++) { num += tankLevelUpRequirements.levelUpCostCards[i]; } return(num); }
public int GetTankPossibleLevel(Tank tank, int cards) { TankRarityProgression tankLevelUpRequirements = instance.GetTankLevelUpRequirements(tank.rarity); int num = 0; for (int i = 0; i != tankLevelUpRequirements.levelUpCostCards.Length; i++) { num += tankLevelUpRequirements.levelUpCostCards[i]; if (num > cards) { return(i); } } return(0); }
public int GetTankLevelUpCardsCumulative(Rarity rarity, int level) { TankRarityProgression tankLevelUpRequirements = GetTankLevelUpRequirements(rarity); if (level >= tankLevelMinMax.max) { level = tankLevelMinMax.max - 1; } int num = 0; for (int i = 0; i <= level; i++) { num += tankLevelUpRequirements.levelUpCostCards[i]; } return(num); }