分支合并提交
parent
0f2bb15952
commit
c3eb254132
|
@ -3374,14 +3374,16 @@ public class MapLogic {
|
||||||
STrialConfig sTrialConfig = STrialConfig.sTrialConfigMap.get(mapManager.getTrialInfo().getFloor());
|
STrialConfig sTrialConfig = STrialConfig.sTrialConfigMap.get(mapManager.getTrialInfo().getFloor());
|
||||||
for(int i = 0 ; i<sTrialConfig.getBoxPosition().length;i++){
|
for(int i = 0 ; i<sTrialConfig.getBoxPosition().length;i++){
|
||||||
int xyPos = CellUtil.xy2Pos(sTrialConfig.getBoxPosition()[i][0], sTrialConfig.getBoxPosition()[i][1]);
|
int xyPos = CellUtil.xy2Pos(sTrialConfig.getBoxPosition()[i][0], sTrialConfig.getBoxPosition()[i][1]);
|
||||||
|
Cell cell = mapManager.getMapInfo().get(xyPos);
|
||||||
if(xyPos==curXY){
|
if(xyPos==curXY){
|
||||||
Cell cell = mapManager.getMapInfo().get(xyPos);
|
if(cell!=null&&cell.getPointId()==STrialSetting.sTrialSetting.getBoxPointId()) {
|
||||||
if(cell!=null){
|
|
||||||
cell.setPointId(0);
|
cell.setPointId(0);
|
||||||
int[][] dropArray = sTrialConfig.getBoxReward()[i];
|
int[][] dropArray = sTrialConfig.getBoxReward()[i];
|
||||||
drop = ItemUtil.drop(user, dropArray, BIReason.MAP_EVENET_REWARD);
|
drop = ItemUtil.drop(user, dropArray, BIReason.MAP_EVENET_REWARD);
|
||||||
mapManager.addOrUpdateCell(cell.getCellId(),cell);
|
mapManager.addOrUpdateCell(cell.getCellId(), cell);
|
||||||
break;
|
break;
|
||||||
|
}else{
|
||||||
|
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -355,13 +355,7 @@ public class TowerMap extends AbstractMap {
|
||||||
//判断是否是打败的boss
|
//判断是否是打败的boss
|
||||||
if(trialInfo.getEnergy()==-1){
|
if(trialInfo.getEnergy()==-1){
|
||||||
//生成传送门
|
//生成传送门
|
||||||
int transportPoint = STrialSetting.sTrialSetting.getTransportPoint();
|
createTransport(createCell);
|
||||||
int[] transportPosition = STrialSetting.sTrialSetting.getTransportPortion();
|
|
||||||
MapPointConfig config = MapPointConfig.getScMapEventMap().get(transportPoint);
|
|
||||||
int position = CellUtil.xy2Pos(transportPosition[0], transportPosition[1]);
|
|
||||||
createCell = new Cell(position, config.getInitialEventId(), transportPoint);
|
|
||||||
LOGGER.info("生成传送门信息:{}",createCell.toString());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
updateEnergy(user);
|
updateEnergy(user);
|
||||||
remainHp = checkResult[2];
|
remainHp = checkResult[2];
|
||||||
|
@ -397,4 +391,19 @@ public class TowerMap extends AbstractMap {
|
||||||
MapMissionManager.updateMapMission(user, EventType.fightEvent, groupId, checkResult[1]);
|
MapMissionManager.updateMapMission(user, EventType.fightEvent, groupId, checkResult[1]);
|
||||||
// LOGGER.info("endFight() uid=>{} sMonsterGroup.getRewardgroup()=>{} misson=>{} eventDrop=>{}, missionDrop=>{}", uid, sMonsterGroup.getRewardgroup(), fastFightResponse.getMission(), fastFightResponse.getEnventDrop(), fastFightResponse.getMissionDrop());
|
// LOGGER.info("endFight() uid=>{} sMonsterGroup.getRewardgroup()=>{} misson=>{} eventDrop=>{}, missionDrop=>{}", uid, sMonsterGroup.getRewardgroup(), fastFightResponse.getMission(), fastFightResponse.getEnventDrop(), fastFightResponse.getMissionDrop());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createTransport(Cell createCell,int floor){
|
||||||
|
int transportPoint = 0;
|
||||||
|
if(floor%5==0){
|
||||||
|
int[] treasureProbability = STrialSetting.sTrialSetting.getTreasureProbability();
|
||||||
|
// MathUtils.randomFromWeight(treasureProbability);
|
||||||
|
}else{
|
||||||
|
transportPoint= STrialSetting.sTrialSetting.getTransportPoint()[0];
|
||||||
|
}
|
||||||
|
int[] transportPosition = STrialSetting.sTrialSetting.getTransportPortion();
|
||||||
|
MapPointConfig config = MapPointConfig.getScMapEventMap().get(transportPoint);
|
||||||
|
int position = CellUtil.xy2Pos(transportPosition[0], transportPosition[1]);
|
||||||
|
createCell = new Cell(position, config.getInitialEventId(), transportPoint);
|
||||||
|
LOGGER.info("生成传送门信息:{}",createCell.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,12 +43,13 @@ public class STrialSetting implements BaseConfig{
|
||||||
|
|
||||||
private int[] bossPosition;
|
private int[] bossPosition;
|
||||||
|
|
||||||
private int transportPoint;
|
private int[] transportPoint;
|
||||||
|
|
||||||
private int[] transportPortion;
|
private int[] transportPortion;
|
||||||
|
|
||||||
private int boxPointId;
|
private int boxPointId;
|
||||||
|
|
||||||
|
private int[] treasureProbability;
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
|
@ -82,7 +83,7 @@ public class STrialSetting implements BaseConfig{
|
||||||
return bossPosition;
|
return bossPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTransportPoint() {
|
public int[] getTransportPoint() {
|
||||||
return transportPoint;
|
return transportPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,4 +94,8 @@ public class STrialSetting implements BaseConfig{
|
||||||
public int getBoxPointId() {
|
public int getBoxPointId() {
|
||||||
return boxPointId;
|
return boxPointId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int[] getTreasureProbability() {
|
||||||
|
return treasureProbability;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue