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