寻宝:人满不开打队伍解散

This commit is contained in:
liangtongchuan
2020-12-02 00:52:43 +08:00
parent cdd889f1aa
commit a001ec4478
2 changed files with 43 additions and 7 deletions
+16 -1
View File
@@ -94,4 +94,19 @@ export async function checkComBattleDrop(roleId: string, battleCode: string) {
}
await ComBattleTeamModel.updateRewardSt(roleId, battleCode, true);
return {status: 0, fixReward};
}
}
export function clearComBtlTimer(teamCode: string, timerMap: Map<string, NodeJS.Timer>) {
let timer = timerMap.get(teamCode);
if (timer) {
clearTimeout(timer);
}
}
export function setComBtlTimer(teamCode: string, timer: NodeJS.Timer, timerMap: Map<string, NodeJS.Timer>) {
let preTimer = timerMap.get(teamCode);
if (preTimer) {
clearTimeout(preTimer);
}
timerMap.set(teamCode, timer);
}