寻宝:修复字段 bug

This commit is contained in:
liangtongchuan
2020-12-07 19:46:47 +08:00
parent 28bc9118bc
commit 38f3215960
2 changed files with 9 additions and 1 deletions

View File

@@ -98,7 +98,7 @@ export class ComBattleHandler {
if (lv < COM_BTL_CONST.ENABLE_LV) return resResult(STATUS.COM_BATTLE_LV_NOT_ENOUGH); if (lv < COM_BTL_CONST.ENABLE_LV) return resResult(STATUS.COM_BATTLE_LV_NOT_ENOUGH);
let blueprt = await ItemModel.findbyRoleAndGidAndCount(roleId, blueprtId, 1); let blueprt = await ItemModel.findbyRoleAndGidAndCount(roleId, blueprtId, 1);
if (!blueprt) return resResult(STATUS.COM_BATTLE_BLUEPRT_NOT_FOUND); if (!blueprt || blueprt.count < 1) return resResult(STATUS.COM_BATTLE_BLUEPRT_NOT_FOUND);
// 检查是否有已创建未结束的寻宝,预先占用一张藏宝图 // 检查是否有已创建未结束的寻宝,预先占用一张藏宝图
let teams = await ComBattleTeamModel.getTeamByCapAndStatus(roleId, COM_TEAM_STATUS.FIGHTING); let teams = await ComBattleTeamModel.getTeamByCapAndStatus(roleId, COM_TEAM_STATUS.FIGHTING);
if (teams && blueprt.count <= teams.length) return resResult(STATUS.COM_BATTLE_BLUEPRT_NOT_ENOUGH); if (teams && blueprt.count <= teams.length) return resResult(STATUS.COM_BATTLE_BLUEPRT_NOT_ENOUGH);

View File

@@ -121,6 +121,14 @@ export default class ComBattleTeam extends BaseModel {
@prop({ required: true, default: 1 }) @prop({ required: true, default: 1 })
roleCnt: number; roleCnt: number;
// boss 总血量
@prop({ required: true, default: 0 })
bossHp: number;
// boss 当前血量
@prop({ required: true, default: 0 })
bossCurHp: number;
// 单个 boss 血量状态 // 单个 boss 血量状态
@prop({ required: false, type: BossHp, default: [] }) @prop({ required: false, type: BossHp, default: [] })
bossHpArr: Array<BossHp>; bossHpArr: Array<BossHp>;