diff --git a/oneKeyStartPm2.sh b/oneKeyStartPm2.sh new file mode 100644 index 0000000..65c5bd9 --- /dev/null +++ b/oneKeyStartPm2.sh @@ -0,0 +1,12 @@ + +git fetch --all && git reset --hard origin/dev && git pull + +npm run build_linux + +cp src/config.json dist/ + +pm2 del heijiao_msg_s0 + +cd dist && pm2 start js_pm2.config.js + +pm2 save \ No newline at end of file diff --git a/src/api_s2c/event/christmas/ApiGame.ts b/src/api_s2c/event/christmas/ApiGame.ts index e3cd097..25486ab 100644 --- a/src/api_s2c/event/christmas/ApiGame.ts +++ b/src/api_s2c/event/christmas/ApiGame.ts @@ -8,17 +8,24 @@ import {PlayerFun} from "../../../public/player"; export default async function (call: ApiCall) { let initCon = await Christmasfun.getCon(call) let need = initCon[call.req.hdid].data.gameneed; + let freenum = initCon[call.req.hdid].data.gamefree let addval = initCon[call.req.hdid].data.game[call.req.index]; - // 判断消耗是否满足 - await PlayerFun.checkNeedIsMeet(call, need); - // 扣除消耗 - await PlayerFun.cutNeed(call, need); let _mydata = await Christmasfun.getMyData(call, call.req.hdid) + // 判断是否有免费配置 + if (_mydata.gamenum >= freenum) { + // 判断消耗是否满足 + await PlayerFun.checkNeedIsMeet(call, need); + // 扣除消耗 + await PlayerFun.cutNeed(call, need); + } + let _setData = {} _mydata["val"] += addval - _setData["val"] = _mydata["val"] - await Christmasfun.setMyData(call.uid, call.req.hdid, { $set: _setData }) + _mydata["gamenum"] += 1 + _setData["val"] = _mydata.val + _setData["game"] = _mydata["gamenum"] + await Christmasfun.setMyData(call.uid, call.req.hdid, { $set: _setData}) let changedata = { mydata: _mydata} // 推送红点 HongDianChange.sendChangeKey(call.uid, ['huodonghd']); diff --git a/src/api_s2c/event/christmas/ApiLiBao.ts b/src/api_s2c/event/christmas/ApiLiBao.ts index 0c5163c..ad070db 100644 --- a/src/api_s2c/event/christmas/ApiLiBao.ts +++ b/src/api_s2c/event/christmas/ApiLiBao.ts @@ -22,13 +22,14 @@ export default async function (call: ApiCall) { // 判断是否能购买 return call.error('', { code: -3, message: globalThis.lng.yangchengmubiao_2 }) } - const _select = _mydata.select[lbid] || {} - if (Object.keys(_select).length >= _con.dlz.length) { + let _select = _mydata.select[lbid] || {} + if (Object.keys(_select).length < _con.dlz.length) { // 判断是否选择奖励了 return call.error('', { code: -3, message: globalThis.lng.yangchengmubiao_2 }) } - let _prize: atn[] = _con.prize + let _prize: atn[] = _con.basep + for (let key in _select) { _prize.push(_con.dlz[parseInt(key)][_select[key]]) } diff --git a/src/api_s2c/event/christmas/ApiOpen.ts b/src/api_s2c/event/christmas/ApiOpen.ts index 9fb038b..7473002 100644 --- a/src/api_s2c/event/christmas/ApiOpen.ts +++ b/src/api_s2c/event/christmas/ApiOpen.ts @@ -9,6 +9,7 @@ export default async function (call: ApiCall) { // 无此活动 return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 }) } + let _mydata = await Christmasfun.getMyData(call, call.req.hdid) let changedata = { mydata: _mydata, hdinfo: _hdinfo } call.succ(changedata); diff --git a/src/api_s2c/event/christmas/ApiQianDao.ts b/src/api_s2c/event/christmas/ApiQianDao.ts index 41f5742..5eb2830 100644 --- a/src/api_s2c/event/christmas/ApiQianDao.ts +++ b/src/api_s2c/event/christmas/ApiQianDao.ts @@ -17,7 +17,7 @@ export default async function (call: ApiCall) { for(let i = 0; i < _diff; i++) { if (_mydata.qiandao.includes(i)) continue _mydata.qiandao.push(i) - _prize.push(_con[i]) + _prize = _prize.concat(_con[i]) } if (!_prize){ diff --git a/src/api_s2c/event/christmas/ApiZhanLingRec.ts b/src/api_s2c/event/christmas/ApiZhanLingRec.ts index 66bc07f..42a460f 100644 --- a/src/api_s2c/event/christmas/ApiZhanLingRec.ts +++ b/src/api_s2c/event/christmas/ApiZhanLingRec.ts @@ -20,12 +20,14 @@ export default async function (call: ApiCall) { if (!_mydata.pt.includes(index)){ // 如果普通奖励没有领取 - _prize.push(_con.pt) + + _prize = _prize.concat(_con.pt) _mydata.pt.push(index) } if (_mydata.pay && !_mydata.gj.includes(index)){ // 如果普通奖励没有领取 - _prize.push(_con.gj) + _prize = _prize.concat(_con.gj) + _mydata.gj.push(index) } if (!_prize) { diff --git a/src/api_s2c/event/christmas/fun.ts b/src/api_s2c/event/christmas/fun.ts index 6d37072..327422c 100644 --- a/src/api_s2c/event/christmas/fun.ts +++ b/src/api_s2c/event/christmas/fun.ts @@ -1,11 +1,12 @@ import { strict } from 'assert'; -import { ApiCall } from 'tsrpc'; +import {ApiCall, BaseConnection} from 'tsrpc'; import { ReqAddHuoDong } from '../../../monopoly/protocols/PtlAddHuoDong'; import { HuoDongFun } from '../../../public/huodongfun'; import { TaskFun } from '../../../public/task'; import { christmas } from '../../../shared/protocols/event/christmas/PtlOpen'; import { PublicShared } from '../../../shared/public/public'; - +import {player} from '../../../shared/protocols/user/type'; +import {PlayerFun} from "../../../public/player"; export class Christmasfun { /**配置 */ @@ -61,6 +62,7 @@ export class Christmasfun { taskval: await this.getTaskVal(call, hdid), taskfinish: [], refresh: G.time, + gamenum: 0, pt: [], gj: [], pay: false, @@ -110,24 +112,54 @@ export class Christmasfun { mydata.taskfinish = [] mydata.taskval = await this.getTaskVal(call, hdid) mydata.refresh = G.time - await this.setMyData(call.uid, hdid, { $set: { refresh: mydata.refresh, taskfinish: mydata.taskfinish, taskval: mydata.taskval } }) + mydata.gamenum = 0 + await this.setMyData(call.uid, hdid, { $set: { refresh: mydata.refresh, taskfinish: mydata.taskfinish, taskval: mydata.taskval, gamenum: mydata.gamenum} }) return mydata } + static async payChristmas(payid, call: ApiCall) { + let _hd = await HuoDongFun.gethdList(call, 8) + for (let index = 0; index < _hd.length; index++) { + const hdinfo = _hd[index]; + const _hdid = hdinfo.hdid + if (payid == hdinfo.data.zlpayid){ + 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); + } + else{ + const libaos = hdinfo.data.libao + for (let index = 0; index < Object.keys(libaos).length; index++){ + const lbid = Object.keys(libaos)[index]; + let _tmp = libaos[lbid] + if (_tmp['payid'] != payid) continue + let _mydata = await Christmasfun.getMyData(call, _hdid) + let _buyNum = _mydata.libao[lbid] || 0 + if (_buyNum >= _tmp["buynum"]) continue + _mydata.libao[lbid] = _buyNum + 1 + this.setMyData(call.uid, _hdid, { $set: { libao: _mydata.libao} }) + break + + } + } + } + } + + /**设置任务 */ static async setTaskVal(call: ApiCall, stype: number, val: number, chkCall: Function, chkval: number = 0, isinc: number = 0, alchangeVal: Function, arg) { let hdids = await this.gethdids(call) if (hdids.length <= 0) return // 活动过期,不计数 let _initCon = await this.getCon(call) - - for (let index = 0; index < hdids.length; index++) { const hdid = hdids[index]; let _mydata = await Christmasfun.getMyData(call, hdid) let _tasks = _initCon[hdid].data.task - let _setData = { + let _setData= { $inc: {}, $set: {} } @@ -165,4 +197,4 @@ export class Christmasfun { -} \ No newline at end of file +} diff --git a/src/api_s2c/event/zhoumolibao/ApiOpen.ts b/src/api_s2c/event/zhoumolibao/ApiOpen.ts index bb4a2f6..7bed3a6 100644 --- a/src/api_s2c/event/zhoumolibao/ApiOpen.ts +++ b/src/api_s2c/event/zhoumolibao/ApiOpen.ts @@ -20,24 +20,32 @@ export default async function (call: ApiCall) { } -export async function checkResetBuyLog(call: ApiCall) { +export async function getConf(call, args?: { id?: string; payId?: string }) { + let _hd = (await HuoDongFun.gethdList(call, 9))[0] + if (!_hd) return [] + if (args?.id) return _hd?.data?.gift?.find(i => i.id == args.id) + if (args?.payId) return _hd?.data?.gift?.find(i => i.payId == args.payId) + return _hd?.data?.gift +} + +export async function checkResetBuyLog(call) { let zeroTime = PublicShared.getToDayZeroTime() - let data = await G.mongodb.cEvent('zhoumolibao').findOne({uid: call.uid, type: 'zhoumolibao'}) - if (data.refreshTime && data.refreshTime > zeroTime) return + if (data.refreshTime && data.refreshTime <= zeroTime) { + G.mongodb.cEvent(`zhoumolibao`).updateOne( + {uid: call.uid, type: `zhoumolibao`}, + {$set: {record: {}}}, + {upsert: true} + ) + } - G.mongodb.cEvent(`zhoumolibao`).updateOne( - {uid: call.uid, type: `zhoumolibao`}, - {$set: {record: {}}}, - {upsert: true} - ) + let gifts = await getConf(call) - let _hd = (await HuoDongFun.gethdList(call, 9))[0] - let payIds = _hd?.data?.gift?.filter(i => i.payId)?.map(i => i.payId) + let payIds = gifts.filter(i => i.payId)?.map(i => i.payId) let payLogs = await PayFun.getPayLogs(call.uid, payIds) let payLogLength = R.values(payLogs).filter(i => i.time < zeroTime).length if (payLogLength) { - PayFun.delPayLog(call.uid, payIds.map(i => ({payId: i}))) + PayFun.delPayLog(call.uid, payIds.map(i => ({payId: i, val: []}))) } } \ No newline at end of file diff --git a/src/api_s2c/event/zhoumolibao/ApiReceive.ts b/src/api_s2c/event/zhoumolibao/ApiReceive.ts index 3a295e4..895443e 100644 --- a/src/api_s2c/event/zhoumolibao/ApiReceive.ts +++ b/src/api_s2c/event/zhoumolibao/ApiReceive.ts @@ -2,6 +2,7 @@ import {ApiCall} from "tsrpc"; import {ReqReceive, ResReceive} from "../../../shared/protocols/event/zhoumolibao/PtlReceive"; import {HuoDongFun} from "../../../public/huodongfun"; import {PlayerFun} from "../../../public/player"; +import {HongDianChange} from "../../hongdian/fun"; export default async function (call: ApiCall) { // 查询活动是否有当前领奖的免费选项 @@ -12,14 +13,15 @@ export default async function (call: ApiCall) { // 取奖励列表,判断是否有可领取奖励 let data = await G.mongodb.cEvent('zhoumolibao').findOne({uid: call.uid, type: 'zhoumolibao'}) let rec = data?.record?.[call.req.id] - // if (rec && rec >= gift?.buyNum) return call.errorCode(-2) + if (rec && rec >= gift?.buyNum) return call.errorCode(-2) await PlayerFun.sendPrize(call, gift.prize); await G.mongodb.cEvent('zhoumolibao').updateOne({uid: call.uid, type: 'zhoumolibao'}, { $inc: {[`record.${gift.id}`]: 1}, - },{ upsert: true }) + }, {upsert: true}) call.succ({}) + HongDianChange.sendChangeKey(call.uid, ['zhoumolibao']); } diff --git a/src/api_s2c/hongdian/ApiGet.ts b/src/api_s2c/hongdian/ApiGet.ts index efdbe0e..57898d1 100644 --- a/src/api_s2c/hongdian/ApiGet.ts +++ b/src/api_s2c/hongdian/ApiGet.ts @@ -1,25 +1,25 @@ -import { ApiCall } from "tsrpc"; -import { DiXiaQianZhuangFun } from "../../public/dixiaqianzhuang"; -import { DxltFun } from "../../public/dxlt"; -import { GongHuiFun } from "../../public/gonghui/gonghui"; -import { JJCFun } from "../../public/jjc"; -import { KuangDongfun } from "../../public/kuangdong"; -import { LingZhuLaiXifun } from "../../public/lingzhulaixi"; -import { SignFun } from "../../public/sign"; -import { TaskFun } from "../../public/task"; -import { WangZheRongYaofun } from "../../public/wzry"; -import { XstaskFun } from "../../public/xstask"; -import { ReqGet, ResGet, hongdianKey } from "../../shared/protocols/hongdian/PtlGet"; -import { PublicShared } from '../../shared/public/public'; -import { getShouChongRedPoint } from '../event/shouchong/ApiReceive'; -import { md_redPoint } from '../gongyu/mingdao/ApiOpen'; -import { HongDianFun, HuoDongHongDianFun } from "./fun"; -import { FunWeiXiuChang } from "../../public/weixiuchang"; +import {ApiCall} from "tsrpc"; +import {DiXiaQianZhuangFun} from "../../public/dixiaqianzhuang"; +import {DxltFun} from "../../public/dxlt"; +import {GongHuiFun} from "../../public/gonghui/gonghui"; +import {JJCFun} from "../../public/jjc"; +import {KuangDongfun} from "../../public/kuangdong"; +import {LingZhuLaiXifun} from "../../public/lingzhulaixi"; +import {SignFun} from "../../public/sign"; +import {TaskFun} from "../../public/task"; +import {WangZheRongYaofun} from "../../public/wzry"; +import {XstaskFun} from "../../public/xstask"; +import {ReqGet, ResGet, hongdianKey} from "../../shared/protocols/hongdian/PtlGet"; +import {PublicShared} from '../../shared/public/public'; +import {getShouChongRedPoint} from '../event/shouchong/ApiReceive'; +import {md_redPoint} from '../gongyu/mingdao/ApiOpen'; +import {HongDianFun, HuoDongHongDianFun} from "./fun"; +import {FunWeiXiuChang} from "../../public/weixiuchang"; const defaultKeys: hongdianKey[] = ['jiuba', 'jiaotang', 'shouchong', 'clslhd', 'dixiaqianzhuanghd', 'gonghuihd', 'hbzbhd', 'jjchd', 'taskhd', 'xstaskhd', 'lingzhulaixihd', 'dxlthd', 'wzcjhd', 'slzdhd', 'qjzzdhd', 'kuangdonghd', 'qiandaohd', 'kaifukuanghuanhd', 'jijinhd', 'zhuishalinghd', 'yibaichouhd', 'huobanzhaomuhd', 'qirileichonghd', 'jierihd', 'kbzzhd', 'wzryhd', 'yuedujijin', 'mingdao', 'patahd', - 'heishihd', 'huodonghd', 'renown', 'weixiuchang', 'kaifujingsai']; + 'heishihd', 'huodonghd', 'renown', 'weixiuchang', 'kaifujingsai', 'zhoumolibao']; export default async function (call: ApiCall) { @@ -28,13 +28,13 @@ export default async function (call: ApiCall) { let toDayZeroTime = PublicShared.getToDayZeroTime(); //正常跑完引导的等级 - if(call.conn.gud.lv >= 7){ + if (call.conn.gud.lv >= 7) { for (let key of keys) { switch (key) { case 'jiuba': case 'jiaotang': - let db = await G.mongodb.collection('playerInfo', key).findOne({ uid: call.uid, type: key }); - res[key] = { show: (!db || toDayZeroTime >= db.freeTime) ? true : false }; + let db = await G.mongodb.collection('playerInfo', key).findOne({uid: call.uid, type: key}); + res[key] = {show: (!db || toDayZeroTime >= db.freeTime) ? true : false}; break; case 'shouchong': res[key] = await getShouChongRedPoint(call); @@ -160,6 +160,9 @@ export default async function (call: ApiCall) { case 'kaifujingsai': res[key] = await HongDianFun.kaifujingsai(call); break; + case 'zhoumolibao': + res[key] = await HongDianFun.zhoumolibao(call); + break; } } } diff --git a/src/api_s2c/hongdian/fun.ts b/src/api_s2c/hongdian/fun.ts index cfd992e..867eb16 100644 --- a/src/api_s2c/hongdian/fun.ts +++ b/src/api_s2c/hongdian/fun.ts @@ -20,7 +20,7 @@ import {PlayerFun} from "../../public/player"; import kfjsFun from "../../public/kaifujingsai"; import {RankKfjs} from "../../public/rank/rank_kfjs"; import {ShopFun} from "../../public/shop"; -import { Christmasfun } from '../event/christmas/fun'; +import {Christmasfun} from '../event/christmas/fun'; export class HongDianFun { /**黑榜争霸红点 */ @@ -301,6 +301,18 @@ export class HongDianFun { return {show: true, val: canGet} } + /**周末礼包 */ + static async zhoumolibao(call: ApiCall): Promise { + let _hd = (await HuoDongFun.gethdList(call, 9))[0] + let gift = _hd?.data?.gift?.find(i => i.free) + if (!gift) return {show: false} + + let data = await G.mongodb.cEvent('zhoumolibao').findOne({uid: call.uid, type: 'zhoumolibao'}) + let rec = data?.record?.[gift.id] + if (rec && rec >= gift?.buyNum) return {show: false} + return {show: true} + } + } @@ -708,10 +720,11 @@ export class HuoDongHongDianFun { if (_buyNum < _tmp.buynum) { _res.show = true; return _res; - }} + } + } let _diff = PublicShared.getDiff(stime) // 循环判断是否有可以领取的 - for(let i = 0; i < _diff; i++) { + for (let i = 0; i < _diff; i++) { if (_mydata.qiandao.includes(i)) continue _res.show = true; return _res; @@ -724,15 +737,15 @@ export class HuoDongHongDianFun { return _res; } let zhanling = _hdCon.zhanling - for (let indexzhanling = 0; indexzhanling < zhanling.length; indexzhanling++){ - if (!_mydata.pt.includes(indexzhanling)){ + for (let indexzhanling = 0; indexzhanling < zhanling.length; indexzhanling++) { + if (!_mydata.pt.includes(indexzhanling)) { _res.show = true; return _res; } - if (_mydata.pay && !_mydata.gj.includes(indexzhanling)){ - _res.show = true; + if (_mydata.pay && !_mydata.gj.includes(indexzhanling)) { + _res.show = true; return _res; - } + } } return _res; diff --git a/src/api_s2c/jiuba/ApiLottery.ts b/src/api_s2c/jiuba/ApiLottery.ts index 968cd79..89266e0 100644 --- a/src/api_s2c/jiuba/ApiLottery.ts +++ b/src/api_s2c/jiuba/ApiLottery.ts @@ -9,6 +9,7 @@ import {ReqLottery, ResLottery} from "../../shared/protocols/jiuba/PtlLottery"; import {PublicShared} from '../../shared/public/public'; import {HongDianChange} from '../hongdian/fun'; import {RankKfjs} from "../../public/rank/rank_kfjs"; +import {PushGiftFun} from "../../public/pushgift"; export default async function (call: ApiCall) { @@ -142,4 +143,8 @@ export default async function (call: ApiCall) { valArr: [await rankKfjs.getRankScore(call.uid) + call.req.type] }); + // 十连抽推送礼包 + if (call.req.type == 10) { + PushGiftFun.chkRecruitGift(call.uid) + } } \ No newline at end of file diff --git a/src/api_s2c/pushgift/ApiOpen.ts b/src/api_s2c/pushgift/ApiOpen.ts new file mode 100644 index 0000000..58d85b2 --- /dev/null +++ b/src/api_s2c/pushgift/ApiOpen.ts @@ -0,0 +1,29 @@ +import {ApiCall} from "tsrpc"; +import {ReqOpen, ResOpen} from "../../shared/protocols/pushgift/PtlOpen"; +import {PushGiftFun} from "../../public/pushgift"; +import {Gift} from "../../module/collection_pushgift"; + +export default async function (call: ApiCall) { + let res: ResOpen = {gifts: []}; + + // 过滤过期的礼包 和购买完毕的礼包 + (await PushGiftFun.getGift(call.uid)).forEach((gift) => { + if (gift.passTime > G.time && chkBuyNum(gift.id, gift)) { + res.gifts.push(gift) + } + }) + + call.succ(res) +} + +function chkBuyNum(gift_id: string, gift_info: Gift) { + let conf = G.gc.tuisonglibao[gift_id]; + for (let i = 0; i < conf.payId.length; i++) { + let pay = G.gc.pay[conf.payId[i]]; + if (pay.buys > 0 && gift_info.buy[i] < pay.buys) { + return true + } + } + + return false +} \ No newline at end of file diff --git a/src/globalListener.ts b/src/globalListener.ts index 4c51904..9300f46 100644 --- a/src/globalListener.ts +++ b/src/globalListener.ts @@ -15,6 +15,8 @@ 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"; export type gEventType = { /**玩家断开连接 */ @@ -22,7 +24,7 @@ export type gEventType = { /**玩家修改名字 */ PLAYER_CHANGE_NAME: (gud: player, name: string) => void; /**玩家充值 */ - PLAYER_PAY: (gud: player, payId: string, type: 'user' | 'system') => void; + PLAYER_PAY: (gud: player, payId: string, type: 'user' | 'system', call) => void; /**玩家发生api调用 */ API_CALL: (node: { call: ApiCall, return: ApiReturn; }) => void; /**玩家每日首次登陆 */ @@ -165,13 +167,14 @@ export function addListener() { } }); - G.on('PLAYER_PAY', async (player, payId, payArgs) => { + 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 }); 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; @@ -209,6 +212,8 @@ export function addListener() { G.emit("Class_task_135", 'Class_task_135', call, 1, 0); // 七日登录活动计数 qiRiDengLuAddDay(call); + // 周末礼包检测刷新 + checkResetBuyLog(call); }); diff --git a/src/jsonType.ts b/src/jsonType.ts index 8f8eb88..3b8f547 100644 --- a/src/jsonType.ts +++ b/src/jsonType.ts @@ -1773,6 +1773,24 @@ type gc_yuyuemail = { 'prize': { "a": string, "t": string, "n": number, [x: string]: any }[] }; +type gc_push_gift = { + [k: string]: { + /**礼包id*/ + id: number + /**礼包类型*/ + type: number + /**礼包参数*/ + num: any[] + /**购买id*/ + payId: string[] + /**持续时间*/ + time: number + /**冷却时间*/ + displayCD: number + /**显示返利比*/ + scale: number + } +} type gcType = { [key: string]: any @@ -1922,6 +1940,7 @@ type gcType = { kfcb_content: gc_kfcb_content kfcb_prize: gc_kfcb_prize yuyuemail: gc_yuyuemail + tuisonglibao: gc_push_gift } diff --git a/src/localConfig.ts b/src/localConfig.ts index 5a384b7..cfb411f 100644 --- a/src/localConfig.ts +++ b/src/localConfig.ts @@ -5,7 +5,7 @@ export default { /**是否开发模式 */ debug: true, /**消息服socket端口*/ - msgPort: 7778, + msgPort: 7785, /**http端口 msg服专用*/ // httpPort: 7779, /**跨服socket端口 */ @@ -13,7 +13,7 @@ export default { /**跨服 ws url */ corssWsUrl: "ws://10.0.1.20:10003", /**服务器id */ - serverId: 0, + serverId: 1001, /**redis url */ redisUrl: 'redis://:lyMaple525458@10.0.1.20:6379/0', /**mongodb url */ @@ -27,7 +27,7 @@ export default { /**服务器时间 */ time: '', /**开服时间 */ - openTime: '2022-10-10 1:0:0', + openTime: '2023-12-11 1:0:0', /**项目名称 */ projectName: 'heijiao', /**加密key */ diff --git a/src/module/collection_pushgift.ts b/src/module/collection_pushgift.ts new file mode 100644 index 0000000..c62fff0 --- /dev/null +++ b/src/module/collection_pushgift.ts @@ -0,0 +1,13 @@ +import {ObjectId} from "mongodb"; +import {ResOpen} from "../shared/protocols/pushgift/PtlOpen"; + +export type Gift = { + id: string + uid: string + buy: number[] + ctime: number + passTime: number + ext_data: { [key: string]: any } +} + +export type CollectionPushGift = Gift & { _id: ObjectId }; \ No newline at end of file diff --git a/src/module/mongodb.ts b/src/module/mongodb.ts index f912ad7..5d8c8ac 100644 --- a/src/module/mongodb.ts +++ b/src/module/mongodb.ts @@ -59,6 +59,7 @@ import {CollectionPlayerBehavior} from "./collection_player_behavior"; import {CollectionRmbuse} from "./collection_rmbuse"; import {CollectionFightLog} from "./collection_fightLog"; import {CollectionShop} from "./collection_shop"; +import {CollectionPushGift} from "./collection_pushgift"; export type MongodbCollections = { user: CollectionUser; @@ -131,4 +132,5 @@ export type MongodbCollections = { rmbuse: CollectionRmbuse fightLog: CollectionFightLog shop: CollectionShop + pushgift:CollectionPushGift }; \ No newline at end of file diff --git a/src/public/fight.ts b/src/public/fight.ts index 202369c..c13c029 100644 --- a/src/public/fight.ts +++ b/src/public/fight.ts @@ -9,6 +9,7 @@ import {HeroFun} from './hero'; import {UserFun} from './user'; import {re, string} from "mathjs"; import {getGud} from './gud'; +import {PushGiftFun} from "./pushgift"; type fightType = 'tanxian' | 'pata' | 'jjc' | 'gbtx' | 'qjzzd' | 'meirishilian' | 'wzrycross'; @@ -86,9 +87,16 @@ export class FightFun { /**挑战竞技场 */ static async fightJJc(call: ApiCall, rankInfo: rankInfo) { - if (rankInfo.player.uid.indexOf('npc_') != -1) return await this.fightNpc(call, G.gc.jjc_npc[rankInfo.player.uid].npcId, 'jjc', await this.getPlayerFightData(call.conn.uid)); - return this.fight([await this.getPlayerFightData(call.conn.uid), await this.getPlayerFightData(rankInfo.player.uid)]); + + let result = this.fight([await this.getPlayerFightData(call.conn.uid), await this.getPlayerFightData(rankInfo.player.uid)]); + + // 竞技场 战败触发推送礼包 + if (result.winSide != 0) { + PushGiftFun.chkLoseGift(call.uid) + } + + return result } /**挑战npc */ @@ -106,7 +114,13 @@ export class FightFun { let npc = formatNpcData(npcId); - return this.fight([my, npc], 30, 'pve'); + let result = this.fight([my, npc], 30, 'pve'); + + // 主线 爬塔 战败触发推送礼包 + if (result.winSide != 0 && ["tanxian", "pata"].includes(type)) { + PushGiftFun.chkLoseGift(data[0].player.uid) + } + return result } /** diff --git a/src/public/pay.ts b/src/public/pay.ts index d7adaeb..665a3cd 100644 --- a/src/public/pay.ts +++ b/src/public/pay.ts @@ -9,6 +9,7 @@ import {HuoDongFun} from './huodongfun'; import {call, PlayerFun} from './player'; import {number} from "mathjs"; import {getGud} from './gud'; +import {getConf as zmlbGetConf} from '../api_s2c/event/zhoumolibao/ApiOpen'; async function checkPayIsActive(payId: string, logs: payLog[], payArgs) { let conf: any = await this.getConf(payId, payArgs); @@ -98,7 +99,7 @@ export class PayFun { }).toArray(); if (payIds?.length) { - return Object.fromEntries(payIds.map(id => [id, logs[id] || []])); + return Object.fromEntries(payIds.map(id => [id, logs.find(i => i.key == id)?.values || []])); } let allLogs = {} logs.map(i => allLogs[i.key] = i.values) @@ -176,13 +177,6 @@ export class PayFun { let conf: any = await this.getConf(payId, payArgs); - let isReplaceConf = await this.checkBuysAfterPay(uid, payId, conf, payArgs) - if (isReplaceConf) { - let prizePayId = `zuanshi_${conf.money}` - payArgs.toPrizePayId = prizePayId - conf = this.replacePrizeToChongzhi(prizePayId, conf) - } - let prize = [...conf.prize]; //let player = await G.redis.get('user', uid); let player = await getGud(uid); @@ -225,6 +219,22 @@ export class PayFun { } }); } + + if (payId.indexOf('wkdlibao') != -1) { + let call = this.getCall(player) + let conf = await zmlbGetConf(call, {payId}) + prize.push(...conf.prize) + } + + let isReplaceConf = await this.checkBuysAfterPay(uid, payId, conf, payArgs) + if (isReplaceConf) { + let prizePayId = `zuanshi_${conf.money}` + payArgs.toPrizePayId = prizePayId + conf = this.replacePrizeToChongzhi(prizePayId, conf) + prize = [...conf.prize] + } + + await PlayerFun.sendPrize(call, prize); await PlayerFun.addAttr(call, conf.payExp); if (payId == 'G123SendGift') { @@ -261,7 +271,7 @@ export class PayFun { } }); - G.emit('PLAYER_PAY', player, payId, payArgs); + G.emit('PLAYER_PAY', player, payId, payArgs, call); G.emit("Class_task_116", 'Class_task_116', call, 1, 0); } @@ -362,12 +372,20 @@ export class PayFun { } if (conf.buys > 0 && buyLog.length >= conf.buys) return G.server.sendMsgByUid(player.uid, 'msg_s2c/PayResult', {code: -1}); - if (conf.time != -1 && buyLog.slice(-1)[0]?.eTime > G.time && conf.buys == 0) return G.server.sendMsgByUid(player.uid, 'msg_s2c/PayResult', {code: -2}); + + // todo 没看懂这个判断针对什么支付,不支持周末礼包这个类型的限购,所以加上判断:payId.indexOf('wkdlibao') == -1 + if (conf.time != -1 && buyLog.slice(-1)[0]?.eTime > G.time && conf.buys == 0 && payId.indexOf('wkdlibao') == -1) { + return G.server.sendMsgByUid(player.uid, 'msg_s2c/PayResult', {code: -2}); + } if (payId.indexOf('136Gift') != -1 && payId != '136Gift1') { buyLog = await this.getPayLog(player.uid, '136Gift1'); if (buyLog.slice(-1)[0]?.eTime > G.time) return G.server.sendMsgByUid(player.uid, 'msg_s2c/PayResult', {code: -3}); } - + if (payId.indexOf('wkdlibao') != -1) { + let call = this.getCall(player) + let conf = await zmlbGetConf(call, {payId}) + if (buyLog.length && buyLog.length >= conf.buyNum) return G.server.sendMsgByUid(player.uid, 'msg_s2c/PayResult', {code: -1}); + } } if (G.config.debug) { diff --git a/src/public/player.ts b/src/public/player.ts index 7c38a1c..f5dac4e 100644 --- a/src/public/player.ts +++ b/src/public/player.ts @@ -14,9 +14,10 @@ import {PublicShared} from '../shared/public/public'; import {HeroFun} from './hero'; import {ShiwuFun} from './shiwu'; import {UserFun} from './user'; -import { getItemByItemId, getItemNum } from './item'; -import { getGud, setGud } from './gud'; +import {getItemByItemId, getItemNum} from './item'; +import {getGud, setGud} from './gud'; import {addGameLog} from "../gameLog"; +import {PushGiftFun} from "./pushgift"; export type call = { @@ -35,7 +36,7 @@ export type call = { }; service: { name: string }; addEventMsg: ApiCall['addEventMsg']; - req: { } + req: {} }; export class PlayerFun { @@ -66,6 +67,8 @@ export class PlayerFun { if (has < atn.n) { if (err) { + // 消耗不足 触发推送礼包 + PushGiftFun.chkItemGift(call.uid, atn) throw new TsrpcError('', {code: -104, atn: atn}); } else { return {isOk: false, atn: atn}; @@ -143,15 +146,15 @@ export class PlayerFun { shiwu.length > 0 && this.addShiwu(call, shiwu), peijian.length > 0 && this.addPeijian(call, peijian) ]); - + return prizeList; }; //attr里的指定字段的值,不能小于0 - static fixAttrLteZero(t:string, val:number){ - if(['jinbi','rmbmoney','payExp','nexp'].includes(t) && val < 0){ + static fixAttrLteZero(t: string, val: number) { + if (['jinbi', 'rmbmoney', 'payExp', 'nexp'].includes(t) && val < 0) { return 0 - }else{ + } else { return val; } } @@ -189,6 +192,16 @@ export class PlayerFun { // 修改属性应在相关奖励领取之前,否则奖励内获取的用户数据是旧数据 // await this.changeAttr(call.conn.uid, change); call.addEventMsg('msg_s2c/PlayerChange', change); + + // 等级改变 触发推送礼包 + if (change["lv"]) { + PushGiftFun.chkLvGift(call.uid, change["lv"]) + } + // 关卡改变 触发推送礼包 + if (change["mapId"]) { + PushGiftFun.chkLevelGift(call.uid, change["mapId"]) + } + } static async changeAttrLog(uid: string, change, atn, before) { @@ -207,9 +220,9 @@ export class PlayerFun { static async changeAttr(uid: string, change: Partial) { //for (let k in change) { - //G.redis.set('user', uid, k as any, change[k]); + //G.redis.set('user', uid, k as any, change[k]); //} - setGud(uid,change); + setGud(uid, change); G.mongodb.collection('user').updateOne({uid: uid}, {$set: change}); @@ -290,7 +303,11 @@ export class PlayerFun { G.mongodb.collection('item').updateOne(upObj.filter, upObj.update, upObj.options); call.addEventMsg('msg_s2c/ItemChange', atn.t, data); - addGameLog(call.uid, "_itemChange", {"additem":1}, {"filter": upObj.filter, "update": upObj.update, "options": upObj.options}) + addGameLog(call.uid, "_itemChange", {"additem": 1}, { + "filter": upObj.filter, + "update": upObj.update, + "options": upObj.options + }) } else { if (item.num + atn.n <= 0) { await Promise.all([ @@ -302,13 +319,13 @@ export class PlayerFun { //await G.redis.del('item', call.uid, atn.t); //await G.mongodb.collection('item').deleteOne({uid: call.uid, itemId: atn.t}); call.addEventMsg('msg_s2c/ItemChange', atn.t, {num: 0}); - addGameLog(call.uid, "_itemChange",{"delitem":1}, {"itemId": atn.t}) + addGameLog(call.uid, "_itemChange", {"delitem": 1}, {"itemId": atn.t}) } else { await Promise.all([ ////去掉item Redis相关 //G.redis.set('item', call.uid, atn.t, 'lastTime', upObj.update.$set.lastTime), //G.redis.numIncrBy('item', call.uid, atn.t, 'num', atn.n), - + G.mongodb.collection('item').updateOne(upObj.filter, upObj.update, upObj.options) ]); // await G.redis.set('item', call.uid, atn.t, 'lastTime', upObj.update.$set.lastTime); @@ -318,7 +335,12 @@ export class PlayerFun { num: item.num + atn.n, lastTime: upObj.update.$set.lastTime }); - addGameLog(call.uid, "_itemChange",{"attritem":1}, {"filter": upObj.filter, "update": upObj.update, "options": upObj.options,newNum:item.num + atn.n}) + addGameLog(call.uid, "_itemChange", {"attritem": 1}, { + "filter": upObj.filter, + "update": upObj.update, + "options": upObj.options, + newNum: item.num + atn.n + }) } } } @@ -344,7 +366,7 @@ export class PlayerFun { }).reduce((a, b) => a.concat(b)); let result = await G.mongodb.collection('equip').insertMany(insertData); - addGameLog(call.uid, "_addEquip",{}, insertData) + addGameLog(call.uid, "_addEquip", {}, insertData) insertData.forEach((v, key) => { let id = result.insertedIds[key].toHexString(); @@ -391,7 +413,7 @@ export class PlayerFun { G.mongodb.collection('equip').deleteOne({uid: call.uid, _id: new ObjectId(_id)}); call.addEventMsg('msg_s2c/EquipChange', _id, {num: 0}); - addGameLog(call.uid, "_cutEquip",{}, {_id:_id}) + addGameLog(call.uid, "_cutEquip", {}, {_id: _id}) } } @@ -419,7 +441,7 @@ export class PlayerFun { }); let result = await G.mongodb.collection('hero').insertMany(insertData); - addGameLog(call.uid, "_addHero",{}, insertData) + addGameLog(call.uid, "_addHero", {}, insertData) for (let key = 0; key < insertData.length; key++) { let v = insertData[key] @@ -474,7 +496,7 @@ export class PlayerFun { G.redis.del('hero', call.uid, _id); G.mongodb.collection('hero').deleteOne({uid: call.uid, _id: new ObjectId(_id)}); call.addEventMsg('msg_s2c/HeroChange', _id, {num: 0}); - addGameLog(call.uid, "_cutHero",{}, {_id:_id}) + addGameLog(call.uid, "_cutHero", {}, {_id: _id}) } } @@ -505,7 +527,7 @@ export class PlayerFun { }).reduce((a, b) => a.concat(b)); let result = await G.mongodb.collection('shiwu').insertMany(insertData); - addGameLog(call.uid, "_addShiWu",{}, insertData) + addGameLog(call.uid, "_addShiWu", {}, insertData) insertData.forEach((v, key) => { let id = result.insertedIds[key].toHexString(); @@ -537,7 +559,7 @@ export class PlayerFun { // G.redis.del('shiwu', call.uid, _id); G.mongodb.collection('shiwu').deleteOne({uid: call.uid, _id: new ObjectId(_id)}); call.addEventMsg('msg_s2c/ShiwuChange', _id, {num: 0}); - addGameLog(call.uid, "_cutShiwu",{}, {_id:_id}) + addGameLog(call.uid, "_cutShiwu", {}, {_id: _id}) } } @@ -559,7 +581,7 @@ export class PlayerFun { }).reduce((a, b) => a.concat(b)); let result = await G.mongodb.collection('peijian').insertMany(insertData); - addGameLog(call.uid, "_addPeiJian",{}, insertData) + addGameLog(call.uid, "_addPeiJian", {}, insertData) insertData.forEach((v, key) => { let {_id, uid, ...ops} = v; @@ -600,7 +622,7 @@ export class PlayerFun { G.redis.del('peijian', call.uid, _id); G.mongodb.collection('peijian').deleteOne({uid: call.uid, _id: new ObjectId(_id)}); call.addEventMsg('msg_s2c/PeijianChange', _id, {num: 0}); - addGameLog(call.uid, "_cutPeijian",{}, {_id:_id}) + addGameLog(call.uid, "_cutPeijian", {}, {_id: _id}) } } diff --git a/src/public/pushgift.ts b/src/public/pushgift.ts new file mode 100644 index 0000000..72fcfde --- /dev/null +++ b/src/public/pushgift.ts @@ -0,0 +1,155 @@ +import {PayFun} from "./pay"; + +const PushGiftType = { + LevelGift: 1, // 关卡推送 + ItemGift: 2, // 道具推送 + LoseGift: 3, // 战败推送 + RecruitGift: 4, // 十连推送 + LvGift: 5, // 等级推送 +} + +export class PushGiftFun { + + static async getGift(uid: string) { + // 查询所有礼包 + return (await G.mongodb.collection("pushgift").find({ + uid: uid + }).toArray()).map((i) => { + let {_id, ...gift} = i; + return gift + }) + } + + static async chkItemGift(uid: string, atn: atn) { + let gift_ids = []; + for (let id in G.gc.tuisonglibao) { + let conf = G.gc.tuisonglibao[id]; + if (conf.type == PushGiftType.ItemGift && conf.num[0].a == atn.a && conf.num[0].t == atn.t) { + gift_ids.push(id); + } + } + if (gift_ids.length <= 0) { + return + } else { + this.pushGift(uid, gift_ids) + } + } + + static async chkLevelGift(uid: string, level: number) { + let gift_ids = []; + for (let id in G.gc.tuisonglibao) { + let conf = G.gc.tuisonglibao[id]; + if (conf.type == PushGiftType.LevelGift && conf.num[0] == level) { + gift_ids.push(id); + } + } + if (gift_ids.length <= 0) { + return + } else { + this.pushGift(uid, gift_ids) + } + } + + static async chkLvGift(uid: string, lv: number) { + let gift_ids = []; + for (let id in G.gc.tuisonglibao) { + let conf = G.gc.tuisonglibao[id]; + if (conf.type == PushGiftType.LevelGift && conf.num[0] == lv) { + gift_ids.push(id); + } + } + if (gift_ids.length <= 0) { + return + } else { + this.pushGift(uid, gift_ids) + } + } + + static async chkLoseGift(uid: string) { + let gift_ids = []; + for (let id in G.gc.tuisonglibao) { + let conf = G.gc.tuisonglibao[id]; + if (conf.type == PushGiftType.LoseGift) { + gift_ids.push(id); + } + } + if (gift_ids.length <= 0) { + return + } else { + this.pushGift(uid, gift_ids) + } + } + + static async chkRecruitGift(uid: string) { + let gift_ids = []; + for (let id in G.gc.tuisonglibao) { + let conf = G.gc.tuisonglibao[id]; + if (conf.type == PushGiftType.RecruitGift) { + gift_ids.push(id); + } + } + if (gift_ids.length <= 0) { + return + } else { + this.pushGift(uid, gift_ids) + } + } + + static async pushGift(uid: string, gift_ids: string[]) { + let gifts = {}; + (await this.getGift(uid)).forEach(i => gifts[i.id] = i) + for (let gift_id of gift_ids) { + let conf = G.gc.tuisonglibao[gift_id]; + if (gifts[gift_id] && conf.displayCD > 0 && gifts[gift_id].ctime + conf.displayCD > G.time) { + continue + } + if (conf.type == PushGiftType.RecruitGift) { + if (gifts[gift_id]) { + if (gift_ids[gift_id].ext_data.num + 1 >= conf.num[0]) { + this.addGift(uid, gift_id, {num: 0}) + } else { + G.mongodb.collection("pushgift").updateOne({ + uid: uid, id: gift_id + }, {"$inc": {"ext_data.num": 1}}) + } + } else { + // 招募礼包不存在 初始化数据 记录招募次数 + G.mongodb.collection("pushgift").updateOne({ + uid: uid, id: gift_id + }, { + $set: { + ctime: 0, + passTime: 0, + ext_data: {num: 1}, + buy: conf.payId.map(() => 0), + } + }, {upsert: true}) + } + } else { + this.addGift(uid, gift_id, {}) + } + } + } + + static async addGift(uid: string, giftid: string, ext_data: { [key: string]: any }) { + let conf = G.gc.tuisonglibao[giftid]; + // 更新礼包 + G.mongodb.collection("pushgift").updateOne({ + uid: uid, id: giftid + }, { + $set: { + ctime: G.time, + ext_data: ext_data, + passTime: G.time + conf.time, + buy: conf.payId.map(() => 0), + } + }, {upsert: true}) + + // 删除购买记录 + PayFun.delPayLog(uid, ...conf.payId.map(i => { + return {payId: i, val: []} + })) + // 推送客户端消息 + G.server.sendMsgByUid(uid, "msg_s2c/PushGiftChange", 1); + } +} \ No newline at end of file diff --git a/src/shared/protocols/event/christmas/PtlOpen.ts b/src/shared/protocols/event/christmas/PtlOpen.ts index f0129c6..1dc8168 100644 --- a/src/shared/protocols/event/christmas/PtlOpen.ts +++ b/src/shared/protocols/event/christmas/PtlOpen.ts @@ -23,6 +23,8 @@ export type christmas = { taskval: { [id: string]: number } /**任务领取标识 */ taskfinish: string[] + /**小游戏挑战次数 */ + gamenum: number /**普通战令奖励集合 奖励id */ pt: number[] /**高级战令奖励集合 奖励id */ @@ -36,7 +38,7 @@ export type christmas = { /**装扮值 */ val: number /**签到标识 */ - qiandao:string[], + qiandao:number[], /**刷新时间 */ refresh: number } \ No newline at end of file diff --git a/src/shared/protocols/event/christmas/huodong.json b/src/shared/protocols/event/christmas/huodong.json index 2f9d42e..cea9f66 100644 --- a/src/shared/protocols/event/christmas/huodong.json +++ b/src/shared/protocols/event/christmas/huodong.json @@ -2,11 +2,11 @@ "hdid" : 91029302193, "htype" : 8, "stype" : 800, - "ttype" : 1, - "stime" : 60, - "rtime" : 90, - "etime" : 90, - "name" : "xinfupeiyang", + "ttype" : 0, + "stime" : 1702396800, + "rtime" : 1703088000, + "etime" : 1703088000, + "name" : "christmas", "icon" : "icon_xfdj", "showtime" : "根据玩家注册时间,游戏返回时复写", "data" : { @@ -52,24 +52,51 @@ } }, "gameneed": [{"a": "attr", "t":"jinbi", "n": 1}], - "game": [0,1,2,3,4,5], - "zhanling":[ - { - "val": 1, - "pt": [{"a": "attr", "t":"jinbi", "n": 1}], - "gj": [{"a": "attr", "t":"jinbi", "n": 1}] - }, - { - "val": 2, - "pt": [{"a": "attr", "t":"jinbi", "n": 1}], - "gj": [{"a": "attr", "t":"jinbi", "n": 1}] - }, - { - "val": 3, - "pt": [{"a": "attr", "t":"jinbi", "n": 1}], - "gj": [{"a": "attr", "t":"jinbi", "n": 1}] - } - ], + "game": [0,1, 2, 3, 4, 5], + "gamefree": 3, + "zhanling":[{ + "val": 1, + "pt": [{"a": "attr", "t":"jinbi", "n": 1}], + "gj": [{"a": "attr", "t":"jinbi", "n": 1},{"a": "attr", "t":"jinbi", "n": 1}] + }, + { + "val": 2, + "pt": [{"a": "attr", "t":"rmbmoney", "n": 100}], + "gj": [{"a": "attr", "t":"rmbmoney", "n": 100},{"a": "attr", "t":"jinbi", "n": 1}] + }, + { + "val": 3, + "pt": [{"a": "attr", "t":"jinbi", "n": 1}], + "gj": [{"a": "attr", "t":"jinbi", "n": 1},{"a": "attr", "t":"jinbi", "n": 1}] + },{ + "val": 4, + "pt": [{"a": "attr", "t":"jinbi", "n": 1}], + "gj": [{"a": "attr", "t":"jinbi", "n": 1},{"a": "attr", "t":"jinbi", "n": 1}] + }, + { + "val": 5, + "pt": [{"a": "attr", "t":"rmbmoney", "n": 100}], + "gj": [{"a": "attr", "t":"rmbmoney", "n": 100},{"a": "attr", "t":"jinbi", "n": 1}] + }, + { + "val": 6, + "pt": [{"a": "attr", "t":"jinbi", "n": 1}], + "gj": [{"a": "attr", "t":"jinbi", "n": 1},{"a": "attr", "t":"jinbi", "n": 1}] + },{ + "val": 7, + "pt": [{"a": "attr", "t":"jinbi", "n": 1}], + "gj": [{"a": "attr", "t":"jinbi", "n": 1},{"a": "attr", "t":"jinbi", "n": 1}] + }, + { + "val": 8, + "pt": [{"a": "attr", "t":"rmbmoney", "n": 100}], + "gj": [{"a": "attr", "t":"rmbmoney", "n": 100},{"a": "attr", "t":"jinbi", "n": 1}] + }, + { + "val": 9, + "pt": [{"a": "attr", "t":"jinbi", "n": 1}], + "gj": [{"a": "attr", "t":"jinbi", "n": 1},{"a": "attr", "t":"jinbi", "n": 1}] + }], "zlpayid":"ycmb_1_1", "libao": { "1": { diff --git a/src/shared/protocols/hongdian/PtlGet.ts b/src/shared/protocols/hongdian/PtlGet.ts index 0265b2c..e09f771 100644 --- a/src/shared/protocols/hongdian/PtlGet.ts +++ b/src/shared/protocols/hongdian/PtlGet.ts @@ -1,5 +1,3 @@ - - /** * 获取红点 */ @@ -13,10 +11,47 @@ export const conf = { timeIntervalLimit: 0 }; -export type hongdianKey = 'jiuba' | 'jiaotang' | 'shouchong' | 'dixiaqianzhuanghd' | 'taskhd' | 'xstaskhd' | 'gonghuihd' | 'jjchd' | 'hbzbhd' | - 'clslhd' | 'lingzhulaixihd' | 'dxlthd' | 'wzcjhd' | 'slzdhd' | 'qjzzdhd' | 'kuangdonghd' | 'qiandaohd' | 'kaifukuanghuanhd' | 'jijinhd' | 'zhuishalinghd' | - 'yibaichouhd' | 'huobanzhaomuhd' | 'qirileichonghd' | 'jierihd' | 'kbzzhd' | 'wzryhd' | 'yuedujijin' | 'patahd' | - 'mingdao' | 'heishihd' |'jitianhaoli'| 'huodonghd' | 'renown' | 'heishiMrjx' | 'weixiuchang' | 'kaifujingsai'; +export type hongdianKey = + 'jiuba' + | 'jiaotang' + | 'shouchong' + | 'dixiaqianzhuanghd' + | 'taskhd' + | 'xstaskhd' + | 'gonghuihd' + | 'jjchd' + | 'hbzbhd' + | + 'clslhd' + | 'lingzhulaixihd' + | 'dxlthd' + | 'wzcjhd' + | 'slzdhd' + | 'qjzzdhd' + | 'kuangdonghd' + | 'qiandaohd' + | 'kaifukuanghuanhd' + | 'jijinhd' + | 'zhuishalinghd' + | + 'yibaichouhd' + | 'huobanzhaomuhd' + | 'qirileichonghd' + | 'jierihd' + | 'kbzzhd' + | 'wzryhd' + | 'yuedujijin' + | 'patahd' + | + 'mingdao' + | 'heishihd' + | 'jitianhaoli' + | 'huodonghd' + | 'renown' + | 'heishiMrjx' + | 'weixiuchang' + | 'kaifujingsai' + | 'zhoumolibao'; export type hongdianVal = { diff --git a/src/shared/protocols/msg_s2c/MsgPushGiftChange.ts b/src/shared/protocols/msg_s2c/MsgPushGiftChange.ts new file mode 100644 index 0000000..4c04b9b --- /dev/null +++ b/src/shared/protocols/msg_s2c/MsgPushGiftChange.ts @@ -0,0 +1 @@ +export type MsgPushGiftChange = 1; diff --git a/src/shared/protocols/pushgift/PtlOpen.ts b/src/shared/protocols/pushgift/PtlOpen.ts new file mode 100644 index 0000000..829c306 --- /dev/null +++ b/src/shared/protocols/pushgift/PtlOpen.ts @@ -0,0 +1,5 @@ +import {Gift} from "../../../module/collection_pushgift"; + +export type ReqOpen = {} + +export type ResOpen = { gifts: Gift[] } diff --git a/src/shared/protocols/serviceProto.ts b/src/shared/protocols/serviceProto.ts index c7e31ea..218afc9 100644 --- a/src/shared/protocols/serviceProto.ts +++ b/src/shared/protocols/serviceProto.ts @@ -237,6 +237,7 @@ import { MsgPayResult } from './msg_s2c/MsgPayResult'; import { MsgPeijianChange } from './msg_s2c/MsgPeijianChange'; import { MsgPlayerChange } from './msg_s2c/MsgPlayerChange'; import { MsgPrivate } from './msg_s2c/MsgPrivate'; +import { MsgPushGiftChange } from './msg_s2c/MsgPushGiftChange'; import { MsgSendGift } from './msg_s2c/MsgSendGift'; import { MsgShiwuChange } from './msg_s2c/MsgShiwuChange'; import { MsgTaskChange } from './msg_s2c/MsgTaskChange'; @@ -264,9 +265,10 @@ import { ReqBingo, ResBingo } from './PtlBingo'; import { ReqFightTest, ResFightTest } from './PtlFightTest'; import { ReqSyncBtn, ResSyncBtn } from './PtlSyncBtn'; import { ReqTest, ResTest } from './PtlTest'; +import { ReqOpen as ReqOpen_48, ResOpen as ResOpen_48 } from './pushgift/PtlOpen'; import { ReqFight as ReqFight_9, ResFight as ResFight_9 } from './qjzzd/PtlFight'; -import { ReqOpen as ReqOpen_48, ResOpen as ResOpen_48 } from './qjzzd/PtlOpen'; -import { ReqOpen as ReqOpen_49, ResOpen as ResOpen_49 } from './rank/PtlOpen'; +import { ReqOpen as ReqOpen_49, ResOpen as ResOpen_49 } from './qjzzd/PtlOpen'; +import { ReqOpen as ReqOpen_50, ResOpen as ResOpen_50 } from './rank/PtlOpen'; import { ReqConcise, ResConcise } from './shiwu/PtlConcise'; import { ReqExtract, ResExtract } from './shiwu/PtlExtract'; import { ReqGetList as ReqGetList_7, ResGetList as ResGetList_7 } from './shiwu/PtlGetList'; @@ -274,20 +276,20 @@ import { ReqLvUp as ReqLvUp_3, ResLvUp as ResLvUp_3 } from './shiwu/PtlLvUp'; import { ReqRecast, ResRecast } from './shiwu/PtlRecast'; import { ReqTakeOff as ReqTakeOff_2, ResTakeOff as ResTakeOff_2 } from './shiwu/PtlTakeOff'; import { ReqWear as ReqWear_2, ResWear as ResWear_2 } from './shiwu/PtlWear'; -import { ReqOpen as ReqOpen_50, ResOpen as ResOpen_50 } from './shootGame/PtlOpen'; +import { ReqOpen as ReqOpen_51, ResOpen as ResOpen_51 } from './shootGame/PtlOpen'; import { ReqRec as ReqRec_14, ResRec as ResRec_14 } from './shootGame/PtlRec'; import { ReqBuy as ReqBuy_6, ResBuy as ResBuy_6 } from './shop/PtlBuy'; -import { ReqOpen as ReqOpen_51, ResOpen as ResOpen_51 } from './shop/PtlOpen'; +import { ReqOpen as ReqOpen_52, ResOpen as ResOpen_52 } from './shop/PtlOpen'; import { ReqRefresh as ReqRefresh_6, ResRefresh as ResRefresh_6 } from './shop/PtlRefresh'; import { ReqGetBoxPrize, ResGetBoxPrize } from './sign/PtlGetBoxPrize'; import { ReqGetPrize as ReqGetPrize_2, ResGetPrize as ResGetPrize_2 } from './sign/PtlGetPrize'; -import { ReqOpen as ReqOpen_52, ResOpen as ResOpen_52 } from './sign/PtlOpen'; +import { ReqOpen as ReqOpen_53, ResOpen as ResOpen_53 } from './sign/PtlOpen'; import { ReqAim, ResAim } from './slzd/PtlAim'; import { ReqBuyNum as ReqBuyNum_4, ResBuyNum as ResBuyNum_4 } from './slzd/PtlBuyNum'; import { ReqFight as ReqFight_10, ResFight as ResFight_10 } from './slzd/PtlFight'; import { ReqFightLog as ReqFightLog_2, ResFightLog as ResFightLog_2 } from './slzd/PtlFightLog'; import { ReqMyRank, ResMyRank } from './slzd/PtlMyRank'; -import { ReqOpen as ReqOpen_53, ResOpen as ResOpen_53 } from './slzd/PtlOpen'; +import { ReqOpen as ReqOpen_54, ResOpen as ResOpen_54 } from './slzd/PtlOpen'; import { ReqOpenFort, ResOpenFort } from './slzd/PtlOpenFort'; import { ReqRec as ReqRec_15, ResRec as ResRec_15 } from './slzd/PtlRec'; import { ReqRefresh as ReqRefresh_7, ResRefresh as ResRefresh_7 } from './slzd/PtlRefresh'; @@ -296,11 +298,11 @@ import { ReqEvent, ResEvent } from './tanxian/PtlEvent'; 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 { ReqOpen as ReqOpen_55, ResOpen as ResOpen_55 } from './tanxian/PtlOpen'; import { ReqReceive as ReqReceive_6, ResReceive as ResReceive_6 } 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'; +import { ReqOpen as ReqOpen_56, ResOpen as ResOpen_56 } from './task/PtlOpen'; import { ReqCDKEY, ResCDKEY } from './user/PtlCDKEY'; import { ReqChangeInfo, ResChangeInfo } from './user/PtlChangeInfo'; import { ReqChangeName, ResChangeName } from './user/PtlChangeName'; @@ -316,7 +318,7 @@ import { ReqRenownOpen, ResRenownOpen } from './user/PtlRenownOpen'; import { ReqTujian, ResTujian } from './user/PtlTujian'; import { ReqDecompose, ResDecompose } from './weixiuchang/PtlDecompose'; import { ReqExchange, ResExchange } from './weixiuchang/PtlExchange'; -import { ReqOpen as ReqOpen_56, ResOpen as ResOpen_56 } from './weixiuchang/PtlOpen'; +import { ReqOpen as ReqOpen_57, ResOpen as ResOpen_57 } from './weixiuchang/PtlOpen'; import { ReqUpLv, ResUpLv } from './weixiuchang/PtlUpLv'; import { ReqUpStar, ResUpStar } from './weixiuchang/PtlUpStar'; import { ReqAutoBaoMing, ResAutoBaoMing } from './wzry/PtlAutoBaoMing'; @@ -327,7 +329,7 @@ import { ReqDldFight, ResDldFight } from './wzry/PtlDldFight'; import { ReqDldRefre, ResDldRefre } from './wzry/PtlDldRefre'; import { ReqJingCai, ResJingCai } from './wzry/PtlJingCai'; import { ReqJingCaiOpen, ResJingCaiOpen } from './wzry/PtlJingCaiOpen'; -import { ReqOpen as ReqOpen_57, ResOpen as ResOpen_57 } from './wzry/PtlOpen'; +import { ReqOpen as ReqOpen_58, ResOpen as ResOpen_58 } from './wzry/PtlOpen'; import { ReqUpdateFight, ResUpdateFight } from './wzry/PtlUpdateFight'; import { ReqWzzd, ResWzzd } from './wzry/PtlWzzd'; import { ReqZuanShiOpen, ResZuanShiOpen } from './wzry/PtlZuanShiOpen'; @@ -335,7 +337,7 @@ import { ReqAllGet, ResAllGet } from './xstask/PtlAllGet'; 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 { ReqOpen as ReqOpen_59, ResOpen as ResOpen_59 } from './xstask/PtlOpen'; import { ReqReceive as ReqReceive_7, ResReceive as ResReceive_7 } from './xstask/PtlReceive'; import { ReqRefresh as ReqRefresh_8, ResRefresh as ResRefresh_8 } from './xstask/PtlRefresh'; import { ReqHandle, ResHandle } from './yongbingzhuzhan/PtlHandle'; @@ -1293,18 +1295,22 @@ export interface ServiceType { req: ReqTest, res: ResTest }, + "pushgift/Open": { + req: ReqOpen_48, + res: ResOpen_48 + }, "qjzzd/Fight": { req: ReqFight_9, res: ResFight_9 }, "qjzzd/Open": { - req: ReqOpen_48, - res: ResOpen_48 - }, - "rank/Open": { req: ReqOpen_49, res: ResOpen_49 }, + "rank/Open": { + req: ReqOpen_50, + res: ResOpen_50 + }, "shiwu/Concise": { req: ReqConcise, res: ResConcise @@ -1334,8 +1340,8 @@ export interface ServiceType { res: ResWear_2 }, "shootGame/Open": { - req: ReqOpen_50, - res: ResOpen_50 + req: ReqOpen_51, + res: ResOpen_51 }, "shootGame/Rec": { req: ReqRec_14, @@ -1346,8 +1352,8 @@ export interface ServiceType { res: ResBuy_6 }, "shop/Open": { - req: ReqOpen_51, - res: ResOpen_51 + req: ReqOpen_52, + res: ResOpen_52 }, "shop/Refresh": { req: ReqRefresh_6, @@ -1362,8 +1368,8 @@ export interface ServiceType { res: ResGetPrize_2 }, "sign/Open": { - req: ReqOpen_52, - res: ResOpen_52 + req: ReqOpen_53, + res: ResOpen_53 }, "slzd/Aim": { req: ReqAim, @@ -1386,8 +1392,8 @@ export interface ServiceType { res: ResMyRank }, "slzd/Open": { - req: ReqOpen_53, - res: ResOpen_53 + req: ReqOpen_54, + res: ResOpen_54 }, "slzd/OpenFort": { req: ReqOpenFort, @@ -1422,8 +1428,8 @@ export interface ServiceType { res: ResGuaJi }, "tanxian/Open": { - req: ReqOpen_54, - res: ResOpen_54 + req: ReqOpen_55, + res: ResOpen_55 }, "tanxian/Receive": { req: ReqReceive_6, @@ -1438,8 +1444,8 @@ export interface ServiceType { res: ResFinsh }, "task/Open": { - req: ReqOpen_55, - res: ResOpen_55 + req: ReqOpen_56, + res: ResOpen_56 }, "user/CDKEY": { req: ReqCDKEY, @@ -1502,8 +1508,8 @@ export interface ServiceType { res: ResExchange }, "weixiuchang/Open": { - req: ReqOpen_56, - res: ResOpen_56 + req: ReqOpen_57, + res: ResOpen_57 }, "weixiuchang/UpLv": { req: ReqUpLv, @@ -1546,8 +1552,8 @@ export interface ServiceType { res: ResJingCaiOpen }, "wzry/Open": { - req: ReqOpen_57, - res: ResOpen_57 + req: ReqOpen_58, + res: ResOpen_58 }, "wzry/UpdateFight": { req: ReqUpdateFight, @@ -1578,8 +1584,8 @@ export interface ServiceType { res: ResOnekeyReceive }, "xstask/Open": { - req: ReqOpen_58, - res: ResOpen_58 + req: ReqOpen_59, + res: ResOpen_59 }, "xstask/Receive": { req: ReqReceive_7, @@ -1631,6 +1637,7 @@ export interface ServiceType { "msg_s2c/PeijianChange": MsgPeijianChange, "msg_s2c/PlayerChange": MsgPlayerChange, "msg_s2c/Private": MsgPrivate, + "msg_s2c/PushGiftChange": MsgPushGiftChange, "msg_s2c/SendGift": MsgSendGift, "msg_s2c/ShiwuChange": MsgShiwuChange, "msg_s2c/TaskChange": MsgTaskChange, @@ -2932,91 +2939,96 @@ export const serviceProto: ServiceProto = { }, { "id": 238, - "name": "msg_s2c/SendGift", + "name": "msg_s2c/PushGiftChange", "type": "msg" }, { "id": 239, - "name": "msg_s2c/ShiwuChange", + "name": "msg_s2c/SendGift", "type": "msg" }, { "id": 240, - "name": "msg_s2c/TaskChange", + "name": "msg_s2c/ShiwuChange", "type": "msg" }, { "id": 241, - "name": "msg_s2c/Xianshilibao", + "name": "msg_s2c/TaskChange", "type": "msg" }, { "id": 242, + "name": "msg_s2c/Xianshilibao", + "type": "msg" + }, + { + "id": 243, "name": "pata/Fight", "type": "api" }, { - "id": 243, + "id": 244, "name": "pata/GetPrize", "type": "api" }, { - "id": 244, + "id": 245, "name": "pata/Open", "type": "api" }, { - "id": 245, + "id": 246, "name": "pata/SaoDang", "type": "api" }, { - "id": 246, + "id": 247, "name": "pay/GetList", "type": "api" }, { - "id": 247, + "id": 248, "name": "peijian/GetList", "type": "api" }, { - "id": 248, + "id": 249, "name": "peijian/JingLian", "type": "api" }, { - "id": 249, + "id": 250, "name": "peijian/JinJie", "type": "api" }, { - "id": 250, + "id": 251, "name": "peijian/LvUp", "type": "api" }, { - "id": 251, + "id": 252, "name": "peijian/OneKeyLvUp", "type": "api" }, { - "id": 252, + "id": 253, "name": "peijian/OneKeyWear", "type": "api" }, { - "id": 253, + "id": 254, "name": "peijian/Reset", "type": "api" }, { - "id": 254, + "id": 255, "name": "peijian/Rm", "type": "api" }, { - "id": 255, + "id": 256, "name": "peijian/TakeOff", "type": "api", "conf": { @@ -3024,32 +3036,32 @@ export const serviceProto: ServiceProto = { } }, { - "id": 256, + "id": 257, "name": "peijian/UnLock", "type": "api" }, { - "id": 257, + "id": 258, "name": "peijian/Wear", "type": "api" }, { - "id": 258, + "id": 259, "name": "peijiancangku/Deal", "type": "api" }, { - "id": 259, + "id": 260, "name": "peijiancangku/Jump", "type": "api" }, { - "id": 260, + "id": 261, "name": "peijiancangku/Open", "type": "api" }, { - "id": 261, + "id": 262, "name": "Bingo", "type": "api", "conf": { @@ -3057,137 +3069,142 @@ export const serviceProto: ServiceProto = { } }, { - "id": 262, + "id": 263, "name": "FightTest", "type": "api" }, { - "id": 263, + "id": 264, "name": "SyncBtn", "type": "api" }, { - "id": 264, + "id": 265, "name": "Test", "type": "api" }, - { - "id": 265, - "name": "qjzzd/Fight", - "type": "api" - }, { "id": 266, - "name": "qjzzd/Open", + "name": "pushgift/Open", "type": "api" }, { "id": 267, - "name": "rank/Open", + "name": "qjzzd/Fight", "type": "api" }, { "id": 268, - "name": "shiwu/Concise", + "name": "qjzzd/Open", "type": "api" }, { "id": 269, - "name": "shiwu/Extract", + "name": "rank/Open", "type": "api" }, { "id": 270, - "name": "shiwu/GetList", + "name": "shiwu/Concise", "type": "api" }, { "id": 271, - "name": "shiwu/LvUp", + "name": "shiwu/Extract", "type": "api" }, { "id": 272, - "name": "shiwu/Recast", + "name": "shiwu/GetList", "type": "api" }, { "id": 273, - "name": "shiwu/TakeOff", + "name": "shiwu/LvUp", "type": "api" }, { "id": 274, - "name": "shiwu/Wear", + "name": "shiwu/Recast", "type": "api" }, { "id": 275, - "name": "shootGame/Open", + "name": "shiwu/TakeOff", "type": "api" }, { "id": 276, - "name": "shootGame/Rec", + "name": "shiwu/Wear", "type": "api" }, { "id": 277, - "name": "shop/Buy", + "name": "shootGame/Open", "type": "api" }, { "id": 278, - "name": "shop/Open", + "name": "shootGame/Rec", "type": "api" }, { "id": 279, - "name": "shop/Refresh", + "name": "shop/Buy", "type": "api" }, { "id": 280, - "name": "sign/GetBoxPrize", + "name": "shop/Open", "type": "api" }, { "id": 281, - "name": "sign/GetPrize", + "name": "shop/Refresh", "type": "api" }, { "id": 282, - "name": "sign/Open", + "name": "sign/GetBoxPrize", "type": "api" }, { "id": 283, - "name": "slzd/Aim", + "name": "sign/GetPrize", "type": "api" }, { "id": 284, - "name": "slzd/BuyNum", + "name": "sign/Open", "type": "api" }, { "id": 285, - "name": "slzd/Fight", + "name": "slzd/Aim", "type": "api" }, { "id": 286, - "name": "slzd/FightLog", + "name": "slzd/BuyNum", "type": "api" }, { "id": 287, - "name": "slzd/MyRank", + "name": "slzd/Fight", "type": "api" }, { "id": 288, + "name": "slzd/FightLog", + "type": "api" + }, + { + "id": 289, + "name": "slzd/MyRank", + "type": "api" + }, + { + "id": 290, "name": "slzd/Open", "type": "api", "conf": { @@ -3197,77 +3214,77 @@ export const serviceProto: ServiceProto = { } }, { - "id": 289, + "id": 291, "name": "slzd/OpenFort", "type": "api" }, { - "id": 290, + "id": 292, "name": "slzd/Rec", "type": "api" }, { - "id": 291, + "id": 293, "name": "slzd/Refresh", "type": "api" }, { - "id": 292, + "id": 294, "name": "slzd/Slot", "type": "api" }, { - "id": 293, + "id": 295, "name": "tanxian/Event", "type": "api" }, { - "id": 294, + "id": 296, "name": "tanxian/FastGuaJi", "type": "api" }, { - "id": 295, + "id": 297, "name": "tanxian/Fight", "type": "api" }, { - "id": 296, + "id": 298, "name": "tanxian/GuaJi", "type": "api" }, { - "id": 297, + "id": 299, "name": "tanxian/Open", "type": "api" }, { - "id": 298, + "id": 300, "name": "tanxian/Receive", "type": "api" }, { - "id": 299, + "id": 301, "name": "task/AllFinsh", "type": "api" }, { - "id": 300, + "id": 302, "name": "task/Finsh", "type": "api" }, { - "id": 301, + "id": 303, "name": "task/Open", "type": "api" }, { - "id": 302, + "id": 304, "name": "user/CDKEY", "type": "api" }, { - "id": 303, + "id": 305, "name": "user/ChangeInfo", "type": "api", "conf": { @@ -3275,197 +3292,197 @@ export const serviceProto: ServiceProto = { } }, { - "id": 304, + "id": 306, "name": "user/ChangeName", "type": "api" }, { - "id": 305, + "id": 307, "name": "user/Fight", "type": "api" }, { - "id": 306, + "id": 308, "name": "user/GetInfo", "type": "api" }, { - "id": 307, + "id": 309, "name": "user/InfoOpen", "type": "api" }, { - "id": 308, + "id": 310, "name": "user/Login", "type": "api" }, { - "id": 309, + "id": 311, "name": "user/Ping", "type": "api" }, { - "id": 310, + "id": 312, "name": "user/Renown", "type": "api" }, { - "id": 311, + "id": 313, "name": "user/RenownBuy", "type": "api" }, { - "id": 312, + "id": 314, "name": "user/RenownGetPrize", "type": "api" }, { - "id": 313, + "id": 315, "name": "user/RenownOpen", "type": "api" }, { - "id": 314, + "id": 316, "name": "user/Tujian", "type": "api" }, { - "id": 315, + "id": 317, "name": "weixiuchang/Decompose", "type": "api" }, { - "id": 316, + "id": 318, "name": "weixiuchang/Exchange", "type": "api" }, { - "id": 317, + "id": 319, "name": "weixiuchang/Open", "type": "api" }, { - "id": 318, + "id": 320, "name": "weixiuchang/UpLv", "type": "api" }, { - "id": 319, + "id": 321, "name": "weixiuchang/UpStar", "type": "api" }, { - "id": 320, + "id": 322, "name": "wzry/AutoBaoMing", "type": "api" }, { - "id": 321, + "id": 323, "name": "wzry/BaoMing", "type": "api" }, { - "id": 322, + "id": 324, "name": "wzry/catFightLog", "type": "api" }, { - "id": 323, + "id": 325, "name": "wzry/CatGroup", "type": "api" }, { - "id": 324, + "id": 326, "name": "wzry/DldFight", "type": "api" }, { - "id": 325, + "id": 327, "name": "wzry/DldRefre", "type": "api" }, { - "id": 326, + "id": 328, "name": "wzry/JingCai", "type": "api" }, { - "id": 327, + "id": 329, "name": "wzry/JingCaiOpen", "type": "api" }, { - "id": 328, + "id": 330, "name": "wzry/Open", "type": "api" }, { - "id": 329, + "id": 331, "name": "wzry/UpdateFight", "type": "api" }, { - "id": 330, + "id": 332, "name": "wzry/Wzzd", "type": "api" }, { - "id": 331, + "id": 333, "name": "wzry/ZuanShiOpen", "type": "api" }, { - "id": 332, + "id": 334, "name": "xstask/AllGet", "type": "api" }, { - "id": 333, + "id": 335, "name": "xstask/Get", "type": "api" }, { - "id": 334, + "id": 336, "name": "xstask/LvUp", "type": "api" }, { - "id": 335, + "id": 337, "name": "xstask/OnekeyReceive", "type": "api" }, { - "id": 336, + "id": 338, "name": "xstask/Open", "type": "api" }, { - "id": 337, + "id": 339, "name": "xstask/Receive", "type": "api" }, { - "id": 338, + "id": 340, "name": "xstask/Refresh", "type": "api" }, { - "id": 339, + "id": 341, "name": "yongbingzhuzhan/Handle", "type": "api" }, { - "id": 340, + "id": 342, "name": "zhanqianbushu/ChangePos", "type": "api" }, { - "id": 341, + "id": 343, "name": "zhanqianbushu/Select", "type": "api" }, { - "id": 342, + "id": 344, "name": "zhanqianbushu/Up", "type": "api" } @@ -8635,6 +8652,13 @@ export const serviceProto: ServiceProto = { }, { "id": 5, + "name": "gamenum", + "type": { + "type": "Number" + } + }, + { + "id": 6, "name": "pt", "type": { "type": "Array", @@ -8644,7 +8668,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 6, + "id": 7, "name": "gj", "type": { "type": "Array", @@ -8654,14 +8678,14 @@ export const serviceProto: ServiceProto = { } }, { - "id": 7, + "id": 8, "name": "pay", "type": { "type": "Boolean" } }, { - "id": 8, + "id": 9, "name": "libao", "type": { "type": "Interface", @@ -8674,7 +8698,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 9, + "id": 10, "name": "select", "type": { "type": "Interface", @@ -8693,24 +8717,24 @@ export const serviceProto: ServiceProto = { } }, { - "id": 10, + "id": 11, "name": "val", "type": { "type": "Number" } }, { - "id": 11, + "id": 12, "name": "qiandao", "type": { "type": "Array", "elementType": { - "type": "String" + "type": "Number" } } }, { - "id": 12, + "id": 13, "name": "refresh", "type": { "type": "Number" @@ -14887,6 +14911,13 @@ export const serviceProto: ServiceProto = { "type": "Literal", "literal": "kaifujingsai" } + }, + { + "id": 36, + "type": { + "type": "Literal", + "literal": "zhoumolibao" + } } ] }, @@ -17920,6 +17951,10 @@ export const serviceProto: ServiceProto = { } } }, + "msg_s2c/MsgPushGiftChange/MsgPushGiftChange": { + "type": "Literal", + "literal": 1 + }, "msg_s2c/MsgSendGift/MsgSendGift": { "type": "Interface", "indexSignature": { @@ -18994,6 +19029,81 @@ export const serviceProto: ServiceProto = { "PtlTest/ResTest": { "type": "Any" }, + "pushgift/PtlOpen/ReqOpen": { + "type": "Interface" + }, + "pushgift/PtlOpen/ResOpen": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "gifts", + "type": { + "type": "Array", + "elementType": { + "type": "Reference", + "target": "../../module/collection_pushgift/Gift" + } + } + } + ] + }, + "../../module/collection_pushgift/Gift": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "id", + "type": { + "type": "String" + } + }, + { + "id": 1, + "name": "uid", + "type": { + "type": "String" + } + }, + { + "id": 2, + "name": "buy", + "type": { + "type": "Array", + "elementType": { + "type": "Number" + } + } + }, + { + "id": 3, + "name": "ctime", + "type": { + "type": "Number" + } + }, + { + "id": 4, + "name": "passTime", + "type": { + "type": "Number" + } + }, + { + "id": 5, + "name": "ext_data", + "type": { + "type": "Interface", + "indexSignature": { + "keyType": "String", + "type": { + "type": "Any" + } + } + } + } + ] + }, "qjzzd/PtlFight/ReqFight": { "type": "Interface" },