🐞 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 limit = Math.ceil(leaguePrepare.maxMemberCnt * GVG.GVG_ROLE_TOTAL_RATIO);
|
||||||
let cnt = job == LEAGUE_JOB.FIGHTER? leaguePrepare.fighterCnt: leaguePrepare.producerCnt;
|
let cnt = job == LEAGUE_JOB.FIGHTER? leaguePrepare.fighterCnt: leaguePrepare.producerCnt;
|
||||||
if(leaguePrepare.fighterCnt + leaguePrepare.producerCnt >= limit ||
|
if(cnt >= Math.ceil(limit * GVG.GVG_ROLE_RATIO / 2)) {
|
||||||
cnt >= Math.ceil(limit * GVG.GVG_ROLE_RATIO / 2)) {
|
return resResult(STATUS.SUCCESS, {
|
||||||
return resResult(STATUS.SUCCESS, {
|
isSuccess: false,
|
||||||
isSuccess: false,
|
leagueCode: myLeague.leagueCode,
|
||||||
leagueCode: myLeague.leagueCode,
|
job: myUserData.job,
|
||||||
job: myUserData.job,
|
producerCnt: leaguePrepare.producerCnt,
|
||||||
producerCnt: leaguePrepare.producerCnt,
|
fighterCnt: leaguePrepare.fighterCnt,
|
||||||
fighterCnt: leaguePrepare.fighterCnt,
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新userData
|
// 更新userData
|
||||||
|
|||||||
Reference in New Issue
Block a user