From 6089ad5dd206c4f726c635faf58ac1192a845f7b Mon Sep 17 00:00:00 2001 From: dy Date: Wed, 27 Dec 2023 15:06:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8A=93=E5=A8=83=E5=A8=83?= =?UTF-8?q?=E7=9A=84=E4=BB=BB=E5=8A=A1=E7=B1=BB=E5=9E=8B=EF=BC=8CuserPing?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E7=8E=A9=E5=AE=B6=E9=92=BB=E7=9F=B3=E9=87=91?= =?UTF-8?q?=E5=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/user/ApiPing.ts | 5 +++++ src/globalListener.ts | 2 ++ src/public/task.ts | 6 ++++++ src/public/taskclass.ts | 10 ++++++++++ 4 files changed, 23 insertions(+) diff --git a/src/api_s2c/user/ApiPing.ts b/src/api_s2c/user/ApiPing.ts index 46dc2c3..2eaba74 100644 --- a/src/api_s2c/user/ApiPing.ts +++ b/src/api_s2c/user/ApiPing.ts @@ -20,4 +20,9 @@ export default async function (call: ApiCall) { onlineTime: onlineTime, openDay: PublicShared.getOpenServerDay() }); + + G.server.sendMsgByUid(call.uid, 'msg_s2c/PlayerChange', { + jinbi: call.conn.gud.jinbi, + rmbmoney: call.conn.gud.rmbmoney + }); } \ No newline at end of file diff --git a/src/globalListener.ts b/src/globalListener.ts index 24fd6eb..8496680 100644 --- a/src/globalListener.ts +++ b/src/globalListener.ts @@ -149,6 +149,8 @@ export type gEventType = { Class_task_156: (eventname, call, val, chkVal) => void; /**每日获取vip经验 */ Class_task_157: (eventname, call, val, chkVal) => void; + /**今日参与{1}次抓娃娃小游戏 */ + Class_task_158: (eventname, call, val, chkVal) => void; }; export function addListener() { diff --git a/src/public/task.ts b/src/public/task.ts index 055ed64..deb468c 100644 --- a/src/public/task.ts +++ b/src/public/task.ts @@ -838,6 +838,12 @@ export class TaskAllEmitFun { G.emit("Class_task_153", 'Class_task_153', node.call, _val, 0); } + if (node.call.service.name == 'event/yuandan/DMRec' && node.return.isSucc) { + // 今日参与{1}次抓娃娃小游戏 + let _val = node.call.conn.gud.helpHeros.length; + G.emit("Class_task_158", 'Class_task_158', node.call, _val, 0); + } + if (node.call.eventMsg && node.call.eventMsg["msg_s2c/PeijianChange"] && node.call.eventMsg["msg_s2c/PeijianChange"]) { let _change = node.call.eventMsg["msg_s2c/PeijianChange"]; diff --git a/src/public/taskclass.ts b/src/public/taskclass.ts index 5bf3f67..07c6635 100644 --- a/src/public/taskclass.ts +++ b/src/public/taskclass.ts @@ -820,6 +820,16 @@ export module manager { } } + // 第60个任务 今日参与{1}次抓娃娃小游戏 + export class Class_task_158 extends BaseClass { + stype = 158 + isinc = 1 + + async initVal(call: ApiCall, con) { + return 0; + } + } + }