From 14796bb06b2a08fdbe1a28145a087254a49dc9b5 Mon Sep 17 00:00:00 2001 From: xichaoyin Date: Wed, 10 Jan 2024 14:29:17 +0800 Subject: [PATCH 01/12] =?UTF-8?q?feat=EF=BC=9A=E9=BB=84=E6=97=97=E9=85=92?= =?UTF-8?q?=E9=A6=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/huangqijiuguan/ApiZhaoMu.ts | 2 +- src/api_s2c/event/huangqijiuguan/fun.ts | 38 +++++++++-- src/globalListener.ts | 13 ++-- src/public/scheduler/scheduler_newDay.ts | 66 ++++++++++--------- 4 files changed, 75 insertions(+), 44 deletions(-) diff --git a/src/api_s2c/event/huangqijiuguan/ApiZhaoMu.ts b/src/api_s2c/event/huangqijiuguan/ApiZhaoMu.ts index b672a94..0b22e98 100644 --- a/src/api_s2c/event/huangqijiuguan/ApiZhaoMu.ts +++ b/src/api_s2c/event/huangqijiuguan/ApiZhaoMu.ts @@ -19,7 +19,7 @@ export default async function (call: ApiCall) { let prize = []; let mydata = await HQJGFun.getMydata(call, call.req.hdid); - for (let n = 0; n < call.req.num; n++) { + for (let n = 1; n <= call.req.num; n++) { let num = mydata.zhaomu.num + n; let baodi = hd.data.baodi.filter(x => x.num == num); if (baodi.length > 0) { diff --git a/src/api_s2c/event/huangqijiuguan/fun.ts b/src/api_s2c/event/huangqijiuguan/fun.ts index 1ee383d..abf61a9 100644 --- a/src/api_s2c/event/huangqijiuguan/fun.ts +++ b/src/api_s2c/event/huangqijiuguan/fun.ts @@ -214,10 +214,13 @@ export default class HQJGFun { /** * 每日伤害等级奖励结算 */ - static async dayDpsLvPrize() { + static async dayDpsLvPrize(time: number) { + console.log( + "黄旗酒馆 每日伤害等级奖励结算 开始执行。。。" + ) // 取stime小于当前时间的最后一条数据 let hdinfo = await G.mongodb.collection("hdinfo").find({ - htype: this.htype, stime: { $lte: G.time } + htype: this.htype, stime: { $lte: time } }, { sort: { stime: -1 } }).limit(1).toArray(); // 没有活动数 @@ -227,6 +230,7 @@ export default class HQJGFun { let hd = hdinfo[0]; let hdid = hdinfo[0].hdid; + // 活动结束 if (hd.etime < G.time - 300) { return } @@ -260,17 +264,26 @@ export default class HQJGFun { contentInsertArr: [lvprize.lv], }) } + console.log( + "黄旗酒馆 每日伤害等级奖励结算 执行完成!!!" + ) }) } /** * 最大伤害排行奖励结算 */ - static async endDpsRankPrize() { - // 取stime小于当前时间的最后一条数据 + static async endDpsRankPrize(time: number) { + console.log( + "黄旗酒馆 最大伤害排行奖励结算 开始执行。。。" + ) + let today = PublicShared.getToDayZeroTime(time + 300); + let yesterday = PublicShared.getToDayZeroTime(time - 300); + + // 查询昨天23:59:00或者今天00:00:00结束的活动 let hdinfo = await G.mongodb.collection("hdinfo").find({ - htype: this.htype, stime: { $lte: G.time } - }, { sort: { stime: -1 } }).limit(1).toArray(); + htype: this.htype, rtime: { $gt: yesterday, $lte: today } + }).toArray(); // 没有活动数 if (hdinfo.length <= 0) { @@ -279,7 +292,7 @@ export default class HQJGFun { let hd = hdinfo[0]; let hdid = hdinfo[0].hdid; - if (hd.etime < G.time - 300) { + if (hd.data.sendrank) { return } @@ -306,5 +319,16 @@ export default class HQJGFun { contentInsertArr: [rank], }) } + // 标记已发送 + await G.mongodb.collection("hdinfo").updateOne( + { hdid: hdid }, { $set: { "data.sendrank": true } } + ); + + console.log( + "黄旗酒馆 最大伤害排行奖励结算 执行结束!!!" + ) } } + +G.on("NEW_DAY", HQJGFun.dayDpsLvPrize.bind(HQJGFun)); +G.on("NEW_DAY", HQJGFun.endDpsRankPrize.bind(HQJGFun)); \ No newline at end of file diff --git a/src/globalListener.ts b/src/globalListener.ts index 68bc8c8..d031e4f 100644 --- a/src/globalListener.ts +++ b/src/globalListener.ts @@ -15,13 +15,14 @@ import { ZhanLingTasks } from './public/zhanling'; import { player } from './shared/protocols/user/type'; import { PublicShared } from './shared/public/public'; import { setGud } from './public/gud'; -import {checkResetBuyLog} from "./api_s2c/event/zhoumolibao/ApiOpen"; -import {Christmasfun} from "./api_s2c/event/christmas/fun"; -import {PushGiftFun} from "./public/pushgift"; -import {LeiChongLiBaoBuyGift} from "./api_s2c/event/leichonglibao/ApiReceive"; +import { checkResetBuyLog } from "./api_s2c/event/zhoumolibao/ApiOpen"; +import { PushGiftFun } from "./public/pushgift"; +import { LeiChongLiBaoBuyGift } from "./api_s2c/event/leichonglibao/ApiReceive"; import { HongDianChange } from './api_s2c/hongdian/fun'; export type gEventType = { + /**新的一天 */ + NEW_DAY: (time: number) => void; /**玩家断开连接 */ PLAYER_DISCONNECT: (uid: string) => void; /**玩家修改名字 */ @@ -165,7 +166,7 @@ export function addListener() { XstaskFun.uidTask[uid] = null; delete XstaskFun.uidTask[uid]; } - setGud(uid,{ logoutTime: G.time }); + setGud(uid, { logoutTime: G.time }); G.mongodb.collection('user').updateOne({ uid: uid }, { $set: { logoutTime: G.time } }); }); @@ -177,7 +178,7 @@ export function addListener() { } }); - G.on('PLAYER_PAY', async (player, payId, payArgs,call) => { + G.on('PLAYER_PAY', async (player, payId, payArgs, call) => { let conf: any = await PayFun.getConf(payId, payArgs); ActionLog.addDayLog(player.uid, { key: 'pay', val: conf.payExp[0].n }); ActionLog.addRetainLog(player.uid, { key: 'pay', val: conf.payExp[0].n }); diff --git a/src/public/scheduler/scheduler_newDay.ts b/src/public/scheduler/scheduler_newDay.ts index 4ca793b..7c6ae72 100644 --- a/src/public/scheduler/scheduler_newDay.ts +++ b/src/public/scheduler/scheduler_newDay.ts @@ -4,6 +4,7 @@ import { Wjjl } from "../../module/collection_wjjl"; import { ZhanLingTasks } from "../zhanling"; import { setGud } from '../gud'; import { EmailFun } from '../email'; +import { clusterRunOnce } from '../../clusterUtils'; export class SchedulerNewDayLocalCtor extends Scheduler { @@ -23,6 +24,41 @@ export class SchedulerNewDayLocalCtor extends Scheduler { } async start() { + + clusterRunOnce(async () => { + //这个定时器会被每个进程都启动,这是这部分逻辑,应该只执行1次 + + // 每周一,发放终身卡 + (async () => { + if (PublicShared.getWeek(G.time) == 1) { + let logs = await G.mongodb.collection("payLogNew").find( + { key: "zhongshenka", del_time: { $exists: false } }, { projection: { _id: 0, } } + ).toArray(); + + if (logs.length == 0) { + console.log("没有终身卡数据,不发放终身卡"); + } + let con = G.gc.payEmail.zhongshenka.filter(e => e.day == 7)[0]; + for (let i = 0; i < logs.length; i++) { + console.log("发放终身卡", logs[i].uid); + // 发送邮件 + EmailFun.addEmail({ + uid: logs[i].uid, + type: "system", + title: con.title, + content: con.content, + contentInsertArr: [], + createTime: G.time, + prize: con.prize, + }) + } + } + })() + + // 转点刷新事件 + G.emit('NEW_DAY', G.time); + }) + let users = Object.values(G.server.uid_connections) if (users.length) { for (let item of users) { @@ -55,35 +91,5 @@ export class SchedulerNewDayLocalCtor extends Scheduler { } G.server.broadcastClusterMsg('msg_s2c/NewDay', { time: this.zeroTime }); } - - (async () => { - // 每周一,发放终身卡 - if (PublicShared.getWeek(G.time) != 1) { - console.log("不是周一,不发放终身卡", PublicShared.getWeek(G.time)); - return - }; - - let logs = await G.mongodb.collection("payLogNew").find( - { key: "zhongshenka", del_time: { $exists: false } }, { projection: { _id: 0, } } - ).toArray(); - - if (logs.length == 0) { - console.log("没有终身卡数据,不发放终身卡"); - } - let con = G.gc.payEmail.zhongshenka.filter(e => e.day == 7)[0]; - for (let i = 0; i < logs.length; i++) { - console.log("发放终身卡", logs[i].uid); - // 发送邮件 - EmailFun.addEmail({ - uid: logs[i].uid, - type: "system", - title: con.title, - content: con.content, - contentInsertArr: [], - createTime: G.time, - prize:con.prize, - }) - } - })() } } From 273b1865c32c17ccdd45dd7b45e019d796d30178 Mon Sep 17 00:00:00 2001 From: xichaoyin Date: Wed, 10 Jan 2024 17:53:44 +0800 Subject: [PATCH 02/12] =?UTF-8?q?feat:=E9=BB=84=E6=97=97=E9=85=92=E9=A6=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/huangqijiuguan/ApiFight.ts | 2 +- src/api_s2c/event/huangqijiuguan/ApiOpen.ts | 3 +-- src/api_s2c/event/huangqijiuguan/ApiRecDpsPrize.ts | 3 +-- .../event/huangqijiuguan/ApiZhaoMuPrizeRec.ts | 14 ++++++++++---- src/api_s2c/event/huangqijiuguan/fun.ts | 6 +++--- .../event/huangqijiuguan/PtlZhaoMuPrizeRec.ts | 2 +- 6 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/api_s2c/event/huangqijiuguan/ApiFight.ts b/src/api_s2c/event/huangqijiuguan/ApiFight.ts index fa547a2..b7f1085 100644 --- a/src/api_s2c/event/huangqijiuguan/ApiFight.ts +++ b/src/api_s2c/event/huangqijiuguan/ApiFight.ts @@ -6,7 +6,7 @@ import { fightResult } from "../../../shared/fightControl/fightType"; import { FightFun } from "../../../public/fight"; export default async function (call: ApiCall) { - let hd = await HuoDongFun.getHdidInfo(call, call.req.hdid); + let hd = await HQJGFun.HdInfo(call, call.req.hdid); if (!hd) { // 无此活动 diff --git a/src/api_s2c/event/huangqijiuguan/ApiOpen.ts b/src/api_s2c/event/huangqijiuguan/ApiOpen.ts index 0d799d2..660ba47 100644 --- a/src/api_s2c/event/huangqijiuguan/ApiOpen.ts +++ b/src/api_s2c/event/huangqijiuguan/ApiOpen.ts @@ -1,10 +1,9 @@ import HQJGFun from "./fun"; import { ApiCall } from "tsrpc"; -import { HuoDongFun } from "../../../public/huodongfun"; import { ReqOpen, ResOpen } from "../../../shared/protocols/event/huangqijiuguan/PtlOpen"; export default async (call: ApiCall) => { - let hd = await HuoDongFun.getHdidInfo(call, call.req.hdid); + let hd = await HQJGFun.HdInfo(call, call.req.hdid); if (!hd || Object.keys(hd).length <= 0) { // 无此活动 return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 }) diff --git a/src/api_s2c/event/huangqijiuguan/ApiRecDpsPrize.ts b/src/api_s2c/event/huangqijiuguan/ApiRecDpsPrize.ts index 25b3438..888b3b3 100644 --- a/src/api_s2c/event/huangqijiuguan/ApiRecDpsPrize.ts +++ b/src/api_s2c/event/huangqijiuguan/ApiRecDpsPrize.ts @@ -1,11 +1,10 @@ import { ApiCall } from "tsrpc"; import HQJGFun, { Data } from "./fun"; -import { HuoDongFun } from "../../../public/huodongfun"; import { ReqRecDpsPrize, ResRecDpsPrize } from "../../../shared/protocols/event/huangqijiuguan/PtlRecDpsPrize"; import { PlayerFun } from "../../../public/player"; export default async function (call: ApiCall) { - let hd = await HuoDongFun.getHdidInfo(call, call.req.hdid); + let hd = await HQJGFun.HdInfo(call, call.req.hdid); if (!hd) { // 无此活动 diff --git a/src/api_s2c/event/huangqijiuguan/ApiZhaoMuPrizeRec.ts b/src/api_s2c/event/huangqijiuguan/ApiZhaoMuPrizeRec.ts index f0b7f8f..6107988 100644 --- a/src/api_s2c/event/huangqijiuguan/ApiZhaoMuPrizeRec.ts +++ b/src/api_s2c/event/huangqijiuguan/ApiZhaoMuPrizeRec.ts @@ -14,13 +14,19 @@ export default async function (call: ApiCall mydata.zhaomu.num || mydata.zhaomu.prize.includes(rec)) { + let con = hd.data.choukajiangli[rec.idx]; + + if (con.num > mydata.zhaomu.num || mydata.zhaomu.prize.includes(rec.idx)) { continue } - mydata.zhaomu.prize.push(rec); - prize = prize.concat(con.prize); + if (con.dlz) { + prize.push(con.dlz[rec.sec]); + } else { + prize = prize.concat(con.prize); + } + + mydata.zhaomu.prize.push(rec.idx); } if (prize.length <= 0) { diff --git a/src/api_s2c/event/huangqijiuguan/fun.ts b/src/api_s2c/event/huangqijiuguan/fun.ts index abf61a9..175420b 100644 --- a/src/api_s2c/event/huangqijiuguan/fun.ts +++ b/src/api_s2c/event/huangqijiuguan/fun.ts @@ -26,7 +26,7 @@ export interface Data { chouka: { a: string, t: string, n: number, p: number, gailv: number, cishu: number }[] - choukajiangli: { num: number, prize: any[] }[] + choukajiangli: { num: number, prize?: any[], dlz: { [k: string]: atn } }[] baodi: { num: number, prize: any[] }[] @@ -151,14 +151,14 @@ export default class HQJGFun { } /** 获取活动数据 */ - static async HdInfo(call: ApiCall, hdid?: number): Promise { + static async HdInfo(call: ApiCall, hdid?: number): Promise { if (!hdid) { let hdlist = await HuoDongFun.gethdList( call, this.htype ); return hdlist.length > 0 ? hdlist[0] : null } else { - return await HuoDongFun.getHdidInfo(call, hdid) as ReqAddHuoDong + return await HuoDongFun.getHdidInfo(call, hdid) as any as ReqAddHuoDong & { data: Data } } } diff --git a/src/shared/protocols/event/huangqijiuguan/PtlZhaoMuPrizeRec.ts b/src/shared/protocols/event/huangqijiuguan/PtlZhaoMuPrizeRec.ts index 4cfdace..d5a6eba 100644 --- a/src/shared/protocols/event/huangqijiuguan/PtlZhaoMuPrizeRec.ts +++ b/src/shared/protocols/event/huangqijiuguan/PtlZhaoMuPrizeRec.ts @@ -2,7 +2,7 @@ import { PlayerData } from "../../../../api_s2c/event/huangqijiuguan/fun" export interface ReqZhaoMuPrizeRec { hdid: number - recid: number[] + recid: { idx: number, sec: string }[] } export interface ResZhaoMuPrizeRec { From 950a048742f57c861371acbc85a3b6838fcc9ec1 Mon Sep 17 00:00:00 2001 From: xichaoyin Date: Wed, 10 Jan 2024 18:23:42 +0800 Subject: [PATCH 03/12] =?UTF-8?q?feat:=E9=BB=84=E6=97=97=E9=85=92=E9=A6=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/huangqijiuguan/ApiFight.ts | 2 +- src/api_s2c/event/huangqijiuguan/fun.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api_s2c/event/huangqijiuguan/ApiFight.ts b/src/api_s2c/event/huangqijiuguan/ApiFight.ts index b7f1085..41974cd 100644 --- a/src/api_s2c/event/huangqijiuguan/ApiFight.ts +++ b/src/api_s2c/event/huangqijiuguan/ApiFight.ts @@ -17,7 +17,7 @@ export default async function (call: ApiCall) { let mydata = await HQJGFun.getMydata(call, call.req.hdid); // 开始战斗 - let result: fightResult = await FightFun.fightNpc(call, hd.data.bossId, 'hqjg'); + let result: fightResult = await FightFun.fightNpc(call, hd.data.boss.npcId, 'hqjg'); let up = false; let today = HQJGFun.today(hd); diff --git a/src/api_s2c/event/huangqijiuguan/fun.ts b/src/api_s2c/event/huangqijiuguan/fun.ts index 175420b..ec907e8 100644 --- a/src/api_s2c/event/huangqijiuguan/fun.ts +++ b/src/api_s2c/event/huangqijiuguan/fun.ts @@ -14,7 +14,10 @@ export interface Data { } huobi: atn // 抽卡货币 - bossId: number // boss表的ID + boss: { + img: string + npcId: number + } // boss排行邮件 bossRank_des: string From 1c18a5b7fd8a958a0422a2a40e658556ff1fb02e Mon Sep 17 00:00:00 2001 From: xichaoyin Date: Wed, 10 Jan 2024 18:56:33 +0800 Subject: [PATCH 04/12] =?UTF-8?q?feat:=E9=BB=84=E6=97=97=E9=85=92=E9=A6=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/huangqijiuguan/fun.ts | 40 ++++++++++++++- src/public/taskclass.ts | 67 +++++++++++++------------ 2 files changed, 74 insertions(+), 33 deletions(-) diff --git a/src/api_s2c/event/huangqijiuguan/fun.ts b/src/api_s2c/event/huangqijiuguan/fun.ts index ec907e8..1e4a6bc 100644 --- a/src/api_s2c/event/huangqijiuguan/fun.ts +++ b/src/api_s2c/event/huangqijiuguan/fun.ts @@ -9,7 +9,7 @@ export interface Data { show: 1 task: { [k: `day${number}`]: { - [k: string]: { pval: number, stype: string, cond: string[], tiaozhuan: number, prize: atn[], des: string } + [k: string]: { pval: number, stype: number, cond: string[], tiaozhuan: number, prize: atn[], des: string } } } @@ -331,6 +331,44 @@ export default class HQJGFun { "黄旗酒馆 最大伤害排行奖励结算 执行结束!!!" ) } + + /**设置任务 */ + static async setTaskVal(call: ApiCall, stype: number, val: number, chkCall: Function, chkval: number = 0, isinc: number = 0, alchangeVal: Function, arg) { + // 活动过期,不计数 + let hd = await this.HdInfo(call) + if (!hd) return + + let today = this.today(hd); + await this.getMydata(call, hd.hdid) + + let isset = 0; + let setData = { + $inc: {}, + $set: {} + }; + let tasks = hd.data.task[`day${today}`]; + for (let taskCon of Object.values(tasks)) { + if (taskCon.stype != stype) continue + + // 不符合任务要求 + if (!(await chkCall(taskCon["cond"], chkval, arg))) continue + + // 根据需求改写 + val = await alchangeVal(call, taskCon, val, arg) + + isset = 1 + if (isinc == 1) { // 累加 + setData["$inc"][`task.val.day${today}`] = val + } else { + setData["$set"][`task.val.day${today}`] = val + } + } + + // 设置任务 + if (isset == 1) { + await G.mongodb.collection('event').updateOne({ uid: call.uid, type: this.dataType(hd.hdid) }, setData) + } + } } G.on("NEW_DAY", HQJGFun.dayDpsLvPrize.bind(HQJGFun)); diff --git a/src/public/taskclass.ts b/src/public/taskclass.ts index 878a7a2..88ad56f 100644 --- a/src/public/taskclass.ts +++ b/src/public/taskclass.ts @@ -1,19 +1,20 @@ -import {ApiCall} from "tsrpc" -import {YangChengMuBiaofun} from "../api_s2c/event/yangchengmubiao/fun" -import {Christmasfun} from "../api_s2c/event/christmas/fun" +import { ApiCall } from "tsrpc" +import { YangChengMuBiaofun } from "../api_s2c/event/yangchengmubiao/fun" +import { Christmasfun } from "../api_s2c/event/christmas/fun" // import { YangChengMuBiaofun } from "../api_s2c/event/yangchengmubiao/fun" -import {Wjjl} from "../module/collection_wjjl" -import {PublicShared} from "../shared/public/public" -import {PayFun} from "./pay" -import {TaskFun} from "./task" -import {CollectionWanted} from "../module/collection_wanted"; -import {TanXianFun} from "./tanxian"; -import {PataFun} from "./pata"; -import {weixiuchangType} from "../shared/protocols/weixiuchang/type"; -import {FunWeiXiuChang} from "./weixiuchang"; -import {JJCFun} from "./jjc"; -import {getGud} from "./gud"; -import {Yuandanfun} from "../api_s2c/event/yuandan/fun"; +import { Wjjl } from "../module/collection_wjjl" +import { PublicShared } from "../shared/public/public" +import { PayFun } from "./pay" +import { TaskFun } from "./task" +import { CollectionWanted } from "../module/collection_wanted"; +import { TanXianFun } from "./tanxian"; +import { PataFun } from "./pata"; +import { weixiuchangType } from "../shared/protocols/weixiuchang/type"; +import { FunWeiXiuChang } from "./weixiuchang"; +import { JJCFun } from "./jjc"; +import { getGud } from "./gud"; +import { Yuandanfun } from "../api_s2c/event/yuandan/fun"; +import HQJGFun from "../api_s2c/event/huangqijiuguan/fun" let _classNameFunc = {} /** @@ -72,13 +73,15 @@ export module manager { // 设置数据 async setVal(call: ApiCall, val: number, chkval, arg) { - TaskFun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg) + TaskFun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg); // 养成目标任务计数 - YangChengMuBiaofun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg) + YangChengMuBiaofun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg); // 圣诞活动任务计数 - Christmasfun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg) + Christmasfun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg); // 元旦活动任务计数 - Yuandanfun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg) + Yuandanfun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg); + // 黄旗酒馆 + HQJGFun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg); } // 任务数值, 和检测值,看情况需要上层复写 @@ -167,12 +170,12 @@ export module manager { async initVal(call: ApiCall, con) { let _chk = parseInt(con.cond[0]) - return await G.mongodb.collection('hero').countDocuments({uid: call.uid, lv: {$gte: _chk}}) || 0 + return await G.mongodb.collection('hero').countDocuments({ uid: call.uid, lv: { $gte: _chk } }) || 0 } async alchangeVal(call: ApiCall, con, val: number) { let _chk = parseInt(con.cond[0]) - return await G.mongodb.collection('hero').countDocuments({uid: call.uid, lv: {$gte: _chk}}) || 0 + return await G.mongodb.collection('hero').countDocuments({ uid: call.uid, lv: { $gte: _chk } }) || 0 } } @@ -194,13 +197,13 @@ export module manager { async initVal(call: ApiCall, con) { let _chk = parseInt(con.cond[0]) - let _num = await G.mongodb.collection('hero').countDocuments({uid: call.uid, jieji: {$gte: _chk}}) || 0 + let _num = await G.mongodb.collection('hero').countDocuments({ uid: call.uid, jieji: { $gte: _chk } }) || 0 return _num } async alchangeVal(call: ApiCall, con, val: number) { let _chk = parseInt(con.cond[0]) - let _num = await G.mongodb.collection('hero').countDocuments({uid: call.uid, jieji: {$gte: _chk}}) || 0 + let _num = await G.mongodb.collection('hero').countDocuments({ uid: call.uid, jieji: { $gte: _chk } }) || 0 return _num } } @@ -256,13 +259,13 @@ export module manager { async initVal(call: ApiCall, con) { let _chk = parseInt(con.cond[0]) - let _num = await G.mongodb.collection('equip').countDocuments({uid: call.uid, lv: {$gte: _chk}}) || 0 + let _num = await G.mongodb.collection('equip').countDocuments({ uid: call.uid, lv: { $gte: _chk } }) || 0 return _num } async alchangeVal(call: ApiCall, con, val: number) { let _chk = parseInt(con.cond[0]) - let _num = await G.mongodb.collection('equip').countDocuments({uid: call.uid, lv: {$gte: _chk}}) || 0 + let _num = await G.mongodb.collection('equip').countDocuments({ uid: call.uid, lv: { $gte: _chk } }) || 0 return _num } } @@ -426,7 +429,7 @@ export module manager { isinc = 1 async initVal(call: ApiCall, con) { - let myData = await G.mongodb.cPlayerInfo('meirishilian').findOne({uid: call.uid, type: 'meirishilian'}); + let myData = await G.mongodb.cPlayerInfo('meirishilian').findOne({ uid: call.uid, type: 'meirishilian' }); if (myData.data.refreshTime > PublicShared.getToDayZeroTime()) { return R.compose(R.sum(), R.map(i => i[0].useFightNum), R.values())(myData.data.numInfo) || 0 } @@ -446,7 +449,7 @@ export module manager { isinc = 1 async initVal(call: ApiCall, con) { - let myData = await G.mongodb.cPlayerInfo('qjzzd').findOne({uid: call.uid, type: 'qjzzd'}); + let myData = await G.mongodb.cPlayerInfo('qjzzd').findOne({ uid: call.uid, type: 'qjzzd' }); if (myData?.refreFightTime > PublicShared.getToDayZeroTime()) { return myData?.useFightNum || 0 } @@ -505,7 +508,7 @@ export module manager { isinc = 1 async initVal(call: ApiCall, con) { - let data: Partial = await G.mongodb.collection('wanted').findOne({uid: call.uid}) || {}; + let data: Partial = await G.mongodb.collection('wanted').findOne({ uid: call.uid }) || {}; if (data.refreshTime > PublicShared.getToDayZeroTime()) { return data.toDayUseNum || 0 } @@ -608,12 +611,12 @@ export module manager { async initVal(call: ApiCall, con) { let _chk = parseInt(con.cond[0]) - return await G.mongodb.collection('peijian').countDocuments({uid: call.uid, lv: {$gte: _chk}}) || 0 + return await G.mongodb.collection('peijian').countDocuments({ uid: call.uid, lv: { $gte: _chk } }) || 0 } async alchangeVal(call: ApiCall, con, val: number) { let _chk = parseInt(con.cond[0]) - return await G.mongodb.collection('peijian').countDocuments({uid: call.uid, lv: {$gte: _chk}}) || 0 + return await G.mongodb.collection('peijian').countDocuments({ uid: call.uid, lv: { $gte: _chk } }) || 0 } } @@ -675,11 +678,11 @@ export module manager { isinc = 0 async initVal(call: ApiCall, con) { - return await G.mongodb.collection('equip').countDocuments({uid: call.uid, wearaId: {$ne: ""}}) || 0 + return await G.mongodb.collection('equip').countDocuments({ uid: call.uid, wearaId: { $ne: "" } }) || 0 } async alchangeVal(call: ApiCall, con, val: number) { - return await G.mongodb.collection('equip').countDocuments({uid: call.uid, wearaId: {$ne: ""}}) || 0 + return await G.mongodb.collection('equip').countDocuments({ uid: call.uid, wearaId: { $ne: "" } }) || 0 } } From 8b8e14a60991b956efc4dfe94af02e8aea92f9b4 Mon Sep 17 00:00:00 2001 From: xichaoyin Date: Wed, 10 Jan 2024 19:39:07 +0800 Subject: [PATCH 05/12] =?UTF-8?q?feat=EF=BC=9A=E9=BB=84=E6=97=97=E9=85=92?= =?UTF-8?q?=E9=A6=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/huangqijiuguan/fun.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api_s2c/event/huangqijiuguan/fun.ts b/src/api_s2c/event/huangqijiuguan/fun.ts index 1e4a6bc..593e459 100644 --- a/src/api_s2c/event/huangqijiuguan/fun.ts +++ b/src/api_s2c/event/huangqijiuguan/fun.ts @@ -371,5 +371,5 @@ export default class HQJGFun { } } -G.on("NEW_DAY", HQJGFun.dayDpsLvPrize.bind(HQJGFun)); -G.on("NEW_DAY", HQJGFun.endDpsRankPrize.bind(HQJGFun)); \ No newline at end of file +// G.on("NEW_DAY", HQJGFun.dayDpsLvPrize.bind(HQJGFun)); +// G.on("NEW_DAY", HQJGFun.endDpsRankPrize.bind(HQJGFun)); \ No newline at end of file From d30f62f6c58c320c643556369b707e0daf40c4f7 Mon Sep 17 00:00:00 2001 From: xichaoyin Date: Wed, 10 Jan 2024 19:59:27 +0800 Subject: [PATCH 06/12] =?UTF-8?q?feat:=E9=BB=84=E6=97=97=E9=85=92=E9=A6=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/huangqijiuguan/ApiZhaoMuPrizeRec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api_s2c/event/huangqijiuguan/ApiZhaoMuPrizeRec.ts b/src/api_s2c/event/huangqijiuguan/ApiZhaoMuPrizeRec.ts index 6107988..7ec2586 100644 --- a/src/api_s2c/event/huangqijiuguan/ApiZhaoMuPrizeRec.ts +++ b/src/api_s2c/event/huangqijiuguan/ApiZhaoMuPrizeRec.ts @@ -21,7 +21,7 @@ export default async function (call: ApiCall Date: Wed, 10 Jan 2024 20:50:03 +0800 Subject: [PATCH 07/12] =?UTF-8?q?feat:=E9=BB=84=E6=97=97=E9=85=92=E9=A6=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../event/huangqijiuguan/ApiGiftRec.ts | 42 + .../event/huangqijiuguan/ApiGiftSelect.ts | 35 + src/api_s2c/event/huangqijiuguan/fun.ts | 63 +- src/globalListener.ts | 6 + .../event/huangqijiuguan/PtlGiftRec.ts | 11 + .../event/huangqijiuguan/PtlGiftSelect.ts | 11 + src/shared/protocols/serviceProto.ts | 773 +++++++++++------- 7 files changed, 608 insertions(+), 333 deletions(-) create mode 100644 src/api_s2c/event/huangqijiuguan/ApiGiftRec.ts create mode 100644 src/api_s2c/event/huangqijiuguan/ApiGiftSelect.ts create mode 100644 src/shared/protocols/event/huangqijiuguan/PtlGiftRec.ts create mode 100644 src/shared/protocols/event/huangqijiuguan/PtlGiftSelect.ts diff --git a/src/api_s2c/event/huangqijiuguan/ApiGiftRec.ts b/src/api_s2c/event/huangqijiuguan/ApiGiftRec.ts new file mode 100644 index 0000000..b2e309e --- /dev/null +++ b/src/api_s2c/event/huangqijiuguan/ApiGiftRec.ts @@ -0,0 +1,42 @@ +import { ApiCall } from "tsrpc"; +import { ReqGiftRec, ResGiftRec } from "../../../shared/protocols/event/huangqijiuguan/PtlGiftRec"; +import HQJGFun from "./fun"; + +export default async function (call: ApiCall) { + let hd = await HQJGFun.HdInfo(call, call.req.hdid); + if (!hd || Object.keys(hd).length <= 0) { + // 无此活动 + return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 }) + } + + let gift = hd.data.gift.filter(i => i.id == call.req.giftid)[0]; + if (!gift || !gift.free) { + return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 }) + } + + let mydata = await HQJGFun.getMydata(call, call.req.hdid); + if ((mydata.giftbuy[call.req.giftid] || { num: 0 }).num + 1 > gift.buynum) { + return call.error("", { code: -2, message: globalThis.lng.hqjgtips_28 }) + } + + let prize: atn[] = [].concat(gift.prize); + if (!mydata.giftbuy[call.req.giftid]) { + mydata.giftbuy[call.req.giftid] = { num: 0, select: [] }; + } + + if (gift.dlz) { + for (let i = 0; i < gift.dlz.length; i++) { + if (!mydata.giftbuy[call.req.giftid].select[i]) { + let ids = Object.keys(gift.dlz[i]) + prize.push(gift.dlz[i][ids[0]]); + mydata.giftbuy[call.req.giftid].select[i] = Number(ids[0]); + } else { + prize.push(gift.dlz[i][mydata.giftbuy.select[i]]); + } + } + } + mydata.giftbuy[call.req.giftid].num++; + await HQJGFun.setMyData(call.uid, call.req.hdid, { giftbuy: mydata.giftbuy }); + + call.succ({ data: mydata, prize: prize }) +} diff --git a/src/api_s2c/event/huangqijiuguan/ApiGiftSelect.ts b/src/api_s2c/event/huangqijiuguan/ApiGiftSelect.ts new file mode 100644 index 0000000..8c8f2d5 --- /dev/null +++ b/src/api_s2c/event/huangqijiuguan/ApiGiftSelect.ts @@ -0,0 +1,35 @@ +import { ApiCall } from "tsrpc"; +import { ReqGiftSelect, ResGiftSelect } from "../../../shared/protocols/event/huangqijiuguan/PtlGiftSelect"; +import HQJGFun from "./fun"; + +export default async function (call: ApiCall) { + let hd = await HQJGFun.HdInfo(call, call.req.hdid); + if (!hd || Object.keys(hd).length <= 0) { + // 无此活动 + return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 }) + } + + let gift = hd.data.gift[call.req.giftid]; + if (!gift || !gift.dlz) { + return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 }) + } + + for (let i = 0; i < call.req.seletc.length; i++) { + if (!gift.dlz[i] || !gift.dlz[i][call.req.seletc[i]]) { + return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 }) + } + } + + let mydata = await HQJGFun.getMydata(call, call.req.hdid); + if (!mydata.giftbuy[call.req.giftid]) { + mydata.giftbuy[call.req.giftid] = { + num: 0, select: call.req.seletc + } + } else { + mydata.giftbuy[call.req.giftid].select = call.req.seletc; + } + + await HQJGFun.setMyData(call.uid, call.req.hdid, { giftbuy: mydata.giftbuy }); + + call.succ({ data: mydata }); +} \ No newline at end of file diff --git a/src/api_s2c/event/huangqijiuguan/fun.ts b/src/api_s2c/event/huangqijiuguan/fun.ts index 593e459..881ed73 100644 --- a/src/api_s2c/event/huangqijiuguan/fun.ts +++ b/src/api_s2c/event/huangqijiuguan/fun.ts @@ -3,6 +3,7 @@ import { ReqAddHuoDong } from "../../../monopoly/protocols/PtlAddHuoDong" import { HuoDongFun } from "../../../public/huodongfun" import { PublicShared } from "../../../shared/public/public" import { EmailFun } from "../../../public/email" +import { playerInfo } from "../../../shared/protocols/user/PtlLogin" // hddata.data export interface Data { @@ -33,7 +34,7 @@ export interface Data { baodi: { num: number, prize: any[] }[] - gift: { id: number, free: boolean, payId: string, buynum: number, prize: atn[] }[] + gift: { id: number, free: boolean, payId: string, buynum: number, prize: atn[], dlz?: { [k: string]: atn }[] }[] duihuan: { id: number, need: atn[], prize: atn[], buyNum: number }[] @@ -203,17 +204,6 @@ export default class HQJGFun { } } - static async buy(call: ApiCall, payId: string) { - let hddata = await this.HdInfo(call); - - if (!hddata) { // 活动不存在 - return - } - - let mydata = await this.getMydata(call); - await this.setMyData(call.uid, (await this.HdInfo(call)).hdid, mydata); - } - /** * 每日伤害等级奖励结算 */ @@ -347,7 +337,8 @@ export default class HQJGFun { $set: {} }; let tasks = hd.data.task[`day${today}`]; - for (let taskCon of Object.values(tasks)) { + for (let taskid of Object.keys(tasks)) { + let taskCon = tasks[taskid]; if (taskCon.stype != stype) continue // 不符合任务要求 @@ -358,9 +349,9 @@ export default class HQJGFun { isset = 1 if (isinc == 1) { // 累加 - setData["$inc"][`task.val.day${today}`] = val + setData["$inc"][`task.val.day${today}.${taskid}`] = val } else { - setData["$set"][`task.val.day${today}`] = val + setData["$set"][`task.val.day${today}.${taskid}`] = val } } @@ -369,7 +360,43 @@ export default class HQJGFun { await G.mongodb.collection('event').updateOne({ uid: call.uid, type: this.dataType(hd.hdid) }, setData) } } -} -// G.on("NEW_DAY", HQJGFun.dayDpsLvPrize.bind(HQJGFun)); -// G.on("NEW_DAY", HQJGFun.endDpsRankPrize.bind(HQJGFun)); \ No newline at end of file + static async buy(player: playerInfo, payId: string, payArgs: any, call: ApiCall) { + let hd = await this.HdInfo(call); + + if (!hd) { // 活动不存在 + return + } + + // 判断购买次数 + let gift = hd.data.gift.filter(x => x.payId == payId)[0]; + if (!gift) { + return + } + + let mydata = await this.getMydata(call); + if (!mydata.giftbuy[gift.id]) { + mydata.giftbuy[gift.id] = { num: 0, select: [] }; + } + + let prize: atn[] = []; + if (mydata.giftbuy[gift.id].num + 1 > gift.buynum) { + let pay = G.gc.pay[payId]; + prize.push({ a: "attr", t: "rmbmoney", n: pay.payExp[0].n }) + } else { + prize = gift.prize; + for (let i = 0; i < gift.dlz.length; i++) { + if (!mydata.giftbuy[call.req.giftid].select[i]) { + let ids = Object.keys(gift.dlz[i]) + prize.push(gift.dlz[i][ids[0]]); + mydata.giftbuy[call.req.giftid].select[i] = Number(ids[0]); + } else { + prize.push(gift.dlz[i][mydata.giftbuy.select[i]]); + } + } + } + + mydata.giftbuy[gift.id].num++; + await this.setMyData(call.uid, hd.hdid, { giftbuy: mydata.giftbuy }); + } +} \ No newline at end of file diff --git a/src/globalListener.ts b/src/globalListener.ts index d031e4f..9b73722 100644 --- a/src/globalListener.ts +++ b/src/globalListener.ts @@ -19,6 +19,7 @@ import { checkResetBuyLog } from "./api_s2c/event/zhoumolibao/ApiOpen"; import { PushGiftFun } from "./public/pushgift"; import { LeiChongLiBaoBuyGift } from "./api_s2c/event/leichonglibao/ApiReceive"; import { HongDianChange } from './api_s2c/hongdian/fun'; +import HQJGFun from './api_s2c/event/huangqijiuguan/fun'; export type gEventType = { /**新的一天 */ @@ -261,4 +262,9 @@ export function addListener() { let call = PayFun.getCall(gud); G.emit("Class_task_134", 'Class_task_134', call, 1, 0, items); }); + + // 黄旗酒馆 + G.on("NEW_DAY", HQJGFun.dayDpsLvPrize.bind(HQJGFun)); + G.on("NEW_DAY", HQJGFun.endDpsRankPrize.bind(HQJGFun)); + G.on("PLAYER_PAY", HQJGFun.buy.bind(HQJGFun)); } \ No newline at end of file diff --git a/src/shared/protocols/event/huangqijiuguan/PtlGiftRec.ts b/src/shared/protocols/event/huangqijiuguan/PtlGiftRec.ts new file mode 100644 index 0000000..a15177d --- /dev/null +++ b/src/shared/protocols/event/huangqijiuguan/PtlGiftRec.ts @@ -0,0 +1,11 @@ +import { PlayerData } from "../../../../api_s2c/event/huangqijiuguan/fun" + +export interface ReqGiftRec { + hdid: number + giftid: number +} + +export interface ResGiftRec { + data: PlayerData + prize: { a: string, t: string, n: number }[] +} diff --git a/src/shared/protocols/event/huangqijiuguan/PtlGiftSelect.ts b/src/shared/protocols/event/huangqijiuguan/PtlGiftSelect.ts new file mode 100644 index 0000000..ef484aa --- /dev/null +++ b/src/shared/protocols/event/huangqijiuguan/PtlGiftSelect.ts @@ -0,0 +1,11 @@ +import { PlayerData } from "../../../../api_s2c/event/huangqijiuguan/fun" + +export interface ReqGiftSelect { + hdid: number + giftid: number + seletc: number[] +} + +export interface ResGiftSelect { + data: PlayerData +} diff --git a/src/shared/protocols/serviceProto.ts b/src/shared/protocols/serviceProto.ts index ccdee15..59f42ea 100644 --- a/src/shared/protocols/serviceProto.ts +++ b/src/shared/protocols/serviceProto.ts @@ -53,6 +53,8 @@ import { ReqGet, ResGet } from './event/diaoluoduihuan/PtlGet'; import { ReqOpen as ReqOpen_9, ResOpen as ResOpen_9 } from './event/diaoluoduihuan/PtlOpen'; import { ReqDuiHuan, ResDuiHuan } from './event/huangqijiuguan/PtlDuiHuan'; import { ReqFight as ReqFight_1, ResFight as ResFight_1 } from './event/huangqijiuguan/PtlFight'; +import { ReqGiftRec, ResGiftRec } from './event/huangqijiuguan/PtlGiftRec'; +import { ReqGiftSelect, ResGiftSelect } from './event/huangqijiuguan/PtlGiftSelect'; import { ReqOpen as ReqOpen_10, ResOpen as ResOpen_10 } from './event/huangqijiuguan/PtlOpen'; import { ReqRankList, ResRankList } from './event/huangqijiuguan/PtlRankList'; import { ReqRecDpsPrize, ResRecDpsPrize } from './event/huangqijiuguan/PtlRecDpsPrize'; @@ -587,6 +589,14 @@ export interface ServiceType { req: ReqFight_1, res: ResFight_1 }, + "event/huangqijiuguan/GiftRec": { + req: ReqGiftRec, + res: ResGiftRec + }, + "event/huangqijiuguan/GiftSelect": { + req: ReqGiftSelect, + res: ResGiftSelect + }, "event/huangqijiuguan/Open": { req: ReqOpen_10, res: ResOpen_10 @@ -2039,281 +2049,291 @@ export const serviceProto: ServiceProto = { }, { "id": 54, - "name": "event/huangqijiuguan/Open", + "name": "event/huangqijiuguan/GiftRec", "type": "api" }, { "id": 55, - "name": "event/huangqijiuguan/RankList", + "name": "event/huangqijiuguan/GiftSelect", "type": "api" }, { "id": 56, - "name": "event/huangqijiuguan/RecDpsPrize", + "name": "event/huangqijiuguan/Open", "type": "api" }, { "id": 57, - "name": "event/huangqijiuguan/TaskRec", + "name": "event/huangqijiuguan/RankList", "type": "api" }, { "id": 58, - "name": "event/huangqijiuguan/ZhaoMu", + "name": "event/huangqijiuguan/RecDpsPrize", "type": "api" }, { "id": 59, - "name": "event/huangqijiuguan/ZhaoMuPrizeRec", + "name": "event/huangqijiuguan/TaskRec", "type": "api" }, { "id": 60, - "name": "event/huobanzhaomu/Open", + "name": "event/huangqijiuguan/ZhaoMu", "type": "api" }, { "id": 61, - "name": "event/huobanzhaomu/Rec", + "name": "event/huangqijiuguan/ZhaoMuPrizeRec", "type": "api" }, { "id": 62, - "name": "event/jierihuodong/Get", + "name": "event/huobanzhaomu/Open", "type": "api" }, { "id": 63, - "name": "event/jierihuodong/Open", + "name": "event/huobanzhaomu/Rec", "type": "api" }, { "id": 64, - "name": "event/jierihuodong/Rec", + "name": "event/jierihuodong/Get", "type": "api" }, { "id": 65, - "name": "event/jijin/CheckOpen", + "name": "event/jierihuodong/Open", "type": "api" }, { "id": 66, - "name": "event/jijin/Open", + "name": "event/jierihuodong/Rec", "type": "api" }, { "id": 67, - "name": "event/jijin/Receive", + "name": "event/jijin/CheckOpen", "type": "api" }, { "id": 68, - "name": "event/kaifukuanghuan/LoginPrize", + "name": "event/jijin/Open", "type": "api" }, { "id": 69, - "name": "event/kaifukuanghuan/Open", + "name": "event/jijin/Receive", "type": "api" }, { "id": 70, - "name": "event/kaifukuanghuan/ShopBuy", + "name": "event/kaifukuanghuan/LoginPrize", "type": "api" }, { "id": 71, - "name": "event/kaifukuanghuan/TaskBox", + "name": "event/kaifukuanghuan/Open", "type": "api" }, { "id": 72, - "name": "event/kaifukuanghuan/TaskPrize", + "name": "event/kaifukuanghuan/ShopBuy", "type": "api" }, { "id": 73, - "name": "event/leichonglibao/Open", + "name": "event/kaifukuanghuan/TaskBox", "type": "api" }, { "id": 74, - "name": "event/leichonglibao/Receive", + "name": "event/kaifukuanghuan/TaskPrize", "type": "api" }, { "id": 75, - "name": "event/leijichongzhi/Open", + "name": "event/leichonglibao/Open", "type": "api" }, { "id": 76, - "name": "event/leijichongzhi/Rec", + "name": "event/leichonglibao/Receive", "type": "api" }, { "id": 77, - "name": "event/niudanji/Lottery", + "name": "event/leijichongzhi/Open", "type": "api" }, { "id": 78, - "name": "event/niudanji/Open", + "name": "event/leijichongzhi/Rec", "type": "api" }, { "id": 79, - "name": "event/payForDiamond/CanReceive", + "name": "event/niudanji/Lottery", "type": "api" }, { "id": 80, - "name": "event/payForDiamond/Receive", + "name": "event/niudanji/Open", "type": "api" }, { "id": 81, - "name": "event/pobinglibao/Open", + "name": "event/payForDiamond/CanReceive", "type": "api" }, { "id": 82, - "name": "event/pobinglibao/Receive", + "name": "event/payForDiamond/Receive", "type": "api" }, { "id": 83, - "name": "event/qirichongzhi/Open", + "name": "event/pobinglibao/Open", "type": "api" }, { "id": 84, - "name": "event/qirichongzhi/Rec", + "name": "event/pobinglibao/Receive", "type": "api" }, { "id": 85, - "name": "event/qiridenglu/Open", + "name": "event/qirichongzhi/Open", "type": "api" }, { "id": 86, - "name": "event/qiridenglu/RecPrize", + "name": "event/qirichongzhi/Rec", "type": "api" }, { "id": 87, - "name": "event/shiwuleichong/Open", + "name": "event/qiridenglu/Open", "type": "api" }, { "id": 88, - "name": "event/shouchong/Open", + "name": "event/qiridenglu/RecPrize", "type": "api" }, { "id": 89, - "name": "event/shouchong/Receive", + "name": "event/shiwuleichong/Open", "type": "api" }, { "id": 90, - "name": "event/xianshizhaomu/Buy", + "name": "event/shouchong/Open", "type": "api" }, { "id": 91, - "name": "event/xianshizhaomu/Duihuan", + "name": "event/shouchong/Receive", "type": "api" }, { "id": 92, - "name": "event/xianshizhaomu/Lottery", + "name": "event/xianshizhaomu/Buy", "type": "api" }, { "id": 93, - "name": "event/xianshizhaomu/Open", + "name": "event/xianshizhaomu/Duihuan", "type": "api" }, { "id": 94, - "name": "event/xianshizhaomu/Rec", + "name": "event/xianshizhaomu/Lottery", "type": "api" }, { "id": 95, - "name": "event/xiaofeijingsai/Open", + "name": "event/xianshizhaomu/Open", "type": "api" }, { "id": 96, - "name": "event/xinshoulibao/Open", + "name": "event/xianshizhaomu/Rec", "type": "api" }, { "id": 97, - "name": "event/yangchengmubiao/Buy", + "name": "event/xiaofeijingsai/Open", "type": "api" }, { "id": 98, - "name": "event/yangchengmubiao/Open", + "name": "event/xinshoulibao/Open", "type": "api" }, { "id": 99, - "name": "event/yangchengmubiao/Rec", + "name": "event/yangchengmubiao/Buy", "type": "api" }, { "id": 100, - "name": "event/yibaichou/Open", + "name": "event/yangchengmubiao/Open", "type": "api" }, { "id": 101, - "name": "event/yibaichou/Rec", + "name": "event/yangchengmubiao/Rec", "type": "api" }, { "id": 102, - "name": "event/yibaichou/RecAll", + "name": "event/yibaichou/Open", "type": "api" }, { "id": 103, - "name": "event/yuandan/DMRec", + "name": "event/yibaichou/Rec", "type": "api" }, { "id": 104, - "name": "event/yuandan/DZRec", + "name": "event/yibaichou/RecAll", "type": "api" }, { "id": 105, - "name": "event/yuandan/Exchange", + "name": "event/yuandan/DMRec", "type": "api" }, { "id": 106, - "name": "event/yuandan/Open", + "name": "event/yuandan/DZRec", "type": "api" }, { "id": 107, - "name": "event/yuandan/TaskRec", + "name": "event/yuandan/Exchange", "type": "api" }, { "id": 108, - "name": "event/yuandan/ZLRec", + "name": "event/yuandan/Open", "type": "api" }, { "id": 109, + "name": "event/yuandan/TaskRec", + "type": "api" + }, + { + "id": 110, + "name": "event/yuandan/ZLRec", + "type": "api" + }, + { + "id": 111, "name": "event/yuedujijin/Open", "type": "api", "conf": { @@ -2321,157 +2341,157 @@ export const serviceProto: ServiceProto = { } }, { - "id": 110, + "id": 112, "name": "event/yuedujijin/Rec", "type": "api" }, { - "id": 111, + "id": 113, "name": "event/zhanling/BuyLv", "type": "api" }, { - "id": 112, + "id": 114, "name": "event/zhanling/Open", "type": "api" }, { - "id": 113, + "id": 115, "name": "event/zhanling/RecPrize", "type": "api" }, { - "id": 114, + "id": 116, "name": "event/zhanling/RecTask", "type": "api" }, { - "id": 115, + "id": 117, "name": "event/zhoulibao/Open", "type": "api" }, { - "id": 116, + "id": 118, "name": "event/zhoumolibao/Open", "type": "api" }, { - "id": 117, + "id": 119, "name": "event/zhoumolibao/Receive", "type": "api" }, { - "id": 118, + "id": 120, "name": "event/zixuanlibao/Buy", "type": "api" }, { - "id": 119, + "id": 121, "name": "event/zixuanlibao/Open", "type": "api" }, { - "id": 120, + "id": 122, "name": "eventlist/hdGetList", "type": "api" }, { - "id": 121, + "id": 123, "name": "friend/Apply", "type": "api" }, { - "id": 122, + "id": 124, "name": "friend/Del", "type": "api" }, { - "id": 123, + "id": 125, "name": "friend/Gift", "type": "api" }, { - "id": 124, + "id": 126, "name": "friend/List", "type": "api" }, { - "id": 125, + "id": 127, "name": "friend/Open", "type": "api" }, { - "id": 126, + "id": 128, "name": "friend/Respond", "type": "api" }, { - "id": 127, + "id": 129, "name": "friend/RmBlackList", "type": "api" }, { - "id": 128, + "id": 130, "name": "friend/Search", "type": "api" }, { - "id": 129, + "id": 131, "name": "ganbutexun/Challenge", "type": "api" }, { - "id": 130, + "id": 132, "name": "ganbutexun/Open", "type": "api" }, { - "id": 131, + "id": 133, "name": "ganhai/Fast", "type": "api" }, { - "id": 132, + "id": 134, "name": "ganhai/Fight", "type": "api" }, { - "id": 133, + "id": 135, "name": "ganhai/Log", "type": "api" }, { - "id": 134, + "id": 136, "name": "ganhai/Open", "type": "api" }, { - "id": 135, + "id": 137, "name": "ganhai/Refresh", "type": "api" }, { - "id": 136, + "id": 138, "name": "ganhai/RefreshShip", "type": "api" }, { - "id": 137, + "id": 139, "name": "ganhai/Select", "type": "api" }, { - "id": 138, + "id": 140, "name": "gmapi/Gift", "type": "api" }, { - "id": 139, + "id": 141, "name": "gmapi/Post", "type": "api" }, { - "id": 140, + "id": 142, "name": "gonghui/Apply", "type": "api", "conf": { @@ -2481,7 +2501,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 141, + "id": 143, "name": "gonghui/ApplyAll", "type": "api", "conf": { @@ -2491,7 +2511,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 142, + "id": 144, "name": "gonghui/ApplyList", "type": "api", "conf": { @@ -2501,7 +2521,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 143, + "id": 145, "name": "gonghui/Change", "type": "api", "conf": { @@ -2511,12 +2531,12 @@ export const serviceProto: ServiceProto = { } }, { - "id": 144, + "id": 146, "name": "gonghui/Create", "type": "api" }, { - "id": 145, + "id": 147, "name": "gonghui/Dissolve", "type": "api", "conf": { @@ -2526,7 +2546,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 146, + "id": 148, "name": "gonghui/Exit", "type": "api", "conf": { @@ -2536,12 +2556,12 @@ export const serviceProto: ServiceProto = { } }, { - "id": 147, + "id": 149, "name": "gonghui/FbBuyNum", "type": "api" }, { - "id": 148, + "id": 150, "name": "gonghui/FbFight", "type": "api", "conf": { @@ -2551,7 +2571,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 149, + "id": 151, "name": "gonghui/FbOpen", "type": "api", "conf": { @@ -2561,17 +2581,17 @@ export const serviceProto: ServiceProto = { } }, { - "id": 150, + "id": 152, "name": "gonghui/GetList", "type": "api" }, { - "id": 151, + "id": 153, "name": "gonghui/Join", "type": "api" }, { - "id": 152, + "id": 154, "name": "gonghui/Jx", "type": "api", "conf": { @@ -2581,7 +2601,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 153, + "id": 155, "name": "gonghui/JxOpen", "type": "api", "conf": { @@ -2591,7 +2611,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 154, + "id": 156, "name": "gonghui/List", "type": "api", "conf": { @@ -2601,7 +2621,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 155, + "id": 157, "name": "gonghui/Manage", "type": "api", "conf": { @@ -2611,7 +2631,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 156, + "id": 158, "name": "gonghui/Open", "type": "api", "conf": { @@ -2621,7 +2641,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 157, + "id": 159, "name": "gonghui/TanHe", "type": "api", "conf": { @@ -2631,7 +2651,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 158, + "id": 160, "name": "gonghui/TaskOpen", "type": "api", "conf": { @@ -2641,7 +2661,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 159, + "id": 161, "name": "gonghui/TaskReceive", "type": "api", "conf": { @@ -2651,7 +2671,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 160, + "id": 162, "name": "gonghui/UpWz", "type": "api", "conf": { @@ -2661,137 +2681,137 @@ export const serviceProto: ServiceProto = { } }, { - "id": 161, + "id": 163, "name": "gonghuibaozang/Lottery", "type": "api" }, { - "id": 162, + "id": 164, "name": "gonghuibaozang/Open", "type": "api" }, { - "id": 163, + "id": 165, "name": "gonglukuangbiao/Buy", "type": "api" }, { - "id": 164, + "id": 166, "name": "gonglukuangbiao/Fight", "type": "api" }, { - "id": 165, + "id": 167, "name": "gonglukuangbiao/Open", "type": "api" }, { - "id": 166, + "id": 168, "name": "gonglukuangbiao/Refresh", "type": "api" }, { - "id": 167, + "id": 169, "name": "gongyu/mingdao/Active", "type": "api" }, { - "id": 168, + "id": 170, "name": "gongyu/mingdao/Open", "type": "api" }, { - "id": 169, + "id": 171, "name": "gongyu/mingdao/RecPrize", "type": "api" }, { - "id": 170, + "id": 172, "name": "gongyu/mingdao/Repair", "type": "api" }, { - "id": 171, + "id": 173, "name": "gongyu/xunlianjihua/Reset", "type": "api" }, { - "id": 172, + "id": 174, "name": "gongyu/xunlianjihua/UpSkill", "type": "api" }, { - "id": 173, + "id": 175, "name": "gongyu/zuozhanjihua/SetSkill", "type": "api" }, { - "id": 174, + "id": 176, "name": "hbzb/jfs/BuyNum", "type": "api" }, { - "id": 175, + "id": 177, "name": "hbzb/jfs/Fight", "type": "api" }, { - "id": 176, + "id": 178, "name": "hbzb/jfs/GetLog", "type": "api" }, { - "id": 177, + "id": 179, "name": "hbzb/jfs/Open", "type": "api" }, { - "id": 178, + "id": 180, "name": "hbzb/jfs/Rec", "type": "api" }, { - "id": 179, + "id": 181, "name": "hbzb/jfs/Refresh", "type": "api" }, { - "id": 180, + "id": 182, "name": "hbzb/GetStatus", "type": "api" }, { - "id": 181, + "id": 183, "name": "hbzb/zbs/BuyNum", "type": "api" }, { - "id": 182, + "id": 184, "name": "hbzb/zbs/Fight", "type": "api" }, { - "id": 183, + "id": 185, "name": "hbzb/zbs/GetLog", "type": "api" }, { - "id": 184, + "id": 186, "name": "hbzb/zbs/Open", "type": "api" }, { - "id": 185, + "id": 187, "name": "hbzb/zbs/Refresh", "type": "api" }, { - "id": 186, + "id": 188, "name": "hero/Awake", "type": "api" }, { - "id": 187, + "id": 189, "name": "hero/ChangePos", "type": "api", "conf": { @@ -2799,17 +2819,17 @@ export const serviceProto: ServiceProto = { } }, { - "id": 188, + "id": 190, "name": "hero/GetList", "type": "api" }, { - "id": 189, + "id": 191, "name": "hero/JinJie", "type": "api" }, { - "id": 190, + "id": 192, "name": "hero/LvUp", "type": "api", "conf": { @@ -2817,32 +2837,32 @@ export const serviceProto: ServiceProto = { } }, { - "id": 191, + "id": 193, "name": "hero/Potency", "type": "api" }, { - "id": 192, + "id": 194, "name": "hero/Rec", "type": "api" }, { - "id": 193, + "id": 195, "name": "hero/Reset", "type": "api" }, { - "id": 194, + "id": 196, "name": "hero/Talent", "type": "api" }, { - "id": 195, + "id": 197, "name": "hero/WeaponUp", "type": "api" }, { - "id": 196, + "id": 198, "name": "hongdian/Get", "type": "api", "conf": { @@ -2850,117 +2870,117 @@ export const serviceProto: ServiceProto = { } }, { - "id": 197, + "id": 199, "name": "item/GetList", "type": "api" }, { - "id": 198, + "id": 200, "name": "item/Use", "type": "api" }, { - "id": 199, + "id": 201, "name": "jiaotang/Lottery", "type": "api" }, { - "id": 200, + "id": 202, "name": "jiaotang/Open", "type": "api" }, { - "id": 201, + "id": 203, "name": "jiuba/Lottery", "type": "api" }, { - "id": 202, + "id": 204, "name": "jiuba/Open", "type": "api" }, { - "id": 203, + "id": 205, "name": "jjc/BuyFightNum", "type": "api" }, { - "id": 204, + "id": 206, "name": "jjc/Fight", "type": "api" }, { - "id": 205, + "id": 207, "name": "jjc/FightLog", "type": "api" }, { - "id": 206, + "id": 208, "name": "jjc/Open", "type": "api" }, { - "id": 207, + "id": 209, "name": "jjc/Receive", "type": "api" }, { - "id": 208, + "id": 210, "name": "jjc/Refresh", "type": "api" }, { - "id": 209, + "id": 211, "name": "kaifujingsai/Open", "type": "api" }, { - "id": 210, + "id": 212, "name": "kaifujingsai/Receive", "type": "api" }, { - "id": 211, + "id": 213, "name": "kbzz/Apply", "type": "api" }, { - "id": 212, + "id": 214, "name": "kbzz/AutoApply", "type": "api" }, { - "id": 213, + "id": 215, "name": "kbzz/BuyNum", "type": "api" }, { - "id": 214, + "id": 216, "name": "kbzz/Fight", "type": "api" }, { - "id": 215, + "id": 217, "name": "kbzz/FightLog", "type": "api" }, { - "id": 216, + "id": 218, "name": "kbzz/GroupState", "type": "api" }, { - "id": 217, + "id": 219, "name": "kbzz/Open", "type": "api" }, { - "id": 218, + "id": 220, "name": "kbzz/RecPrize", "type": "api" }, { - "id": 219, + "id": 221, "name": "kbzz/Refresh", "type": "api", "conf": { @@ -2968,287 +2988,287 @@ export const serviceProto: ServiceProto = { } }, { - "id": 220, + "id": 222, "name": "kuangdong/AddPkNum", "type": "api" }, { - "id": 221, + "id": 223, "name": "kuangdong/GetPrize", "type": "api" }, { - "id": 222, + "id": 224, "name": "kuangdong/KdInfo", "type": "api" }, { - "id": 223, + "id": 225, "name": "kuangdong/Log", "type": "api" }, { - "id": 224, + "id": 226, "name": "kuangdong/Open", "type": "api" }, { - "id": 225, + "id": 227, "name": "kuangdong/YanShi", "type": "api" }, { - "id": 226, + "id": 228, "name": "kuangdong/ZhanLing", "type": "api" }, { - "id": 227, + "id": 229, "name": "lingzhulaixi/Open", "type": "api" }, { - "id": 228, + "id": 230, "name": "lingzhulaixi/PkBoss", "type": "api" }, { - "id": 229, + "id": 231, "name": "lingzhulaixi/PkRank", "type": "api" }, { - "id": 230, + "id": 232, "name": "lingzhulaixi/SaoDang", "type": "api" }, { - "id": 231, + "id": 233, "name": "meirishilian/Buy", "type": "api" }, { - "id": 232, + "id": 234, "name": "meirishilian/Fight", "type": "api" }, { - "id": 233, + "id": 235, "name": "meirishilian/Open", "type": "api" }, { - "id": 234, + "id": 236, "name": "msg_c2s/BindUid", "type": "msg" }, { - "id": 235, + "id": 237, "name": "msg_c2s/Pay", "type": "msg" }, { - "id": 236, + "id": 238, "name": "msg_c2s/Sync", "type": "msg" }, { - "id": 237, + "id": 239, "name": "msg_s2c/Chat", "type": "msg" }, { - "id": 238, + "id": 240, "name": "msg_s2c/ChatHelp", "type": "msg" }, { - "id": 239, + "id": 241, "name": "msg_s2c/Collection", "type": "msg" }, { - "id": 240, + "id": 242, "name": "msg_s2c/Email", "type": "msg" }, { - "id": 241, + "id": 243, "name": "msg_s2c/EmailDel", "type": "msg" }, { - "id": 242, + "id": 244, "name": "msg_s2c/EquipChange", "type": "msg" }, { - "id": 243, + "id": 245, "name": "msg_s2c/Friend", "type": "msg" }, { - "id": 244, + "id": 246, "name": "msg_s2c/GhChange", "type": "msg" }, { - "id": 245, + "id": 247, "name": "msg_s2c/GongHuiBaoZang", "type": "msg" }, { - "id": 246, + "id": 248, "name": "msg_s2c/HeroChange", "type": "msg" }, { - "id": 247, + "id": 249, "name": "msg_s2c/HongDianChange", "type": "msg" }, { - "id": 248, + "id": 250, "name": "msg_s2c/ItemChange", "type": "msg" }, { - "id": 249, + "id": 251, "name": "msg_s2c/LoginQueue", "type": "msg" }, { - "id": 250, + "id": 252, "name": "msg_s2c/LshdChange", "type": "msg" }, { - "id": 251, + "id": 253, "name": "msg_s2c/NewDay", "type": "msg" }, { - "id": 252, + "id": 254, "name": "msg_s2c/OtherLogin", "type": "msg" }, { - "id": 253, + "id": 255, "name": "msg_s2c/PayChange", "type": "msg" }, { - "id": 254, + "id": 256, "name": "msg_s2c/PayResult", "type": "msg" }, { - "id": 255, + "id": 257, "name": "msg_s2c/PeijianChange", "type": "msg" }, { - "id": 256, + "id": 258, "name": "msg_s2c/PlayerChange", "type": "msg" }, { - "id": 257, + "id": 259, "name": "msg_s2c/Private", "type": "msg" }, { - "id": 258, + "id": 260, "name": "msg_s2c/PushGiftChange", "type": "msg" }, { - "id": 259, + "id": 261, "name": "msg_s2c/SendGift", "type": "msg" }, { - "id": 260, + "id": 262, "name": "msg_s2c/ShiwuChange", "type": "msg" }, { - "id": 261, + "id": 263, "name": "msg_s2c/TaskChange", "type": "msg" }, { - "id": 262, + "id": 264, "name": "msg_s2c/Xianshilibao", "type": "msg" }, { - "id": 263, + "id": 265, "name": "pata/Fight", "type": "api" }, { - "id": 264, + "id": 266, "name": "pata/GetPrize", "type": "api" }, { - "id": 265, + "id": 267, "name": "pata/Open", "type": "api" }, { - "id": 266, + "id": 268, "name": "pata/SaoDang", "type": "api" }, { - "id": 267, + "id": 269, "name": "pay/GetList", "type": "api" }, { - "id": 268, + "id": 270, "name": "peijian/GetList", "type": "api" }, { - "id": 269, + "id": 271, "name": "peijian/JingLian", "type": "api" }, { - "id": 270, + "id": 272, "name": "peijian/JinJie", "type": "api" }, { - "id": 271, + "id": 273, "name": "peijian/LvUp", "type": "api" }, { - "id": 272, + "id": 274, "name": "peijian/OneKeyLvUp", "type": "api" }, { - "id": 273, + "id": 275, "name": "peijian/OneKeyWear", "type": "api" }, { - "id": 274, + "id": 276, "name": "peijian/Reset", "type": "api" }, { - "id": 275, + "id": 277, "name": "peijian/Rm", "type": "api" }, { - "id": 276, + "id": 278, "name": "peijian/TakeOff", "type": "api", "conf": { @@ -3256,32 +3276,32 @@ export const serviceProto: ServiceProto = { } }, { - "id": 277, + "id": 279, "name": "peijian/UnLock", "type": "api" }, { - "id": 278, + "id": 280, "name": "peijian/Wear", "type": "api" }, { - "id": 279, + "id": 281, "name": "peijiancangku/Deal", "type": "api" }, { - "id": 280, + "id": 282, "name": "peijiancangku/Jump", "type": "api" }, { - "id": 281, + "id": 283, "name": "peijiancangku/Open", "type": "api" }, { - "id": 282, + "id": 284, "name": "Bingo", "type": "api", "conf": { @@ -3289,147 +3309,147 @@ export const serviceProto: ServiceProto = { } }, { - "id": 283, + "id": 285, "name": "FightTest", "type": "api" }, { - "id": 284, + "id": 286, "name": "SyncBtn", "type": "api" }, { - "id": 285, + "id": 287, "name": "Test", "type": "api" }, { - "id": 286, + "id": 288, "name": "pushgift/ItemNoEnough", "type": "api" }, { - "id": 287, + "id": 289, "name": "pushgift/Open", "type": "api" }, { - "id": 288, + "id": 290, "name": "qjzzd/Fight", "type": "api" }, { - "id": 289, + "id": 291, "name": "qjzzd/Open", "type": "api" }, { - "id": 290, + "id": 292, "name": "rank/Open", "type": "api" }, { - "id": 291, + "id": 293, "name": "shiwu/Concise", "type": "api" }, { - "id": 292, + "id": 294, "name": "shiwu/Extract", "type": "api" }, { - "id": 293, + "id": 295, "name": "shiwu/GetList", "type": "api" }, { - "id": 294, + "id": 296, "name": "shiwu/LvUp", "type": "api" }, { - "id": 295, + "id": 297, "name": "shiwu/Recast", "type": "api" }, { - "id": 296, + "id": 298, "name": "shiwu/TakeOff", "type": "api" }, { - "id": 297, + "id": 299, "name": "shiwu/Wear", "type": "api" }, { - "id": 298, + "id": 300, "name": "shootGame/Open", "type": "api" }, { - "id": 299, + "id": 301, "name": "shootGame/Rec", "type": "api" }, { - "id": 300, + "id": 302, "name": "shop/Buy", "type": "api" }, { - "id": 301, + "id": 303, "name": "shop/Open", "type": "api" }, { - "id": 302, + "id": 304, "name": "shop/Refresh", "type": "api" }, { - "id": 303, + "id": 305, "name": "sign/GetBoxPrize", "type": "api" }, { - "id": 304, + "id": 306, "name": "sign/GetPrize", "type": "api" }, { - "id": 305, + "id": 307, "name": "sign/Open", "type": "api" }, { - "id": 306, + "id": 308, "name": "slzd/Aim", "type": "api" }, { - "id": 307, + "id": 309, "name": "slzd/BuyNum", "type": "api" }, { - "id": 308, + "id": 310, "name": "slzd/Fight", "type": "api" }, { - "id": 309, + "id": 311, "name": "slzd/FightLog", "type": "api" }, { - "id": 310, + "id": 312, "name": "slzd/MyRank", "type": "api" }, { - "id": 311, + "id": 313, "name": "slzd/Open", "type": "api", "conf": { @@ -3439,77 +3459,77 @@ export const serviceProto: ServiceProto = { } }, { - "id": 312, + "id": 314, "name": "slzd/OpenFort", "type": "api" }, { - "id": 313, + "id": 315, "name": "slzd/Rec", "type": "api" }, { - "id": 314, + "id": 316, "name": "slzd/Refresh", "type": "api" }, { - "id": 315, + "id": 317, "name": "slzd/Slot", "type": "api" }, { - "id": 316, + "id": 318, "name": "tanxian/Event", "type": "api" }, { - "id": 317, + "id": 319, "name": "tanxian/FastGuaJi", "type": "api" }, { - "id": 318, + "id": 320, "name": "tanxian/Fight", "type": "api" }, { - "id": 319, + "id": 321, "name": "tanxian/GuaJi", "type": "api" }, { - "id": 320, + "id": 322, "name": "tanxian/Open", "type": "api" }, { - "id": 321, + "id": 323, "name": "tanxian/Receive", "type": "api" }, { - "id": 322, + "id": 324, "name": "task/AllFinsh", "type": "api" }, { - "id": 323, + "id": 325, "name": "task/Finsh", "type": "api" }, { - "id": 324, + "id": 326, "name": "task/Open", "type": "api" }, { - "id": 325, + "id": 327, "name": "user/CDKEY", "type": "api" }, { - "id": 326, + "id": 328, "name": "user/ChangeInfo", "type": "api", "conf": { @@ -3517,212 +3537,212 @@ export const serviceProto: ServiceProto = { } }, { - "id": 327, + "id": 329, "name": "user/ChangeName", "type": "api" }, { - "id": 328, + "id": 330, "name": "user/Dot", "type": "api" }, { - "id": 329, + "id": 331, "name": "user/Fight", "type": "api" }, { - "id": 330, + "id": 332, "name": "user/GetInfo", "type": "api" }, { - "id": 331, + "id": 333, "name": "user/InfoOpen", "type": "api" }, { - "id": 332, + "id": 334, "name": "user/Login", "type": "api" }, { - "id": 333, + "id": 335, "name": "user/Ping", "type": "api" }, { - "id": 334, + "id": 336, "name": "user/Renown", "type": "api" }, { - "id": 335, + "id": 337, "name": "user/RenownBuy", "type": "api" }, { - "id": 336, + "id": 338, "name": "user/RenownGetPrize", "type": "api" }, { - "id": 337, + "id": 339, "name": "user/RenownOpen", "type": "api" }, { - "id": 338, + "id": 340, "name": "user/Tujian", "type": "api" }, { - "id": 339, + "id": 341, "name": "weiwang/Open", "type": "api" }, { - "id": 340, + "id": 342, "name": "weiwang/UpLv", "type": "api" }, { - "id": 341, + "id": 343, "name": "weixiuchang/Decompose", "type": "api" }, { - "id": 342, + "id": 344, "name": "weixiuchang/Exchange", "type": "api" }, { - "id": 343, + "id": 345, "name": "weixiuchang/Open", "type": "api" }, { - "id": 344, + "id": 346, "name": "weixiuchang/UpLv", "type": "api" }, { - "id": 345, + "id": 347, "name": "weixiuchang/UpStar", "type": "api" }, { - "id": 346, + "id": 348, "name": "wzry/AutoBaoMing", "type": "api" }, { - "id": 347, + "id": 349, "name": "wzry/BaoMing", "type": "api" }, { - "id": 348, + "id": 350, "name": "wzry/catFightLog", "type": "api" }, { - "id": 349, + "id": 351, "name": "wzry/CatGroup", "type": "api" }, { - "id": 350, + "id": 352, "name": "wzry/DldFight", "type": "api" }, { - "id": 351, + "id": 353, "name": "wzry/DldRefre", "type": "api" }, { - "id": 352, + "id": 354, "name": "wzry/JingCai", "type": "api" }, { - "id": 353, + "id": 355, "name": "wzry/JingCaiOpen", "type": "api" }, { - "id": 354, + "id": 356, "name": "wzry/Open", "type": "api" }, { - "id": 355, + "id": 357, "name": "wzry/UpdateFight", "type": "api" }, { - "id": 356, + "id": 358, "name": "wzry/Wzzd", "type": "api" }, { - "id": 357, + "id": 359, "name": "wzry/ZuanShiOpen", "type": "api" }, { - "id": 358, + "id": 360, "name": "xstask/AllGet", "type": "api" }, { - "id": 359, + "id": 361, "name": "xstask/Get", "type": "api" }, { - "id": 360, + "id": 362, "name": "xstask/LvUp", "type": "api" }, { - "id": 361, + "id": 363, "name": "xstask/OnekeyReceive", "type": "api" }, { - "id": 362, + "id": 364, "name": "xstask/Open", "type": "api" }, { - "id": 363, + "id": 365, "name": "xstask/Receive", "type": "api" }, { - "id": 364, + "id": 366, "name": "xstask/Refresh", "type": "api" }, { - "id": 365, + "id": 367, "name": "yongbingzhuzhan/Handle", "type": "api" }, { - "id": 366, + "id": 368, "name": "zhanqianbushu/ChangePos", "type": "api" }, { - "id": 367, + "id": 369, "name": "zhanqianbushu/Select", "type": "api" }, { - "id": 368, + "id": 370, "name": "zhanqianbushu/Up", "type": "api" } @@ -9973,6 +9993,113 @@ export const serviceProto: ServiceProto = { } ] }, + "event/huangqijiuguan/PtlGiftRec/ReqGiftRec": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "hdid", + "type": { + "type": "Number" + } + }, + { + "id": 1, + "name": "giftid", + "type": { + "type": "Number" + } + } + ] + }, + "event/huangqijiuguan/PtlGiftRec/ResGiftRec": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "data", + "type": { + "type": "Reference", + "target": "../../api_s2c/event/huangqijiuguan/fun/PlayerData" + } + }, + { + "id": 1, + "name": "prize", + "type": { + "type": "Array", + "elementType": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "a", + "type": { + "type": "String" + } + }, + { + "id": 1, + "name": "t", + "type": { + "type": "String" + } + }, + { + "id": 2, + "name": "n", + "type": { + "type": "Number" + } + } + ] + } + } + } + ] + }, + "event/huangqijiuguan/PtlGiftSelect/ReqGiftSelect": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "hdid", + "type": { + "type": "Number" + } + }, + { + "id": 1, + "name": "giftid", + "type": { + "type": "Number" + } + }, + { + "id": 2, + "name": "seletc", + "type": { + "type": "Array", + "elementType": { + "type": "Number" + } + } + } + ] + }, + "event/huangqijiuguan/PtlGiftSelect/ResGiftSelect": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "data", + "type": { + "type": "Reference", + "target": "../../api_s2c/event/huangqijiuguan/fun/PlayerData" + } + } + ] + }, "event/huangqijiuguan/PtlOpen/ReqOpen": { "type": "Interface", "properties": [ @@ -10249,7 +10376,23 @@ export const serviceProto: ServiceProto = { "type": { "type": "Array", "elementType": { - "type": "Number" + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "idx", + "type": { + "type": "Number" + } + }, + { + "id": 1, + "name": "sec", + "type": { + "type": "String" + } + } + ] } } } From 6f7eab170155f7c6581b76a4057c2b2aab7002c1 Mon Sep 17 00:00:00 2001 From: xichaoyin Date: Wed, 10 Jan 2024 21:57:09 +0800 Subject: [PATCH 08/12] =?UTF-8?q?feat:=E9=BB=84=E6=97=97=E9=85=92=E9=A6=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/huangqijiuguan/ApiGiftSelect.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api_s2c/event/huangqijiuguan/ApiGiftSelect.ts b/src/api_s2c/event/huangqijiuguan/ApiGiftSelect.ts index 8c8f2d5..40df551 100644 --- a/src/api_s2c/event/huangqijiuguan/ApiGiftSelect.ts +++ b/src/api_s2c/event/huangqijiuguan/ApiGiftSelect.ts @@ -9,7 +9,7 @@ export default async function (call: ApiCall) { return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 }) } - let gift = hd.data.gift[call.req.giftid]; + let gift = hd.data.gift.filter(i => i.id == call.req.giftid)[0]; if (!gift || !gift.dlz) { return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 }) } From 13de3624dcc90f7450d0a039606014b9d4a02bce Mon Sep 17 00:00:00 2001 From: xichaoyin Date: Thu, 11 Jan 2024 13:57:52 +0800 Subject: [PATCH 09/12] =?UTF-8?q?feat:=E9=BB=84=E6=97=97=E9=85=92=E9=A6=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/huangqijiuguan/ApiGiftRec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api_s2c/event/huangqijiuguan/ApiGiftRec.ts b/src/api_s2c/event/huangqijiuguan/ApiGiftRec.ts index b2e309e..741c88c 100644 --- a/src/api_s2c/event/huangqijiuguan/ApiGiftRec.ts +++ b/src/api_s2c/event/huangqijiuguan/ApiGiftRec.ts @@ -31,7 +31,7 @@ export default async function (call: ApiCall) { prize.push(gift.dlz[i][ids[0]]); mydata.giftbuy[call.req.giftid].select[i] = Number(ids[0]); } else { - prize.push(gift.dlz[i][mydata.giftbuy.select[i]]); + prize.push(gift.dlz[i][mydata.giftbuy[call.req.giftid].select[i]]); } } } From a8051b9767f21da7544de95c22f6897753de5352 Mon Sep 17 00:00:00 2001 From: xichaoyin Date: Thu, 11 Jan 2024 14:19:51 +0800 Subject: [PATCH 10/12] =?UTF-8?q?feat:npc=E6=B7=BB=E5=8A=A0=E7=9A=AE?= =?UTF-8?q?=E8=82=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jsonType.ts | 2 ++ src/shared/fightControl/fightFun.ts | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/jsonType.ts b/src/jsonType.ts index c6edbea..4823cba 100644 --- a/src/jsonType.ts +++ b/src/jsonType.ts @@ -800,6 +800,8 @@ type gc_npc = k_v<{ 'ghname': string /**npc名称 */ 'npcname': string + /**怪物皮肤*/ + 'skin': number[] }>; type gc_openCond = k_v<{ diff --git a/src/shared/fightControl/fightFun.ts b/src/shared/fightControl/fightFun.ts index 3230eca..ea85f64 100644 --- a/src/shared/fightControl/fightFun.ts +++ b/src/shared/fightControl/fightFun.ts @@ -121,7 +121,7 @@ export function createNpc(npcId: string | number, fixData: Partial [i + 1, function () { - + d['skin'] = (npcConf.skin?.[i] || ''); let { id, atk, def, mindps, maxdps, hp, speed, ...ops } = G.gc.armyattr[d.countId]; let buff = HeroShared.getHeroBasicAttr({ heroId: d.heroId, lv: d.lv }); @@ -149,9 +149,9 @@ export function createNpc(npcId: string | number, fixData: Partial Date: Thu, 11 Jan 2024 14:38:09 +0800 Subject: [PATCH 11/12] =?UTF-8?q?feat:=E9=BB=84=E8=8A=AA=E9=85=92=E9=A6=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/huangqijiuguan/fun.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api_s2c/event/huangqijiuguan/fun.ts b/src/api_s2c/event/huangqijiuguan/fun.ts index 881ed73..60d2691 100644 --- a/src/api_s2c/event/huangqijiuguan/fun.ts +++ b/src/api_s2c/event/huangqijiuguan/fun.ts @@ -386,12 +386,12 @@ export default class HQJGFun { } else { prize = gift.prize; for (let i = 0; i < gift.dlz.length; i++) { - if (!mydata.giftbuy[call.req.giftid].select[i]) { + if (!mydata.giftbuy[gift.id].select[i]) { let ids = Object.keys(gift.dlz[i]) prize.push(gift.dlz[i][ids[0]]); - mydata.giftbuy[call.req.giftid].select[i] = Number(ids[0]); + mydata.giftbuy[gift.id].select[i] = Number(ids[0]); } else { - prize.push(gift.dlz[i][mydata.giftbuy.select[i]]); + prize.push(gift.dlz[i][mydata.giftbuy[gift.id].select[i]]); } } } From 8d35b1d74cffd66c7b358bea2ccf811423062130 Mon Sep 17 00:00:00 2001 From: xichaoyin Date: Thu, 11 Jan 2024 14:46:05 +0800 Subject: [PATCH 12/12] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E9=BB=84=E8=8A=AA?= =?UTF-8?q?=E9=85=92=E9=A6=86=E6=8B=9B=E5=8B=9F=E6=AC=A1=E6=95=B0=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/huangqijiuguan/ApiZhaoMu.ts | 2 ++ src/globalListener.ts | 2 ++ src/public/taskclass.ts | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/src/api_s2c/event/huangqijiuguan/ApiZhaoMu.ts b/src/api_s2c/event/huangqijiuguan/ApiZhaoMu.ts index 0b22e98..224bcee 100644 --- a/src/api_s2c/event/huangqijiuguan/ApiZhaoMu.ts +++ b/src/api_s2c/event/huangqijiuguan/ApiZhaoMu.ts @@ -45,4 +45,6 @@ export default async function (call: ApiCall) { await HQJGFun.setMyData(call.uid, call.req.hdid, { zhaomu: mydata.zhaomu }); call.succ({ data: mydata, prize: prize }) + + G.emit("Class_task_159", 'Class_task_159', call, 1, 0); } \ No newline at end of file diff --git a/src/globalListener.ts b/src/globalListener.ts index 9b73722..daab826 100644 --- a/src/globalListener.ts +++ b/src/globalListener.ts @@ -154,6 +154,8 @@ export type gEventType = { Class_task_157: (eventname, call, val, chkVal) => void; /**今日参与{1}次抓娃娃小游戏 */ Class_task_158: (eventname, call, val, chkVal) => void; + /**黄旗酒馆累计抽卡X次*/ + Class_task_159: (eventname, call, val, chkVal) => void; }; export function addListener() { diff --git a/src/public/taskclass.ts b/src/public/taskclass.ts index 88ad56f..9475f29 100644 --- a/src/public/taskclass.ts +++ b/src/public/taskclass.ts @@ -836,6 +836,11 @@ export module manager { } } + // 第61个任务 黄旗酒馆累计抽卡X次 + export class Class_task_159 extends BaseClass { + stype = 159 + isinc = 1 + } }