From 80908e5a46981d08ac392515fe7e4f9d1d963be5 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Tue, 19 Dec 2023 17:38:59 +0800 Subject: [PATCH 01/23] =?UTF-8?q?fix:=E5=9C=A3=E8=AF=9E=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9C=A3=E8=AF=9E=E7=BB=8F=E9=AA=8C=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/christmas/ApiTaskRec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/api_s2c/event/christmas/ApiTaskRec.ts b/src/api_s2c/event/christmas/ApiTaskRec.ts index 1227d85..d0af2c9 100644 --- a/src/api_s2c/event/christmas/ApiTaskRec.ts +++ b/src/api_s2c/event/christmas/ApiTaskRec.ts @@ -22,11 +22,14 @@ export default async function (call: ApiCall) { return call.error('', { code: -3, message: globalThis.lng.yangchengmubiao_4 }) } _mydata.taskfinish.push(taskid) - + let _addval = _con.addval let _setData = {} + _mydata["val"] += _addval + _setData["val"] = _mydata.val _setData["taskfinish"] = _mydata.taskfinish await Christmasfun.setMyData(call.uid, call.req.hdid, { $set: _setData }) let _prize = _con.prize + await PlayerFun.sendPrize(call, _prize); let changedata = { mydata: _mydata, prize: _prize} // 推送红点 From 1b222a9fc69038f6187b5c87a715d7be2b82e504 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Tue, 19 Dec 2023 19:35:45 +0800 Subject: [PATCH 02/23] =?UTF-8?q?fix:=E5=9C=A3=E8=AF=9E=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E5=85=85=E5=80=BC=E4=B8=8D=E5=88=B0=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/christmas/fun.ts | 12 +++++++++--- src/globalListener.ts | 2 -- src/public/pay.ts | 5 +++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/api_s2c/event/christmas/fun.ts b/src/api_s2c/event/christmas/fun.ts index 327422c..9ecaa7f 100644 --- a/src/api_s2c/event/christmas/fun.ts +++ b/src/api_s2c/event/christmas/fun.ts @@ -117,7 +117,7 @@ export class Christmasfun { return mydata } - static async payChristmas(payid, call: ApiCall) { + static async payChristmas(payid, call: any) { let _hd = await HuoDongFun.gethdList(call, 8) for (let index = 0; index < _hd.length; index++) { const hdinfo = _hd[index]; @@ -126,8 +126,8 @@ export class Christmasfun { let _mydata = await Christmasfun.getMyData(call, _hdid) if (_mydata.pay) continue await this.setMyData(call.uid, _hdid, { $set: { pay: true} }) - let _prize = hdinfo.data.zlpayprize - await PlayerFun.sendPrize(call, _prize); + // let _prize = hdinfo.data.zlpayprize + // await PlayerFun.sendPrize(call, _prize); } else{ const libaos = hdinfo.data.libao @@ -140,6 +140,12 @@ export class Christmasfun { if (_buyNum >= _tmp["buynum"]) continue _mydata.libao[lbid] = _buyNum + 1 this.setMyData(call.uid, _hdid, { $set: { libao: _mydata.libao} }) + let _select = _mydata.select[lbid] || {} + let _prize: atn[] = _tmp["basep"] + for (let key in _select) { + _prize.push(_tmp["dlz"][parseInt(key)][_select[key]]) + } + await PlayerFun.sendPrize(call, _prize); break } diff --git a/src/globalListener.ts b/src/globalListener.ts index 2c3aa37..1e81c29 100644 --- a/src/globalListener.ts +++ b/src/globalListener.ts @@ -177,8 +177,6 @@ export function addListener() { ActionLog.addRetainLog(player.uid, { key: 'pay', val: conf.payExp[0].n }); if (payId == G.gc.zhanling.payId) payZhanLing(player); - //圣诞节活动充值 - Christmasfun.payChristmas(payId, call); let payEmailConf = G.gc.payEmail[payId] as _gcType['payEmail']['caifutequan']; if (payEmailConf?.length > 0) { let sendEmailConfs = payEmailConf; diff --git a/src/public/pay.ts b/src/public/pay.ts index 43a0e58..61fef69 100644 --- a/src/public/pay.ts +++ b/src/public/pay.ts @@ -10,6 +10,7 @@ import {call, PlayerFun} from './player'; import {number} from "mathjs"; import {getGud} from './gud'; import {getConf as zmlbGetConf} from '../api_s2c/event/zhoumolibao/ApiOpen'; +import {Christmasfun} from "../api_s2c/event/christmas/fun"; async function checkPayIsActive(payId: string, logs: payLog[], payArgs) { let conf: any = await this.getConf(payId, payArgs); @@ -230,7 +231,8 @@ export class PayFun { let conf = await zmlbGetConf(call, {payId}) prize.push(...conf.prize) } - + //圣诞节活动充值 + await Christmasfun.payChristmas(payId, call); let isReplaceConf = await this.checkBuysAfterPay(uid, payId, conf, payArgs, player) if (isReplaceConf) { let prizePayId = `zuanshi_${conf.money}` @@ -239,7 +241,6 @@ export class PayFun { prize = [...conf.prize] } - await PlayerFun.sendPrize(call, prize); await PlayerFun.addAttr(call, conf.payExp); if (payId == 'G123SendGift') { From ec3d872390ec07b39c10f6875a7538c1abffed39 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 20 Dec 2023 16:17:09 +0800 Subject: [PATCH 03/23] =?UTF-8?q?fix:=E5=9C=A3=E8=AF=9E=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E7=BA=A2=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/hongdian/fun.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/api_s2c/hongdian/fun.ts b/src/api_s2c/hongdian/fun.ts index 4b58691..550b80b 100644 --- a/src/api_s2c/hongdian/fun.ts +++ b/src/api_s2c/hongdian/fun.ts @@ -364,6 +364,10 @@ export class HuoDongHongDianFun { // 检测 htype 6 七日登录活动红点 ishd = await this.qiridengluHongDian(call, element) } + if (element.htype == 8) { + // 检测 htype 8 圣诞活动红点 + ishd = await this.christmasHongDian(call, element) + } // 此活动有红点 if (ishd.show) { From 4e74b001b57849366601c354989de9ba2d005a34 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 20 Dec 2023 16:25:22 +0800 Subject: [PATCH 04/23] =?UTF-8?q?fix:=E6=96=B0=E5=A2=9E=E5=9C=A3=E8=AF=9E?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=AF=8F=E6=97=A5=E6=B6=88=E8=80=97=E9=92=BB?= =?UTF-8?q?=E7=9F=B3=E4=BB=BB=E5=8A=A1=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/globalListener.ts | 2 ++ src/public/player.ts | 5 +++++ src/public/taskclass.ts | 11 ++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/globalListener.ts b/src/globalListener.ts index 1e81c29..cb59b16 100644 --- a/src/globalListener.ts +++ b/src/globalListener.ts @@ -143,6 +143,8 @@ export type gEventType = { Class_task_154: (eventname, call, val, chkVal) => void; /**每日任务宝箱领取 */ Class_task_155: (eventname, call, val, chkVal) => void; + /**每日钻石消耗 */ + Class_task_156: (eventname, call, val, chkVal) => void; }; export function addListener() { diff --git a/src/public/player.ts b/src/public/player.ts index d8322dd..1eccfcd 100644 --- a/src/public/player.ts +++ b/src/public/player.ts @@ -169,6 +169,11 @@ export class PlayerFun { change[atn.t] = this.fixAttrLteZero(atn.t, await this.getAtnNum(call, atn) + atn.n); if (atn.t == 'rmbmoney') { this.changeAttrLog(call.conn.uid, change[atn.t], atn, call.conn.gud.rmbmoney) + // 扣除钻石时 + if (atn.n < 0) { + // 监听任务消耗任务 + G.emit("Class_task_156", 'Class_task_156', call, -atn.n, 0); + } } all.push(this.changeAttr(call.conn.uid, change)); all.push(this.upAttr(call, {...atn, n: change[atn.t]})); diff --git a/src/public/taskclass.ts b/src/public/taskclass.ts index 7271b4e..e18a05d 100644 --- a/src/public/taskclass.ts +++ b/src/public/taskclass.ts @@ -788,7 +788,7 @@ export module manager { isinc = 1 async initVal(call: ApiCall, con) { - return 1; + return 0; } } @@ -797,6 +797,15 @@ export module manager { stype = 155 isinc = 0 + async initVal(call: ApiCall, con) { + return 0; + } + } + // 第58个任务 每日钻石消耗 + export class Class_task_156 extends BaseClass { + stype = 156 + isinc = 1 + async initVal(call: ApiCall, con) { return 1; } From 5ec8b60e99c3e1fb7ab52d65fe9b40aa33ed4ce9 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 20 Dec 2023 16:39:29 +0800 Subject: [PATCH 05/23] =?UTF-8?q?fix:=E6=96=B0=E5=A2=9E=E5=9C=A3=E8=AF=9E?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=AD=BE=E5=88=B0=E4=B9=9F=E5=8A=A0=E4=B8=8A?= =?UTF-8?q?=E7=BB=8F=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/christmas/ApiQianDao.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/api_s2c/event/christmas/ApiQianDao.ts b/src/api_s2c/event/christmas/ApiQianDao.ts index 5eb2830..0dba7b9 100644 --- a/src/api_s2c/event/christmas/ApiQianDao.ts +++ b/src/api_s2c/event/christmas/ApiQianDao.ts @@ -19,17 +19,23 @@ export default async function (call: ApiCall) { _mydata.qiandao.push(i) _prize = _prize.concat(_con[i]) } - if (!_prize){ // 没有奖励可以领取 return call.error('', { code: -1, message: globalThis.lng.yangchengmubiao_2 }) } - - let _setData = {} + let _addVal = 0 + // 懒得喊后台和前端修改了,直接取prize里面的对应的经验字段去添加zhanling经验 + for (const p of _prize) { + // 战令经验 + if (p.t == "shengdanExp") { + _addVal += p.n + } + } + _mydata["val"] += _addVal + _setData["val"] = _mydata.val _setData["qiandao"] = _mydata.qiandao await Christmasfun.setMyData(call.uid, call.req.hdid, { $set: _setData }) - await PlayerFun.sendPrize(call, _prize); let changedata = { mydata: _mydata, prize: _prize} // 推送红点 From 1d7b1a4f5806e754ba4b573bf3a7c836304a1c5c Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 20 Dec 2023 16:59:16 +0800 Subject: [PATCH 06/23] =?UTF-8?q?fix:=E5=9C=A3=E8=AF=9E=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E7=BA=A2=E7=82=B9=E6=8A=A5=E9=94=99=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/hongdian/fun.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api_s2c/hongdian/fun.ts b/src/api_s2c/hongdian/fun.ts index 550b80b..3f3eeba 100644 --- a/src/api_s2c/hongdian/fun.ts +++ b/src/api_s2c/hongdian/fun.ts @@ -708,7 +708,7 @@ export class HuoDongHongDianFun { for (let indextask = 0; indextask < Object.keys(_tasks).length; indextask++) { const elementtask = Object.keys(_tasks)[indextask]; let _tmp = _tasks[elementtask]; - if (_tmp.pval <= (_mydata.taskval[elementtask] || 0) && !_mydata.taskfinsih.includes(elementtask)) { + if (_tmp.pval <= (_mydata.taskval[elementtask] || 0) && !_mydata.taskfinish.includes(elementtask)) { // 任务完成且没有领取 _res.show = true; return _res; From ad439d0b14cccb51ddd20cb62c41bb4b6485806f Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 20 Dec 2023 17:32:31 +0800 Subject: [PATCH 07/23] =?UTF-8?q?fix:=E5=9C=A3=E8=AF=9E=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E7=A4=BC=E5=8C=85=E6=94=B9=E6=88=90=E6=AF=8F=E6=97=A5=E9=87=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/christmas/fun.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/api_s2c/event/christmas/fun.ts b/src/api_s2c/event/christmas/fun.ts index 9ecaa7f..9c1fb4f 100644 --- a/src/api_s2c/event/christmas/fun.ts +++ b/src/api_s2c/event/christmas/fun.ts @@ -113,7 +113,11 @@ export class Christmasfun { mydata.taskval = await this.getTaskVal(call, hdid) mydata.refresh = G.time mydata.gamenum = 0 - await this.setMyData(call.uid, hdid, { $set: { refresh: mydata.refresh, taskfinish: mydata.taskfinish, taskval: mydata.taskval, gamenum: mydata.gamenum} }) + mydata.libao = {} + await this.setMyData(call.uid, hdid, { $set: { refresh: mydata.refresh, taskfinish: mydata.taskfinish, + taskval: mydata.taskval, + gamenum: mydata.gamenum, + libao:mydata.libao} }) return mydata } From 48038d1b0778cefcf7dec06dc55596e9203ca181 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 20 Dec 2023 17:47:37 +0800 Subject: [PATCH 08/23] =?UTF-8?q?fix:=E5=9C=A3=E8=AF=9E=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E6=96=B0=E5=A2=9Evip=E7=BB=8F=E9=AA=8C=E4=BB=BB=E5=8A=A1157?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/christmas/fun.ts | 4 +++- src/globalListener.ts | 2 ++ src/public/player.ts | 4 ++++ src/public/taskclass.ts | 9 +++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/api_s2c/event/christmas/fun.ts b/src/api_s2c/event/christmas/fun.ts index 9c1fb4f..b3e5fca 100644 --- a/src/api_s2c/event/christmas/fun.ts +++ b/src/api_s2c/event/christmas/fun.ts @@ -114,7 +114,9 @@ export class Christmasfun { mydata.refresh = G.time mydata.gamenum = 0 mydata.libao = {} - await this.setMyData(call.uid, hdid, { $set: { refresh: mydata.refresh, taskfinish: mydata.taskfinish, + await this.setMyData(call.uid, hdid, { $set: { + refresh: mydata.refresh, + taskfinish: mydata.taskfinish, taskval: mydata.taskval, gamenum: mydata.gamenum, libao:mydata.libao} }) diff --git a/src/globalListener.ts b/src/globalListener.ts index cb59b16..fc2c85b 100644 --- a/src/globalListener.ts +++ b/src/globalListener.ts @@ -145,6 +145,8 @@ export type gEventType = { Class_task_155: (eventname, call, val, chkVal) => void; /**每日钻石消耗 */ Class_task_156: (eventname, call, val, chkVal) => void; + /**每日获取vip经验 */ + Class_task_157: (eventname, call, val, chkVal) => void; }; export function addListener() { diff --git a/src/public/player.ts b/src/public/player.ts index 1eccfcd..df3e641 100644 --- a/src/public/player.ts +++ b/src/public/player.ts @@ -175,6 +175,10 @@ export class PlayerFun { G.emit("Class_task_156", 'Class_task_156', call, -atn.n, 0); } } + // 增加vip经验的任务监听 + if (atn.t == "payExp" && atn.n > 0) { + G.emit("Class_task_157", 'Class_task_157', call, atn.n, 0); + } all.push(this.changeAttr(call.conn.uid, change)); all.push(this.upAttr(call, {...atn, n: change[atn.t]})); //await this.changeAttr(call.conn.uid, change); diff --git a/src/public/taskclass.ts b/src/public/taskclass.ts index e18a05d..5bf3f67 100644 --- a/src/public/taskclass.ts +++ b/src/public/taskclass.ts @@ -810,6 +810,15 @@ export module manager { return 1; } } + // 第59个任务 获得vip经验 + export class Class_task_157 extends BaseClass { + stype = 157 + isinc = 1 + + async initVal(call: ApiCall, con) { + return 0; + } + } } From 05368fc0deb50c0c6e3d8a0bfc9aedef50614fe0 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 20 Dec 2023 18:56:40 +0800 Subject: [PATCH 09/23] =?UTF-8?q?fix:=E5=9C=A3=E8=AF=9E=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=82=E6=AD=A5=E6=8C=89=E9=92=AE=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/ApiSyncBtn.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/api_s2c/ApiSyncBtn.ts b/src/api_s2c/ApiSyncBtn.ts index 68065df..b420eb8 100644 --- a/src/api_s2c/ApiSyncBtn.ts +++ b/src/api_s2c/ApiSyncBtn.ts @@ -39,15 +39,14 @@ export default async function (call: ApiCall) { } break; case 'christmas': - //领完消失 - if (!data[key]) { - let _hdList = await HuoDongFun.gethdList(call, 8) - if (_hdList) { - // 无此活动 - data[key] = {active: true}; - change[key] = data[key]; - } - } + //领完消失 + change[key] = {active: false}; + let _hdList = await HuoDongFun.gethdList(call, 8) + if (_hdList) { + // 无此活动 + data[key] = {active: true}; + change[key] = data[key]; + } break; case 'dayjijin': case 'dengjijijin': From f1a4daece329e4bd5f71bb502ac7ef4cff8e159d Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 20 Dec 2023 19:03:41 +0800 Subject: [PATCH 10/23] =?UTF-8?q?fix:=E5=9C=A3=E8=AF=9E=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=82=E6=AD=A5=E6=8C=89=E9=92=AE=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/ApiSyncBtn.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api_s2c/ApiSyncBtn.ts b/src/api_s2c/ApiSyncBtn.ts index b420eb8..062ff63 100644 --- a/src/api_s2c/ApiSyncBtn.ts +++ b/src/api_s2c/ApiSyncBtn.ts @@ -40,7 +40,8 @@ export default async function (call: ApiCall) { break; case 'christmas': //领完消失 - change[key] = {active: false}; + data[key] = {active: false}; + change[key] = data[key]; let _hdList = await HuoDongFun.gethdList(call, 8) if (_hdList) { // 无此活动 From 4690254453cd09ad0d9a5b764948cd9fe67b7b87 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Mon, 25 Dec 2023 19:30:55 +0800 Subject: [PATCH 11/23] =?UTF-8?q?fix:=E5=9C=A3=E8=AF=9E=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=82=E6=AD=A5=E6=8C=89=E9=92=AE=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/ApiSyncBtn.ts | 2 +- src/api_s2c/event/christmas/ApiLiBao.ts | 1 - src/api_s2c/event/christmas/ApiQianDao.ts | 2 +- src/api_s2c/event/christmas/ApiZhanLingRec.ts | 2 +- src/public/huodongfun.ts | 1 - 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/api_s2c/ApiSyncBtn.ts b/src/api_s2c/ApiSyncBtn.ts index 062ff63..959eb6e 100644 --- a/src/api_s2c/ApiSyncBtn.ts +++ b/src/api_s2c/ApiSyncBtn.ts @@ -43,7 +43,7 @@ export default async function (call: ApiCall) { data[key] = {active: false}; change[key] = data[key]; let _hdList = await HuoDongFun.gethdList(call, 8) - if (_hdList) { + if (_hdList.length > 0) { // 无此活动 data[key] = {active: true}; change[key] = data[key]; diff --git a/src/api_s2c/event/christmas/ApiLiBao.ts b/src/api_s2c/event/christmas/ApiLiBao.ts index ad070db..cb87f50 100644 --- a/src/api_s2c/event/christmas/ApiLiBao.ts +++ b/src/api_s2c/event/christmas/ApiLiBao.ts @@ -27,7 +27,6 @@ export default async function (call: ApiCall) { // 判断是否选择奖励了 return call.error('', { code: -3, message: globalThis.lng.yangchengmubiao_2 }) } - let _prize: atn[] = _con.basep for (let key in _select) { diff --git a/src/api_s2c/event/christmas/ApiQianDao.ts b/src/api_s2c/event/christmas/ApiQianDao.ts index 0dba7b9..06ac114 100644 --- a/src/api_s2c/event/christmas/ApiQianDao.ts +++ b/src/api_s2c/event/christmas/ApiQianDao.ts @@ -19,7 +19,7 @@ export default async function (call: ApiCall) { _mydata.qiandao.push(i) _prize = _prize.concat(_con[i]) } - if (!_prize){ + if (_prize.length <= 0){ // 没有奖励可以领取 return call.error('', { code: -1, message: globalThis.lng.yangchengmubiao_2 }) } diff --git a/src/api_s2c/event/christmas/ApiZhanLingRec.ts b/src/api_s2c/event/christmas/ApiZhanLingRec.ts index 42a460f..a95ff7d 100644 --- a/src/api_s2c/event/christmas/ApiZhanLingRec.ts +++ b/src/api_s2c/event/christmas/ApiZhanLingRec.ts @@ -30,7 +30,7 @@ export default async function (call: ApiCall) { _mydata.gj.push(index) } - if (!_prize) { + if (_prize.length <= 0) { // 没有奖励可以领取 return call.error('', { code: -1, message: globalThis.lng.yangchengmubiao_2 }) } diff --git a/src/public/huodongfun.ts b/src/public/huodongfun.ts index 99ed2a1..44d16cc 100644 --- a/src/public/huodongfun.ts +++ b/src/public/huodongfun.ts @@ -54,7 +54,6 @@ export class HuoDongFun { if (htype != 0) _where["htype"] = htype let _res = await this.catAllHD(_where) - let result = [] for (let index = 0; index < _res.length; index++) { const element = _res[index]; From 82b4b6172510b1357fcb1eb041e329d45c405205 Mon Sep 17 00:00:00 2001 From: chenkai Date: Thu, 21 Dec 2023 19:52:19 +0800 Subject: [PATCH 12/23] =?UTF-8?q?feat:=20=E6=8A=A2=E7=BA=A2=E5=8C=85?= =?UTF-8?q?=E5=88=86=E9=92=BB=E7=9F=B3=E6=8E=A5=E5=8F=A3=20=E5=88=9D?= =?UTF-8?q?=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../event/payForDiamond/ApiCanReceive.ts | 45 ++++++++ src/api_s2c/event/payForDiamond/ApiReceive.ts | 104 ++++++++++++++++++ .../event/payForDiamond/PtlCanReceive.ts | 9 ++ .../event/payForDiamond/PtlReceive.ts | 8 ++ 4 files changed, 166 insertions(+) create mode 100644 src/api_s2c/event/payForDiamond/ApiCanReceive.ts create mode 100644 src/api_s2c/event/payForDiamond/ApiReceive.ts create mode 100644 src/shared/protocols/event/payForDiamond/PtlCanReceive.ts create mode 100644 src/shared/protocols/event/payForDiamond/PtlReceive.ts diff --git a/src/api_s2c/event/payForDiamond/ApiCanReceive.ts b/src/api_s2c/event/payForDiamond/ApiCanReceive.ts new file mode 100644 index 0000000..b77fe24 --- /dev/null +++ b/src/api_s2c/event/payForDiamond/ApiCanReceive.ts @@ -0,0 +1,45 @@ +import { ApiCall } from "tsrpc"; +import { HuoDongFun } from "../../../public/huodongfun"; +import { ReqCanReceive, ResCanReceive } from '../../../shared/protocols/event/payForDiamond/PtlCanReceive'; +import { PublicShared } from "../../../shared/public/public"; + +export async function playerCanReceive(call: ApiCall) { + const activityInfo = await HuoDongFun.getHdidInfo(call, call.req.activityId); + if (!activityInfo) { + return call.error('No such activity'); + } + const remaining = activityInfo.data['remaining']; + const zeroTime = PublicShared.getToDayZeroTime(); + const dayPayInfo = await G.mongodb.collection('dayPay').findOne({ uid: call.uid, time: zeroTime }); + if (!dayPayInfo || !dayPayInfo.payNum) { + return { + payNum: 0, remaining, result: false, activityInfo + }; + } + const payNum = dayPayInfo.payNum; + // 玩家充值未达标或者奖池余额耗尽则不能领取 + if (payNum < activityInfo.data['price'] || remaining <= 0) { + return { + payNum, remaining, result: false, activityInfo + } + } + // 检查玩家今日是否已经领取 + const playerActivityInfo = G.mongodb.cEvent('payForDiamond').findOne({ uid: call.uid }); + if (playerActivityInfo) { + if (playerActivityInfo[zeroTime]?.length) { + return { + payNum, remaining, result: false, activityInfo + }; + } + } + return { + payNum, remaining, result: true, activityInfo + }; +} + +export default async function (call: ApiCall) { + const canReceiveResult = await playerCanReceive(call); + if (canReceiveResult) { + call.succ(canReceiveResult); + } +} \ No newline at end of file diff --git a/src/api_s2c/event/payForDiamond/ApiReceive.ts b/src/api_s2c/event/payForDiamond/ApiReceive.ts new file mode 100644 index 0000000..46748ab --- /dev/null +++ b/src/api_s2c/event/payForDiamond/ApiReceive.ts @@ -0,0 +1,104 @@ +import { ApiCall } from "tsrpc"; +import { HuoDongFun } from "../../../public/huodongfun"; +import { ReqReceive, ResReceive } from '../../../shared/protocols/event/payForDiamond/PtlReceive'; +import { playerCanReceive } from './ApiCanReceive'; +import { PublicShared } from "../../../shared/public/public"; + +type diamondWeightGroup = { + weight: number; + numrange: [ min: number, max: number]; +}; + +/** + * @param groups 各分组及其权重 + */ +function randomWithWeight(groups: diamondWeightGroup[]) { + let minAmount: number; + let totalWeights = 0; + for (const group of groups) { + totalWeights += group.weight; + if (!minAmount) { + minAmount = group.numrange[0]; + } else { + minAmount = Math.min(minAmount, group.numrange[0]); + } + } + const randomValue = Math.random() * totalWeights; // 随机值落在[0, totalWeights) 之间 + let currSum = 0; + for (const group of groups) { + if (currSum <= randomValue && randomValue < currSum + group.weight) { + return { group, minAmount }; + } else { + currSum += group.weight; + } + } + const length = groups.length; + return { group: groups[length - 1], minAmount }; +} + +/** + * 计算玩家分得的钻石数量 + * @param remaining + * @param group + * @param minAmount + */ +function calcDiamondGot(remaining: number, group: diamondWeightGroup, minAmount: number) { + const [min, max] = group.numrange; + const randomAmount = Math.floor(Math.random() * (max - min)) + min + 1; // max 值应能够取到, 故 +1 + // 剩余数额小于组内随机得到的值, 全给吧 + if (randomAmount > remaining) { + return remaining; + } + // 玩家分过后的余额不足给到下一个玩家分配的最小额度, 也把当前剩的全给 + if (remaining - randomAmount < minAmount) { + return remaining; + } + return randomAmount; +} + +export default async function (call: ApiCall) { + const canReceiveResult = await playerCanReceive(call); + if (canReceiveResult) { + if (!canReceiveResult.result) { + return call.succ({ + amount: 0, + timesRemaining: 0 + }); + } + const activityData = canReceiveResult.activityInfo.data; + const remaining = activityData['remaining']? activityData['remaining'] : activityData['totalmoney']; + const { group, minAmount } = randomWithWeight(activityData['groupConf']['arr']); + const gotAmount = calcDiamondGot(remaining, group, minAmount); + // 减去余额 + const filter = { + hdid: call.req.activityId, + $or: [ + {'data.remaining': { $exists: false }}, + {$expr: {$gte: [ `$data.remaining - ${gotAmount}`, 0 ]}}, + ], + }; + const updateDoc = { + $set: { 'data.remaining': `$data.remaining - ${gotAmount}` } + } + const updateResult = await G.mongodb.collection('hdinfo').updateOne(filter, updateDoc); + // 更新成功 + if (updateResult.modifiedCount) { + // 请求返回 + call.succ({ + amount: gotAmount, + timesRemaining: 0 + }); + // 添加玩家领取记录 + const zeroTime = PublicShared.getToDayZeroTime(); + const setObj = {}; + setObj[zeroTime] = gotAmount; + G.mongodb.cEvent('payForDiamond').updateOne({ uid: call.uid }, { + $set: setObj + }); + } + // 发送炫耀 + if (gotAmount >= activityData['groupConf']['base']['loglimit']) { + + } + } +} \ No newline at end of file diff --git a/src/shared/protocols/event/payForDiamond/PtlCanReceive.ts b/src/shared/protocols/event/payForDiamond/PtlCanReceive.ts new file mode 100644 index 0000000..8d905ec --- /dev/null +++ b/src/shared/protocols/event/payForDiamond/PtlCanReceive.ts @@ -0,0 +1,9 @@ +export type ReqCanReceive = { + activityId: number; +}; + +export type ResCanReceive = { + payNum: number; + remaining?: number; + result: boolean; +}; \ No newline at end of file diff --git a/src/shared/protocols/event/payForDiamond/PtlReceive.ts b/src/shared/protocols/event/payForDiamond/PtlReceive.ts new file mode 100644 index 0000000..beb4bf8 --- /dev/null +++ b/src/shared/protocols/event/payForDiamond/PtlReceive.ts @@ -0,0 +1,8 @@ +export type ReqReceive = { + activityId: number; +}; + +export type ResReceive = { + amount: number, + timesRemaining: number; +}; From 2ae2a1362d48b98c2b48df1de1cdb40379a64346 Mon Sep 17 00:00:00 2001 From: chenkai Date: Thu, 21 Dec 2023 20:16:29 +0800 Subject: [PATCH 13/23] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=82=AB?= =?UTF-8?q?=E8=80=80=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/payForDiamond/ApiReceive.ts | 13 +++++++++++-- src/json/pmd.json5 | 4 +++- src/module/collection_event.ts | 5 ++++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/api_s2c/event/payForDiamond/ApiReceive.ts b/src/api_s2c/event/payForDiamond/ApiReceive.ts index 46748ab..ff9748a 100644 --- a/src/api_s2c/event/payForDiamond/ApiReceive.ts +++ b/src/api_s2c/event/payForDiamond/ApiReceive.ts @@ -1,8 +1,8 @@ import { ApiCall } from "tsrpc"; -import { HuoDongFun } from "../../../public/huodongfun"; import { ReqReceive, ResReceive } from '../../../shared/protocols/event/payForDiamond/PtlReceive'; import { playerCanReceive } from './ApiCanReceive'; import { PublicShared } from "../../../shared/public/public"; +import { ChatFun } from "../../../public/chat"; type diamondWeightGroup = { weight: number; @@ -98,7 +98,16 @@ export default async function (call: ApiCall) { } // 发送炫耀 if (gotAmount >= activityData['groupConf']['base']['loglimit']) { - + ChatFun.newMsg({ + type: 'local', + msg: G.gc.pmd.get_hero_star5_pmd, + time: G.time, + sender: 'system', + otherData: { + pmd: true, + args: [gotAmount] + } + }); } } } \ No newline at end of file diff --git a/src/json/pmd.json5 b/src/json/pmd.json5 index 2e0db1c..bd2ec62 100644 --- a/src/json/pmd.json5 +++ b/src/json/pmd.json5 @@ -14,5 +14,7 @@ //黑帮争霸争霸赛第二名 hbzb_pmd2: 'intr_pmd_hbzb2', //黑帮争霸争霸赛第三名 - hbzb_pmd3: 'intr_pmd_hbzb3' + hbzb_pmd3: 'intr_pmd_hbzb3', + // 充值抢钻石 - 抢到大量钻石 + pay_for_diamond: 'intr_pmd_pfd' } \ No newline at end of file diff --git a/src/module/collection_event.ts b/src/module/collection_event.ts index 6681c58..901d3f9 100644 --- a/src/module/collection_event.ts +++ b/src/module/collection_event.ts @@ -50,7 +50,10 @@ export type eventType = { qirichongzhi: Omit; jierihuodong: Omit & { refreshTime: number; }; kaifujingsai: ResOpenKaifujingsai; - zhoumolibao: ResOpenZhoumolibao & { refreshTime: number; } + zhoumolibao: ResOpenZhoumolibao & { refreshTime: number; }; + payForDiamond: { + [time: number]: number[] + } } & { [k: `${number}jijin`]: ResOpenYuedujijin; [k: `yangchengmubiao${number}`]: yangchengmubiao; From 6808b53dd4be10bf64188c46db317ce34b35ffe6 Mon Sep 17 00:00:00 2001 From: chenkai Date: Thu, 21 Dec 2023 20:33:47 +0800 Subject: [PATCH 14/23] =?UTF-8?q?fix:=20=E5=85=81=E8=AE=B8=E7=8E=A9?= =?UTF-8?q?=E5=AE=B6=E9=A2=86=E5=8F=96=E5=88=B0=E7=9A=84=E9=92=BB=E7=9F=B3?= =?UTF-8?q?=E6=95=B0=E5=B0=8F=E4=BA=8E=E9=85=8D=E7=BD=AE=E7=9A=84=E6=9C=80?= =?UTF-8?q?=E4=BD=8E=E6=A1=A3=E4=BD=8D=E9=A2=9D=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/payForDiamond/ApiReceive.ts | 21 +- src/shared/protocols/serviceProto.ts | 670 ++++++++++-------- 2 files changed, 385 insertions(+), 306 deletions(-) diff --git a/src/api_s2c/event/payForDiamond/ApiReceive.ts b/src/api_s2c/event/payForDiamond/ApiReceive.ts index ff9748a..8aaf8e6 100644 --- a/src/api_s2c/event/payForDiamond/ApiReceive.ts +++ b/src/api_s2c/event/payForDiamond/ApiReceive.ts @@ -13,46 +13,35 @@ type diamondWeightGroup = { * @param groups 各分组及其权重 */ function randomWithWeight(groups: diamondWeightGroup[]) { - let minAmount: number; let totalWeights = 0; for (const group of groups) { totalWeights += group.weight; - if (!minAmount) { - minAmount = group.numrange[0]; - } else { - minAmount = Math.min(minAmount, group.numrange[0]); - } } const randomValue = Math.random() * totalWeights; // 随机值落在[0, totalWeights) 之间 let currSum = 0; for (const group of groups) { if (currSum <= randomValue && randomValue < currSum + group.weight) { - return { group, minAmount }; + return group; } else { currSum += group.weight; } } const length = groups.length; - return { group: groups[length - 1], minAmount }; + return groups[length - 1]; } /** * 计算玩家分得的钻石数量 * @param remaining * @param group - * @param minAmount */ -function calcDiamondGot(remaining: number, group: diamondWeightGroup, minAmount: number) { +function calcDiamondGot(remaining: number, group: diamondWeightGroup) { const [min, max] = group.numrange; const randomAmount = Math.floor(Math.random() * (max - min)) + min + 1; // max 值应能够取到, 故 +1 // 剩余数额小于组内随机得到的值, 全给吧 if (randomAmount > remaining) { return remaining; } - // 玩家分过后的余额不足给到下一个玩家分配的最小额度, 也把当前剩的全给 - if (remaining - randomAmount < minAmount) { - return remaining; - } return randomAmount; } @@ -67,8 +56,8 @@ export default async function (call: ApiCall) { } const activityData = canReceiveResult.activityInfo.data; const remaining = activityData['remaining']? activityData['remaining'] : activityData['totalmoney']; - const { group, minAmount } = randomWithWeight(activityData['groupConf']['arr']); - const gotAmount = calcDiamondGot(remaining, group, minAmount); + const group = randomWithWeight(activityData['groupConf']['arr']); + const gotAmount = calcDiamondGot(remaining, group); // 减去余额 const filter = { hdid: call.req.activityId, diff --git a/src/shared/protocols/serviceProto.ts b/src/shared/protocols/serviceProto.ts index c60ab37..5bef3a2 100644 --- a/src/shared/protocols/serviceProto.ts +++ b/src/shared/protocols/serviceProto.ts @@ -68,13 +68,15 @@ import { ReqOpen as ReqOpen_14, ResOpen as ResOpen_14 } from './event/leijichong import { ReqRec as ReqRec_5, ResRec as ResRec_5 } from './event/leijichongzhi/PtlRec'; import { ReqLottery, ResLottery } from './event/niudanji/PtlLottery'; import { ReqOpen as ReqOpen_15, ResOpen as ResOpen_15 } from './event/niudanji/PtlOpen'; +import { ReqCanReceive, ResCanReceive } from './event/payForDiamond/PtlCanReceive'; +import { ReqReceive as ReqReceive_2, ResReceive as ResReceive_2 } from './event/payForDiamond/PtlReceive'; import { ReqOpen as ReqOpen_16, ResOpen as ResOpen_16 } from './event/qirichongzhi/PtlOpen'; import { ReqRec as ReqRec_6, ResRec as ResRec_6 } from './event/qirichongzhi/PtlRec'; import { ReqOpen as ReqOpen_17, ResOpen as ResOpen_17 } from './event/qiridenglu/PtlOpen'; import { ReqRecPrize as ReqRecPrize_1, ResRecPrize as ResRecPrize_1 } from './event/qiridenglu/PtlRecPrize'; import { ReqOpen as ReqOpen_18, ResOpen as ResOpen_18 } from './event/shiwuleichong/PtlOpen'; import { ReqOpen as ReqOpen_19, ResOpen as ResOpen_19 } from './event/shouchong/PtlOpen'; -import { ReqReceive as ReqReceive_2, ResReceive as ResReceive_2 } from './event/shouchong/PtlReceive'; +import { ReqReceive as ReqReceive_3, ResReceive as ResReceive_3 } from './event/shouchong/PtlReceive'; import { ReqBuy as ReqBuy_1, ResBuy as ResBuy_1 } from './event/xianshizhaomu/PtlBuy'; import { ReqDuihuan, ResDuihuan } from './event/xianshizhaomu/PtlDuihuan'; import { ReqLottery as ReqLottery_1, ResLottery as ResLottery_1 } from './event/xianshizhaomu/PtlLottery'; @@ -95,7 +97,7 @@ import { ReqRecPrize as ReqRecPrize_2, ResRecPrize as ResRecPrize_2 } from './ev import { ReqRecTask, ResRecTask } from './event/zhanling/PtlRecTask'; import { ReqOpen as ReqOpen_26, ResOpen as ResOpen_26 } from './event/zhoulibao/PtlOpen'; import { ReqOpen as ReqOpen_27, ResOpen as ResOpen_27 } from './event/zhoumolibao/PtlOpen'; -import { ReqReceive as ReqReceive_3, ResReceive as ResReceive_3 } from './event/zhoumolibao/PtlReceive'; +import { ReqReceive as ReqReceive_4, ResReceive as ResReceive_4 } from './event/zhoumolibao/PtlReceive'; import { ReqBuy as ReqBuy_3, ResBuy as ResBuy_3 } from './event/zixuanlibao/PtlBuy'; import { ReqOpen as ReqOpen_28, ResOpen as ResOpen_28 } from './event/zixuanlibao/PtlOpen'; import { ReqhdGetList, ReshdGetList } from './eventlist/PtlhdGetList'; @@ -185,10 +187,10 @@ import { ReqBuyFightNum, ResBuyFightNum } from './jjc/PtlBuyFightNum'; import { ReqFight as ReqFight_5, ResFight as ResFight_5 } from './jjc/PtlFight'; import { ReqFightLog, ResFightLog } from './jjc/PtlFightLog'; import { ReqOpen as ReqOpen_40, ResOpen as ResOpen_40 } from './jjc/PtlOpen'; -import { ReqReceive as ReqReceive_4, ResReceive as ResReceive_4 } from './jjc/PtlReceive'; +import { ReqReceive as ReqReceive_5, ResReceive as ResReceive_5 } from './jjc/PtlReceive'; import { ReqRefresh as ReqRefresh_4, ResRefresh as ResRefresh_4 } from './jjc/PtlRefresh'; import { ReqOpen as ReqOpen_41, ResOpen as ResOpen_41 } from './kaifujingsai/PtlOpen'; -import { ReqReceive as ReqReceive_5, ResReceive as ResReceive_5 } from './kaifujingsai/PtlReceive'; +import { ReqReceive as ReqReceive_6, ResReceive as ResReceive_6 } from './kaifujingsai/PtlReceive'; import { ReqApply as ReqApply_2, ResApply as ResApply_2 } from './kbzz/PtlApply'; import { ReqAutoApply, ResAutoApply } from './kbzz/PtlAutoApply'; import { ReqBuyNum as ReqBuyNum_3, ResBuyNum as ResBuyNum_3 } from './kbzz/PtlBuyNum'; @@ -296,7 +298,7 @@ import { ReqFastGuaJi, ResFastGuaJi } from './tanxian/PtlFastGuaJi'; import { ReqFight as ReqFight_11, ResFight as ResFight_11 } from './tanxian/PtlFight'; import { ReqGuaJi, ResGuaJi } from './tanxian/PtlGuaJi'; import { ReqOpen as ReqOpen_54, ResOpen as ResOpen_54 } from './tanxian/PtlOpen'; -import { ReqReceive as ReqReceive_6, ResReceive as ResReceive_6 } from './tanxian/PtlReceive'; +import { ReqReceive as ReqReceive_7, ResReceive as ResReceive_7 } from './tanxian/PtlReceive'; import { ReqAllFinsh, ResAllFinsh } from './task/PtlAllFinsh'; import { ReqFinsh, ResFinsh } from './task/PtlFinsh'; import { ReqOpen as ReqOpen_55, ResOpen as ResOpen_55 } from './task/PtlOpen'; @@ -335,7 +337,7 @@ import { ReqGet as ReqGet_3, ResGet as ResGet_3 } from './xstask/PtlGet'; import { ReqLvUp as ReqLvUp_4, ResLvUp as ResLvUp_4 } from './xstask/PtlLvUp'; import { ReqOnekeyReceive, ResOnekeyReceive } from './xstask/PtlOnekeyReceive'; import { ReqOpen as ReqOpen_58, ResOpen as ResOpen_58 } from './xstask/PtlOpen'; -import { ReqReceive as ReqReceive_7, ResReceive as ResReceive_7 } from './xstask/PtlReceive'; +import { ReqReceive as ReqReceive_8, ResReceive as ResReceive_8 } from './xstask/PtlReceive'; import { ReqRefresh as ReqRefresh_8, ResRefresh as ResRefresh_8 } from './xstask/PtlRefresh'; import { ReqHandle, ResHandle } from './yongbingzhuzhan/PtlHandle'; import { ReqChangePos as ReqChangePos_1, ResChangePos as ResChangePos_1 } from './zhanqianbushu/PtlChangePos'; @@ -620,6 +622,14 @@ export interface ServiceType { req: ReqOpen_15, res: ResOpen_15 }, + "event/payForDiamond/CanReceive": { + req: ReqCanReceive, + res: ResCanReceive + }, + "event/payForDiamond/Receive": { + req: ReqReceive_2, + res: ResReceive_2 + }, "event/qirichongzhi/Open": { req: ReqOpen_16, res: ResOpen_16 @@ -645,8 +655,8 @@ export interface ServiceType { res: ResOpen_19 }, "event/shouchong/Receive": { - req: ReqReceive_2, - res: ResReceive_2 + req: ReqReceive_3, + res: ResReceive_3 }, "event/xianshizhaomu/Buy": { req: ReqBuy_1, @@ -729,8 +739,8 @@ export interface ServiceType { res: ResOpen_27 }, "event/zhoumolibao/Receive": { - req: ReqReceive_3, - res: ResReceive_3 + req: ReqReceive_4, + res: ResReceive_4 }, "event/zixuanlibao/Buy": { req: ReqBuy_3, @@ -1089,8 +1099,8 @@ export interface ServiceType { res: ResOpen_40 }, "jjc/Receive": { - req: ReqReceive_4, - res: ResReceive_4 + req: ReqReceive_5, + res: ResReceive_5 }, "jjc/Refresh": { req: ReqRefresh_4, @@ -1101,8 +1111,8 @@ export interface ServiceType { res: ResOpen_41 }, "kaifujingsai/Receive": { - req: ReqReceive_5, - res: ResReceive_5 + req: ReqReceive_6, + res: ResReceive_6 }, "kbzz/Apply": { req: ReqApply_2, @@ -1421,8 +1431,8 @@ export interface ServiceType { res: ResOpen_54 }, "tanxian/Receive": { - req: ReqReceive_6, - res: ResReceive_6 + req: ReqReceive_7, + res: ResReceive_7 }, "task/AllFinsh": { req: ReqAllFinsh, @@ -1577,8 +1587,8 @@ export interface ServiceType { res: ResOpen_58 }, "xstask/Receive": { - req: ReqReceive_7, - res: ResReceive_7 + req: ReqReceive_8, + res: ResReceive_8 }, "xstask/Refresh": { req: ReqRefresh_8, @@ -1982,101 +1992,111 @@ export const serviceProto: ServiceProto = { }, { "id": 69, - "name": "event/qirichongzhi/Open", + "name": "event/payForDiamond/CanReceive", "type": "api" }, { "id": 70, - "name": "event/qirichongzhi/Rec", + "name": "event/payForDiamond/Receive", "type": "api" }, { "id": 71, - "name": "event/qiridenglu/Open", + "name": "event/qirichongzhi/Open", "type": "api" }, { "id": 72, - "name": "event/qiridenglu/RecPrize", + "name": "event/qirichongzhi/Rec", "type": "api" }, { "id": 73, - "name": "event/shiwuleichong/Open", + "name": "event/qiridenglu/Open", "type": "api" }, { "id": 74, - "name": "event/shouchong/Open", + "name": "event/qiridenglu/RecPrize", "type": "api" }, { "id": 75, - "name": "event/shouchong/Receive", + "name": "event/shiwuleichong/Open", "type": "api" }, { "id": 76, - "name": "event/xianshizhaomu/Buy", + "name": "event/shouchong/Open", "type": "api" }, { "id": 77, - "name": "event/xianshizhaomu/Duihuan", + "name": "event/shouchong/Receive", "type": "api" }, { "id": 78, - "name": "event/xianshizhaomu/Lottery", + "name": "event/xianshizhaomu/Buy", "type": "api" }, { "id": 79, - "name": "event/xianshizhaomu/Open", + "name": "event/xianshizhaomu/Duihuan", "type": "api" }, { "id": 80, - "name": "event/xianshizhaomu/Rec", + "name": "event/xianshizhaomu/Lottery", "type": "api" }, { "id": 81, - "name": "event/xinshoulibao/Open", + "name": "event/xianshizhaomu/Open", "type": "api" }, { "id": 82, - "name": "event/yangchengmubiao/Buy", + "name": "event/xianshizhaomu/Rec", "type": "api" }, { "id": 83, - "name": "event/yangchengmubiao/Open", + "name": "event/xinshoulibao/Open", "type": "api" }, { "id": 84, - "name": "event/yangchengmubiao/Rec", + "name": "event/yangchengmubiao/Buy", "type": "api" }, { "id": 85, - "name": "event/yibaichou/Open", + "name": "event/yangchengmubiao/Open", "type": "api" }, { "id": 86, - "name": "event/yibaichou/Rec", + "name": "event/yangchengmubiao/Rec", "type": "api" }, { "id": 87, - "name": "event/yibaichou/RecAll", + "name": "event/yibaichou/Open", "type": "api" }, { "id": 88, + "name": "event/yibaichou/Rec", + "type": "api" + }, + { + "id": 89, + "name": "event/yibaichou/RecAll", + "type": "api" + }, + { + "id": 90, "name": "event/yuedujijin/Open", "type": "api", "conf": { @@ -2084,157 +2104,157 @@ export const serviceProto: ServiceProto = { } }, { - "id": 89, + "id": 91, "name": "event/yuedujijin/Rec", "type": "api" }, { - "id": 90, + "id": 92, "name": "event/zhanling/BuyLv", "type": "api" }, { - "id": 91, + "id": 93, "name": "event/zhanling/Open", "type": "api" }, { - "id": 92, + "id": 94, "name": "event/zhanling/RecPrize", "type": "api" }, { - "id": 93, + "id": 95, "name": "event/zhanling/RecTask", "type": "api" }, { - "id": 94, + "id": 96, "name": "event/zhoulibao/Open", "type": "api" }, { - "id": 95, + "id": 97, "name": "event/zhoumolibao/Open", "type": "api" }, { - "id": 96, + "id": 98, "name": "event/zhoumolibao/Receive", "type": "api" }, { - "id": 97, + "id": 99, "name": "event/zixuanlibao/Buy", "type": "api" }, { - "id": 98, + "id": 100, "name": "event/zixuanlibao/Open", "type": "api" }, { - "id": 99, + "id": 101, "name": "eventlist/hdGetList", "type": "api" }, { - "id": 100, + "id": 102, "name": "friend/Apply", "type": "api" }, { - "id": 101, + "id": 103, "name": "friend/Del", "type": "api" }, { - "id": 102, + "id": 104, "name": "friend/Gift", "type": "api" }, { - "id": 103, + "id": 105, "name": "friend/List", "type": "api" }, { - "id": 104, + "id": 106, "name": "friend/Open", "type": "api" }, { - "id": 105, + "id": 107, "name": "friend/Respond", "type": "api" }, { - "id": 106, + "id": 108, "name": "friend/RmBlackList", "type": "api" }, { - "id": 107, + "id": 109, "name": "friend/Search", "type": "api" }, { - "id": 108, + "id": 110, "name": "ganbutexun/Challenge", "type": "api" }, { - "id": 109, + "id": 111, "name": "ganbutexun/Open", "type": "api" }, { - "id": 110, + "id": 112, "name": "ganhai/Fast", "type": "api" }, { - "id": 111, + "id": 113, "name": "ganhai/Fight", "type": "api" }, { - "id": 112, + "id": 114, "name": "ganhai/Log", "type": "api" }, { - "id": 113, + "id": 115, "name": "ganhai/Open", "type": "api" }, { - "id": 114, + "id": 116, "name": "ganhai/Refresh", "type": "api" }, { - "id": 115, + "id": 117, "name": "ganhai/RefreshShip", "type": "api" }, { - "id": 116, + "id": 118, "name": "ganhai/Select", "type": "api" }, { - "id": 117, + "id": 119, "name": "gmapi/Gift", "type": "api" }, { - "id": 118, + "id": 120, "name": "gmapi/Post", "type": "api" }, { - "id": 119, + "id": 121, "name": "gonghui/Apply", "type": "api", "conf": { @@ -2244,7 +2264,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 120, + "id": 122, "name": "gonghui/ApplyAll", "type": "api", "conf": { @@ -2254,7 +2274,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 121, + "id": 123, "name": "gonghui/ApplyList", "type": "api", "conf": { @@ -2264,7 +2284,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 122, + "id": 124, "name": "gonghui/Change", "type": "api", "conf": { @@ -2274,12 +2294,12 @@ export const serviceProto: ServiceProto = { } }, { - "id": 123, + "id": 125, "name": "gonghui/Create", "type": "api" }, { - "id": 124, + "id": 126, "name": "gonghui/Dissolve", "type": "api", "conf": { @@ -2289,7 +2309,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 125, + "id": 127, "name": "gonghui/Exit", "type": "api", "conf": { @@ -2299,12 +2319,12 @@ export const serviceProto: ServiceProto = { } }, { - "id": 126, + "id": 128, "name": "gonghui/FbBuyNum", "type": "api" }, { - "id": 127, + "id": 129, "name": "gonghui/FbFight", "type": "api", "conf": { @@ -2314,7 +2334,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 128, + "id": 130, "name": "gonghui/FbOpen", "type": "api", "conf": { @@ -2324,17 +2344,17 @@ export const serviceProto: ServiceProto = { } }, { - "id": 129, + "id": 131, "name": "gonghui/GetList", "type": "api" }, { - "id": 130, + "id": 132, "name": "gonghui/Join", "type": "api" }, { - "id": 131, + "id": 133, "name": "gonghui/Jx", "type": "api", "conf": { @@ -2344,7 +2364,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 132, + "id": 134, "name": "gonghui/JxOpen", "type": "api", "conf": { @@ -2354,7 +2374,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 133, + "id": 135, "name": "gonghui/List", "type": "api", "conf": { @@ -2364,7 +2384,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 134, + "id": 136, "name": "gonghui/Manage", "type": "api", "conf": { @@ -2374,7 +2394,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 135, + "id": 137, "name": "gonghui/Open", "type": "api", "conf": { @@ -2384,7 +2404,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 136, + "id": 138, "name": "gonghui/TanHe", "type": "api", "conf": { @@ -2394,7 +2414,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 137, + "id": 139, "name": "gonghui/TaskOpen", "type": "api", "conf": { @@ -2404,7 +2424,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 138, + "id": 140, "name": "gonghui/TaskReceive", "type": "api", "conf": { @@ -2414,7 +2434,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 139, + "id": 141, "name": "gonghui/UpWz", "type": "api", "conf": { @@ -2424,137 +2444,137 @@ export const serviceProto: ServiceProto = { } }, { - "id": 140, + "id": 142, "name": "gonghuibaozang/Lottery", "type": "api" }, { - "id": 141, + "id": 143, "name": "gonghuibaozang/Open", "type": "api" }, { - "id": 142, + "id": 144, "name": "gonglukuangbiao/Buy", "type": "api" }, { - "id": 143, + "id": 145, "name": "gonglukuangbiao/Fight", "type": "api" }, { - "id": 144, + "id": 146, "name": "gonglukuangbiao/Open", "type": "api" }, { - "id": 145, + "id": 147, "name": "gonglukuangbiao/Refresh", "type": "api" }, { - "id": 146, + "id": 148, "name": "gongyu/mingdao/Active", "type": "api" }, { - "id": 147, + "id": 149, "name": "gongyu/mingdao/Open", "type": "api" }, { - "id": 148, + "id": 150, "name": "gongyu/mingdao/RecPrize", "type": "api" }, { - "id": 149, + "id": 151, "name": "gongyu/mingdao/Repair", "type": "api" }, { - "id": 150, + "id": 152, "name": "gongyu/xunlianjihua/Reset", "type": "api" }, { - "id": 151, + "id": 153, "name": "gongyu/xunlianjihua/UpSkill", "type": "api" }, { - "id": 152, + "id": 154, "name": "gongyu/zuozhanjihua/SetSkill", "type": "api" }, { - "id": 153, + "id": 155, "name": "hbzb/jfs/BuyNum", "type": "api" }, { - "id": 154, + "id": 156, "name": "hbzb/jfs/Fight", "type": "api" }, { - "id": 155, + "id": 157, "name": "hbzb/jfs/GetLog", "type": "api" }, { - "id": 156, + "id": 158, "name": "hbzb/jfs/Open", "type": "api" }, { - "id": 157, + "id": 159, "name": "hbzb/jfs/Rec", "type": "api" }, { - "id": 158, + "id": 160, "name": "hbzb/jfs/Refresh", "type": "api" }, { - "id": 159, + "id": 161, "name": "hbzb/GetStatus", "type": "api" }, { - "id": 160, + "id": 162, "name": "hbzb/zbs/BuyNum", "type": "api" }, { - "id": 161, + "id": 163, "name": "hbzb/zbs/Fight", "type": "api" }, { - "id": 162, + "id": 164, "name": "hbzb/zbs/GetLog", "type": "api" }, { - "id": 163, + "id": 165, "name": "hbzb/zbs/Open", "type": "api" }, { - "id": 164, + "id": 166, "name": "hbzb/zbs/Refresh", "type": "api" }, { - "id": 165, + "id": 167, "name": "hero/Awake", "type": "api" }, { - "id": 166, + "id": 168, "name": "hero/ChangePos", "type": "api", "conf": { @@ -2562,17 +2582,17 @@ export const serviceProto: ServiceProto = { } }, { - "id": 167, + "id": 169, "name": "hero/GetList", "type": "api" }, { - "id": 168, + "id": 170, "name": "hero/JinJie", "type": "api" }, { - "id": 169, + "id": 171, "name": "hero/LvUp", "type": "api", "conf": { @@ -2580,32 +2600,32 @@ export const serviceProto: ServiceProto = { } }, { - "id": 170, + "id": 172, "name": "hero/Potency", "type": "api" }, { - "id": 171, + "id": 173, "name": "hero/Rec", "type": "api" }, { - "id": 172, + "id": 174, "name": "hero/Reset", "type": "api" }, { - "id": 173, + "id": 175, "name": "hero/Talent", "type": "api" }, { - "id": 174, + "id": 176, "name": "hero/WeaponUp", "type": "api" }, { - "id": 175, + "id": 177, "name": "hongdian/Get", "type": "api", "conf": { @@ -2613,117 +2633,117 @@ export const serviceProto: ServiceProto = { } }, { - "id": 176, + "id": 178, "name": "item/GetList", "type": "api" }, { - "id": 177, + "id": 179, "name": "item/Use", "type": "api" }, { - "id": 178, + "id": 180, "name": "jiaotang/Lottery", "type": "api" }, { - "id": 179, + "id": 181, "name": "jiaotang/Open", "type": "api" }, { - "id": 180, + "id": 182, "name": "jiuba/Lottery", "type": "api" }, { - "id": 181, + "id": 183, "name": "jiuba/Open", "type": "api" }, { - "id": 182, + "id": 184, "name": "jjc/BuyFightNum", "type": "api" }, { - "id": 183, + "id": 185, "name": "jjc/Fight", "type": "api" }, { - "id": 184, + "id": 186, "name": "jjc/FightLog", "type": "api" }, { - "id": 185, + "id": 187, "name": "jjc/Open", "type": "api" }, { - "id": 186, + "id": 188, "name": "jjc/Receive", "type": "api" }, { - "id": 187, + "id": 189, "name": "jjc/Refresh", "type": "api" }, { - "id": 188, + "id": 190, "name": "kaifujingsai/Open", "type": "api" }, { - "id": 189, + "id": 191, "name": "kaifujingsai/Receive", "type": "api" }, { - "id": 190, + "id": 192, "name": "kbzz/Apply", "type": "api" }, { - "id": 191, + "id": 193, "name": "kbzz/AutoApply", "type": "api" }, { - "id": 192, + "id": 194, "name": "kbzz/BuyNum", "type": "api" }, { - "id": 193, + "id": 195, "name": "kbzz/Fight", "type": "api" }, { - "id": 194, + "id": 196, "name": "kbzz/FightLog", "type": "api" }, { - "id": 195, + "id": 197, "name": "kbzz/GroupState", "type": "api" }, { - "id": 196, + "id": 198, "name": "kbzz/Open", "type": "api" }, { - "id": 197, + "id": 199, "name": "kbzz/RecPrize", "type": "api" }, { - "id": 198, + "id": 200, "name": "kbzz/Refresh", "type": "api", "conf": { @@ -2731,282 +2751,282 @@ export const serviceProto: ServiceProto = { } }, { - "id": 199, + "id": 201, "name": "kuangdong/AddPkNum", "type": "api" }, { - "id": 200, + "id": 202, "name": "kuangdong/GetPrize", "type": "api" }, { - "id": 201, + "id": 203, "name": "kuangdong/KdInfo", "type": "api" }, { - "id": 202, + "id": 204, "name": "kuangdong/Log", "type": "api" }, { - "id": 203, + "id": 205, "name": "kuangdong/Open", "type": "api" }, { - "id": 204, + "id": 206, "name": "kuangdong/YanShi", "type": "api" }, { - "id": 205, + "id": 207, "name": "kuangdong/ZhanLing", "type": "api" }, { - "id": 206, + "id": 208, "name": "lingzhulaixi/Open", "type": "api" }, { - "id": 207, + "id": 209, "name": "lingzhulaixi/PkBoss", "type": "api" }, { - "id": 208, + "id": 210, "name": "lingzhulaixi/PkRank", "type": "api" }, { - "id": 209, + "id": 211, "name": "lingzhulaixi/SaoDang", "type": "api" }, { - "id": 210, + "id": 212, "name": "meirishilian/Buy", "type": "api" }, { - "id": 211, + "id": 213, "name": "meirishilian/Fight", "type": "api" }, { - "id": 212, + "id": 214, "name": "meirishilian/Open", "type": "api" }, { - "id": 213, + "id": 215, "name": "msg_c2s/BindUid", "type": "msg" }, { - "id": 214, + "id": 216, "name": "msg_c2s/Pay", "type": "msg" }, { - "id": 215, + "id": 217, "name": "msg_c2s/Sync", "type": "msg" }, { - "id": 216, + "id": 218, "name": "msg_s2c/Chat", "type": "msg" }, { - "id": 217, + "id": 219, "name": "msg_s2c/ChatHelp", "type": "msg" }, { - "id": 218, + "id": 220, "name": "msg_s2c/Collection", "type": "msg" }, { - "id": 219, + "id": 221, "name": "msg_s2c/Email", "type": "msg" }, { - "id": 220, + "id": 222, "name": "msg_s2c/EmailDel", "type": "msg" }, { - "id": 221, + "id": 223, "name": "msg_s2c/EquipChange", "type": "msg" }, { - "id": 222, + "id": 224, "name": "msg_s2c/Friend", "type": "msg" }, { - "id": 223, + "id": 225, "name": "msg_s2c/GhChange", "type": "msg" }, { - "id": 224, + "id": 226, "name": "msg_s2c/GongHuiBaoZang", "type": "msg" }, { - "id": 225, + "id": 227, "name": "msg_s2c/HeroChange", "type": "msg" }, { - "id": 226, + "id": 228, "name": "msg_s2c/HongDianChange", "type": "msg" }, { - "id": 227, + "id": 229, "name": "msg_s2c/ItemChange", "type": "msg" }, { - "id": 228, + "id": 230, "name": "msg_s2c/LoginQueue", "type": "msg" }, { - "id": 229, + "id": 231, "name": "msg_s2c/LshdChange", "type": "msg" }, { - "id": 230, + "id": 232, "name": "msg_s2c/NewDay", "type": "msg" }, { - "id": 231, + "id": 233, "name": "msg_s2c/OtherLogin", "type": "msg" }, { - "id": 232, + "id": 234, "name": "msg_s2c/PayChange", "type": "msg" }, { - "id": 233, + "id": 235, "name": "msg_s2c/PayResult", "type": "msg" }, { - "id": 234, + "id": 236, "name": "msg_s2c/PeijianChange", "type": "msg" }, { - "id": 235, + "id": 237, "name": "msg_s2c/PlayerChange", "type": "msg" }, { - "id": 236, + "id": 238, "name": "msg_s2c/Private", "type": "msg" }, { - "id": 237, + "id": 239, "name": "msg_s2c/SendGift", "type": "msg" }, { - "id": 238, + "id": 240, "name": "msg_s2c/ShiwuChange", "type": "msg" }, { - "id": 239, + "id": 241, "name": "msg_s2c/TaskChange", "type": "msg" }, { - "id": 240, + "id": 242, "name": "msg_s2c/Xianshilibao", "type": "msg" }, { - "id": 241, + "id": 243, "name": "pata/Fight", "type": "api" }, { - "id": 242, + "id": 244, "name": "pata/GetPrize", "type": "api" }, { - "id": 243, + "id": 245, "name": "pata/Open", "type": "api" }, { - "id": 244, + "id": 246, "name": "pata/SaoDang", "type": "api" }, { - "id": 245, + "id": 247, "name": "pay/GetList", "type": "api" }, { - "id": 246, + "id": 248, "name": "peijian/GetList", "type": "api" }, { - "id": 247, + "id": 249, "name": "peijian/JingLian", "type": "api" }, { - "id": 248, + "id": 250, "name": "peijian/JinJie", "type": "api" }, { - "id": 249, + "id": 251, "name": "peijian/LvUp", "type": "api" }, { - "id": 250, + "id": 252, "name": "peijian/OneKeyLvUp", "type": "api" }, { - "id": 251, + "id": 253, "name": "peijian/OneKeyWear", "type": "api" }, { - "id": 252, + "id": 254, "name": "peijian/Reset", "type": "api" }, { - "id": 253, + "id": 255, "name": "peijian/Rm", "type": "api" }, { - "id": 254, + "id": 256, "name": "peijian/TakeOff", "type": "api", "conf": { @@ -3014,32 +3034,32 @@ export const serviceProto: ServiceProto = { } }, { - "id": 255, + "id": 257, "name": "peijian/UnLock", "type": "api" }, { - "id": 256, + "id": 258, "name": "peijian/Wear", "type": "api" }, { - "id": 257, + "id": 259, "name": "peijiancangku/Deal", "type": "api" }, { - "id": 258, + "id": 260, "name": "peijiancangku/Jump", "type": "api" }, { - "id": 259, + "id": 261, "name": "peijiancangku/Open", "type": "api" }, { - "id": 260, + "id": 262, "name": "Bingo", "type": "api", "conf": { @@ -3047,137 +3067,137 @@ export const serviceProto: ServiceProto = { } }, { - "id": 261, + "id": 263, "name": "FightTest", "type": "api" }, { - "id": 262, + "id": 264, "name": "SyncBtn", "type": "api" }, { - "id": 263, + "id": 265, "name": "Test", "type": "api" }, { - "id": 264, + "id": 266, "name": "qjzzd/Fight", "type": "api" }, { - "id": 265, + "id": 267, "name": "qjzzd/Open", "type": "api" }, { - "id": 266, + "id": 268, "name": "rank/Open", "type": "api" }, { - "id": 267, + "id": 269, "name": "shiwu/Concise", "type": "api" }, { - "id": 268, + "id": 270, "name": "shiwu/Extract", "type": "api" }, { - "id": 269, + "id": 271, "name": "shiwu/GetList", "type": "api" }, { - "id": 270, + "id": 272, "name": "shiwu/LvUp", "type": "api" }, { - "id": 271, + "id": 273, "name": "shiwu/Recast", "type": "api" }, { - "id": 272, + "id": 274, "name": "shiwu/TakeOff", "type": "api" }, { - "id": 273, + "id": 275, "name": "shiwu/Wear", "type": "api" }, { - "id": 274, + "id": 276, "name": "shootGame/Open", "type": "api" }, { - "id": 275, + "id": 277, "name": "shootGame/Rec", "type": "api" }, { - "id": 276, + "id": 278, "name": "shop/Buy", "type": "api" }, { - "id": 277, + "id": 279, "name": "shop/Open", "type": "api" }, { - "id": 278, + "id": 280, "name": "shop/Refresh", "type": "api" }, { - "id": 279, + "id": 281, "name": "sign/GetBoxPrize", "type": "api" }, { - "id": 280, + "id": 282, "name": "sign/GetPrize", "type": "api" }, { - "id": 281, + "id": 283, "name": "sign/Open", "type": "api" }, { - "id": 282, + "id": 284, "name": "slzd/Aim", "type": "api" }, { - "id": 283, + "id": 285, "name": "slzd/BuyNum", "type": "api" }, { - "id": 284, + "id": 286, "name": "slzd/Fight", "type": "api" }, { - "id": 285, + "id": 287, "name": "slzd/FightLog", "type": "api" }, { - "id": 286, + "id": 288, "name": "slzd/MyRank", "type": "api" }, { - "id": 287, + "id": 289, "name": "slzd/Open", "type": "api", "conf": { @@ -3187,77 +3207,77 @@ export const serviceProto: ServiceProto = { } }, { - "id": 288, + "id": 290, "name": "slzd/OpenFort", "type": "api" }, { - "id": 289, + "id": 291, "name": "slzd/Rec", "type": "api" }, { - "id": 290, + "id": 292, "name": "slzd/Refresh", "type": "api" }, { - "id": 291, + "id": 293, "name": "slzd/Slot", "type": "api" }, { - "id": 292, + "id": 294, "name": "tanxian/Event", "type": "api" }, { - "id": 293, + "id": 295, "name": "tanxian/FastGuaJi", "type": "api" }, { - "id": 294, + "id": 296, "name": "tanxian/Fight", "type": "api" }, { - "id": 295, + "id": 297, "name": "tanxian/GuaJi", "type": "api" }, { - "id": 296, + "id": 298, "name": "tanxian/Open", "type": "api" }, { - "id": 297, + "id": 299, "name": "tanxian/Receive", "type": "api" }, { - "id": 298, + "id": 300, "name": "task/AllFinsh", "type": "api" }, { - "id": 299, + "id": 301, "name": "task/Finsh", "type": "api" }, { - "id": 300, + "id": 302, "name": "task/Open", "type": "api" }, { - "id": 301, + "id": 303, "name": "user/CDKEY", "type": "api" }, { - "id": 302, + "id": 304, "name": "user/ChangeInfo", "type": "api", "conf": { @@ -3265,197 +3285,197 @@ export const serviceProto: ServiceProto = { } }, { - "id": 303, + "id": 305, "name": "user/ChangeName", "type": "api" }, { - "id": 304, + "id": 306, "name": "user/Fight", "type": "api" }, { - "id": 305, + "id": 307, "name": "user/GetInfo", "type": "api" }, { - "id": 306, + "id": 308, "name": "user/InfoOpen", "type": "api" }, { - "id": 307, + "id": 309, "name": "user/Login", "type": "api" }, { - "id": 308, + "id": 310, "name": "user/Ping", "type": "api" }, { - "id": 309, + "id": 311, "name": "user/Renown", "type": "api" }, { - "id": 310, + "id": 312, "name": "user/RenownBuy", "type": "api" }, { - "id": 311, + "id": 313, "name": "user/RenownGetPrize", "type": "api" }, { - "id": 312, + "id": 314, "name": "user/RenownOpen", "type": "api" }, { - "id": 313, + "id": 315, "name": "user/Tujian", "type": "api" }, { - "id": 314, + "id": 316, "name": "weixiuchang/Decompose", "type": "api" }, { - "id": 315, + "id": 317, "name": "weixiuchang/Exchange", "type": "api" }, { - "id": 316, + "id": 318, "name": "weixiuchang/Open", "type": "api" }, { - "id": 317, + "id": 319, "name": "weixiuchang/UpLv", "type": "api" }, { - "id": 318, + "id": 320, "name": "weixiuchang/UpStar", "type": "api" }, { - "id": 319, + "id": 321, "name": "wzry/AutoBaoMing", "type": "api" }, { - "id": 320, + "id": 322, "name": "wzry/BaoMing", "type": "api" }, { - "id": 321, + "id": 323, "name": "wzry/catFightLog", "type": "api" }, { - "id": 322, + "id": 324, "name": "wzry/CatGroup", "type": "api" }, { - "id": 323, + "id": 325, "name": "wzry/DldFight", "type": "api" }, { - "id": 324, + "id": 326, "name": "wzry/DldRefre", "type": "api" }, { - "id": 325, + "id": 327, "name": "wzry/JingCai", "type": "api" }, { - "id": 326, + "id": 328, "name": "wzry/JingCaiOpen", "type": "api" }, { - "id": 327, + "id": 329, "name": "wzry/Open", "type": "api" }, { - "id": 328, + "id": 330, "name": "wzry/UpdateFight", "type": "api" }, { - "id": 329, + "id": 331, "name": "wzry/Wzzd", "type": "api" }, { - "id": 330, + "id": 332, "name": "wzry/ZuanShiOpen", "type": "api" }, { - "id": 331, + "id": 333, "name": "xstask/AllGet", "type": "api" }, { - "id": 332, + "id": 334, "name": "xstask/Get", "type": "api" }, { - "id": 333, + "id": 335, "name": "xstask/LvUp", "type": "api" }, { - "id": 334, + "id": 336, "name": "xstask/OnekeyReceive", "type": "api" }, { - "id": 335, + "id": 337, "name": "xstask/Open", "type": "api" }, { - "id": 336, + "id": 338, "name": "xstask/Receive", "type": "api" }, { - "id": 337, + "id": 339, "name": "xstask/Refresh", "type": "api" }, { - "id": 338, + "id": 340, "name": "yongbingzhuzhan/Handle", "type": "api" }, { - "id": 339, + "id": 341, "name": "zhanqianbushu/ChangePos", "type": "api" }, { - "id": 340, + "id": 342, "name": "zhanqianbushu/Select", "type": "api" }, { - "id": 341, + "id": 343, "name": "zhanqianbushu/Up", "type": "api" } @@ -10085,6 +10105,76 @@ export const serviceProto: ServiceProto = { } ] }, + "event/payForDiamond/PtlCanReceive/ReqCanReceive": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "activityId", + "type": { + "type": "Number" + } + } + ] + }, + "event/payForDiamond/PtlCanReceive/ResCanReceive": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "payNum", + "type": { + "type": "Number" + } + }, + { + "id": 1, + "name": "remaining", + "type": { + "type": "Number" + }, + "optional": true + }, + { + "id": 2, + "name": "result", + "type": { + "type": "Boolean" + } + } + ] + }, + "event/payForDiamond/PtlReceive/ReqReceive": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "activityId", + "type": { + "type": "Number" + } + } + ] + }, + "event/payForDiamond/PtlReceive/ResReceive": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "amount", + "type": { + "type": "Number" + } + }, + { + "id": 1, + "name": "timesRemaining", + "type": { + "type": "Number" + } + } + ] + }, "event/qirichongzhi/PtlOpen/ReqOpen": { "type": "Interface" }, From ba8653dca98515047b940363e9c9e8487c9f999c Mon Sep 17 00:00:00 2001 From: chenkai Date: Thu, 21 Dec 2023 21:08:22 +0800 Subject: [PATCH 15/23] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E9=A2=86?= =?UTF-8?q?=E5=8F=96=E6=95=B0=E9=A2=9D=E7=9A=84=E6=9C=80=E5=A4=A7=E5=80=BC?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/payForDiamond/ApiReceive.ts | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/api_s2c/event/payForDiamond/ApiReceive.ts b/src/api_s2c/event/payForDiamond/ApiReceive.ts index 8aaf8e6..aaf8a56 100644 --- a/src/api_s2c/event/payForDiamond/ApiReceive.ts +++ b/src/api_s2c/event/payForDiamond/ApiReceive.ts @@ -13,35 +13,46 @@ type diamondWeightGroup = { * @param groups 各分组及其权重 */ function randomWithWeight(groups: diamondWeightGroup[]) { + let maxAmount: number; let totalWeights = 0; for (const group of groups) { totalWeights += group.weight; + if (!maxAmount) { + maxAmount = group.numrange[1]; + } else { + maxAmount = Math.min(maxAmount, group.numrange[1]); + } } const randomValue = Math.random() * totalWeights; // 随机值落在[0, totalWeights) 之间 let currSum = 0; for (const group of groups) { if (currSum <= randomValue && randomValue < currSum + group.weight) { - return group; + return { group, maxAmount }; } else { currSum += group.weight; } } const length = groups.length; - return groups[length - 1]; + return { group: groups[length - 1], maxAmount }; } /** * 计算玩家分得的钻石数量 * @param remaining * @param group + * @param maxAmount */ -function calcDiamondGot(remaining: number, group: diamondWeightGroup) { +function calcDiamondGot(remaining: number, group: diamondWeightGroup, maxAmount: number) { const [min, max] = group.numrange; const randomAmount = Math.floor(Math.random() * (max - min)) + min + 1; // max 值应能够取到, 故 +1 // 剩余数额小于组内随机得到的值, 全给吧 if (randomAmount > remaining) { return remaining; } + // 随机值大于最大值, 取最大值 + if (randomAmount > maxAmount) { + return maxAmount; + } return randomAmount; } @@ -56,8 +67,8 @@ export default async function (call: ApiCall) { } const activityData = canReceiveResult.activityInfo.data; const remaining = activityData['remaining']? activityData['remaining'] : activityData['totalmoney']; - const group = randomWithWeight(activityData['groupConf']['arr']); - const gotAmount = calcDiamondGot(remaining, group); + const { group, maxAmount } = randomWithWeight(activityData['groupConf']['arr']); + const gotAmount = calcDiamondGot(remaining, group, maxAmount); // 减去余额 const filter = { hdid: call.req.activityId, From 2fc85853dc31131a9f20e28765dcf0b9aeed0c30 Mon Sep 17 00:00:00 2001 From: chenkai Date: Thu, 21 Dec 2023 21:14:13 +0800 Subject: [PATCH 16/23] =?UTF-8?q?feat:=20=E5=85=85=E5=80=BC=E6=8A=A2?= =?UTF-8?q?=E9=92=BB=E7=9F=B3=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../event/payForDiamond/ApiCanReceive.ts | 45 ++ src/api_s2c/event/payForDiamond/ApiReceive.ts | 113 +++ src/json/pmd.json5 | 4 +- src/module/collection_event.ts | 5 +- .../event/payForDiamond/PtlCanReceive.ts | 9 + .../event/payForDiamond/PtlReceive.ts | 8 + src/shared/protocols/serviceProto.ts | 689 ++++++++++-------- 7 files changed, 572 insertions(+), 301 deletions(-) create mode 100644 src/api_s2c/event/payForDiamond/ApiCanReceive.ts create mode 100644 src/api_s2c/event/payForDiamond/ApiReceive.ts create mode 100644 src/shared/protocols/event/payForDiamond/PtlCanReceive.ts create mode 100644 src/shared/protocols/event/payForDiamond/PtlReceive.ts diff --git a/src/api_s2c/event/payForDiamond/ApiCanReceive.ts b/src/api_s2c/event/payForDiamond/ApiCanReceive.ts new file mode 100644 index 0000000..b77fe24 --- /dev/null +++ b/src/api_s2c/event/payForDiamond/ApiCanReceive.ts @@ -0,0 +1,45 @@ +import { ApiCall } from "tsrpc"; +import { HuoDongFun } from "../../../public/huodongfun"; +import { ReqCanReceive, ResCanReceive } from '../../../shared/protocols/event/payForDiamond/PtlCanReceive'; +import { PublicShared } from "../../../shared/public/public"; + +export async function playerCanReceive(call: ApiCall) { + const activityInfo = await HuoDongFun.getHdidInfo(call, call.req.activityId); + if (!activityInfo) { + return call.error('No such activity'); + } + const remaining = activityInfo.data['remaining']; + const zeroTime = PublicShared.getToDayZeroTime(); + const dayPayInfo = await G.mongodb.collection('dayPay').findOne({ uid: call.uid, time: zeroTime }); + if (!dayPayInfo || !dayPayInfo.payNum) { + return { + payNum: 0, remaining, result: false, activityInfo + }; + } + const payNum = dayPayInfo.payNum; + // 玩家充值未达标或者奖池余额耗尽则不能领取 + if (payNum < activityInfo.data['price'] || remaining <= 0) { + return { + payNum, remaining, result: false, activityInfo + } + } + // 检查玩家今日是否已经领取 + const playerActivityInfo = G.mongodb.cEvent('payForDiamond').findOne({ uid: call.uid }); + if (playerActivityInfo) { + if (playerActivityInfo[zeroTime]?.length) { + return { + payNum, remaining, result: false, activityInfo + }; + } + } + return { + payNum, remaining, result: true, activityInfo + }; +} + +export default async function (call: ApiCall) { + const canReceiveResult = await playerCanReceive(call); + if (canReceiveResult) { + call.succ(canReceiveResult); + } +} \ No newline at end of file diff --git a/src/api_s2c/event/payForDiamond/ApiReceive.ts b/src/api_s2c/event/payForDiamond/ApiReceive.ts new file mode 100644 index 0000000..aaf8a56 --- /dev/null +++ b/src/api_s2c/event/payForDiamond/ApiReceive.ts @@ -0,0 +1,113 @@ +import { ApiCall } from "tsrpc"; +import { ReqReceive, ResReceive } from '../../../shared/protocols/event/payForDiamond/PtlReceive'; +import { playerCanReceive } from './ApiCanReceive'; +import { PublicShared } from "../../../shared/public/public"; +import { ChatFun } from "../../../public/chat"; + +type diamondWeightGroup = { + weight: number; + numrange: [ min: number, max: number]; +}; + +/** + * @param groups 各分组及其权重 + */ +function randomWithWeight(groups: diamondWeightGroup[]) { + let maxAmount: number; + let totalWeights = 0; + for (const group of groups) { + totalWeights += group.weight; + if (!maxAmount) { + maxAmount = group.numrange[1]; + } else { + maxAmount = Math.min(maxAmount, group.numrange[1]); + } + } + const randomValue = Math.random() * totalWeights; // 随机值落在[0, totalWeights) 之间 + let currSum = 0; + for (const group of groups) { + if (currSum <= randomValue && randomValue < currSum + group.weight) { + return { group, maxAmount }; + } else { + currSum += group.weight; + } + } + const length = groups.length; + return { group: groups[length - 1], maxAmount }; +} + +/** + * 计算玩家分得的钻石数量 + * @param remaining + * @param group + * @param maxAmount + */ +function calcDiamondGot(remaining: number, group: diamondWeightGroup, maxAmount: number) { + const [min, max] = group.numrange; + const randomAmount = Math.floor(Math.random() * (max - min)) + min + 1; // max 值应能够取到, 故 +1 + // 剩余数额小于组内随机得到的值, 全给吧 + if (randomAmount > remaining) { + return remaining; + } + // 随机值大于最大值, 取最大值 + if (randomAmount > maxAmount) { + return maxAmount; + } + return randomAmount; +} + +export default async function (call: ApiCall) { + const canReceiveResult = await playerCanReceive(call); + if (canReceiveResult) { + if (!canReceiveResult.result) { + return call.succ({ + amount: 0, + timesRemaining: 0 + }); + } + const activityData = canReceiveResult.activityInfo.data; + const remaining = activityData['remaining']? activityData['remaining'] : activityData['totalmoney']; + const { group, maxAmount } = randomWithWeight(activityData['groupConf']['arr']); + const gotAmount = calcDiamondGot(remaining, group, maxAmount); + // 减去余额 + const filter = { + hdid: call.req.activityId, + $or: [ + {'data.remaining': { $exists: false }}, + {$expr: {$gte: [ `$data.remaining - ${gotAmount}`, 0 ]}}, + ], + }; + const updateDoc = { + $set: { 'data.remaining': `$data.remaining - ${gotAmount}` } + } + const updateResult = await G.mongodb.collection('hdinfo').updateOne(filter, updateDoc); + // 更新成功 + if (updateResult.modifiedCount) { + // 请求返回 + call.succ({ + amount: gotAmount, + timesRemaining: 0 + }); + // 添加玩家领取记录 + const zeroTime = PublicShared.getToDayZeroTime(); + const setObj = {}; + setObj[zeroTime] = gotAmount; + G.mongodb.cEvent('payForDiamond').updateOne({ uid: call.uid }, { + $set: setObj + }); + } + // 发送炫耀 + if (gotAmount >= activityData['groupConf']['base']['loglimit']) { + ChatFun.newMsg({ + type: 'local', + msg: G.gc.pmd.get_hero_star5_pmd, + time: G.time, + sender: 'system', + otherData: { + pmd: true, + args: [gotAmount] + } + }); + } + } +} \ No newline at end of file diff --git a/src/json/pmd.json5 b/src/json/pmd.json5 index 2e0db1c..bd2ec62 100644 --- a/src/json/pmd.json5 +++ b/src/json/pmd.json5 @@ -14,5 +14,7 @@ //黑帮争霸争霸赛第二名 hbzb_pmd2: 'intr_pmd_hbzb2', //黑帮争霸争霸赛第三名 - hbzb_pmd3: 'intr_pmd_hbzb3' + hbzb_pmd3: 'intr_pmd_hbzb3', + // 充值抢钻石 - 抢到大量钻石 + pay_for_diamond: 'intr_pmd_pfd' } \ No newline at end of file diff --git a/src/module/collection_event.ts b/src/module/collection_event.ts index d8339fe..a667969 100644 --- a/src/module/collection_event.ts +++ b/src/module/collection_event.ts @@ -52,7 +52,10 @@ export type eventType = { jierihuodong: Omit & { refreshTime: number; }; kaifujingsai: ResOpenKaifujingsai; zhoumolibao: ResOpenZhoumolibao & { refreshTime: number; } - pobinglibao: ResOpenPobinglibao + pobinglibao: ResOpenPobinglibao; + payForDiamond: { + [time: number]: number[] + } } & { [k: `${number}jijin`]: ResOpenYuedujijin; [k: `yangchengmubiao${number}`]: yangchengmubiao; diff --git a/src/shared/protocols/event/payForDiamond/PtlCanReceive.ts b/src/shared/protocols/event/payForDiamond/PtlCanReceive.ts new file mode 100644 index 0000000..8d905ec --- /dev/null +++ b/src/shared/protocols/event/payForDiamond/PtlCanReceive.ts @@ -0,0 +1,9 @@ +export type ReqCanReceive = { + activityId: number; +}; + +export type ResCanReceive = { + payNum: number; + remaining?: number; + result: boolean; +}; \ No newline at end of file diff --git a/src/shared/protocols/event/payForDiamond/PtlReceive.ts b/src/shared/protocols/event/payForDiamond/PtlReceive.ts new file mode 100644 index 0000000..beb4bf8 --- /dev/null +++ b/src/shared/protocols/event/payForDiamond/PtlReceive.ts @@ -0,0 +1,8 @@ +export type ReqReceive = { + activityId: number; +}; + +export type ResReceive = { + amount: number, + timesRemaining: number; +}; diff --git a/src/shared/protocols/serviceProto.ts b/src/shared/protocols/serviceProto.ts index d9413c9..df7b3e4 100644 --- a/src/shared/protocols/serviceProto.ts +++ b/src/shared/protocols/serviceProto.ts @@ -68,15 +68,17 @@ import { ReqOpen as ReqOpen_14, ResOpen as ResOpen_14 } from './event/leijichong import { ReqRec as ReqRec_5, ResRec as ResRec_5 } from './event/leijichongzhi/PtlRec'; import { ReqLottery, ResLottery } from './event/niudanji/PtlLottery'; import { ReqOpen as ReqOpen_15, ResOpen as ResOpen_15 } from './event/niudanji/PtlOpen'; +import { ReqCanReceive, ResCanReceive } from './event/payForDiamond/PtlCanReceive'; +import { ReqReceive as ReqReceive_2, ResReceive as ResReceive_2 } from './event/payForDiamond/PtlReceive'; import { ReqOpen as ReqOpen_16, ResOpen as ResOpen_16 } from './event/pobinglibao/PtlOpen'; -import { ReqReceive as ReqReceive_2, ResReceive as ResReceive_2 } from './event/pobinglibao/PtlReceive'; +import { ReqReceive as ReqReceive_3, ResReceive as ResReceive_3 } from './event/pobinglibao/PtlReceive'; import { ReqOpen as ReqOpen_17, ResOpen as ResOpen_17 } from './event/qirichongzhi/PtlOpen'; import { ReqRec as ReqRec_6, ResRec as ResRec_6 } from './event/qirichongzhi/PtlRec'; import { ReqOpen as ReqOpen_18, ResOpen as ResOpen_18 } from './event/qiridenglu/PtlOpen'; import { ReqRecPrize as ReqRecPrize_1, ResRecPrize as ResRecPrize_1 } from './event/qiridenglu/PtlRecPrize'; import { ReqOpen as ReqOpen_19, ResOpen as ResOpen_19 } from './event/shiwuleichong/PtlOpen'; import { ReqOpen as ReqOpen_20, ResOpen as ResOpen_20 } from './event/shouchong/PtlOpen'; -import { ReqReceive as ReqReceive_3, ResReceive as ResReceive_3 } from './event/shouchong/PtlReceive'; +import { ReqReceive as ReqReceive_4, ResReceive as ResReceive_4 } from './event/shouchong/PtlReceive'; import { ReqBuy as ReqBuy_1, ResBuy as ResBuy_1 } from './event/xianshizhaomu/PtlBuy'; import { ReqDuihuan, ResDuihuan } from './event/xianshizhaomu/PtlDuihuan'; import { ReqLottery as ReqLottery_1, ResLottery as ResLottery_1 } from './event/xianshizhaomu/PtlLottery'; @@ -98,7 +100,7 @@ import { ReqRecPrize as ReqRecPrize_2, ResRecPrize as ResRecPrize_2 } from './ev import { ReqRecTask, ResRecTask } from './event/zhanling/PtlRecTask'; import { ReqOpen as ReqOpen_28, ResOpen as ResOpen_28 } from './event/zhoulibao/PtlOpen'; import { ReqOpen as ReqOpen_29, ResOpen as ResOpen_29 } from './event/zhoumolibao/PtlOpen'; -import { ReqReceive as ReqReceive_4, ResReceive as ResReceive_4 } from './event/zhoumolibao/PtlReceive'; +import { ReqReceive as ReqReceive_5, ResReceive as ResReceive_5 } from './event/zhoumolibao/PtlReceive'; import { ReqBuy as ReqBuy_3, ResBuy as ResBuy_3 } from './event/zixuanlibao/PtlBuy'; import { ReqOpen as ReqOpen_30, ResOpen as ResOpen_30 } from './event/zixuanlibao/PtlOpen'; import { ReqhdGetList, ReshdGetList } from './eventlist/PtlhdGetList'; @@ -188,10 +190,10 @@ import { ReqBuyFightNum, ResBuyFightNum } from './jjc/PtlBuyFightNum'; import { ReqFight as ReqFight_5, ResFight as ResFight_5 } from './jjc/PtlFight'; import { ReqFightLog, ResFightLog } from './jjc/PtlFightLog'; import { ReqOpen as ReqOpen_42, ResOpen as ResOpen_42 } from './jjc/PtlOpen'; -import { ReqReceive as ReqReceive_5, ResReceive as ResReceive_5 } from './jjc/PtlReceive'; +import { ReqReceive as ReqReceive_6, ResReceive as ResReceive_6 } from './jjc/PtlReceive'; import { ReqRefresh as ReqRefresh_4, ResRefresh as ResRefresh_4 } from './jjc/PtlRefresh'; import { ReqOpen as ReqOpen_43, ResOpen as ResOpen_43 } from './kaifujingsai/PtlOpen'; -import { ReqReceive as ReqReceive_6, ResReceive as ResReceive_6 } from './kaifujingsai/PtlReceive'; +import { ReqReceive as ReqReceive_7, ResReceive as ResReceive_7 } from './kaifujingsai/PtlReceive'; import { ReqApply as ReqApply_2, ResApply as ResApply_2 } from './kbzz/PtlApply'; import { ReqAutoApply, ResAutoApply } from './kbzz/PtlAutoApply'; import { ReqBuyNum as ReqBuyNum_3, ResBuyNum as ResBuyNum_3 } from './kbzz/PtlBuyNum'; @@ -301,7 +303,7 @@ import { ReqFastGuaJi, ResFastGuaJi } from './tanxian/PtlFastGuaJi'; import { ReqFight as ReqFight_11, ResFight as ResFight_11 } from './tanxian/PtlFight'; import { ReqGuaJi, ResGuaJi } from './tanxian/PtlGuaJi'; import { ReqOpen as ReqOpen_57, ResOpen as ResOpen_57 } from './tanxian/PtlOpen'; -import { ReqReceive as ReqReceive_7, ResReceive as ResReceive_7 } from './tanxian/PtlReceive'; +import { ReqReceive as ReqReceive_8, ResReceive as ResReceive_8 } from './tanxian/PtlReceive'; import { ReqAllFinsh, ResAllFinsh } from './task/PtlAllFinsh'; import { ReqFinsh, ResFinsh } from './task/PtlFinsh'; import { ReqOpen as ReqOpen_58, ResOpen as ResOpen_58 } from './task/PtlOpen'; @@ -340,7 +342,7 @@ import { ReqGet as ReqGet_3, ResGet as ResGet_3 } from './xstask/PtlGet'; import { ReqLvUp as ReqLvUp_4, ResLvUp as ResLvUp_4 } from './xstask/PtlLvUp'; import { ReqOnekeyReceive, ResOnekeyReceive } from './xstask/PtlOnekeyReceive'; import { ReqOpen as ReqOpen_61, ResOpen as ResOpen_61 } from './xstask/PtlOpen'; -import { ReqReceive as ReqReceive_8, ResReceive as ResReceive_8 } from './xstask/PtlReceive'; +import { ReqReceive as ReqReceive_9, ResReceive as ResReceive_9 } from './xstask/PtlReceive'; import { ReqRefresh as ReqRefresh_8, ResRefresh as ResRefresh_8 } from './xstask/PtlRefresh'; import { ReqHandle, ResHandle } from './yongbingzhuzhan/PtlHandle'; import { ReqChangePos as ReqChangePos_1, ResChangePos as ResChangePos_1 } from './zhanqianbushu/PtlChangePos'; @@ -625,13 +627,21 @@ export interface ServiceType { req: ReqOpen_15, res: ResOpen_15 }, + "event/payForDiamond/CanReceive": { + req: ReqCanReceive, + res: ResCanReceive + }, + "event/payForDiamond/Receive": { + req: ReqReceive_2, + res: ResReceive_2 + }, "event/pobinglibao/Open": { req: ReqOpen_16, res: ResOpen_16 }, "event/pobinglibao/Receive": { - req: ReqReceive_2, - res: ResReceive_2 + req: ReqReceive_3, + res: ResReceive_3 }, "event/qirichongzhi/Open": { req: ReqOpen_17, @@ -658,8 +668,8 @@ export interface ServiceType { res: ResOpen_20 }, "event/shouchong/Receive": { - req: ReqReceive_3, - res: ResReceive_3 + req: ReqReceive_4, + res: ResReceive_4 }, "event/xianshizhaomu/Buy": { req: ReqBuy_1, @@ -746,8 +756,8 @@ export interface ServiceType { res: ResOpen_29 }, "event/zhoumolibao/Receive": { - req: ReqReceive_4, - res: ResReceive_4 + req: ReqReceive_5, + res: ResReceive_5 }, "event/zixuanlibao/Buy": { req: ReqBuy_3, @@ -1106,8 +1116,8 @@ export interface ServiceType { res: ResOpen_42 }, "jjc/Receive": { - req: ReqReceive_5, - res: ResReceive_5 + req: ReqReceive_6, + res: ResReceive_6 }, "jjc/Refresh": { req: ReqRefresh_4, @@ -1118,8 +1128,8 @@ export interface ServiceType { res: ResOpen_43 }, "kaifujingsai/Receive": { - req: ReqReceive_6, - res: ResReceive_6 + req: ReqReceive_7, + res: ResReceive_7 }, "kbzz/Apply": { req: ReqApply_2, @@ -1442,8 +1452,8 @@ export interface ServiceType { res: ResOpen_57 }, "tanxian/Receive": { - req: ReqReceive_7, - res: ResReceive_7 + req: ReqReceive_8, + res: ResReceive_8 }, "task/AllFinsh": { req: ReqAllFinsh, @@ -1598,8 +1608,8 @@ export interface ServiceType { res: ResOpen_61 }, "xstask/Receive": { - req: ReqReceive_8, - res: ResReceive_8 + req: ReqReceive_9, + res: ResReceive_9 }, "xstask/Refresh": { req: ReqRefresh_8, @@ -2004,116 +2014,126 @@ export const serviceProto: ServiceProto = { }, { "id": 69, - "name": "event/pobinglibao/Open", + "name": "event/payForDiamond/CanReceive", "type": "api" }, { "id": 70, - "name": "event/pobinglibao/Receive", + "name": "event/payForDiamond/Receive", "type": "api" }, { "id": 71, - "name": "event/qirichongzhi/Open", + "name": "event/pobinglibao/Open", "type": "api" }, { "id": 72, - "name": "event/qirichongzhi/Rec", + "name": "event/pobinglibao/Receive", "type": "api" }, { "id": 73, - "name": "event/qiridenglu/Open", + "name": "event/qirichongzhi/Open", "type": "api" }, { "id": 74, - "name": "event/qiridenglu/RecPrize", + "name": "event/qirichongzhi/Rec", "type": "api" }, { "id": 75, - "name": "event/shiwuleichong/Open", + "name": "event/qiridenglu/Open", "type": "api" }, { "id": 76, - "name": "event/shouchong/Open", + "name": "event/qiridenglu/RecPrize", "type": "api" }, { "id": 77, - "name": "event/shouchong/Receive", + "name": "event/shiwuleichong/Open", "type": "api" }, { "id": 78, - "name": "event/xianshizhaomu/Buy", + "name": "event/shouchong/Open", "type": "api" }, { "id": 79, - "name": "event/xianshizhaomu/Duihuan", + "name": "event/shouchong/Receive", "type": "api" }, { "id": 80, - "name": "event/xianshizhaomu/Lottery", + "name": "event/xianshizhaomu/Buy", "type": "api" }, { "id": 81, - "name": "event/xianshizhaomu/Open", + "name": "event/xianshizhaomu/Duihuan", "type": "api" }, { "id": 82, - "name": "event/xianshizhaomu/Rec", + "name": "event/xianshizhaomu/Lottery", "type": "api" }, { "id": 83, - "name": "event/xiaofeijingsai/Open", + "name": "event/xianshizhaomu/Open", "type": "api" }, { "id": 84, - "name": "event/xinshoulibao/Open", + "name": "event/xianshizhaomu/Rec", "type": "api" }, { "id": 85, - "name": "event/yangchengmubiao/Buy", + "name": "event/xiaofeijingsai/Open", "type": "api" }, { "id": 86, - "name": "event/yangchengmubiao/Open", + "name": "event/xinshoulibao/Open", "type": "api" }, { "id": 87, - "name": "event/yangchengmubiao/Rec", + "name": "event/yangchengmubiao/Buy", "type": "api" }, { "id": 88, - "name": "event/yibaichou/Open", + "name": "event/yangchengmubiao/Open", "type": "api" }, { "id": 89, - "name": "event/yibaichou/Rec", + "name": "event/yangchengmubiao/Rec", "type": "api" }, { "id": 90, - "name": "event/yibaichou/RecAll", + "name": "event/yibaichou/Open", "type": "api" }, { "id": 91, + "name": "event/yibaichou/Rec", + "type": "api" + }, + { + "id": 92, + "name": "event/yibaichou/RecAll", + "type": "api" + }, + { + "id": 93, "name": "event/yuedujijin/Open", "type": "api", "conf": { @@ -2121,157 +2141,157 @@ export const serviceProto: ServiceProto = { } }, { - "id": 92, + "id": 94, "name": "event/yuedujijin/Rec", "type": "api" }, { - "id": 93, + "id": 95, "name": "event/zhanling/BuyLv", "type": "api" }, { - "id": 94, + "id": 96, "name": "event/zhanling/Open", "type": "api" }, { - "id": 95, + "id": 97, "name": "event/zhanling/RecPrize", "type": "api" }, { - "id": 96, + "id": 98, "name": "event/zhanling/RecTask", "type": "api" }, { - "id": 97, + "id": 99, "name": "event/zhoulibao/Open", "type": "api" }, { - "id": 98, + "id": 100, "name": "event/zhoumolibao/Open", "type": "api" }, { - "id": 99, + "id": 101, "name": "event/zhoumolibao/Receive", "type": "api" }, { - "id": 100, + "id": 102, "name": "event/zixuanlibao/Buy", "type": "api" }, { - "id": 101, + "id": 103, "name": "event/zixuanlibao/Open", "type": "api" }, { - "id": 102, + "id": 104, "name": "eventlist/hdGetList", "type": "api" }, { - "id": 103, + "id": 105, "name": "friend/Apply", "type": "api" }, { - "id": 104, + "id": 106, "name": "friend/Del", "type": "api" }, { - "id": 105, + "id": 107, "name": "friend/Gift", "type": "api" }, { - "id": 106, + "id": 108, "name": "friend/List", "type": "api" }, { - "id": 107, + "id": 109, "name": "friend/Open", "type": "api" }, { - "id": 108, + "id": 110, "name": "friend/Respond", "type": "api" }, { - "id": 109, + "id": 111, "name": "friend/RmBlackList", "type": "api" }, { - "id": 110, + "id": 112, "name": "friend/Search", "type": "api" }, { - "id": 111, + "id": 113, "name": "ganbutexun/Challenge", "type": "api" }, { - "id": 112, + "id": 114, "name": "ganbutexun/Open", "type": "api" }, { - "id": 113, + "id": 115, "name": "ganhai/Fast", "type": "api" }, { - "id": 114, + "id": 116, "name": "ganhai/Fight", "type": "api" }, { - "id": 115, + "id": 117, "name": "ganhai/Log", "type": "api" }, { - "id": 116, + "id": 118, "name": "ganhai/Open", "type": "api" }, { - "id": 117, + "id": 119, "name": "ganhai/Refresh", "type": "api" }, { - "id": 118, + "id": 120, "name": "ganhai/RefreshShip", "type": "api" }, { - "id": 119, + "id": 121, "name": "ganhai/Select", "type": "api" }, { - "id": 120, + "id": 122, "name": "gmapi/Gift", "type": "api" }, { - "id": 121, + "id": 123, "name": "gmapi/Post", "type": "api" }, { - "id": 122, + "id": 124, "name": "gonghui/Apply", "type": "api", "conf": { @@ -2281,7 +2301,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 123, + "id": 125, "name": "gonghui/ApplyAll", "type": "api", "conf": { @@ -2291,7 +2311,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 124, + "id": 126, "name": "gonghui/ApplyList", "type": "api", "conf": { @@ -2301,7 +2321,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 125, + "id": 127, "name": "gonghui/Change", "type": "api", "conf": { @@ -2311,12 +2331,12 @@ export const serviceProto: ServiceProto = { } }, { - "id": 126, + "id": 128, "name": "gonghui/Create", "type": "api" }, { - "id": 127, + "id": 129, "name": "gonghui/Dissolve", "type": "api", "conf": { @@ -2326,7 +2346,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 128, + "id": 130, "name": "gonghui/Exit", "type": "api", "conf": { @@ -2336,12 +2356,12 @@ export const serviceProto: ServiceProto = { } }, { - "id": 129, + "id": 131, "name": "gonghui/FbBuyNum", "type": "api" }, { - "id": 130, + "id": 132, "name": "gonghui/FbFight", "type": "api", "conf": { @@ -2351,7 +2371,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 131, + "id": 133, "name": "gonghui/FbOpen", "type": "api", "conf": { @@ -2361,17 +2381,17 @@ export const serviceProto: ServiceProto = { } }, { - "id": 132, + "id": 134, "name": "gonghui/GetList", "type": "api" }, { - "id": 133, + "id": 135, "name": "gonghui/Join", "type": "api" }, { - "id": 134, + "id": 136, "name": "gonghui/Jx", "type": "api", "conf": { @@ -2381,7 +2401,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 135, + "id": 137, "name": "gonghui/JxOpen", "type": "api", "conf": { @@ -2391,7 +2411,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 136, + "id": 138, "name": "gonghui/List", "type": "api", "conf": { @@ -2401,7 +2421,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 137, + "id": 139, "name": "gonghui/Manage", "type": "api", "conf": { @@ -2411,7 +2431,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 138, + "id": 140, "name": "gonghui/Open", "type": "api", "conf": { @@ -2421,7 +2441,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 139, + "id": 141, "name": "gonghui/TanHe", "type": "api", "conf": { @@ -2431,7 +2451,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 140, + "id": 142, "name": "gonghui/TaskOpen", "type": "api", "conf": { @@ -2441,7 +2461,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 141, + "id": 143, "name": "gonghui/TaskReceive", "type": "api", "conf": { @@ -2451,7 +2471,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 142, + "id": 144, "name": "gonghui/UpWz", "type": "api", "conf": { @@ -2461,137 +2481,137 @@ export const serviceProto: ServiceProto = { } }, { - "id": 143, + "id": 145, "name": "gonghuibaozang/Lottery", "type": "api" }, { - "id": 144, + "id": 146, "name": "gonghuibaozang/Open", "type": "api" }, { - "id": 145, + "id": 147, "name": "gonglukuangbiao/Buy", "type": "api" }, { - "id": 146, + "id": 148, "name": "gonglukuangbiao/Fight", "type": "api" }, { - "id": 147, + "id": 149, "name": "gonglukuangbiao/Open", "type": "api" }, { - "id": 148, + "id": 150, "name": "gonglukuangbiao/Refresh", "type": "api" }, { - "id": 149, + "id": 151, "name": "gongyu/mingdao/Active", "type": "api" }, { - "id": 150, + "id": 152, "name": "gongyu/mingdao/Open", "type": "api" }, { - "id": 151, + "id": 153, "name": "gongyu/mingdao/RecPrize", "type": "api" }, { - "id": 152, + "id": 154, "name": "gongyu/mingdao/Repair", "type": "api" }, { - "id": 153, + "id": 155, "name": "gongyu/xunlianjihua/Reset", "type": "api" }, { - "id": 154, + "id": 156, "name": "gongyu/xunlianjihua/UpSkill", "type": "api" }, { - "id": 155, + "id": 157, "name": "gongyu/zuozhanjihua/SetSkill", "type": "api" }, { - "id": 156, + "id": 158, "name": "hbzb/jfs/BuyNum", "type": "api" }, { - "id": 157, + "id": 159, "name": "hbzb/jfs/Fight", "type": "api" }, { - "id": 158, + "id": 160, "name": "hbzb/jfs/GetLog", "type": "api" }, { - "id": 159, + "id": 161, "name": "hbzb/jfs/Open", "type": "api" }, { - "id": 160, + "id": 162, "name": "hbzb/jfs/Rec", "type": "api" }, { - "id": 161, + "id": 163, "name": "hbzb/jfs/Refresh", "type": "api" }, { - "id": 162, + "id": 164, "name": "hbzb/GetStatus", "type": "api" }, { - "id": 163, + "id": 165, "name": "hbzb/zbs/BuyNum", "type": "api" }, { - "id": 164, + "id": 166, "name": "hbzb/zbs/Fight", "type": "api" }, { - "id": 165, + "id": 167, "name": "hbzb/zbs/GetLog", "type": "api" }, { - "id": 166, + "id": 168, "name": "hbzb/zbs/Open", "type": "api" }, { - "id": 167, + "id": 169, "name": "hbzb/zbs/Refresh", "type": "api" }, { - "id": 168, + "id": 170, "name": "hero/Awake", "type": "api" }, { - "id": 169, + "id": 171, "name": "hero/ChangePos", "type": "api", "conf": { @@ -2599,17 +2619,17 @@ export const serviceProto: ServiceProto = { } }, { - "id": 170, + "id": 172, "name": "hero/GetList", "type": "api" }, { - "id": 171, + "id": 173, "name": "hero/JinJie", "type": "api" }, { - "id": 172, + "id": 174, "name": "hero/LvUp", "type": "api", "conf": { @@ -2617,32 +2637,32 @@ export const serviceProto: ServiceProto = { } }, { - "id": 173, + "id": 175, "name": "hero/Potency", "type": "api" }, { - "id": 174, + "id": 176, "name": "hero/Rec", "type": "api" }, { - "id": 175, + "id": 177, "name": "hero/Reset", "type": "api" }, { - "id": 176, + "id": 178, "name": "hero/Talent", "type": "api" }, { - "id": 177, + "id": 179, "name": "hero/WeaponUp", "type": "api" }, { - "id": 178, + "id": 180, "name": "hongdian/Get", "type": "api", "conf": { @@ -2650,117 +2670,117 @@ export const serviceProto: ServiceProto = { } }, { - "id": 179, + "id": 181, "name": "item/GetList", "type": "api" }, { - "id": 180, + "id": 182, "name": "item/Use", "type": "api" }, { - "id": 181, + "id": 183, "name": "jiaotang/Lottery", "type": "api" }, { - "id": 182, + "id": 184, "name": "jiaotang/Open", "type": "api" }, { - "id": 183, + "id": 185, "name": "jiuba/Lottery", "type": "api" }, { - "id": 184, + "id": 186, "name": "jiuba/Open", "type": "api" }, { - "id": 185, + "id": 187, "name": "jjc/BuyFightNum", "type": "api" }, { - "id": 186, + "id": 188, "name": "jjc/Fight", "type": "api" }, { - "id": 187, + "id": 189, "name": "jjc/FightLog", "type": "api" }, { - "id": 188, + "id": 190, "name": "jjc/Open", "type": "api" }, { - "id": 189, + "id": 191, "name": "jjc/Receive", "type": "api" }, { - "id": 190, + "id": 192, "name": "jjc/Refresh", "type": "api" }, { - "id": 191, + "id": 193, "name": "kaifujingsai/Open", "type": "api" }, { - "id": 192, + "id": 194, "name": "kaifujingsai/Receive", "type": "api" }, { - "id": 193, + "id": 195, "name": "kbzz/Apply", "type": "api" }, { - "id": 194, + "id": 196, "name": "kbzz/AutoApply", "type": "api" }, { - "id": 195, + "id": 197, "name": "kbzz/BuyNum", "type": "api" }, { - "id": 196, + "id": 198, "name": "kbzz/Fight", "type": "api" }, { - "id": 197, + "id": 199, "name": "kbzz/FightLog", "type": "api" }, { - "id": 198, + "id": 200, "name": "kbzz/GroupState", "type": "api" }, { - "id": 199, + "id": 201, "name": "kbzz/Open", "type": "api" }, { - "id": 200, + "id": 202, "name": "kbzz/RecPrize", "type": "api" }, { - "id": 201, + "id": 203, "name": "kbzz/Refresh", "type": "api", "conf": { @@ -2768,287 +2788,287 @@ export const serviceProto: ServiceProto = { } }, { - "id": 202, + "id": 204, "name": "kuangdong/AddPkNum", "type": "api" }, { - "id": 203, + "id": 205, "name": "kuangdong/GetPrize", "type": "api" }, { - "id": 204, + "id": 206, "name": "kuangdong/KdInfo", "type": "api" }, { - "id": 205, + "id": 207, "name": "kuangdong/Log", "type": "api" }, { - "id": 206, + "id": 208, "name": "kuangdong/Open", "type": "api" }, { - "id": 207, + "id": 209, "name": "kuangdong/YanShi", "type": "api" }, { - "id": 208, + "id": 210, "name": "kuangdong/ZhanLing", "type": "api" }, { - "id": 209, + "id": 211, "name": "lingzhulaixi/Open", "type": "api" }, { - "id": 210, + "id": 212, "name": "lingzhulaixi/PkBoss", "type": "api" }, { - "id": 211, + "id": 213, "name": "lingzhulaixi/PkRank", "type": "api" }, { - "id": 212, + "id": 214, "name": "lingzhulaixi/SaoDang", "type": "api" }, { - "id": 213, + "id": 215, "name": "meirishilian/Buy", "type": "api" }, { - "id": 214, + "id": 216, "name": "meirishilian/Fight", "type": "api" }, { - "id": 215, + "id": 217, "name": "meirishilian/Open", "type": "api" }, { - "id": 216, + "id": 218, "name": "msg_c2s/BindUid", "type": "msg" }, { - "id": 217, + "id": 219, "name": "msg_c2s/Pay", "type": "msg" }, { - "id": 218, + "id": 220, "name": "msg_c2s/Sync", "type": "msg" }, { - "id": 219, + "id": 221, "name": "msg_s2c/Chat", "type": "msg" }, { - "id": 220, + "id": 222, "name": "msg_s2c/ChatHelp", "type": "msg" }, { - "id": 221, + "id": 223, "name": "msg_s2c/Collection", "type": "msg" }, { - "id": 222, + "id": 224, "name": "msg_s2c/Email", "type": "msg" }, { - "id": 223, + "id": 225, "name": "msg_s2c/EmailDel", "type": "msg" }, { - "id": 224, + "id": 226, "name": "msg_s2c/EquipChange", "type": "msg" }, { - "id": 225, + "id": 227, "name": "msg_s2c/Friend", "type": "msg" }, { - "id": 226, + "id": 228, "name": "msg_s2c/GhChange", "type": "msg" }, { - "id": 227, + "id": 229, "name": "msg_s2c/GongHuiBaoZang", "type": "msg" }, { - "id": 228, + "id": 230, "name": "msg_s2c/HeroChange", "type": "msg" }, { - "id": 229, + "id": 231, "name": "msg_s2c/HongDianChange", "type": "msg" }, { - "id": 230, + "id": 232, "name": "msg_s2c/ItemChange", "type": "msg" }, { - "id": 231, + "id": 233, "name": "msg_s2c/LoginQueue", "type": "msg" }, { - "id": 232, + "id": 234, "name": "msg_s2c/LshdChange", "type": "msg" }, { - "id": 233, + "id": 235, "name": "msg_s2c/NewDay", "type": "msg" }, { - "id": 234, + "id": 236, "name": "msg_s2c/OtherLogin", "type": "msg" }, { - "id": 235, + "id": 237, "name": "msg_s2c/PayChange", "type": "msg" }, { - "id": 236, + "id": 238, "name": "msg_s2c/PayResult", "type": "msg" }, { - "id": 237, + "id": 239, "name": "msg_s2c/PeijianChange", "type": "msg" }, { - "id": 238, + "id": 240, "name": "msg_s2c/PlayerChange", "type": "msg" }, { - "id": 239, + "id": 241, "name": "msg_s2c/Private", "type": "msg" }, { - "id": 240, + "id": 242, "name": "msg_s2c/PushGiftChange", "type": "msg" }, { - "id": 241, + "id": 243, "name": "msg_s2c/SendGift", "type": "msg" }, { - "id": 242, + "id": 244, "name": "msg_s2c/ShiwuChange", "type": "msg" }, { - "id": 243, + "id": 245, "name": "msg_s2c/TaskChange", "type": "msg" }, { - "id": 244, + "id": 246, "name": "msg_s2c/Xianshilibao", "type": "msg" }, { - "id": 245, + "id": 247, "name": "pata/Fight", "type": "api" }, { - "id": 246, + "id": 248, "name": "pata/GetPrize", "type": "api" }, { - "id": 247, + "id": 249, "name": "pata/Open", "type": "api" }, { - "id": 248, + "id": 250, "name": "pata/SaoDang", "type": "api" }, { - "id": 249, + "id": 251, "name": "pay/GetList", "type": "api" }, { - "id": 250, + "id": 252, "name": "peijian/GetList", "type": "api" }, { - "id": 251, + "id": 253, "name": "peijian/JingLian", "type": "api" }, { - "id": 252, + "id": 254, "name": "peijian/JinJie", "type": "api" }, { - "id": 253, + "id": 255, "name": "peijian/LvUp", "type": "api" }, { - "id": 254, + "id": 256, "name": "peijian/OneKeyLvUp", "type": "api" }, { - "id": 255, + "id": 257, "name": "peijian/OneKeyWear", "type": "api" }, { - "id": 256, + "id": 258, "name": "peijian/Reset", "type": "api" }, { - "id": 257, + "id": 259, "name": "peijian/Rm", "type": "api" }, { - "id": 258, + "id": 260, "name": "peijian/TakeOff", "type": "api", "conf": { @@ -3056,32 +3076,32 @@ export const serviceProto: ServiceProto = { } }, { - "id": 259, + "id": 261, "name": "peijian/UnLock", "type": "api" }, { - "id": 260, + "id": 262, "name": "peijian/Wear", "type": "api" }, { - "id": 261, + "id": 263, "name": "peijiancangku/Deal", "type": "api" }, { - "id": 262, + "id": 264, "name": "peijiancangku/Jump", "type": "api" }, { - "id": 263, + "id": 265, "name": "peijiancangku/Open", "type": "api" }, { - "id": 264, + "id": 266, "name": "Bingo", "type": "api", "conf": { @@ -3089,142 +3109,142 @@ export const serviceProto: ServiceProto = { } }, { - "id": 265, + "id": 267, "name": "FightTest", "type": "api" }, { - "id": 266, + "id": 268, "name": "SyncBtn", "type": "api" }, { - "id": 267, + "id": 269, "name": "Test", "type": "api" }, { - "id": 268, + "id": 270, "name": "pushgift/Open", "type": "api" }, { - "id": 269, + "id": 271, "name": "qjzzd/Fight", "type": "api" }, { - "id": 270, + "id": 272, "name": "qjzzd/Open", "type": "api" }, { - "id": 271, + "id": 273, "name": "rank/Open", "type": "api" }, { - "id": 272, + "id": 274, "name": "shiwu/Concise", "type": "api" }, { - "id": 273, + "id": 275, "name": "shiwu/Extract", "type": "api" }, { - "id": 274, + "id": 276, "name": "shiwu/GetList", "type": "api" }, { - "id": 275, + "id": 277, "name": "shiwu/LvUp", "type": "api" }, { - "id": 276, + "id": 278, "name": "shiwu/Recast", "type": "api" }, { - "id": 277, + "id": 279, "name": "shiwu/TakeOff", "type": "api" }, { - "id": 278, + "id": 280, "name": "shiwu/Wear", "type": "api" }, { - "id": 279, + "id": 281, "name": "shootGame/Open", "type": "api" }, { - "id": 280, + "id": 282, "name": "shootGame/Rec", "type": "api" }, { - "id": 281, + "id": 283, "name": "shop/Buy", "type": "api" }, { - "id": 282, + "id": 284, "name": "shop/Open", "type": "api" }, { - "id": 283, + "id": 285, "name": "shop/Refresh", "type": "api" }, { - "id": 284, + "id": 286, "name": "sign/GetBoxPrize", "type": "api" }, { - "id": 285, + "id": 287, "name": "sign/GetPrize", "type": "api" }, { - "id": 286, + "id": 288, "name": "sign/Open", "type": "api" }, { - "id": 287, + "id": 289, "name": "slzd/Aim", "type": "api" }, { - "id": 288, + "id": 290, "name": "slzd/BuyNum", "type": "api" }, { - "id": 289, + "id": 291, "name": "slzd/Fight", "type": "api" }, { - "id": 290, + "id": 292, "name": "slzd/FightLog", "type": "api" }, { - "id": 291, + "id": 293, "name": "slzd/MyRank", "type": "api" }, { - "id": 292, + "id": 294, "name": "slzd/Open", "type": "api", "conf": { @@ -3234,77 +3254,77 @@ export const serviceProto: ServiceProto = { } }, { - "id": 293, + "id": 295, "name": "slzd/OpenFort", "type": "api" }, { - "id": 294, + "id": 296, "name": "slzd/Rec", "type": "api" }, { - "id": 295, + "id": 297, "name": "slzd/Refresh", "type": "api" }, { - "id": 296, + "id": 298, "name": "slzd/Slot", "type": "api" }, { - "id": 297, + "id": 299, "name": "tanxian/Event", "type": "api" }, { - "id": 298, + "id": 300, "name": "tanxian/FastGuaJi", "type": "api" }, { - "id": 299, + "id": 301, "name": "tanxian/Fight", "type": "api" }, { - "id": 300, + "id": 302, "name": "tanxian/GuaJi", "type": "api" }, { - "id": 301, + "id": 303, "name": "tanxian/Open", "type": "api" }, { - "id": 302, + "id": 304, "name": "tanxian/Receive", "type": "api" }, { - "id": 303, + "id": 305, "name": "task/AllFinsh", "type": "api" }, { - "id": 304, + "id": 306, "name": "task/Finsh", "type": "api" }, { - "id": 305, + "id": 307, "name": "task/Open", "type": "api" }, { - "id": 306, + "id": 308, "name": "user/CDKEY", "type": "api" }, { - "id": 307, + "id": 309, "name": "user/ChangeInfo", "type": "api", "conf": { @@ -3312,197 +3332,197 @@ export const serviceProto: ServiceProto = { } }, { - "id": 308, + "id": 310, "name": "user/ChangeName", "type": "api" }, { - "id": 309, + "id": 311, "name": "user/Fight", "type": "api" }, { - "id": 310, + "id": 312, "name": "user/GetInfo", "type": "api" }, { - "id": 311, + "id": 313, "name": "user/InfoOpen", "type": "api" }, { - "id": 312, + "id": 314, "name": "user/Login", "type": "api" }, { - "id": 313, + "id": 315, "name": "user/Ping", "type": "api" }, { - "id": 314, + "id": 316, "name": "user/Renown", "type": "api" }, { - "id": 315, + "id": 317, "name": "user/RenownBuy", "type": "api" }, { - "id": 316, + "id": 318, "name": "user/RenownGetPrize", "type": "api" }, { - "id": 317, + "id": 319, "name": "user/RenownOpen", "type": "api" }, { - "id": 318, + "id": 320, "name": "user/Tujian", "type": "api" }, { - "id": 319, + "id": 321, "name": "weixiuchang/Decompose", "type": "api" }, { - "id": 320, + "id": 322, "name": "weixiuchang/Exchange", "type": "api" }, { - "id": 321, + "id": 323, "name": "weixiuchang/Open", "type": "api" }, { - "id": 322, + "id": 324, "name": "weixiuchang/UpLv", "type": "api" }, { - "id": 323, + "id": 325, "name": "weixiuchang/UpStar", "type": "api" }, { - "id": 324, + "id": 326, "name": "wzry/AutoBaoMing", "type": "api" }, { - "id": 325, + "id": 327, "name": "wzry/BaoMing", "type": "api" }, { - "id": 326, + "id": 328, "name": "wzry/catFightLog", "type": "api" }, { - "id": 327, + "id": 329, "name": "wzry/CatGroup", "type": "api" }, { - "id": 328, + "id": 330, "name": "wzry/DldFight", "type": "api" }, { - "id": 329, + "id": 331, "name": "wzry/DldRefre", "type": "api" }, { - "id": 330, + "id": 332, "name": "wzry/JingCai", "type": "api" }, { - "id": 331, + "id": 333, "name": "wzry/JingCaiOpen", "type": "api" }, { - "id": 332, + "id": 334, "name": "wzry/Open", "type": "api" }, { - "id": 333, + "id": 335, "name": "wzry/UpdateFight", "type": "api" }, { - "id": 334, + "id": 336, "name": "wzry/Wzzd", "type": "api" }, { - "id": 335, + "id": 337, "name": "wzry/ZuanShiOpen", "type": "api" }, { - "id": 336, + "id": 338, "name": "xstask/AllGet", "type": "api" }, { - "id": 337, + "id": 339, "name": "xstask/Get", "type": "api" }, { - "id": 338, + "id": 340, "name": "xstask/LvUp", "type": "api" }, { - "id": 339, + "id": 341, "name": "xstask/OnekeyReceive", "type": "api" }, { - "id": 340, + "id": 342, "name": "xstask/Open", "type": "api" }, { - "id": 341, + "id": 343, "name": "xstask/Receive", "type": "api" }, { - "id": 342, + "id": 344, "name": "xstask/Refresh", "type": "api" }, { - "id": 343, + "id": 345, "name": "yongbingzhuzhan/Handle", "type": "api" }, { - "id": 344, + "id": 346, "name": "zhanqianbushu/ChangePos", "type": "api" }, { - "id": 345, + "id": 347, "name": "zhanqianbushu/Select", "type": "api" }, { - "id": 346, + "id": 348, "name": "zhanqianbushu/Up", "type": "api" } @@ -10178,6 +10198,76 @@ export const serviceProto: ServiceProto = { } ] }, + "event/payForDiamond/PtlCanReceive/ReqCanReceive": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "activityId", + "type": { + "type": "Number" + } + } + ] + }, + "event/payForDiamond/PtlCanReceive/ResCanReceive": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "payNum", + "type": { + "type": "Number" + } + }, + { + "id": 1, + "name": "remaining", + "type": { + "type": "Number" + }, + "optional": true + }, + { + "id": 2, + "name": "result", + "type": { + "type": "Boolean" + } + } + ] + }, + "event/payForDiamond/PtlReceive/ReqReceive": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "activityId", + "type": { + "type": "Number" + } + } + ] + }, + "event/payForDiamond/PtlReceive/ResReceive": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "amount", + "type": { + "type": "Number" + } + }, + { + "id": 1, + "name": "timesRemaining", + "type": { + "type": "Number" + } + } + ] + }, "event/pobinglibao/PtlOpen/ReqOpen": { "type": "Interface" }, @@ -10680,7 +10770,8 @@ export const serviceProto: ServiceProto = { "name": "limit", "type": { "type": "Number" - } + }, + "optional": true } ] }, From bfb6e4ff4ecc6d494f856d4575326075b8874829 Mon Sep 17 00:00:00 2001 From: chenkai Date: Thu, 21 Dec 2023 21:40:49 +0800 Subject: [PATCH 17/23] =?UTF-8?q?build:=20=E6=9B=B4=E6=96=B0=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/json/huodong.json5 | 76 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 70 insertions(+), 6 deletions(-) diff --git a/src/json/huodong.json5 b/src/json/huodong.json5 index e66b88a..4e332e8 100644 --- a/src/json/huodong.json5 +++ b/src/json/huodong.json5 @@ -3988,27 +3988,31 @@ "data" : { //活动文本描述 intr: "xfjstips_1", - intr: "xfjstips_2", - //排名 + intr2: "xfjstips_2", + //奖励邮件标题 + mailTitle: "intr_xfjs_mailTitle", + //奖励邮件内容 + mailDes: "intr_xfjs_mailDes", + //排名 rank: [ { id: '1', name: 'xfjstips_3', - rank:[1], + rank:[1,1], need: [{'a': 'attr', 't': 'rmbmoney', 'n': 20000}], prize: [{'a': 'item', 't': '13', 'n': 600}] }, { id: '2', name: 'xfjstips_4', - rank:[2], + rank:[2,2], need: [{'a': 'attr', 't': 'rmbmoney', 'n': 18000}], prize: [{'a': 'item', 't': '13', 'n': 600}] }, { id: '3', name: 'xfjstips_5', - rank:[3], + rank:[3,3], need: [{'a': 'attr', 't': 'rmbmoney', 'n': 16000}], prize: [{'a': 'item', 't': '13', 'n': 600}] }, @@ -4025,6 +4029,13 @@ rank:[11,30], need: [{'a': 'attr', 't': 'rmbmoney', 'n': 12000}], prize: [{'a': 'item', 't': '13', 'n': 600}] + }, + { + id: '6', + name: 'xfjstips_8', + rank:[31,9999], + need: [{'a': 'attr', 't': 'rmbmoney', 'n': 12000}], + prize: [{'a': 'item', 't': '13', 'n': 600}] } ] } @@ -4043,15 +4054,17 @@ "data" : { //活动文本描述 intr: "ljlibaotips_1", - intr: "ljlibaotips_2", + intr2: "ljlibaotips_2", //礼包 gift: [ { id: '1', + name: 'ljlibaotips_3', need:[], free: false, payId: 'ljlibao_1', + //返利比 scale: 200, buynum: 1, prize:[ @@ -4179,7 +4192,11 @@ ] }, ], + //买X次可以领大奖 + payRewardNum: 5, //自选框掉落池 + //配几组就显示有几个格子 + //配置的是可选的道具 dlz: [ { "1": {"a": "item", "t":"600", "n": 20}, @@ -4224,5 +4241,52 @@ } ] } + }, + { + "hdid" : 13000, // 唯一活动id 累计购买礼包 + "htype" : 13, // 后端唯一识别标识 + "stype" : 1300, // 前端唯一识别标识(看前端需要是否修改) + "ttype" : 0, // 0 按照开服时间计算,1 玩家注册时间计算 4 屏蔽此活动 + "stime" : 0, // 活动开始天数 + "rtime" : 30, // 活动显示结束天数 + "etime" : 30, // 活动实际结束 + "name": "fenhongbao", + "icon": "icon_fenhongbao", + "showtime" : "仅供参考,会复写正确值", // 自选礼包,如果存在多个活动,计费点不要设置一样;如果是一样,可能会存在付费一次,购买多次。 + "data" : { + //活动文本描述 + intr: "zuanshihongbao_5", + //分红包所需最低钻石数 + loglimit: 1000, + //奖池总数量 + jackpot: 100000, + //档位 + arr: [ + { + //权重 + "weight": 50, + //获得范围 + "numrange": [1000,1500] + }, + { + //权重 + "weight": 30, + //获得范围 + "numrange": [1500,2000] + }, + { + //权重 + "weight": 15, + //获得范围 + "numrange": [2000,3000] + }, + { + //权重 + "weight": 5, + //获得范围 + "numrange": [3000,8000] + } + ] + } } ] \ No newline at end of file From 50c52556e059a06eacf0c92e94cc450d6e59fdb9 Mon Sep 17 00:00:00 2001 From: dy Date: Thu, 21 Dec 2023 23:40:41 +0800 Subject: [PATCH 18/23] fix pay --- src/fix_patch/patch_hdinfo_20231221.ts | 27 ++++++++++++++++++++++++++ src/public/pay.ts | 1 + 2 files changed, 28 insertions(+) create mode 100644 src/fix_patch/patch_hdinfo_20231221.ts diff --git a/src/fix_patch/patch_hdinfo_20231221.ts b/src/fix_patch/patch_hdinfo_20231221.ts new file mode 100644 index 0000000..22afa3b --- /dev/null +++ b/src/fix_patch/patch_hdinfo_20231221.ts @@ -0,0 +1,27 @@ +import {ctor} from "../global"; +import {initMongoDB} from "../setMongodb"; + +async function start() { + await initMongoDB() + + // 刷新活动配置 + console.log(`删除错误活动数据开始...`); + + + await G.mongodb.collection("hdinfo").deleteOne({hdid: 8000}) + + console.log(`删除错误活动数据完成...`); +} + +ctor(); +start().then(() => { + let s = 0; + setInterval(() => { + s += 1; + console.log(new Date().format("MM-dd hh:mm:ss")); + if (s >= 3) process.exit(1); + }, 1000) + console.log("逻辑执行完成...等待退出!!!"); +}); + + diff --git a/src/public/pay.ts b/src/public/pay.ts index 61fef69..ec4ea08 100644 --- a/src/public/pay.ts +++ b/src/public/pay.ts @@ -178,6 +178,7 @@ export class PayFun { if (payed) { console.log(uid, payId, payArgs, orderNo); console.log('订单号已存在'); + return; } } From c6953882084e4cb4397ecd06c076182e88149ab2 Mon Sep 17 00:00:00 2001 From: dy Date: Thu, 21 Dec 2023 23:51:03 +0800 Subject: [PATCH 19/23] fix pay --- src/public/pay.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/public/pay.ts b/src/public/pay.ts index ec4ea08..e752ce8 100644 --- a/src/public/pay.ts +++ b/src/public/pay.ts @@ -233,7 +233,12 @@ export class PayFun { prize.push(...conf.prize) } //圣诞节活动充值 - await Christmasfun.payChristmas(payId, call); + try{ + await Christmasfun.payChristmas(payId, call); + }catch (e) { + console.log("Christmasfun.payChristmas Error",e); + } + let isReplaceConf = await this.checkBuysAfterPay(uid, payId, conf, payArgs, player) if (isReplaceConf) { let prizePayId = `zuanshi_${conf.money}` From ba2c49868f653cf8763a89e26a419d3550748b56 Mon Sep 17 00:00:00 2001 From: dy Date: Fri, 22 Dec 2023 00:22:54 +0800 Subject: [PATCH 20/23] fix pay --- src/public/pay.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/public/pay.ts b/src/public/pay.ts index e752ce8..b1302b5 100644 --- a/src/public/pay.ts +++ b/src/public/pay.ts @@ -244,7 +244,7 @@ export class PayFun { let prizePayId = `zuanshi_${conf.money}` payArgs.toPrizePayId = prizePayId conf = this.replacePrizeToChongzhi(prizePayId, conf) - prize = [...conf.prize] + prize = conf.prize; } await PlayerFun.sendPrize(call, prize); @@ -292,7 +292,7 @@ export class PayFun { * @param payId * @param conf */ - static async replacePrizeToChongzhi(payId, conf) { + static replacePrizeToChongzhi(payId, conf) { return { id: payId, money: conf.money, From 3d43fa1a34f9121c060a9b3a16ae16a546c0557b Mon Sep 17 00:00:00 2001 From: chenkai Date: Fri, 22 Dec 2023 10:07:23 +0800 Subject: [PATCH 21/23] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E6=8A=A2?= =?UTF-8?q?=E9=92=BB=E7=9F=B3=E6=B4=BB=E5=8A=A8=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/json/huodong.json5 | 62 +++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/src/json/huodong.json5 b/src/json/huodong.json5 index 4e332e8..c049895 100644 --- a/src/json/huodong.json5 +++ b/src/json/huodong.json5 @@ -4257,36 +4257,42 @@ //活动文本描述 intr: "zuanshihongbao_5", //分红包所需最低钻石数 - loglimit: 1000, + price: 1000, + reset: 0, //奖池总数量 - jackpot: 100000, - //档位 - arr: [ - { - //权重 - "weight": 50, - //获得范围 - "numrange": [1000,1500] - }, - { - //权重 - "weight": 30, - //获得范围 - "numrange": [1500,2000] - }, - { - //权重 - "weight": 15, - //获得范围 - "numrange": [2000,3000] - }, - { - //权重 - "weight": 5, - //获得范围 - "numrange": [3000,8000] + totalmoney: 100000, + groupConf: { + //档位 + base: { + loglimit:2000, + arr:[ + { + //权重 + "weight": 50, + //获得范围 + "numrange": [1000,1500] + }, + { + //权重 + "weight": 30, + //获得范围 + "numrange": [1500,2000] + }, + { + //权重 + "weight": 15, + //获得范围 + "numrange": [2000,3000] + }, + { + //权重 + "weight": 5, + //获得范围 + "numrange": [3000,8000] + } + ] } - ] + } } } ] \ No newline at end of file From 4b190272b172f277053b66aeff566afb7db4c714 Mon Sep 17 00:00:00 2001 From: chenkai Date: Fri, 22 Dec 2023 10:11:24 +0800 Subject: [PATCH 22/23] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=20remaining=20?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/payForDiamond/ApiCanReceive.ts | 2 +- src/api_s2c/event/payForDiamond/ApiReceive.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api_s2c/event/payForDiamond/ApiCanReceive.ts b/src/api_s2c/event/payForDiamond/ApiCanReceive.ts index b77fe24..a39596f 100644 --- a/src/api_s2c/event/payForDiamond/ApiCanReceive.ts +++ b/src/api_s2c/event/payForDiamond/ApiCanReceive.ts @@ -8,7 +8,7 @@ export async function playerCanReceive(call: ApiCall) { if (!activityInfo) { return call.error('No such activity'); } - const remaining = activityInfo.data['remaining']; + const remaining = typeof activityInfo.data['remaining'] === 'number'? activityInfo.data['remaining'] : activityInfo.data['totalmoney']; const zeroTime = PublicShared.getToDayZeroTime(); const dayPayInfo = await G.mongodb.collection('dayPay').findOne({ uid: call.uid, time: zeroTime }); if (!dayPayInfo || !dayPayInfo.payNum) { diff --git a/src/api_s2c/event/payForDiamond/ApiReceive.ts b/src/api_s2c/event/payForDiamond/ApiReceive.ts index aaf8a56..bb1d00d 100644 --- a/src/api_s2c/event/payForDiamond/ApiReceive.ts +++ b/src/api_s2c/event/payForDiamond/ApiReceive.ts @@ -66,7 +66,7 @@ export default async function (call: ApiCall) { }); } const activityData = canReceiveResult.activityInfo.data; - const remaining = activityData['remaining']? activityData['remaining'] : activityData['totalmoney']; + const remaining = typeof activityData['remaining'] === 'number'? activityData['remaining'] : activityData['totalmoney']; const { group, maxAmount } = randomWithWeight(activityData['groupConf']['arr']); const gotAmount = calcDiamondGot(remaining, group, maxAmount); // 减去余额 From 76a04a34d5b6ca9e3eaaf4d66dd304786c1fd205 Mon Sep 17 00:00:00 2001 From: chenkai Date: Fri, 22 Dec 2023 11:30:54 +0800 Subject: [PATCH 23/23] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20groups=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=8F=96=E5=80=BC=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/payForDiamond/ApiReceive.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api_s2c/event/payForDiamond/ApiReceive.ts b/src/api_s2c/event/payForDiamond/ApiReceive.ts index bb1d00d..cb45b06 100644 --- a/src/api_s2c/event/payForDiamond/ApiReceive.ts +++ b/src/api_s2c/event/payForDiamond/ApiReceive.ts @@ -67,7 +67,7 @@ export default async function (call: ApiCall) { } const activityData = canReceiveResult.activityInfo.data; const remaining = typeof activityData['remaining'] === 'number'? activityData['remaining'] : activityData['totalmoney']; - const { group, maxAmount } = randomWithWeight(activityData['groupConf']['arr']); + const { group, maxAmount } = randomWithWeight(activityData['groupConf']['base']['arr']); const gotAmount = calcDiamondGot(remaining, group, maxAmount); // 减去余额 const filter = {