From 4a6a40403d33639e1ae161e731e03063f3dc2516 Mon Sep 17 00:00:00 2001 From: chenkai Date: Fri, 22 Dec 2023 20:47:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20canReceive=20=E6=8E=A5=E5=8F=A3=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=8E=A9=E5=AE=B6=E9=A2=86=E5=8F=96=E5=88=B0=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/payForDiamond/ApiCanReceive.ts | 6 +++--- src/module/collection_event.ts | 2 +- src/shared/protocols/event/payForDiamond/PtlCanReceive.ts | 1 + src/shared/protocols/serviceProto.ts | 8 ++++++++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/api_s2c/event/payForDiamond/ApiCanReceive.ts b/src/api_s2c/event/payForDiamond/ApiCanReceive.ts index 9ef1d5c..5d16d02 100644 --- a/src/api_s2c/event/payForDiamond/ApiCanReceive.ts +++ b/src/api_s2c/event/payForDiamond/ApiCanReceive.ts @@ -51,7 +51,7 @@ export async function playerCanReceive(call: ApiCall, callError : boolean = true if (playerActivityInfo) { if (playerActivityInfo[zeroTime]) { return { - payNum, remaining, result: false, activityInfo, showOffList, price + payNum, remaining, result: false, activityInfo, showOffList, price, gotAmount: playerActivityInfo[zeroTime] }; } } @@ -63,7 +63,7 @@ export async function playerCanReceive(call: ApiCall, callError : boolean = true export default async function (call: ApiCall) { const canReceiveResult = await playerCanReceive(call); if (canReceiveResult) { - const { payNum, remaining, result, showOffList, price } = canReceiveResult; - call.succ({ payNum, remaining, result, showOffList, price }); + const { payNum, remaining, result, showOffList, price, gotAmount } = canReceiveResult; + call.succ({ payNum, remaining, result, showOffList, price, gotAmount }); } } \ No newline at end of file diff --git a/src/module/collection_event.ts b/src/module/collection_event.ts index 901d3f9..97bec9d 100644 --- a/src/module/collection_event.ts +++ b/src/module/collection_event.ts @@ -52,7 +52,7 @@ export type eventType = { kaifujingsai: ResOpenKaifujingsai; zhoumolibao: ResOpenZhoumolibao & { refreshTime: number; }; payForDiamond: { - [time: number]: number[] + [time: number]: number } } & { [k: `${number}jijin`]: ResOpenYuedujijin; diff --git a/src/shared/protocols/event/payForDiamond/PtlCanReceive.ts b/src/shared/protocols/event/payForDiamond/PtlCanReceive.ts index cd0b089..2560773 100644 --- a/src/shared/protocols/event/payForDiamond/PtlCanReceive.ts +++ b/src/shared/protocols/event/payForDiamond/PtlCanReceive.ts @@ -8,4 +8,5 @@ export type ResCanReceive = { result: boolean; price: number; showOffList: any[]; + gotAmount?: number; }; \ No newline at end of file diff --git a/src/shared/protocols/serviceProto.ts b/src/shared/protocols/serviceProto.ts index 8b3c4a8..c99c096 100644 --- a/src/shared/protocols/serviceProto.ts +++ b/src/shared/protocols/serviceProto.ts @@ -10159,6 +10159,14 @@ export const serviceProto: ServiceProto = { "type": "Any" } } + }, + { + "id": 5, + "name": "gotAmount", + "type": { + "type": "Number" + }, + "optional": true } ] },