寻宝:修复藏宝图占用的逻辑错误
This commit is contained in:
@@ -559,7 +559,7 @@ export async function hasEnoughBlueprt(roleId: string, blueprtId: number) {
|
||||
let blueprt = await ItemModel.findbyRoleAndGidAndCount(roleId, blueprtId, 1);
|
||||
if (!blueprt) return false;
|
||||
// 检查是否有已创建未结束的寻宝,预先占用一张藏宝图
|
||||
let teams = await ComBattleTeamModel.getTeamByCapAndStatus(roleId, COM_TEAM_STATUS.FIGHTING);
|
||||
let teams = await ComBattleTeamModel.getBlueprtInUse(roleId, COM_TEAM_STATUS.FIGHTING, blueprtId);
|
||||
if (teams && blueprt.count <= teams.length) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user