寻宝:定时触发的事件需检查最新状态
This commit is contained in:
@@ -187,7 +187,8 @@ export class ComBattleHandler {
|
||||
for(let robotIdx = 0; robotIdx < robotCnt; robotIdx++) {
|
||||
const joinTime = getRandValueByMinMax(COM_BTL_CONST.MIN_CAP_TIME, COM_BTL_CONST.MAX_CAP_TIME, 0);
|
||||
setTimeout(async () => {
|
||||
if (teamStatus.status === COM_TEAM_STATUS.DEFAULT && teamStatus.roleIds.length < 3) {
|
||||
teamStatus = thiz.teamMap.get(teamCode);
|
||||
if (teamStatus && teamStatus.status === COM_TEAM_STATUS.DEFAULT && teamStatus.roleIds.length < 3) {
|
||||
let { robotStArr, robotIdArr } = getRandComBtlRobots(topFiveCe, teamStatus.ceLimit, lv, 1);
|
||||
teamStatus.roleIds = teamStatus.roleIds.concat(robotIdArr);
|
||||
teamStatus.roleStatus = teamStatus.roleStatus.concat(robotStArr);
|
||||
|
||||
Reference in New Issue
Block a user