寻宝:信息边窗

This commit is contained in:
luying
2022-07-07 13:27:43 +08:00
parent b1dc091453
commit 460d0d6955
15 changed files with 153 additions and 38 deletions
@@ -335,6 +335,16 @@ export function comBtlLvInvalid(playerLv: number, blueprtLvs: number[]) {
return false
}
export function getComBtlLvByPlayerLv(playerLv: number) {
let lvs: number[] = [];
for(let [lv, {min, max}] of gameData.comBtlLvRange) {
if(playerLv >= min && playerLv <= max) lvs.push(lv);
}
let minLv = Math.min(...lvs);
let maxLv = Math.max(...lvs);
return { minLv, maxLv }
}
export async function dismissTeam(teamStatus: MemComBtlTeam, teamMap: Map<string, MemComBtlTeam>, roleId: string, teamDisTimer: Map<string, NodeJS.Timer>) {
const { teamCode } = teamStatus;
if (!teamStatus || !teamStatus.roleIds || teamStatus.roleIds.indexOf(roleId) === -1) return resResult(STATUS.COM_BATTLE_TEAM_INVALID);