主线动态匹配表
parent
84969ddd22
commit
3c48a55f4f
|
@ -2087,19 +2087,28 @@ public class MapLogic {
|
|||
int uid = session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
MainLevelManager mainLevelManager = user.getMainLevelManager();
|
||||
SMainLevelConfig sMainLevelConfig = SMainLevelConfig.config.get(fightId);
|
||||
LOGGER.info("the uid={},play fightId={}",uid,fightId);
|
||||
int mineFightId = mainLevelManager.getFightId();
|
||||
if (mineFightId != fightId || mainLevelManager.getState()!=1) {
|
||||
if (mineFightId != fightId) {
|
||||
LOGGER.info("startMainLevelFight==> uid={},fightId={}, levelDifficulty is not allow ", uid, fightId);
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
else if (mainLevelManager.getState()!=1){
|
||||
// 动态匹配最新的表数据
|
||||
if (sMainLevelConfig != null && sMainLevelConfig.getNextLevel() != -1 && user.getPlayerInfoManager().getLevel() >= sMainLevelConfig.getLevelLimit()){
|
||||
mainLevelManager.setState(1);
|
||||
}else {
|
||||
LOGGER.info("startMainLevelFight==> uid={},fightId={}, levelDifficulty is not allow ", uid, fightId);
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
}
|
||||
|
||||
List<TeamPosHeroInfo> teamPosHeroInfos = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
||||
if (teamPosHeroInfos == null || teamPosHeroInfos.size() == 0) {
|
||||
LOGGER.info("startLevelDifficultyFight==> uid={},fightId={},teamId={}", uid, fightId, teamId);
|
||||
throw new ErrorCodeException(ErrorCode.newDefineCode("阵容有误!!"));
|
||||
}
|
||||
SMainLevelConfig sMainLevelConfig = SMainLevelConfig.config.get(fightId);
|
||||
|
||||
// KtEventUtils.onKtEvent(user,ParamEventBean.UserGameType,KTGameType.STORY.getIndex(),fightId);
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.ENTER_STAGE.getType(),String.valueOf(fightId));
|
||||
|
|
Loading…
Reference in New Issue