地图判断 3星 bug
parent
1a67866d2f
commit
503bf13c89
|
@ -525,20 +525,7 @@ public class MapLogic {
|
|||
}
|
||||
|
||||
updateMapMission(mapManager,EventType.updateOptionalEvent, optionId,0);
|
||||
int totalWeight = updateMapMission(mapManager,EventType.updatePonintEvent, pointId,0);
|
||||
if (totalWeight >= 100) {
|
||||
Set<Integer> stars = mapManager.getStars();
|
||||
if (stars == null) {
|
||||
stars = new HashSet<>(3);
|
||||
}
|
||||
stars.add(STAR_3);
|
||||
mapManager.setStars(stars);
|
||||
CrossInfo crossInfo = mapManager.getCrossInfoMap().get(mapManager.getCurMapId());
|
||||
if (crossInfo == null) {
|
||||
crossInfo = new CrossInfo();
|
||||
mapManager.updateCrossInfoMap(mapManager.getCurMapId(), crossInfo);
|
||||
}
|
||||
}
|
||||
updateMapMission(mapManager,EventType.updatePonintEvent, pointId,0);
|
||||
CommonProto.Drop.Builder dropBuilder = null;
|
||||
if (sOptionConfig.getReward().length > 0) {
|
||||
dropBuilder = ItemUtil.drop(user, sOptionConfig.getReward(), 1, 1);
|
||||
|
@ -1262,6 +1249,19 @@ public class MapLogic {
|
|||
|
||||
if(addScore!=0){
|
||||
mapMission.setTotalWeight(mapMission.getTotalWeight()+addScore);
|
||||
if (mapMission.getTotalWeight() >= 100) {
|
||||
Set<Integer> stars = mapManager.getStars();
|
||||
if (stars == null) {
|
||||
stars = new HashSet<>(3);
|
||||
}
|
||||
stars.add(STAR_3);
|
||||
mapManager.setStars(stars);
|
||||
CrossInfo crossInfo = mapManager.getCrossInfoMap().get(mapManager.getCurMapId());
|
||||
if (crossInfo == null) {
|
||||
crossInfo = new CrossInfo();
|
||||
mapManager.updateCrossInfoMap(mapManager.getCurMapId(), crossInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(needUpdate){
|
||||
mapMission.setAllMissionProgress(allMissionProgress);
|
||||
|
|
Loading…
Reference in New Issue