Merge branch 'master_prb_gn' into master_test_gn
commit
5ff20eccc5
|
@ -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));
|
||||
|
|
|
@ -76,7 +76,7 @@ public class UserLevelEventHandler implements IEventHandler,IPrivilegeChange{
|
|||
}
|
||||
|
||||
}
|
||||
if(level==30){
|
||||
if(level==12){
|
||||
MongoTemplate coreMongoTemplate = MongoUtil.getCoreMongoTemplate();
|
||||
Query rechargeQuery = new Query(Criteria.where("_id").is(user.getPlayerInfoManager().getOpenId()));
|
||||
Recharge recharge = coreMongoTemplate.findOne(rechargeQuery, Recharge.class, "recharge");
|
||||
|
|
|
@ -8,10 +8,10 @@ public class GuildHelpLog {
|
|||
private String targetName;
|
||||
private int logTime; // time
|
||||
private int type; // 援助类型
|
||||
private int helpPracticeLevel;
|
||||
private int targetPracticeLevel;
|
||||
private Integer helpPracticeLevel;
|
||||
private Integer targetPracticeLevel;
|
||||
|
||||
public GuildHelpLog(int helpId, int targetId, String helperName, String targetName, int logTime, int type, int helpPracticeLevel, int targetPracticeLevel) {
|
||||
public GuildHelpLog(int helpId, int targetId, String helperName, String targetName, int logTime, int type, Integer helpPracticeLevel, Integer targetPracticeLevel) {
|
||||
this.helpId = helpId;
|
||||
this.targetId = targetId;
|
||||
this.helperName = helperName;
|
||||
|
@ -50,11 +50,17 @@ public class GuildHelpLog {
|
|||
return type;
|
||||
}
|
||||
|
||||
public int getHelpPracticeLevel() {
|
||||
public Integer getHelpPracticeLevel() {
|
||||
if (helpPracticeLevel == null){
|
||||
helpPracticeLevel = 1;
|
||||
}
|
||||
return helpPracticeLevel;
|
||||
}
|
||||
|
||||
public int getTargetPracticeLevel() {
|
||||
public Integer getTargetPracticeLevel() {
|
||||
if (targetPracticeLevel == null){
|
||||
targetPracticeLevel = 1;
|
||||
}
|
||||
return targetPracticeLevel;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue