逍遥游上个首通的限制

back_recharge
lvxinran 2020-10-30 13:24:31 +08:00
parent f420ebc347
commit 1ee9ca08fa
1 changed files with 8 additions and 0 deletions

View File

@ -158,7 +158,15 @@ public class JourneyMap {
User user = UserManager.getUser(session.getUid());
user.getMapManager().setCurrentJourneyId(mapId);
SFreeTravel travelConfig = SFreeTravel.journeyMapByMapId.get(mapId);
Map<Integer, PathInfo> journeyInfo = user.getMapManager().getJourneyInfo();
if(travelConfig.getID()!=1){
int beforeId= STableManager.getConfig(SFreeTravel.class).get(travelConfig.getID()-1).getMapID();
if(!journeyInfo.containsKey(beforeId)||!journeyInfo.get(beforeId).isFirstPass()){
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
}
}
if(!journeyInfo.containsKey(mapId)){
init(user,mapId);
}