Beispiel #1
0
        short GetMaxLevel()
        {
            var costToMax = VCalculator.Calculate(StartingCost, IncrementCost, DesiredLevel, MaxLevelCore);

            if (costToMax <= PerkCollection.Loadout.RemainingPerkPoints)
            {
                return(MaxLevelCore);
            }

            return(GetHighestLevelPPCanAfford());
        }
Beispiel #2
0
        short GetHighestLevelPPCanAfford()
        {
            var remainingPP = PerkCollection.Loadout.RemainingPerkPoints;

            for (var i = MaxLevelCore; i >= DesiredLevel; i--)
            {
                if (VCalculator.Calculate(StartingCost, IncrementCost, DesiredLevel, i) <= remainingPP)
                {
                    return(i);
                }
            }
            return(DesiredLevel);
        }