森罗小怪红点

lvxinran 2021-01-01 19:35:29 +08:00
parent 3a9ab2167d
commit 53b1dc1480
1 changed files with 2 additions and 26 deletions

View File

@ -2043,33 +2043,9 @@ public class MapLogic {
User user = UserManager.getUser(uid);
MapInfoProto.getAllLevelDifficultyInfosResponse.Builder builder = MapInfoProto.getAllLevelDifficultyInfosResponse.newBuilder();
MapManager mapManager = user.getMapManager();
Map<Integer, CrossInfo> crossInfoMap = mapManager.getCrossInfoMap();
for (Map.Entry<Integer, CrossInfo> entry : crossInfoMap.entrySet()) {
CommonProto.MapInfo mapInfo = CommonProto.MapInfo
.newBuilder()
.setMapId(entry.getKey())
.setLeastTime(entry.getValue().getLeastTime())
.addAllStars(entry.getValue().getStars())
.build();
builder.addMapInfos(mapInfo);
}
int starReward = mapManager.getStarReward();
SChallengeStarBox sChallengeStarBox = STableManager.getConfig(SChallengeStarBox.class).get(starReward);
if(sChallengeStarBox == null ){
builder.setStarNum(0);
}else{
builder.setStarNum(sChallengeStarBox.getStarNum());
}
//登录时检测是否需要重置
checkTrialReset(user);
builder.addAllPlayedGenMapId(mapManager.getPlayGenMaps());
builder.setKillCount(mapManager.getTrialInfo().getKillCount());
builder.addAllTrialRewardInfo(mapManager.getTrialInfo().getTowerReceivedReward());
for(Map.Entry<Integer,Integer> entry:mapManager.getDifficultyOptions().entrySet()){
MapInfoProto.DifficultMapOption.Builder difficultMapOption = MapInfoProto.DifficultMapOption.newBuilder();
difficultMapOption.setId(entry.getKey());
difficultMapOption.setMapdifficulty(entry.getValue());
builder.addDifficultMapOptions(difficultMapOption);
}
MessageUtil.sendMessage(iSession, 1, msgId, builder.build(), true);
}