🐞 fix(寻宝): 寻宝有时有问题
This commit is contained in:
@@ -400,13 +400,13 @@ export async function dismissTeam(teamStatus: MemComBtlTeam, teamMap: Map<string
|
||||
}
|
||||
|
||||
export function setDismissTimer(teamStatus: MemComBtlTeam, teamMap: Map<string, MemComBtlTeam>, roleId: string, teamDisTimer: Map<string, NodeJS.Timer>) {
|
||||
if (teamIsFullToStart(teamStatus)) {
|
||||
// if (teamIsFullToStart(teamStatus)) {
|
||||
clearComBtlTimer(teamStatus.teamCode, teamDisTimer);
|
||||
let timer = setTimeout(async () => {
|
||||
await dismissTeam(teamStatus, teamMap, roleId, teamDisTimer);
|
||||
}, COM_BTL_CONST.CAP_START_TIME);
|
||||
teamDisTimer.set(teamStatus.teamCode, timer);
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -688,15 +688,7 @@ export async function oneTeamNotInBlack(teams: ComBattleTeamType[], roleId: stri
|
||||
// }
|
||||
|
||||
export async function checkHasMyTeam(roleId: string) {
|
||||
let battles = pinus.app.getServersByType('battle');
|
||||
let hasMyTeam = false;
|
||||
for(let server of battles) {
|
||||
let checkResult = await pinus.app.rpc.battle.comBattleRemote.checkMyTeam.toServer(server.id, roleId);
|
||||
if(checkResult) {
|
||||
hasMyTeam = true; break;
|
||||
}
|
||||
}
|
||||
return hasMyTeam;
|
||||
return await ComBattleTeamModel.checkHasTeamByRoleId(roleId);
|
||||
}
|
||||
|
||||
export async function checkTeamStatusAndSend(teamCode: string, roleId: string, sid: string) {
|
||||
|
||||
Reference in New Issue
Block a user