Pokedeks sorting almost as in game: grade-attack-name
This commit is contained in:
parent
ffb9863bf7
commit
3a5411f814
@ -228,8 +228,8 @@ func (dc *DataCache) GetAllPokememes() map[int]*dbmapping.PokememeFull {
|
||||
var keys []string
|
||||
keysToIDs := make(map[string]int)
|
||||
for i := range dc.fullPokememes {
|
||||
keys = append(keys, strconv.Itoa(dc.fullPokememes[i].Pokememe.Grade)+"_"+dc.fullPokememes[i].Pokememe.Name)
|
||||
keysToIDs[strconv.Itoa(dc.fullPokememes[i].Pokememe.Grade)+"_"+dc.fullPokememes[i].Pokememe.Name] = i
|
||||
keys = append(keys, strconv.Itoa(dc.fullPokememes[i].Pokememe.Grade)+"_"+strconv.Itoa(dc.fullPokememes[i].Pokememe.Attack+100000000000000)+"_"+dc.fullPokememes[i].Pokememe.Name)
|
||||
keysToIDs[strconv.Itoa(dc.fullPokememes[i].Pokememe.Grade)+"_"+strconv.Itoa(dc.fullPokememes[i].Pokememe.Attack+100000000000000)+"_"+dc.fullPokememes[i].Pokememe.Name] = i
|
||||
}
|
||||
sort.Strings(keys)
|
||||
|
||||
|
Reference in New Issue
Block a user