From 09151ef0453a791738c3f4021e14ecca3da46bb4 Mon Sep 17 00:00:00 2001 From: luying Date: Sun, 26 Dec 2021 07:36:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=93=E5=8A=9B=EF=BC=9Aenter=E4=B8=AD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0before?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/db/ActionPoint.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/db/ActionPoint.ts b/shared/db/ActionPoint.ts index 984fd8cbc..b9fbdeadf 100644 --- a/shared/db/ActionPoint.ts +++ b/shared/db/ActionPoint.ts @@ -23,7 +23,7 @@ export default class ActionPoint extends BaseModel { buyTimes: number; // 当前体力 public static async getAp(roleId: string, lean = true) { - let result: ActionPointType = await ActionPointModel.findOne({roleId}).select('ap refTime buyRefTime buyTimes').lean(lean); + let result: ActionPointType = await ActionPointModel.findOne({roleId}).select('ap refTime buyRefTime buyTimes apBefore').lean(lean); if(!result) { result = await ActionPointModel.findOneAndUpdate({roleId}, { $setOnInsert: { ap: 0, refTime: 0, buyRefTime: 0, buyTimes: 0 } }, {new: true, upsert: true}).lean(lean) }