增加抓娃娃的任务类型,userPing同步玩家钻石金币

This commit is contained in:
dy 2023-12-27 15:06:22 +08:00
parent 4538c0dc16
commit 6089ad5dd2
4 changed files with 23 additions and 0 deletions

View File

@ -20,4 +20,9 @@ export default async function (call: ApiCall<ReqPing, ResPing>) {
onlineTime: onlineTime,
openDay: PublicShared.getOpenServerDay()
});
G.server.sendMsgByUid(call.uid, 'msg_s2c/PlayerChange', {
jinbi: call.conn.gud.jinbi,
rmbmoney: call.conn.gud.rmbmoney
});
}

View File

@ -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() {

View File

@ -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"];

View File

@ -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;
}
}
}