过期数据清除
parent
4a85ed8661
commit
ebc1382f72
|
@ -2827,6 +2827,16 @@ public class HeroLogic{
|
||||||
PokemonManager pokemonManager = user.getPokemonManager();
|
PokemonManager pokemonManager = user.getPokemonManager();
|
||||||
//todo 灵兽
|
//todo 灵兽
|
||||||
Map<String, Pokemon> pokemonMap = pokemonManager.getPokemonMap();
|
Map<String, Pokemon> pokemonMap = pokemonManager.getPokemonMap();
|
||||||
|
|
||||||
|
Set<String> removeKey = new HashSet<>();
|
||||||
|
for(String key:pokemonMap.keySet()){
|
||||||
|
if(key.length()<=2){
|
||||||
|
removeKey.add(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(String key:removeKey){
|
||||||
|
pokemonManager.removePokemon(key);
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// //TODO 测试
|
// //TODO 测试
|
||||||
// if(pokemonMap.isEmpty()){
|
// if(pokemonMap.isEmpty()){
|
||||||
|
|
Loading…
Reference in New Issue