back_recharge
jiahuiwen 2019-06-20 15:28:28 +08:00
commit 6433dc032f
3 changed files with 21 additions and 15 deletions

View File

@ -24,8 +24,10 @@ public class FightEndRequestHandler extends BaseHandler {
int fightId = fightEndRequest.getFightId();
if (type == 1){
MapLogic.getInstance().endDifficultyFight(iSession, frames,fightId,MessageTypeProto.MessageType.FIGHT_END_RESPONSE);
}else{
}else if(type == 2){
MapLogic.getInstance().endFight(iSession, frames, MessageTypeProto.MessageType.FIGHT_END_RESPONSE);
}else if(type == 3){
MapLogic.getInstance().endSuddlenlyFight(iSession, frames, MessageTypeProto.MessageType.FIGHT_END_RESPONSE);
}
}
}

View File

@ -412,6 +412,21 @@ public class MapLogic {
return;
}
}
int pointId = cell.getPointId();
MapPointConfig mapPointConfig = MapPointConfig.getScMapEventMap().get(pointId);
if(mapPointConfig.getStyle() == EventType.suddenlyBoss){
int suddenlyBoss = mapManager.getSuddenlyBoss();
SEventPointConfig sEventPointConfig = SEventPointConfig.sEventPointConfigMap.get(cell.getEventId());
if(suddenlyBoss==0){
int now = (int)(TimeUtils.now()/1000);
int bossId =sEventPointConfig.getOption()[0];
mapManager.findSuddenlyBoss(bossId,now);
}
}else if(mapPointConfig.getStyle() == EventType.businessman){
if(! user.getStoreManager().getStoreInfoMap().containsKey(3)){
StoreLogic.initOneStore(user,3);
}
}
mapManager.setTriggerXY(triggerXY);
mapManager.addWalkCells(new HashSet<>(cells));
mapManager.setCurXY(curXY);
@ -519,18 +534,6 @@ public class MapLogic {
return;
}
}
if(mapPointConfig.getStyle() == EventType.suddenlyBoss){
int suddenlyBoss = mapManager.getSuddenlyBoss();
if(suddenlyBoss==0){
int now = (int)(TimeUtils.now()/1000);
int bossId = option[0];
mapManager.findSuddenlyBoss(bossId,now);
}
}else if(mapPointConfig.getStyle() == EventType.businessman){
if(! user.getStoreManager().getStoreInfoMap().containsKey(3)){
StoreLogic.initOneStore(user,3);
}
}
if (mapPointConfig.getTriggerRules() == 1) {
cell = mapManager.getMapInfo().get(mapManager.getTriggerXY());
} else {

View File

@ -40,8 +40,9 @@ public class StartFightRequestHandler extends BaseHandler{
MapLogic.getInstance().startFight(iSession, MessageTypeProto.MessageType.FIGHT_START_RESPONSE);
}else if(type == 3){
MapLogic.getInstance().startFight(iSession, MessageTypeProto.MessageType.FIGHT_START_RESPONSE);
MapLogic.getInstance().startSuddlenlyFight(iSession,teamId, MessageTypeProto.MessageType.FIGHT_START_RESPONSE);
}else{
MessageUtil.sendErrorResponse(iSession, 0, MessageTypeProto.MessageType.FIGHT_START_RESPONSE.getNumber(),"type is wrong");
}
}
}