创建地图循环修改
parent
e5ae741308
commit
b53e2604fa
|
|
@ -169,6 +169,9 @@ public class TowerMap extends AbstractMap {
|
|||
return;
|
||||
}
|
||||
int floor = mapManager.getTrialInfo().getFloor();
|
||||
if(floor==101){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
STrialConfig sTrialConfig;
|
||||
if(floor>10000){
|
||||
TreeMap<Integer,STrialConfig> sTrialConfigMap = (TreeMap<Integer,STrialConfig>) STrialConfig.sTrialConfigMap;
|
||||
|
|
@ -270,7 +273,7 @@ public class TowerMap extends AbstractMap {
|
|||
int i = 0;
|
||||
int[] monster = MathUtils.randomFromWeightWithTaking(sTrialConfig.getMonsterPoint(),4);
|
||||
while (cellMap4.size() < 4 ) {
|
||||
if (i >= 10000) {
|
||||
if (i >= 100) {
|
||||
break;
|
||||
}
|
||||
int cellLength = scMap1.getGroups().length;
|
||||
|
|
@ -282,13 +285,13 @@ public class TowerMap extends AbstractMap {
|
|||
int y = scMap1.getGroups()[i][1];
|
||||
int xy = CellUtil.xy2Pos(x, y);
|
||||
MapPointConfig mapPointConfig = MapPointConfig.scMapEventMap.get(monster[i]);
|
||||
i++;
|
||||
if (mapPointConfig == null) {
|
||||
LOGGER.info("====initTrialMap()====mapPointConfig == null======>{}", scMap1.getEvent());
|
||||
LOGGER.info("====initTrialMap()====mapPointConfig == null======>{}",monster[i]);
|
||||
continue;
|
||||
}
|
||||
Cell cellValue = new Cell(xy, mapPointConfig.getInitialEventId(), mapPointConfig.getId());
|
||||
cellMap4.put(xy, cellValue);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue