快速战斗
parent
0367c5fbcb
commit
a8cbb93ccb
|
@ -608,3 +608,4 @@ int int mut,int#int,1 int int
|
||||||
8150 1 32050#31050 5 0
|
8150 1 32050#31050 5 0
|
||||||
55001 1 50401 1 0
|
55001 1 50401 1 0
|
||||||
55002 1 50402 1 0
|
55002 1 50402 1 0
|
||||||
|
100001 1 100001 1 0
|
||||||
|
|
|
@ -49,6 +49,7 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
||||||
MapLogic.getInstance().resetDayInfo(user);
|
MapLogic.getInstance().resetDayInfo(user);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
MapLogic.getInstance().checkIsInMap(user);
|
||||||
Map<Integer, Integer> guidePoints = user.getPlayerInfoManager().getGuidePoints();
|
Map<Integer, Integer> guidePoints = user.getPlayerInfoManager().getGuidePoints();
|
||||||
List<CommonProto.NewPlayerGuidePoint> list = new ArrayList<>();
|
List<CommonProto.NewPlayerGuidePoint> list = new ArrayList<>();
|
||||||
for(Map.Entry<Integer,Integer> guideItem : guidePoints.entrySet()){
|
for(Map.Entry<Integer,Integer> guideItem : guidePoints.entrySet()){
|
||||||
|
|
|
@ -76,12 +76,7 @@ public class MapLogic {
|
||||||
MessageUtil.sendErrorResponse(iSession, 0, messageType.getNumber(), "");
|
MessageUtil.sendErrorResponse(iSession, 0, messageType.getNumber(), "");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mapManager.getCurMapId() > 0) {
|
checkIsInMap(user);
|
||||||
int leftTime = getLeftTime(user);
|
|
||||||
if (leftTime == 0) {
|
|
||||||
resetMapInfo(user, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 初始序章地图
|
// 初始序章地图
|
||||||
if (user.getPlayerInfoManager().getMapId() == 0) {
|
if (user.getPlayerInfoManager().getMapId() == 0) {
|
||||||
String error = initTeamInfo(teamId, uid, user, mapManager);
|
String error = initTeamInfo(teamId, uid, user, mapManager);
|
||||||
|
@ -191,6 +186,14 @@ public class MapLogic {
|
||||||
}else{
|
}else{
|
||||||
LOGGER.error("the curmap={}",mapManager.getCurMapId());
|
LOGGER.error("the curmap={}",mapManager.getCurMapId());
|
||||||
}
|
}
|
||||||
|
for (Map.Entry<String, Map<Integer, Integer>> entry : mapManager.getHeroAllAttributeMap().entrySet()) {
|
||||||
|
Map<Integer, Integer> map = entry.getValue();
|
||||||
|
MapInfoProto.HeroInfo heroInfo = MapInfoProto.HeroInfo.newBuilder()
|
||||||
|
.setHeroId(entry.getKey())
|
||||||
|
.setHeroHp(map.get(HeroAttributeEnum.CurHP.getPropertyId()) == null ? 0 : map.get(HeroAttributeEnum.CurHP.getPropertyId()))
|
||||||
|
.build();
|
||||||
|
mapEnterResponse.addHeroInfos(heroInfo);
|
||||||
|
}
|
||||||
MessageUtil.sendMessage(iSession, 1, messageType.getNumber(), mapEnterResponse.build(), true);
|
MessageUtil.sendMessage(iSession, 1, messageType.getNumber(), mapEnterResponse.build(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -899,9 +902,12 @@ public class MapLogic {
|
||||||
}
|
}
|
||||||
if (!nextEventId.isEmpty()) {
|
if (!nextEventId.isEmpty()) {
|
||||||
int triggerXY = mapManager.getTriggerXY();
|
int triggerXY = mapManager.getTriggerXY();
|
||||||
|
cell = mapManager.getMapInfo().get(mapManager.getTriggerXY());
|
||||||
|
if (cell.getEventId() != -1) {
|
||||||
cell.setEventId(Integer.parseInt(nextEventId));
|
cell.setEventId(Integer.parseInt(nextEventId));
|
||||||
mapManager.addOrUpdateCell(triggerXY, cell);
|
mapManager.addOrUpdateCell(triggerXY, cell);
|
||||||
updateMapMission(mapManager,EventType.updateEvent,cell.getEventId(),0);
|
updateMapMission(mapManager, EventType.updateEvent, cell.getEventId(), 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// LOGGER.info("endFight() uid=>{},nextEventId=>{}", uid, nextEventId);
|
// LOGGER.info("endFight() uid=>{},nextEventId=>{}", uid, nextEventId);
|
||||||
updateMapMission(mapManager,EventType.fightEvent,0, 1);
|
updateMapMission(mapManager,EventType.fightEvent,0, 1);
|
||||||
|
@ -1812,4 +1818,17 @@ public class MapLogic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void checkIsInMap(User user) throws Exception {
|
||||||
|
if (user.getMapManager().getCurMapId() == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int leftTime = getLeftTime(user);
|
||||||
|
if (leftTime >= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// TODO 发邮件
|
||||||
|
|
||||||
|
resetMapInfo(user, true);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue