分支合并提交
parent
0f2bb15952
commit
c3eb254132
|
@ -3374,14 +3374,16 @@ public class MapLogic {
|
|||
STrialConfig sTrialConfig = STrialConfig.sTrialConfigMap.get(mapManager.getTrialInfo().getFloor());
|
||||
for(int i = 0 ; i<sTrialConfig.getBoxPosition().length;i++){
|
||||
int xyPos = CellUtil.xy2Pos(sTrialConfig.getBoxPosition()[i][0], sTrialConfig.getBoxPosition()[i][1]);
|
||||
Cell cell = mapManager.getMapInfo().get(xyPos);
|
||||
if(xyPos==curXY){
|
||||
Cell cell = mapManager.getMapInfo().get(xyPos);
|
||||
if(cell!=null){
|
||||
if(cell!=null&&cell.getPointId()==STrialSetting.sTrialSetting.getBoxPointId()) {
|
||||
cell.setPointId(0);
|
||||
int[][] dropArray = sTrialConfig.getBoxReward()[i];
|
||||
drop = ItemUtil.drop(user, dropArray, BIReason.MAP_EVENET_REWARD);
|
||||
mapManager.addOrUpdateCell(cell.getCellId(),cell);
|
||||
mapManager.addOrUpdateCell(cell.getCellId(), cell);
|
||||
break;
|
||||
}else{
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -355,13 +355,7 @@ public class TowerMap extends AbstractMap {
|
|||
//判断是否是打败的boss
|
||||
if(trialInfo.getEnergy()==-1){
|
||||
//生成传送门
|
||||
int transportPoint = STrialSetting.sTrialSetting.getTransportPoint();
|
||||
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());
|
||||
|
||||
createTransport(createCell);
|
||||
}
|
||||
updateEnergy(user);
|
||||
remainHp = checkResult[2];
|
||||
|
@ -397,4 +391,19 @@ public class TowerMap extends AbstractMap {
|
|||
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());
|
||||
}
|
||||
|
||||
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 transportPoint;
|
||||
private int[] transportPoint;
|
||||
|
||||
private int[] transportPortion;
|
||||
|
||||
private int boxPointId;
|
||||
|
||||
private int[] treasureProbability;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
@ -82,7 +83,7 @@ public class STrialSetting implements BaseConfig{
|
|||
return bossPosition;
|
||||
}
|
||||
|
||||
public int getTransportPoint() {
|
||||
public int[] getTransportPoint() {
|
||||
return transportPoint;
|
||||
}
|
||||
|
||||
|
@ -93,4 +94,8 @@ public class STrialSetting implements BaseConfig{
|
|||
public int getBoxPointId() {
|
||||
return boxPointId;
|
||||
}
|
||||
|
||||
public int[] getTreasureProbability() {
|
||||
return treasureProbability;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue