From fb24772d295c5831cafb1a6ba4763c171cc42ec5 Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:56:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E6=AC=A1=E8=AE=B0=E5=BD=95=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=B7=B3=E8=BF=87=E7=BB=91=E5=AE=9A=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BB=A5=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E6=96=B0=E5=8A=A0=E7=9A=84=E8=AE=B0=E5=BD=95=E7=94=B1=E4=BA=8E?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=8F=82=E5=8A=A0=E8=BF=87=E9=A2=84=E5=85=85?= =?UTF-8?q?=E5=80=BC=E8=80=8C=E6=97=A0=E6=B3=95=E6=9F=A5=E8=AF=A2=E5=88=B0?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/cec.controller.ts | 3 ++- src/models/CECRecordTotal.ts | 23 ++++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/controllers/cec.controller.ts b/src/controllers/cec.controller.ts index 1821494..9863c8e 100644 --- a/src/controllers/cec.controller.ts +++ b/src/controllers/cec.controller.ts @@ -72,7 +72,8 @@ const queryCECClaimStatus = async (address: string) => { if (CEC_CLAIM_STAGE === 0) { available += (currentTotal * BigInt(val.rate)) / 100n } else { - if (bindRecord && !bindRecord.invalid) { + // 预充值, 且记录有效, 且没有跳过绑定检查 + if (bindRecord && !bindRecord.invalid && !record.skipBind) { claimed += (currentTotal * BigInt(val.rate)) / 100n } else if (val.status === ClaimStatusEnum.NORMAL){ available += (currentTotal * BigInt(val.rate)) / 100n diff --git a/src/models/CECRecordTotal.ts b/src/models/CECRecordTotal.ts index 9a4aa48..db66266 100644 --- a/src/models/CECRecordTotal.ts +++ b/src/models/CECRecordTotal.ts @@ -57,13 +57,14 @@ export class CECRecordTotalClass extends BaseModule { * p2a: 2, 3 * game test parse 1: 4 * Loyalty Points Rewards: 5 - * Badge staking rewards: 6, 7 - * Gacha Journey: 8, 9 - * Rase of Gacha: 10, 11 - * game season rank: 12, 13 - * hash rate rewards: 14, 15 - * old game event: 16, 17 - * p2e season 2: 18 + * Badge staking rewards: 6, 7, 9, 11, 13, 15, 17, 20, 21, 22, 23, 24, 25 + * Gacha Journey: 8, 7, 9, 11, 13, 15, 17, 20, 21, 22, 23, 24, 25 + * Rase of Gacha: 10, 7, 9, 11, 13, 15, 17, 20, 21, 22, 23, 24, 25 + * game season rank: 12, 7, 9, 11, 13, 15, 17, 20, 21, 22, 23, 24, 25 + * hash rate rewards: 14, 7, 9, 11, 13, 15, 17, 20, 21, 22, 23, 24, 25 + * old game event: 16, 7, 9, 11, 13, 15, 17, 20, 21, 22, 23, 24, 25 + * discord ticket: 26, 7, 9, 11, 13, 15, 17, 20, 21, 22, 23, 24, 25 + * p2e season 2(Contribution Clash): 18 * founder's tag holder: 19 */ @prop({ type: () => ClaimStatus, _id: false }) @@ -77,6 +78,14 @@ export class CECRecordTotalClass extends BaseModule { @prop() public firstRate: number + + /** + * 是否跳过预充值检查 + * 1: 跳过 + * 0: 不跳过 + */ + @prop() + public skipBind: number @prop({ enum: CECStatusEnum, default: CECStatusEnum.NORMAL }) public status: CECStatusEnum