无尽地图

lvxinran 2019-09-28 08:09:58 +08:00
parent 63ee75cc2d
commit 2cb3065187
2 changed files with 10 additions and 8 deletions

View File

@ -17,7 +17,7 @@ public class SEndlessDifficulty implements BaseConfig{
private int[] rewardId;
private int[] mapPool;
private int mapPool;
public static Map<Integer,SEndlessDifficulty> difficultyMap;
@ -78,7 +78,7 @@ public class SEndlessDifficulty implements BaseConfig{
return rewardId;
}
public int[] getMapPool() {
public int getMapPool() {
return mapPool;
}
}

View File

@ -382,12 +382,14 @@ public class GlobalDataManaager {
}
private static int getEndleeMapIdByLevel() throws Exception {
ServerConfig config = MongoUtil.getInstence().getMyMongoTemplate().findById(1, ServerConfig.class);
// Map<Integer, SEndlessDifficulty> difficultyMap = SEndlessDifficulty.difficultyMap;
// for(Map.Entry<Integer, SEndlessDifficulty> entry:difficultyMap.entrySet()){
// if(entry.getValue().getWorldLevel())
//
// }
int mapId = config.getWorldLevel() * 0 + 4001;
int mapId = 4001;
Map<Integer, SEndlessDifficulty> difficultyMap = SEndlessDifficulty.difficultyMap;
for(Map.Entry<Integer, SEndlessDifficulty> entry:difficultyMap.entrySet()){
if(config.getWorldLevel()>entry.getValue().getWorldLevel()[0]&&config.getWorldLevel()<=entry.getValue().getWorldLevel()[1]){
mapId = entry.getValue().getMapPool();
}
}
return mapId;
}