fix map position

back_recharge
wangyuan 2019-08-07 20:55:47 +08:00
parent ee127cfa06
commit 1d90144fdc
1 changed files with 10 additions and 2 deletions

View File

@ -189,8 +189,11 @@ public class MapLogic {
user.getUserMissionManager().onGameEvent(user,GameEvent.PlAY_STORY,SChallengeConfig.sChallengeConfigs.get(mapId).getType(),1);
Poster.getPoster().dispatchEvent(new StoryEvent(user.getId()));
} else if (mapManager.getCurMapId() != mapId) {
MessageUtil.sendErrorResponse(iSession, 0, messageType.getNumber(), "地图错误,应进入" + mapManager.getCurMapId());
return;
}else{
mapEnterResponse.setCurXY(mapManager.getCurXY());
}
@ -203,7 +206,12 @@ public class MapLogic {
}
if(mapManager.getEndlessMapInfo().getCurCell()!=0){
if(mapManager.getEndlessMapInfo().getCurMapId()==mapId) {
mapEnterResponse.setCurXY(mapManager.getEndlessMapInfo().getCurCell());
if(mapManager.getCurXY()!=0){
mapEnterResponse.setCurXY(mapManager.getCurXY());
}else{
mapEnterResponse.setCurXY(mapManager.getEndlessMapInfo().getCurCell());
}
}
}
@ -565,7 +573,7 @@ public class MapLogic {
// LOGGER.info("updateMap() uid=>{} mapId =>{} eventId=>{}", uid, mapManager.getCurMapId(), cell.getEventId());
mapManager.updateFoodBufferByStep(cells.size());
if(!cells.isEmpty()){
if(cells.size() >2){
if(cells.size() >1){
lastXY = cells.get(cells.size()-2);
}
}