精英怪
parent
0983abb99c
commit
689d3ae255
|
@ -24,8 +24,10 @@ public class FightEndRequestHandler extends BaseHandler {
|
||||||
int fightId = fightEndRequest.getFightId();
|
int fightId = fightEndRequest.getFightId();
|
||||||
if (type == 1){
|
if (type == 1){
|
||||||
MapLogic.getInstance().endDifficultyFight(iSession, frames,fightId,MessageTypeProto.MessageType.FIGHT_END_RESPONSE);
|
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);
|
MapLogic.getInstance().endFight(iSession, frames, MessageTypeProto.MessageType.FIGHT_END_RESPONSE);
|
||||||
|
}else if(type == 3){
|
||||||
|
MapLogic.getInstance().endSuddlenlyFight(iSession, frames, MessageTypeProto.MessageType.FIGHT_END_RESPONSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -412,6 +412,21 @@ public class MapLogic {
|
||||||
return;
|
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.setTriggerXY(triggerXY);
|
||||||
mapManager.addWalkCells(new HashSet<>(cells));
|
mapManager.addWalkCells(new HashSet<>(cells));
|
||||||
mapManager.setCurXY(curXY);
|
mapManager.setCurXY(curXY);
|
||||||
|
@ -519,18 +534,6 @@ public class MapLogic {
|
||||||
return;
|
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) {
|
if (mapPointConfig.getTriggerRules() == 1) {
|
||||||
cell = mapManager.getMapInfo().get(mapManager.getTriggerXY());
|
cell = mapManager.getMapInfo().get(mapManager.getTriggerXY());
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -40,8 +40,9 @@ public class StartFightRequestHandler extends BaseHandler{
|
||||||
MapLogic.getInstance().startFight(iSession, MessageTypeProto.MessageType.FIGHT_START_RESPONSE);
|
MapLogic.getInstance().startFight(iSession, MessageTypeProto.MessageType.FIGHT_START_RESPONSE);
|
||||||
|
|
||||||
}else if(type == 3){
|
}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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue