🐞 fix(gvg): 修复选择职能人数限制问题
This commit is contained in:
@@ -138,15 +138,14 @@ export class GVGHandler {
|
||||
// 是否超过人数
|
||||
let limit = Math.ceil(leaguePrepare.maxMemberCnt * GVG.GVG_ROLE_TOTAL_RATIO);
|
||||
let cnt = job == LEAGUE_JOB.FIGHTER? leaguePrepare.fighterCnt: leaguePrepare.producerCnt;
|
||||
if(leaguePrepare.fighterCnt + leaguePrepare.producerCnt >= limit ||
|
||||
cnt >= Math.ceil(limit * GVG.GVG_ROLE_RATIO / 2)) {
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
isSuccess: false,
|
||||
leagueCode: myLeague.leagueCode,
|
||||
job: myUserData.job,
|
||||
producerCnt: leaguePrepare.producerCnt,
|
||||
fighterCnt: leaguePrepare.fighterCnt,
|
||||
});
|
||||
if(cnt >= Math.ceil(limit * GVG.GVG_ROLE_RATIO / 2)) {
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
isSuccess: false,
|
||||
leagueCode: myLeague.leagueCode,
|
||||
job: myUserData.job,
|
||||
producerCnt: leaguePrepare.producerCnt,
|
||||
fighterCnt: leaguePrepare.fighterCnt,
|
||||
});
|
||||
}
|
||||
|
||||
// 更新userData
|
||||
|
||||
Reference in New Issue
Block a user