寻宝:人满不开打队伍解散
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user