寻宝:添加撤退
This commit is contained in:
@@ -157,6 +157,7 @@ export const STATUS = {
|
||||
COM_BATTLE_IS_RUNNING: { code: 20637, simStr: '您有队伍正在进行中' },
|
||||
COM_BATTLE_INVITE_LV_NOT_ENOUGH: { code: 20638, simStr: '对方队伍等级不足,无法邀请' },
|
||||
COM_BATTLE_INVITE_CE_LIMIT: { code: 20639, simStr: '对方队伍战力不足,无法邀请' },
|
||||
COM_BATTLE_RETREAT_ERR: { code: 20640, simStr: '队伍不止单人,不允许撤退' },
|
||||
// 共斗藏宝图合成
|
||||
COM_BLUEPRT_QUALITY_CANNOT_COMPOSE: { code: 20650, simStr: '该品质藏宝图不可合成' },
|
||||
COM_BLUEPRT_COUNT_ERROR: { code: 20651, simStr: '材料数量不足' },
|
||||
|
||||
@@ -196,10 +196,14 @@ export default class ComBattleTeam extends BaseModel {
|
||||
@prop({ required: false, type: BossHp, default: [], _id: false })
|
||||
bossHpArr: BossHp[];
|
||||
|
||||
// 队伍是否开放加入
|
||||
// 是否超时
|
||||
@prop({ required: true, default: false })
|
||||
timeout: boolean;
|
||||
|
||||
// 是否撤退
|
||||
@prop({ required: true, default: false })
|
||||
retreat: boolean;
|
||||
|
||||
// 黑名单
|
||||
blacklist: string[] = [];
|
||||
|
||||
@@ -272,9 +276,9 @@ export default class ComBattleTeam extends BaseModel {
|
||||
return team;
|
||||
}
|
||||
|
||||
public static async syncTeamData(teamData: {teamCode: string, status: number, roleStatus: RoleStatus[], bossHpArr: BossHp[], endTime?: number}, timeout = false, lean = true) {
|
||||
public static async syncTeamData(teamData: {teamCode: string, status: number, roleStatus: RoleStatus[], bossHpArr: BossHp[], endTime?: number}, timeout = false, retreat = false) {
|
||||
// console.log('syncTeamData bossHpArr: ', teamData.bossHpArr);
|
||||
const team: ComBattleTeamType = await ComBattleTeamModel.findOneAndUpdate({ teamCode: teamData.teamCode }, {$set :{...teamData, roleCnt: teamData.roleStatus.length, timeout}}, {new: true}).lean(lean);
|
||||
const team: ComBattleTeamType = await ComBattleTeamModel.findOneAndUpdate({ teamCode: teamData.teamCode }, {$set :{...teamData, roleCnt: teamData.roleStatus.length, timeout, retreat}}, {new: true}).lean();
|
||||
return team;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user