Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lenisko authored and Fabio1988 committed Nov 21, 2024
1 parent 251ce19 commit 18cb323
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ohbem.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func (o *Ohbem) CalculateTopRanks(maxRank int16, pokemonId int, form int, evolut
var lastRank []Ranking
processLevelCap := func(lvCap float64, setOnDup bool) {
lastStat := &Ranking{}
var lastStat *Ranking
combinations, sortedRanks := calculateRanksCompact(stats, leagueOptions.Cap, lvCap, ivFloor)
for i := 0; i < len(sortedRanks); i++ {
Expand Down Expand Up @@ -322,7 +322,7 @@ func (o *Ohbem) CalculateTopRanks(maxRank int16, pokemonId int, form int, evolut
maxed := false
for _, lvCap := range o.LevelCaps {
lvCapFloat := float64(lvCap)
if calculateCp(stats, 15, 15, 15, lvCapFloat) <= leagueOptions.Cap {
if !o.IncludeHundosUnderCap && calculateCp(stats, 15, 15, 15, lvCapFloat) <= leagueOptions.Cap {
continue
}
processLevelCap(lvCapFloat, false)
Expand Down

0 comments on commit 18cb323

Please sign in to comment.