Archived
1

/best command works for levels, where no upper pokememes exists

This commit is contained in:
Vladimir Hodakov 2018-01-30 00:55:14 +04:00
parent 4a90e0ffd7
commit add06f90f4

View File

@ -34,6 +34,21 @@ func (p *Pokedexer) getBestPokememes(playerID int) (map[int]*dbmapping.PokememeF
pokememesArray[allPokememes[i].Pokememe.Attack] = allPokememes[i]
}
}
} else if profileRaw.LevelID > 8 {
// TODO: Remove it on 10th grade pokememes arrival
for i := range allPokememes {
if allPokememes[i].Pokememe.Grade == 9 {
matchLeague := false
for j := range allPokememes[i].Elements {
if allPokememes[i].Elements[j].LeagueID == playerRaw.LeagueID {
matchLeague = true
}
}
if matchLeague {
pokememesArray[allPokememes[i].Pokememe.Attack] = allPokememes[i]
}
}
}
} else {
for i := range allPokememes {
if allPokememes[i].Pokememe.Grade == profileRaw.LevelID+1 {