From ae0a5c688280d2b0678ffccf630a7c5b87252e03 Mon Sep 17 00:00:00 2001 From: dy Date: Tue, 26 Dec 2023 16:33:31 +0800 Subject: [PATCH] =?UTF-8?q?fix=E5=85=83=E6=97=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/yuandan/ApiZLRec.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/api_s2c/event/yuandan/ApiZLRec.ts b/src/api_s2c/event/yuandan/ApiZLRec.ts index 46f3b47..240a590 100644 --- a/src/api_s2c/event/yuandan/ApiZLRec.ts +++ b/src/api_s2c/event/yuandan/ApiZLRec.ts @@ -18,7 +18,14 @@ export default async function (call: ApiCall) { let rec = data?.qiandao?.[call.req.id] if (rec) return call.errorCode(-3) - let prize = [gift.prize, ...gift.dlz.map((v, i) => v[call.req.dlz[i]])] + // 奖励不符合,严格判断 + let dlzList = R.flatten(gift.dlz.map(i => R.values(i))) + call.req.dlz.map(i => { + let item = dlzList.find(v => i.a == v.a && i.t == v.t && i.n == v.n) + if (!item) call.errorCode(-4) + }) + + let prize = [gift.prize, ...call.req.dlz] await PlayerFun.sendPrize(call, prize);