back_recharge
wangyuan 2019-07-30 14:33:57 +08:00
parent b5873e24c4
commit 830fc18252
1 changed files with 15 additions and 5 deletions

View File

@ -1230,6 +1230,10 @@ public class MapLogic {
remainHp.add(checkResult[i]);
}
}
int triggerXY = mapManager.getTriggerXY();
int optionId = Integer.parseInt((String) valueMap.get(RedisKey.NEED_VICTORY_AFTER));
int nextEventId = 0;
SOptionConfig sOptionConfig = SOptionConfig.sOptionConfigMap.get(optionId);
//校验结果码 1胜利
int resultCode = checkResult[0];
if (resultCode == -1) {
@ -1267,9 +1271,17 @@ public class MapLogic {
fightEndResponse.setEnventDrop(dropBuilder);
fightEndResponse.addAllRemainHpList(remainHp);
if(SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==2){
// &&mapManager.getTower()==STrialConfig.getHighestTower()
fightEndResponse.setLastTowerTime((int)(mapManager.getCurrTowerTime()/1000));
}
if(sOptionConfig!=null && sOptionConfig.getJumpType() == 11){
Cell cell = mapManager.getMapInfo().get(triggerXY);
if (cell != null ) {
nextEventId = getNextEventId(user, cell, sOptionConfig);
cell.setEventId(nextEventId);
mapManager.addOrUpdateCell(triggerXY, cell);
fightEndResponse.setEventId(nextEventId);
}
}
MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightEndResponse.build(), true);
return;
}
@ -1286,9 +1298,7 @@ public class MapLogic {
fightEndResponse.addAllRemainHpList(remainHp);
fightEndResponse.build();
mapManager.setLastFightResult(resultCode);
int triggerXY = mapManager.getTriggerXY();
int optionId = Integer.parseInt((String) valueMap.get(RedisKey.NEED_VICTORY_AFTER));
SOptionConfig sOptionConfig = SOptionConfig.sOptionConfigMap.get(optionId);
if (sOptionConfig != null) {
int behaviorType = sOptionConfig.getBehaviorType();
int[][] behaviorTypeValues = sOptionConfig.getBehaviorTypeValues();
@ -1299,7 +1309,7 @@ public class MapLogic {
}else{
BehaviorUtil.destoryApointXY(user,triggerXY);
}
int nextEventId = 0;
if (monsterGroupId == mapManager.getSuddenlyBoss()) {
mapManager.findSuddenlyBoss(0, 0);