逍遥游上个首通的限制
parent
f420ebc347
commit
1ee9ca08fa
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue