diff --git a/src/api_s2c/event/136Gift/ApiRec.ts b/src/api_s2c/event/136Gift/ApiRec.ts index 09592bd..6979750 100644 --- a/src/api_s2c/event/136Gift/ApiRec.ts +++ b/src/api_s2c/event/136Gift/ApiRec.ts @@ -1,41 +1,34 @@ -import { ApiCall } from "tsrpc"; -import { PayFun } from '../../../public/pay'; -import { PlayerFun } from '../../../public/player'; -import { ReqRec, ResRec } from "../../../shared/protocols/event/136Gift/PtlRec"; -import { prizeType } from '../../../shared/protocols/type'; -import { PublicShared } from '../../../shared/public/public'; -import { HongDianChange } from "../../hongdian/fun"; +import {ApiCall} from "tsrpc"; +import {PayFun} from '../../../public/pay'; +import {PlayerFun} from '../../../public/player'; +import {ReqRec, ResRec} from "../../../shared/protocols/event/136Gift/PtlRec"; +import {prizeType} from '../../../shared/protocols/type'; +import {PublicShared} from '../../../shared/public/public'; +import {HongDianChange} from "../../hongdian/fun"; +/** + * 黑市每日礼包改版,此接口只领取免费礼包 + * @param call + */ export default async function (call: ApiCall) { let conf = G.gc.dixiaheishi['136Gift'][call.req.index]; - let buyLog = await PayFun.getPayLog(call.uid, G.gc.dixiaheishi['136Gift'][0].payId); - let buy60 = buyLog.slice(-1)[0]?.eTime >= G.time; - if (!conf) return call.error('', { code: -1 }); - if (!buy60 && conf.payId) return call.error('', { code: -2 }); + if (!conf || conf.payId) return call.error('', {code: -1}); + // if (!buy60 && conf.payId) return call.error('', { code: -2 }); let prize: prizeType[] = []; let pushIndex: number[] = []; - let db = await G.mongodb.cEvent('136Gift').findOne({ uid: call.uid, type: '136Gift' }); + let db = await G.mongodb.cEvent('136Gift').findOne({uid: call.uid, type: '136Gift'}); - if (call.req.index == 0) { - G.gc.dixiaheishi['136Gift'].forEach((c, i) => { - if (i == 0 || !c.payId || db.recIndex.includes(i)) return; - pushIndex.push(i); - prize.push(...G.gc.pay[c.payId].prize); - }); - if (pushIndex.length < 1) return call.error('', { code: -4 }); - } else { - if (db.recIndex.includes(call.req.index)) return call.error('', { code: -3 }); - prize.push(...(conf.payId ? G.gc.pay[conf.payId].prize : conf.prize)); - pushIndex.push(call.req.index); - } + if (db.recIndex.includes(call.req.index)) return call.error('', {code: -3}); + prize.push(...(conf.payId ? G.gc.pay[conf.payId].prize : conf.prize)); + pushIndex.push(call.req.index); prize = PublicShared.mergePrize(prize); await PlayerFun.sendPrize(call, prize); G.mongodb.cEvent('136Gift').updateOne( - { uid: call.uid, type: '136Gift' }, - { $push: { recIndex: { $each: pushIndex } } } + {uid: call.uid, type: '136Gift'}, + {$push: {recIndex: {$each: pushIndex}}} ); // HongDianChange.sendChangeKey(call.uid, ['heishihd', 'heishiMrjx']) diff --git a/src/api_s2c/event/leichonglibao/ApiOpen.ts b/src/api_s2c/event/leichonglibao/ApiOpen.ts new file mode 100644 index 0000000..b820d52 --- /dev/null +++ b/src/api_s2c/event/leichonglibao/ApiOpen.ts @@ -0,0 +1,21 @@ +import {ApiCall} from "tsrpc"; +import {ReqOpen, ResOpen} from "../../../shared/protocols/event/leichonglibao/PtlOpen"; + +export default async function (call: ApiCall) { + let data = await G.mongodb.cEvent(`leichonglibao${call.req.hdid}`).findOne( + {type: `leichonglibao${call.req.hdid}`, uid: call.uid} + ) + let change = {opentime: G.time} + if (!data) { + Object.assign(change, {sc: false, buy: []}) + } + + // 每天open红点 + G.mongodb.cEvent(`leichonglibao${call.req.hdid}`).updateOne( + {type: `leichonglibao${call.req.hdid}`, uid: call.uid}, {$set: change}, {upsert: true} + ) + + let temp = Object.assign((data || {}), change) as ResOpen & { opentime } + + call.succ({sc: temp.sc, buy: temp.buy}); +} \ No newline at end of file diff --git a/src/api_s2c/event/leichonglibao/ApiReceive.ts b/src/api_s2c/event/leichonglibao/ApiReceive.ts new file mode 100644 index 0000000..2ce441f --- /dev/null +++ b/src/api_s2c/event/leichonglibao/ApiReceive.ts @@ -0,0 +1,120 @@ +import {ApiCall} from "tsrpc"; +import {HuoDongFun} from "../../../public/huodongfun"; +import {ReqReceive, ResReceive} from "../../../shared/protocols/event/leichonglibao/PtlReceive"; +import {PlayerFun} from "../../../public/player"; +import {PublicShared} from "../../../shared/public/public"; + +export type LeiChongLiBaoData = { + intr: string + intr2: string + payRewardNum: number + dlz: { [key: string]: atn }[] + gift: { + id: string, name: string, need: atn[], free: boolean, payId: string, scale: number, buynum: number, prize: atn[] + }[] +} +export default async function (call: ApiCall) { + let hdinfo = await HuoDongFun.gethdList(call, 12); + + if (hdinfo.length <= 0) { + // 无此活动 + return call.error('', {code: -1, message: globalThis.lng.huodong_open_1}) + } + + let hddata = hdinfo.filter(i => i.hdid == call.req.hdid)[0].data as LeiChongLiBaoData; + + let data = await G.mongodb.cEvent(`leichonglibao${call.req.hdid}`).findOne( + {type: `leichonglibao${call.req.hdid}`, uid: call.uid} + ) + + if (data.sc) { + // 自选奖励已领取 + return call.error('', {code: -1, message: globalThis.lng.task_finsh_3}) + } + + if (data.buy.length < hddata.payRewardNum) { + // 累计购买礼包次数不足 + return call.error("", {code: -1, message: globalThis.lng.ljlibaotips_8}) + } + + let _prize: atn[] = []; + for (let i = 0; i < hddata.dlz.length; i++) { + _prize.push(hddata.dlz[i][call.req.select[i] || "1"]) + } + + // 修改领取标识 + await G.mongodb.cEvent(`leichonglibao${call.req.hdid}`).updateOne( + {type: `leichonglibao${call.req.hdid}`, uid: call.uid}, {$set: {sc: true}} + ) + + PlayerFun.sendPrize(call, _prize) + call.succ({prize: _prize}) +} + +export async function LeiChongLiBaoBuyGift(call: ApiCall, payId: string) { + let hdinfo = await HuoDongFun.gethdList(call, 12); + + if (hdinfo.length <= 0) { + console.log(call.uid, "购买累充礼包 但是活动没有开启", payId); + return + } + + let gift: LeiChongLiBaoData["gift"][0]; + + let hdid = hdinfo[0].hdid; + let hddata = hdinfo[0].data as LeiChongLiBaoData; + for (let g of hddata.gift) { + if (g.payId == payId) { + gift = g; + break; + } + } + + if (!gift) return; // 不是购买累充礼包 + + let mydata = await G.mongodb.cEvent(`leichonglibao${hdid}`).findOne( + {type: `leichonglibao${hdid}`, uid: call.uid} + ) + + if (mydata && mydata.buy.includes(gift.payId)) { + console.log(call.uid, "购买累充礼包 重复购买", payId); + return + } + + let update; + if (mydata) { + update = {$push: {buy: payId}} + } else { + update = {$set: {opentime: G.time, sc: false, buy: [payId]}} + } + + PlayerFun.sendPrize(call, gift.prize) + G.mongodb.cEvent(`leichonglibao${hdid}`).updateOne( + {uid: call.uid, type: `leichonglibao${hdid}`}, update + ) +} + +export async function LeiChongLiBaoGetHongDian(call: ApiCall) { + let hdinfo = await HuoDongFun.gethdList(call, 12); + + if (hdinfo.length <= 0) { + return {show: false} + } + + let hdid = hdinfo[0].hdid; + let hddata = hdinfo[0].data as LeiChongLiBaoData; + + let mydata = await G.mongodb.cEvent(`leichonglibao${hdid}`).findOne( + {type: `leichonglibao${hdid}`, uid: call.uid} + ) + + if (!mydata || mydata.opentime < PublicShared.getToDayZeroTime()) { + return {show: true} + } + + if (!mydata.sc && mydata.buy.length >= hddata.payRewardNum) { + return {show: true} + } + + return {show: false} +} \ No newline at end of file diff --git a/src/api_s2c/event/payForDiamond/ApiCanReceive.ts b/src/api_s2c/event/payForDiamond/ApiCanReceive.ts new file mode 100644 index 0000000..77e0fa9 --- /dev/null +++ b/src/api_s2c/event/payForDiamond/ApiCanReceive.ts @@ -0,0 +1,69 @@ +import { ApiCall } from "tsrpc"; +import { HuoDongFun } from "../../../public/huodongfun"; +import { ReqCanReceive, ResCanReceive } from '../../../shared/protocols/event/payForDiamond/PtlCanReceive'; +import { PublicShared } from "../../../shared/public/public"; +import { ActionLog } from "../../../public/actionLog/actionLog"; +import { WithId, OptionalId } from "mongodb"; +import { ReqAddHuoDong } from "../../../monopoly/protocols/PtlAddHuoDong"; + +const hasGotKeyPrefix = 'payForDiamond:hasGot:'; // 已领取额度 +const showOffListKeyPrefix = 'payForDiamond:ShowOff:'; // 需要炫耀的玩家列表。 其中需要包含信息:玩家区服, 玩家玩家名称, 领到的数量 + +export async function playerCanReceive(call: ApiCall, callError : boolean = true) { + let activityId = call.req.activityId; + let activityInfo: WithId>; + if (!activityId) { + activityInfo = (await HuoDongFun.gethdList(call, 13))[0]; + } else { + activityInfo = await HuoDongFun.getHdidInfo(call, activityId); + } + if (!activityInfo) { + if (callError) { + return call.error('', { code: -1, message: lng.huodong_open_1 }); + } else { + return { result: false }; + } + } + activityId = activityInfo.hdid; + const hasReceivedKey = hasGotKeyPrefix + activityId; + const hasReceivedStr = await G.iorediscross.get(hasReceivedKey); + const hasReceived = hasReceivedStr? parseInt(hasReceivedStr) : 0; + const remaining = activityInfo.data['totalmoney'] - hasReceived; + const showOffResult = await G.iorediscross.lrange(showOffListKeyPrefix + activityId, 0, -1); + const showOffList = showOffResult.map(result => JSON.parse(result)); + const zeroTime = PublicShared.getToDayZeroTime(); + const vipScore = await ActionLog.getDayLog(call.uid, 'pay'); + const price = activityInfo.data['price']; + if (!vipScore) { + return { + payNum: 0, remaining, result: false, activityInfo, showOffList, price, gotAmount: 0 + }; + } + const payNum = vipScore; + // 玩家充值未达标或者奖池余额耗尽则不能领取 + if (payNum < price || remaining <= 0) { + return { + payNum, remaining, result: false, activityInfo, showOffList, price, gotAmount: 0 + } + } + // 检查玩家今日是否已经领取 + const playerActivityInfo = await G.mongodb.cEvent('payForDiamond').findOne({ uid: call.uid, type: 'payForDiamond' }); + if (playerActivityInfo) { + if (playerActivityInfo[zeroTime]) { + return { + payNum, remaining, result: false, activityInfo, showOffList, price, gotAmount: playerActivityInfo[zeroTime] + }; + } + } + return { + payNum, remaining, result: true, activityInfo, showOffList, price, gotAmount: 0 + }; +} + +export default async function (call: ApiCall) { + const canReceiveResult = await playerCanReceive(call); + if (canReceiveResult) { + const { payNum, remaining, result, showOffList, price, gotAmount } = canReceiveResult; + call.succ({ payNum, remaining, result, showOffList, price, gotAmount }); + } +} \ No newline at end of file diff --git a/src/api_s2c/event/payForDiamond/ApiReceive.ts b/src/api_s2c/event/payForDiamond/ApiReceive.ts new file mode 100644 index 0000000..32cc9cb --- /dev/null +++ b/src/api_s2c/event/payForDiamond/ApiReceive.ts @@ -0,0 +1,121 @@ +import { ApiCall } from "tsrpc"; +import { ReqReceive, ResReceive } from '../../../shared/protocols/event/payForDiamond/PtlReceive'; +import { playerCanReceive } from './ApiCanReceive'; +import { PublicShared } from "../../../shared/public/public"; +import { PlayerFun } from "../../../public/player"; + +type diamondWeightGroup = { + weight: number; + numrange: [ min: number, max: number]; +}; + +const hasGotKeyPrefix = 'payForDiamond:hasGot:'; // 已领取额度 +const hasGotLockKey = "payForDiamond:lock"; // 更新锁, TTL 1s +const showOffListKeyPrefix = 'payForDiamond:ShowOff:'; // 需要炫耀的玩家列表。 其中需要包含信息:玩家区服, 玩家玩家名称, 领到的数量 +/** + * @param groups 各分组及其权重 + */ +function randomWithWeight(groups: diamondWeightGroup[]) { + let maxAmount: number; + let totalWeights = 0; + for (const group of groups) { + totalWeights += group.weight; + if (!maxAmount) { + maxAmount = group.numrange[1]; + } else { + maxAmount = Math.max(maxAmount, group.numrange[1]); + } + } + const randomValue = Math.random() * totalWeights; // 随机值落在[0, totalWeights) 之间 + let currSum = 0; + for (const group of groups) { + if (currSum <= randomValue && randomValue < currSum + group.weight) { + return { group, maxAmount }; + } else { + currSum += group.weight; + } + } + const length = groups.length; + return { group: groups[length - 1], maxAmount }; +} + +/** + * 计算玩家分得的钻石数量 + * @param remaining + * @param group + * @param maxAmount + */ +function calcDiamondGot(remaining: number, group: diamondWeightGroup, maxAmount: number) { + const [min, max] = group.numrange; + const randomAmount = Math.floor(Math.random() * (max - min)) + min + 1; // max 值应能够取到, 故 +1 + // 剩余数额小于组内随机得到的值, 全给吧 + if (randomAmount > remaining) { + return remaining; + } + // 随机值大于最大值, 取最大值 + if (randomAmount > maxAmount) { + return maxAmount; + } + return randomAmount; +} + +export default async function (call: ApiCall) { + const canReceiveResult = await playerCanReceive(call); + if (canReceiveResult) { // 该值不存在的情况已被函数直接返回 error, 无需再处理 + if (!canReceiveResult.result) { + return call.succ({ + amount: 0, + timesRemaining: 0, + showOff: false + }); + } + const activityData = canReceiveResult.activityInfo.data; + // 更新 redis 领取记录之前先加锁, 防止多领 + const lockResult = await G.iorediscross.setnx(hasGotLockKey, 1); + if (lockResult) { + await G.iorediscross.expire(hasGotLockKey, 1); // 设置 ttl 避免死锁 + const activityId = call.req.activityId; + const hasReceivedKey = hasGotKeyPrefix + activityId; + const hasReceivedStr = await G.iorediscross.get(hasReceivedKey); + const hasReceived = hasReceivedStr? parseInt(hasReceivedStr) : 0; + const remaining = activityData['totalmoney'] - hasReceived; + if (remaining <= 0) { + return call.succ({ + amount: 0 + }); + } else { + const { group, maxAmount } = randomWithWeight(activityData['groupConf']['base']['arr']); + const gotAmount = calcDiamondGot(remaining, group, maxAmount); + await G.iorediscross.incrby(hasReceivedKey, Math.abs(gotAmount)); // 添加已领取的额度 + await G.iorediscross.del(hasGotLockKey); // 移除锁 + await PlayerFun.sendPrize(call, [{ 'a': 'attr', 't': 'rmbmoney', 'n': gotAmount }]); + const showOff = gotAmount >= activityData['groupConf']['base']['loglimit']; + call.succ({ // 领取核心逻辑完成, 请求可以返回了 + amount: gotAmount, + timesRemaining: 0, + showOff, + }); + // 添加玩家领取记录 + const zeroTime = PublicShared.getToDayZeroTime(); + const setObj = {}; + setObj[zeroTime] = gotAmount; + await G.mongodb.cEvent('payForDiamond').updateOne({ uid: call.uid, type: 'payForDiamond' }, { + $set: setObj + }, {upsert: true}); + // 炫耀 + if (showOff) { + const msg = JSON.stringify({ + name: call.conn.gud.name, gotAmount, serverID: call.conn.gud.sid + }); + const showOffListKey = showOffListKeyPrefix + activityId; + await G.iorediscross.lpush(showOffListKey, msg); + await G.ioredis.ltrim(showOffListKey, 0, 49); // 限制列表保存 50 条消息, 避免无限增长 + } + } + } else { + return call.succ({ + amount: 0 + }); + } + } +} \ No newline at end of file diff --git a/src/api_s2c/event/pobinglibao/ApiOpen.ts b/src/api_s2c/event/pobinglibao/ApiOpen.ts new file mode 100644 index 0000000..5677a06 --- /dev/null +++ b/src/api_s2c/event/pobinglibao/ApiOpen.ts @@ -0,0 +1,26 @@ +import {ApiCall} from "tsrpc"; +import {ReqOpen, ResOpen} from "../../../shared/protocols/event/zhoumolibao/PtlOpen"; +import {PayFun} from "../../../public/pay"; +import {HuoDongFun} from "../../../public/huodongfun"; +import {PublicShared} from "../../../shared/public/public"; + + +export default async function (call: ApiCall) { + let data = await G.mongodb.cEvent('pobinglibao').findOne({uid: call.uid, type: 'pobinglibao'}) + + let _hd = (await HuoDongFun.gethdList(call, 10))[0] + if (!_hd) return call.errorCode(-1) + + let payIds = _hd?.data?.gift?.filter(i => i.payId)?.map(i => i.payId) + + let payLog: any = await PayFun.getPayLogs(call.uid, payIds) + + for (let key in payLog) { + payLog[key]?.filter(i => i.time > _hd.stime && i.time < _hd.etime) + } + + call.succ({ + record: data?.record || {}, + buyLog: payLog + }) +} \ No newline at end of file diff --git a/src/api_s2c/event/pobinglibao/ApiReceive.ts b/src/api_s2c/event/pobinglibao/ApiReceive.ts new file mode 100644 index 0000000..1f60117 --- /dev/null +++ b/src/api_s2c/event/pobinglibao/ApiReceive.ts @@ -0,0 +1,33 @@ +import {ApiCall} from "tsrpc"; +import {ReqReceive, ResReceive} from "../../../shared/protocols/event/pobinglibao/PtlReceive"; +import {HuoDongFun} from "../../../public/huodongfun"; +import {PlayerFun} from "../../../public/player"; +import {HongDianChange} from "../../hongdian/fun"; +import {PayFun} from "../../../public/pay"; + +export default async function (call: ApiCall) { + // 查询活动是否有当前领奖的免费选项 + let _hd = (await HuoDongFun.gethdList(call, 10))[0] + let gift = _hd?.data?.gift?.find(i => i.id == call.req.id) + if (!gift) return call.errorCode(-1) + + let payLog = await PayFun.getPayLog(call.uid, gift.payId) + payLog = payLog?.filter(i => i.time >= _hd.stime && i.time <= _hd.etime) || [] + if (!payLog || !payLog.length) return call.errorCode(-2) + + + // 取奖励列表,判断是否有可领取奖励 + let data = await G.mongodb.cEvent('pobinglibao').findOne({uid: call.uid, type: 'pobinglibao'}) + let rec = data?.record?.[call.req.id]?.length + if (rec && (rec >= 3 || data?.record?.[gift.id] == call.req.recId)) return call.errorCode(-3) + + await PlayerFun.sendPrize(call, gift[call.req.recId]); + + await G.mongodb.cEvent('pobinglibao').updateOne({uid: call.uid, type: 'pobinglibao'}, { + $push: {[`record.${gift.id}`]: call.req.recId}, + }, {upsert: true}) + + call.succ({}) + + HongDianChange.sendChangeKey(call.uid, ['pobinglibao']); +} diff --git a/src/api_s2c/event/xiaofeijingsai/ApiOpen.ts b/src/api_s2c/event/xiaofeijingsai/ApiOpen.ts new file mode 100644 index 0000000..4fa2459 --- /dev/null +++ b/src/api_s2c/event/xiaofeijingsai/ApiOpen.ts @@ -0,0 +1,91 @@ +import {ApiCall} from "tsrpc"; +import {ReqOpen, ResOpen} from "../../../shared/protocols/event/xiaofeijingsai/PtlOpen"; +import {HuoDongFun} from "../../../public/huodongfun"; + +/** + * 消费竞赛 + * redis缓存120秒 + * 返回活动日期内的 + * @param call + */ +export default async function (call: ApiCall) { + + let ioList = await G.ioredis.get(`rank:xiaofeijingsai`); + if (ioList) { + let myData = await getMyData(call, JSON.parse(ioList)) + return call.succ({list: JSON.parse(ioList), myData}) + } + + let _hd = (await HuoDongFun.gethdList(call, 11))[0] + if (!_hd) return call.errorCode(-1) + + let limit = _hd.data?.rank?.slice(-1)?.[0]?.rank?.slice(-1)?.[0] || call.req.limit || 100 + + let rmbuse = await G.mongodb.collection('rmbuse').aggregate([ + {$match: {isAdd: false, cTime: {$gte: _hd.stime, $lte: _hd.etime}}}, + {$group: {_id: "$uid", total: {$sum: "$change"}}}, + {$sort: {total: 1}}, + {$limit: limit} + ]).toArray() + + let list: any = rmbuse.map(i => ({...i, total: R.negate(i.total)})) + + + let rankList = sortRankList(_hd.data.rank, list) + + let users = await G.mongodb.collection('user').find({uid: {$in: rankList.map(i => i._id).filter(i => i._id != 'system')}}).toArray() + + rankList = rankList.map(i => ({...i, player: users.find(v => v.uid == i._id) || {}})) + + // 活动结束前半小时,缓存过期时间改为10秒 + let exTime = (G.time + 1800) > _hd.etime ? 10 : 120 + + G.ioredis.setex(`rank:xiaofeijingsai`, exTime, JSON.stringify(rankList)); + + let myData = await getMyData(call, rankList, _hd) + + call.succ({list: rankList, myData}) +} + +/** + * 需要满足消耗条件才能添加到排行榜,不满足的时候排行榜加system占位 + * @param rank + * @param list + */ +export function sortRankList(rank, list) { + let rankList = [] + let ccc = 0 + rank.map(i => { + for (let k = i.rank[0] - 1; k < i.rank[1]; k++) { + if (list[k]?.total >= i.need[0].n) { + rankList.push({...list[k - ccc], rank: k}) + } else { + rankList.push({_id: 'system', total: i.need[0].n, rank: k, player: {}}) + ccc += 1 + } + } + }) + return R.sort((a, b) => a.rank - b.rank)(rankList) +} + +// 获取自己的信息 +async function getMyData(call, rankList, _hd?) { + let myData = rankList.find(i => i._id == call.uid) + if (myData) return myData + + if (!_hd) { + _hd = (await HuoDongFun.gethdList(call, 11))[0] + } + let myCut = (await G.mongodb.collection('rmbuse').aggregate([ + {$match: {uid: call.uid, isAdd: false, cTime: {$gte: _hd.stime, $lte: _hd.etime}}}, + {$group: {_id: "$uid", total: {$sum: "$change"}}} + ]).toArray())[0] + + let myUser = await G.mongodb.collection('user').findOne({uid: call.uid}) + + if (!myCut) { + myCut = {_id: myUser.uid, total: 0} + } + + return {player: myUser, ...myCut, total: R.negate(myCut.total), rank: -1} +} \ No newline at end of file diff --git a/src/api_s2c/hero/ApiGetList.ts b/src/api_s2c/hero/ApiGetList.ts index c0882cb..5cc5a8f 100644 --- a/src/api_s2c/hero/ApiGetList.ts +++ b/src/api_s2c/hero/ApiGetList.ts @@ -1,11 +1,12 @@ -import { ApiCall } from "tsrpc"; -import { RedisCollections2 } from '../../module/redis'; -import { ReqGetList, ResGetList } from "../../shared/protocols/hero/PtlGetList"; +import {ApiCall} from "tsrpc"; +import {RedisCollections2} from '../../module/redis'; +import {ReqGetList, ResGetList} from "../../shared/protocols/hero/PtlGetList"; +import {PeijianShared} from "../../shared/public/peijian"; export default async function (call: ApiCall) { let list: ResGetList['list'] = {}; //let kvList: k_v = {}; - let arrList = await G.mongodb.collection('hero').find({ uid: call.uid }).toArray(); + let arrList = await G.mongodb.collection('hero').find({uid: call.uid}).toArray(); let heroCon = G.gc.hero; let color = {}; @@ -19,14 +20,47 @@ export default async function (call: ApiCall) { if (!color[heroCon[v.heroId].colour]) color[heroCon[v.heroId].colour] = 0; color[heroCon[v.heroId].colour] += 1; }); + + // 修复配件数据 + let peijianids = []; + Object.values(list).map(hero => { + hero.peijian && Object.values(hero.peijian).map( + i => peijianids.push(G.mongodb.conversionId(PeijianShared.fmt(i)._id)) + ) + }); + + let peijians = (await G.mongodb.collection("peijian").find( + {uid: call.uid, _id: {$in: peijianids}}, {projection: {_id: 1}} + ).toArray()).map(temp => G.mongodb.conversionId(temp._id)); + + let changes = {}; + Object.values(list).map(hero => { + for (let pos in hero.peijian) { + if (!peijians.includes(PeijianShared.fmt(hero.peijian[pos])._id)) { + hero.peijian[pos] = ""; + changes[hero._id] = hero.peijian; + } + } + }) + + for (let oid in changes) { + // 修复数据 + G.mongodb.collection("hero").updateOne( + G.mongodb.conversionIdObj({_id: oid}), {$set: {peijian: changes[oid]}} + ) + } + // 记录玩家最大等级,颜色相关数据 注册任务用 - await G.mongodb.collection('playerInfo', 'usertasklog').updateOne({ uid: call.conn.uid, type: 'usertasklog' }, - { $set: { maxherolv: maxherolv, herocolor: color } }, { upsert: true }); + await G.mongodb.collection('playerInfo', 'usertasklog').updateOne({uid: call.conn.uid, type: 'usertasklog'}, + {$set: {maxherolv: maxherolv, herocolor: color}}, {upsert: true}); //G.redis.set('hero', call.uid, kvList); - let recLshd = await G.mongodb.collection('playerInfo', 'lshd_hero').findOne({ uid: call.conn.uid, type: 'lshd_hero' }); - let { uid, _id, type, ...heros } = (recLshd || {}); + let recLshd = await G.mongodb.collection('playerInfo', 'lshd_hero').findOne({ + uid: call.conn.uid, + type: 'lshd_hero' + }); + let {uid, _id, type, ...heros} = (recLshd || {}); call.conn.lshd.hero = heros || {}; @@ -34,6 +68,6 @@ export default async function (call: ApiCall) { list: list, pos: call.conn.heroPos, lshd: heros || {}, - gbzj: (await G.mongodb.cPlayerInfo('gbzj').findOne({ uid: call.uid, type: 'gbzj' }))?.rec || {} + gbzj: (await G.mongodb.cPlayerInfo('gbzj').findOne({uid: call.uid, type: 'gbzj'}))?.rec || {} }); } \ No newline at end of file diff --git a/src/api_s2c/hongdian/ApiGet.ts b/src/api_s2c/hongdian/ApiGet.ts index ce0c8d4..8a94b70 100644 --- a/src/api_s2c/hongdian/ApiGet.ts +++ b/src/api_s2c/hongdian/ApiGet.ts @@ -15,11 +15,13 @@ import {md_redPoint} from '../gongyu/mingdao/ApiOpen'; import {HongDianFun, HuoDongHongDianFun} from "./fun"; import {FunWeiXiuChang} from "../../public/weixiuchang"; import {getShouChongRedPoint} from "../event/shouchong/ApiReceive"; +import {LeiChongLiBaoGetHongDian} from "../event/leichonglibao/ApiReceive"; +import { playerCanReceive } from '../event/payForDiamond/ApiCanReceive'; 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', 'zhoumolibao']; + 'heishihd', 'huodonghd', 'renown', 'weixiuchang', 'kaifujingsai', 'zhoumolibao', 'pobinglibao', 'leichonglibao', 'payForDiamond']; export default async function (call: ApiCall) { @@ -163,6 +165,13 @@ export default async function (call: ApiCall) { case 'zhoumolibao': res[key] = await HongDianFun.zhoumolibao(call); break; + case "leichonglibao": + res[key] = await LeiChongLiBaoGetHongDian(call) + break; + case 'payForDiamond': + const receiveResult = await playerCanReceive(call, false); + res[key] = { show: receiveResult && receiveResult.result }; + break; } } } diff --git a/src/api_s2c/hongdian/fun.ts b/src/api_s2c/hongdian/fun.ts index 3f3eeba..215f1f0 100644 --- a/src/api_s2c/hongdian/fun.ts +++ b/src/api_s2c/hongdian/fun.ts @@ -327,10 +327,7 @@ export class HuoDongHongDianFun { hdxq: {} } }; - let _hdList = [] - for (let i = 0; i < 8; i++) { - _hdList.push(...await HuoDongFun.gethdList(call, i + 1)) - } + let _hdList = await HuoDongFun.gethdList(call) // let _hdList = await HuoDongFun.gethdList(call) for (let index = 0; index < _hdList.length; index++) { const element = _hdList[index]; @@ -368,6 +365,10 @@ export class HuoDongHongDianFun { // 检测 htype 8 圣诞活动红点 ishd = await this.christmasHongDian(call, element) } + if (element.htype == 10) { + // 检测 htype 10 破冰活动红点 + ishd = await this.pobinglibao(call, element) + } // 此活动有红点 if (ishd.show) { @@ -380,6 +381,22 @@ export class HuoDongHongDianFun { return _res; } + /**破冰礼包红点 */ + static async pobinglibao(call: ApiCall, _hd: ReqAddHuoDong): Promise { + let gift = _hd?.data?.gift?.find(i => i.id == call.req.id) + if (!gift) return {show: false} + + let payLog = await PayFun.getPayLog(call.uid, gift.payId) + payLog = payLog?.filter(i => i.time >= _hd.stime && i.time <= _hd.etime) || [] + if (!payLog || !payLog.length) return {show: false} + + // 取奖励列表,判断是否有可领取奖励 + let data = await G.mongodb.cEvent('pobinglibao').findOne({uid: call.uid, type: 'pobinglibao'}) + let rec = data?.record?.[call.req.id].length + if (rec && (rec >= 3 || data?.record?.[gift.id] == call.req.recId)) return {show: false} + return {show: true} + } + /**开服狂欢红点 */ static async kfkhHongDian(call: ApiCall) { let _res: hongdianVal = { 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/ApiItemNoEnough.ts b/src/api_s2c/pushgift/ApiItemNoEnough.ts new file mode 100644 index 0000000..7f7087a --- /dev/null +++ b/src/api_s2c/pushgift/ApiItemNoEnough.ts @@ -0,0 +1,9 @@ +import {ApiCall} from "tsrpc"; +import {ReqItemNoEnough, ResItemNoEnough} from "../../shared/protocols/pushgift/PtlItemNoEnough"; +import {PushGiftFun} from "../../public/pushgift"; + +export default async function (call: ApiCall) { + // 物品不足 前端拦截的 通知后端 检测推送礼包 + PushGiftFun.chkItemGift(call.uid, {a: call.req.need.a, t: call.req.need.t, n: 0}) + call.succ({}) +} \ 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..399fb72 --- /dev/null +++ b/src/api_s2c/pushgift/ApiOpen.ts @@ -0,0 +1,30 @@ +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]]; + let buy = gift_info.buy.map(i => i != 0); + if (pay.buys > 0 && gift_info.buy[i] < pay.buys) { + return true + } + } + + return false +} \ No newline at end of file diff --git a/src/api_s2c/user/ApiDot.ts b/src/api_s2c/user/ApiDot.ts new file mode 100644 index 0000000..bf42370 --- /dev/null +++ b/src/api_s2c/user/ApiDot.ts @@ -0,0 +1,10 @@ +import {ApiCall} from "tsrpc"; +import {ReqDot, ResDot} from "../../shared/protocols/user/PtlDot"; +import {addGameDot} from "../../gameLog"; + +export default async function (call: ApiCall) { + + addGameDot(call.uid, call.req.type, call.req.data) + + call.succ({}); +} \ No newline at end of file diff --git a/src/api_s2c/user/ApiLogin.ts b/src/api_s2c/user/ApiLogin.ts index 33ef532..6b54a15 100644 --- a/src/api_s2c/user/ApiLogin.ts +++ b/src/api_s2c/user/ApiLogin.ts @@ -132,6 +132,9 @@ async function doLogin(call: ApiCall) { //await G.redis.set('user', gud.uid, gud); await initGud(gud.uid, gud); + // 修复公会id + await fixUnionData(gud); + //记录玩家所在的进程,change: 更换到处理完踢线操作在写入。 // setUidProcessId(gud.uid); @@ -278,4 +281,19 @@ async function LoginFun(call: ApiCall) { // // G.mongodb.collection("hero").findOneAndUpdate({_id: i._id}, {$set: {shiwu: shiwuChange}}) // }) -// } \ No newline at end of file +// } + +// 修复玩家退出公会 但是gud中残留公会id +async function fixUnionData(gud: ResLogin["gud"]) { + if (gud.ghId) { + let ghdata = await G.mongodb.collection("gonghui").findOne( + {_id: G.mongodb.conversionId(gud.ghId), 'players.uid': gud.uid} + ) + if (!ghdata) { + gud.ghId = ""; + gud.ghName = ""; + gud.ghLevel = 0; + PlayerFun.changeAttr(gud.uid, {ghId: '', ghLevel: 0}) + } + } +} \ No newline at end of file diff --git a/src/fix_patch/patch_20231215.ts b/src/fix_patch/patch_20231215.ts new file mode 100644 index 0000000..0a77b3d --- /dev/null +++ b/src/fix_patch/patch_20231215.ts @@ -0,0 +1,1932 @@ +import {ctor} from "../global"; +import {initMongoDB} from "../setMongodb"; +import {ReqEmail} from "../monopoly/protocols/PtlEmail"; +import {MsgEmail} from "../shared/protocols/msg_s2c/MsgEmail"; +import {yangchengmubiao} from "../shared/protocols/event/yangchengmubiao/PtlOpen"; + + +/** + * 标题:首充优化 + * 日語:初回チャージ仕様改善 + * 繁體:首儲機制改善 + * 韓国語: 초회 충전 시스템 개선 + * 英語: First Top-Up optimization + * + * 內文:这是您的补偿,请查收! + * 日語:仕様改善に伴う補填を発送させていただきました。ご確認ください。 + * 繁體中文:這是您的補償內容,煩請查收! + * 韓国語:투자 시스템 개선으로 인한 보상을 보내드립니다. + * 英語: Please find attached a few items as a compensation for the wait during our adjustments. + * + * 线上玩家脚本 + * 1、已激活首充档位且没领完3天奖励的玩家,邮件补发剩下的奖励 + * 2、重置所有玩家首充活动到新版本状态*/ + +async function addEmail(email: ReqEmail) { + let {prize, uid, ...e} = email; + let sendEmail: MsgEmail = { + _id: null, + uid: uid, + type: e.type, + title: e.title, + content: e.content, + createTime: G.time, + contentInsertArr: e.contentInsertArr || [] + }; + + if (email.lngTitle) { + sendEmail.lngTitle = email.lngTitle; + sendEmail.lngContent = email.lngContent; + } + + if ((prize === null || prize === void 0 ? void 0 : prize.length) > 0) { + sendEmail.prizeData = { + prize: email.prize, + isGet: false + }; + } + + if (email.g123log && Object.keys(email.g123log).length > 0) { + sendEmail.g123log = email.g123log; + } + await G.mongodb.collection('email').insertOne({ + ttl: new Date(), ...G.mongodb.conversionIdObj(sendEmail) + }) +} + +async function shouChongReSet() { + let shouchong = { + "shouchong1": { + "paynum": 6, + "cartoon": { + "hero": 5001 + }, + "prize": [ + [ + { + "a": "hero", + "t": "5001", + "n": 1 + }, + { + "a": "attr", + "t": "jinbi", + "n": 100000 + } + ], + [ + { + "a": "item", + "t": "12", + "n": 200 + }, + { + "a": "attr", + "t": "jinbi", + "n": 200000 + } + ], + [ + { + "a": "item", + "t": "12", + "n": 200 + }, + { + "a": "attr", + "t": "jinbi", + "n": 300000 + } + ] + ] + }, + "shouchong2": { + "paynum": 30, + "cartoon": { + "img": 5001 + }, + "prize": [ + [ + { + "a": "equip", + "t": "1009", + "n": 1 + }, + { + "a": "equip", + "t": "2009", + "n": 1 + } + ], + [ + { + "a": "equip", + "t": "3009", + "n": 1 + }, + { + "a": "item", + "t": "2", + "n": 1000 + } + ], + [ + { + "a": "equip", + "t": "4009", + "n": 1 + }, + { + "a": "item", + "t": "2", + "n": 1000 + } + ] + ] + }, + "shouchong3": { + "paynum": 98, + "cartoon": { + "hero": 5002 + }, + "prize": [ + [ + { + "a": "hero", + "t": "5002", + "n": 1 + }, + { + "a": "item", + "t": "4", + "n": 10 + } + ], + [ + { + "a": "equip", + "t": "1010", + "n": 1 + }, + { + "a": "item", + "t": "2", + "n": 2000 + } + ], + [ + { + "a": "equip", + "t": "3010", + "n": 1 + }, + { + "a": "item", + "t": "2", + "n": 2000 + } + ] + ] + } + }; + let users = await G.mongodb.collection("user").find({}, { + projection: {uid: 1, payExp: 1} + }).toArray(); + + for (let i = 0; i < users.length; i++) { + let user = users[i]; + let data = await G.mongodb.cEvent("shouchong").findOne({ + uid: user.uid, + type: "shouchong", + }); + + if (!data) { + data = {uid: user.uid, receive: {}, type: "shouchong", _id: G.mongodb.conversionId("")}; + } + + let send_prize = []; + for (let key in shouchong) { + // 充值不足 + if (user.payExp < shouchong[key]["paynum"] * 10) { + continue + } + + // 奖励已经领取完毕 + if (data?.receive && data.receive[key] && data.receive[key].length >= shouchong[key]["prize"].length) { + continue + } + + // 补发未领取奖励 + for (let i = 0; i < shouchong[key]["prize"].length; i++) { + if (data?.receive && data.receive[key] && data.receive[key][i]) { + continue + } + + if (!data.receive[key]) { + data.receive[key] = []; + } + data.receive[key][i] = G.time; + send_prize = send_prize.concat(shouchong[key]["prize"][i]); + } + } + if (send_prize.length <= 0) continue; + + let title = "首充优化"; + let content = "这是您的补偿,请查收!"; + + let lngTitle = { + "en": "First Top-Up optimization", + "ja": "初回チャージ仕様改善", + "ko": "초회 충전 시스템 개선", + "zh-TW": "首儲機制改善" + }; + let lngContent = { + "en": "Please find attached a few items as a compensation for the wait during our adjustments.", + "ja": "仕様改善に伴う補填を発送させていただきました。ご確認ください。", + "ko": "투자 시스템 개선으로 인한 보상을 보내드립니다.", + "zh-TW": "這是您的補償內容,煩請查收!", + }; + + // 发放邮件 + await addEmail({ + uid: user.uid, + type: "system", + title: title, + content: content, + prize: send_prize, + lngTitle: lngTitle, + lngContent: lngContent, + }); + // 设置奖励发放记录 + await G.mongodb.cEvent("shouchong").updateOne({ + uid: user.uid, + type: "shouchong", + }, {"$set": {receive: data.receive, patch: 1}}, {upsert: true}); + + console.log(`玩家${user.uid}首充奖励补发完成...`); + } +} + + +/** + * "zhizunyueka" + 标题:至尊月卡优化 + 日語:豪華月パス仕様改善 + 繁體:至尊月卡改善 + 韓国語:고급 월간 패스 시스템 개선 + 英語: Luxurious Monthly Pass optimization + + 邮件内容:这是您的补偿,请查收! + 日語:仕様改善に伴う補填を発送させていただきました。ご確認ください。 + 繁體中文:這是您的補償內容,煩請查收! + 韓国語:투자 시스템 개선으로 인한 보상을 보내드립니다. + 英語: Please find attached a few items as a compensation for the wait during our adjustments. + + 线上玩家脚本: + 线上已购买至尊月卡的玩家,脚本补发:钻石*10000 + **/ +async function zhizunyueka() { + let w = { + key: "zhizunyueka", + del_time: {$exists: false} + }; + let users = (await G.mongodb.collection("payLogNew").find(w).toArray()).filter( + // 过滤没有结束时间 或者 有结束时间 但是没有过期的 + (pay) => pay.values?.length > 0 && (!pay.values.slice(-1)[0].eTime || pay.values.slice(-1)[0].eTime > G.time) + ); + + let uid2Prize: { [uid: string]: { a: string, t: string, n: number }[] } = {}; + users.forEach(user => { + let uid = user.uid; + if (!uid2Prize[uid]) uid2Prize[uid] = []; + uid2Prize[uid].push({a: "attr", t: "rmbmoney", n: 10000}); + }); + + let title = "至尊月卡优化"; + let content = "这是您的补偿,请查收!"; + let lngTitle = { + "en": "Luxurious Monthly Pass optimization", + "ja": "豪華月パス仕様改善", + "ko": "고급 월간 패스 시스템 개선", + "zh-TW": "至尊月卡改善", + }; + let lngContent = { + "en": "Please find attached a few items as a compensation for the wait during our adjustments.", + "ja": "仕様改善に伴う補填を発送させていただきました。ご確認ください。", + "ko": "투자 시스템 개선으로 인한 보상을 보내드립니다.", + "zh-TW": "這是您的補償內容,煩請查收!", + }; + + for (const [uid, sendPrize] of Object.entries(uid2Prize)) { + // 发放邮件 + await addEmail({ + uid: uid, + type: "system", + title: title, + content: content, + prize: sendPrize, + lngTitle: lngTitle, + lngContent: lngContent, + }); + + // 处理重复执行 + await G.mongodb.collection("payLogNew").updateMany( + Object.assign({uid: uid}, w), {$set: {patch: 1}} + ) + + console.log(`玩家${uid}至尊月卡奖励补发完成...`); + } +} + +/** + * "chaozhiyueka" + 标题 超值月卡优化 + ja:お得月パス仕様改善 + zh-TW:超值月卡改善 + ko:월간 패스 시스템 개선 + en: Value Monthly Pass optimization + + 內文: + 这是您的补偿,请查收! + ja:仕様改善に伴う補填を発送させていただきました。ご確認ください。 + zh-TW:這是您的補償內容,煩請查收! + ko:투자 시스템 개선으로 인한 보상을 보내드립니다. + en: Please find attached a few items as a compensation for the wait during our adjustments. + + 线上已购买超值月卡的玩家,脚本补发:招募卡*30 + **/ +async function chaozhiyueka() { + let w = { + key: "chaozhiyueka", + del_time: {$exists: false} + }; + let users = (await G.mongodb.collection("payLogNew").find(w).toArray()).filter( + // 过滤没有结束时间 或者 有结束时间 但是没有过期的 + (pay) => pay.values?.length > 0 && (!pay.values.slice(-1)[0].eTime || pay.values.slice(-1)[0].eTime > G.time) + ); + + let uid2Prize: { [uid: string]: { a: string, t: string, n: number }[] } = {}; + users.forEach(user => { + let uid = user.uid; + if (!uid2Prize[uid]) uid2Prize[uid] = []; + uid2Prize[uid].push({a: "item", t: "4", n: 30}); + }); + + let title = "超值月卡优化"; + let content = "这是您的补偿,请查收!"; + let lngTitle = { + "ja": "お得月パス仕様改善", + "zh-TW": "超值月卡改善", + "ko": "월간 패스 시스템 개선", + "en": "Value Monthly Pass optimization", + }; + let lngContent = { + "en": "Please find attached a few items as a compensation for the wait during our adjustments.", + "ja": "仕様改善に伴う補填を発送させていただきました。ご確認ください。", + "ko": "투자 시스템 개선으로 인한 보상을 보내드립니다.", + "zh-TW": "這是您的補償內容,煩請查收!" + }; + + for (const [uid, sendPrize] of Object.entries(uid2Prize)) { + // 发放邮件 + await addEmail({ + uid: uid, + type: "system", + title: title, + content: content, + prize: sendPrize, + lngTitle: lngTitle, + lngContent: lngContent, + }); + + // 处理重复执行 + await G.mongodb.collection("payLogNew").updateMany( + Object.assign({uid: uid}, w), {$set: {patch: 1}} + ) + + console.log(`玩家${uid}超值月卡奖励补发完成...`); + } +} + +/** + * "zhongshenka" + 标题:终身卡优化 + ja:永久パス仕様改善 + zh-TW:永久通行證改善 + ko:영구 패스 시스템 개선 + en: Lifetime Pass optimization + + 內文: 这是您的补偿,请查收! + ja:仕様改善に伴う補填を発送させていただきました。ご確認ください。 + zh-TW:這是您的補償內容,煩請查收! + ko:투자 시스템 개선으로 인한 보상을 보내드립니다. + en: Please find attached a few items as a compensation for the wait during our adjustments. + + 线上已购买永久卡的玩家,脚本补发:汉塞尔1,能量饮料500w + **/ +async function zhongshenka() { + let w = { + key: "zhongshenka", + del_time: {$exists: false} + }; + let users = (await G.mongodb.collection("payLogNew").find(w).toArray()).filter( + // 过滤没有结束时间 或者 有结束时间 但是没有过期的 + (pay) => pay.values?.length > 0 && (!pay.values.slice(-1)[0].eTime || pay.values.slice(-1)[0].eTime > G.time) + ); + + let uid2Prize: { [uid: string]: { a: string, t: string, n: number }[] } = {}; + users.forEach(user => { + let uid = user.uid; + if (!uid2Prize[uid]) uid2Prize[uid] = []; + uid2Prize[uid].push({"a": "item", "t": "1", "n": 5000000}) + uid2Prize[uid].push({a: "hero", t: "4012", n: 1}) + }); + + let title = "终身卡优化"; + let content = "这是您的补偿,请查收!"; + let lngTitle = { + "ja": "永久パス仕様改善", + "zh-TW": "永久通行證改善", + "ko": "영구 패스 시스템 개선", + "en": "Lifetime Pass optimization", + }; + let lngContent = { + "en": "Please find attached a few items as a compensation for the wait during our adjustments.", + "ja": "仕様改善に伴う補填を発送させていただきました。ご確認ください。", + "ko": "투자 시스템 개선으로 인한 보상을 보내드립니다.", + "zh-TW": "這是您的補償內容,煩請查收!" + }; + + for (const [uid, sendPrize] of Object.entries(uid2Prize)) { + // 发放邮件 + await addEmail({ + uid: uid, + type: "system", + title: title, + content: content, + prize: sendPrize, + lngTitle: lngTitle, + lngContent: lngContent, + }); + + // 处理重复执行 + await G.mongodb.collection("payLogNew").updateMany( + Object.assign({uid: uid}, w), {$set: {patch: 1}} + ) + + console.log(`玩家${uid}终身卡奖励补发完成...`); + } +} + + +/** + "qingbaotequan" + 标题:资讯特权优化 + ja:情報特権仕様改善 + zh-TW:資訊特權改善 + ko:정보 특권 시스템 개선 + en: Intel Benefit optimization + + 內文:这是您的补偿,请查收! + ja:仕様改善に伴う補填を発送させていただきました。ご確認ください。 + zh-TW:這是您的補償內容,煩請查收! + ko:투자 시스템 개선으로 인한 보상을 보내드립니다. + en: Please find attached a few items as a compensation for the wait during our adjustments. + + 线上玩家脚本 + 1、特权内容:已购买特权的玩家,特权效果更新,不重置时间 + 2、已购买资讯特权的玩家,脚本补发:钻石*680,顶级紫色套装*1 + * */ +async function qingbaotequan() { + let w = { + key: "qingbaotequan", + patch: {$exists: false}, + del_time: {$exists: false} + }; + let users = (await G.mongodb.collection("payLogNew").find(w).toArray()).filter( + // 过滤没有结束时间 或者 有结束时间 但是没有过期的 + (pay) => pay.values?.length > 0 && (!pay.values.slice(-1)[0].eTime || pay.values.slice(-1)[0].eTime > G.time) + ); + + let uid2Prize: { [uid: string]: { a: string, t: string, n: number }[] } = {}; + users.forEach(user => { + let uid = user.uid; + + if (!uid2Prize[uid]) uid2Prize[uid] = []; + uid2Prize[uid].push({"a": "attr", "t": "rmbmoney", "n": 680}); + uid2Prize[uid].push({"a": "item", "t": "609", "n": 1}); + }); + + let title = "资讯特权优化"; + let content = "这是您的补偿,请查收!"; + let lngTitle = { + "ja": "情報特権仕様改善", + "zh-TW": "資訊特權改善", + "ko": "정보 특권 시스템 개선", + "en": "Intel Benefit optimization", + }; + let lngContent = { + "en": "Please find attached a few items as a compensation for the wait during our adjustments.", + "ja": "仕様改善に伴う補填を発送させていただきました。ご確認ください。", + "ko": "투자 시스템 개선으로 인한 보상을 보내드립니다.", + "zh-TW": "這是您的補償內容,煩請查收!" + }; + for (const [uid, sendPrize] of Object.entries(uid2Prize)) { + // 发放邮件 + await addEmail({ + uid: uid, + type: "system", + title: title, + content: content, + prize: sendPrize, + lngTitle: lngTitle, + lngContent: lngContent, + }); + await G.mongodb.collection("payLogNew").updateMany( + Object.assign({uid: uid}, w), {$set: {patch: 1}} + ) + + console.log(`玩家${uid}特权奖励补发完成...`); + } +} + +/** + "zuozhantequan" + 标题:作战特权优化 + ja:作戦特権仕様改善 + zh-TW:作戰特權改善 + ko:작전 특권 시스템 개선 + en: Strategy Benefit optimization + + 內文:这是您的补偿,请查收! + ja:仕様改善に伴う補填を発送させていただきました。ご確認ください。 + zh-TW:這是您的補償內容,煩請查收! + ko:투자 시스템 개선으로 인한 보상을 보내드립니다. + en: Please find attached a few items as a compensation for the wait during our adjustments. + + 线上玩家脚本 + 1、特权内容:已购买特权的玩家,特权效果更新,不重置时间 + 2、已购买快速特权的玩家,脚本补发:钻石300,快速探险券30 + * */ +async function zuozhantequan() { + let w = { + key: "zuozhantequan", + patch: {$exists: false}, + del_time: {$exists: false} + }; + let users = (await G.mongodb.collection("payLogNew").find(w).toArray()).filter( + // 过滤没有结束时间 或者 有结束时间 但是没有过期的 + (pay) => pay.values?.length > 0 && (!pay.values.slice(-1)[0].eTime || pay.values.slice(-1)[0].eTime > G.time) + ); + + let uid2Prize: { [uid: string]: { a: string, t: string, n: number }[] } = {}; + users.forEach(user => { + let uid = user.uid; + + if (!uid2Prize[uid]) uid2Prize[uid] = []; + uid2Prize[uid].push({"a": "item", "t": "24", "n": 30}); + uid2Prize[uid].push({"a": "attr", "t": "rmbmoney", "n": 300}); + }); + + let title = "作战特权优化"; + let content = "这是您的补偿,请查收!"; + let lngTitle = { + "ja": "作戦特権仕様改善", + "zh-TW": "作戰特權改善", + "ko": "작전 특권 시스템 개선", + "en": "Strategy Benefit optimization", + }; + let lngContent = { + "en": "Please find attached a few items as a compensation for the wait during our adjustments.", + "ja": "仕様改善に伴う補填を発送させていただきました。ご確認ください。", + "ko": "투자 시스템 개선으로 인한 보상을 보내드립니다.", + "zh-TW": "這是您的補償內容,煩請查收!" + }; + for (const [uid, sendPrize] of Object.entries(uid2Prize)) { + // 发放邮件 + await addEmail({ + uid: uid, + type: "system", + title: title, + content: content, + prize: sendPrize, + lngTitle: lngTitle, + lngContent: lngContent, + }); + await G.mongodb.collection("payLogNew").updateMany( + Object.assign({uid: uid}, w), {$set: {patch: 1}} + ) + + console.log(`玩家${uid}特权奖励补发完成...`); + } +} + +/** + "caifutequan" + 标题:资产特权优化 + ja:資産特権仕様改善 + zh-TW:資産特權改善 + ko:자산 특권 시스템 개선 + en: Asset Benefit optimization + + 內文:这是您的补偿,请查收! + ja:仕様改善に伴う補填を発送させていただきました。ご確認ください。 + zh-TW:這是您的補償內容,煩請查收! + ko:투자 시스템 개선으로 인한 보상을 보내드립니다. + en: Please find attached a few items as a compensation for the wait during our adjustments. + + 线上玩家脚本 + 1、特权内容:已购买特权的玩家,特权效果更新,不重置时间 + 2、已购买资产特权的玩家,脚本补发:钻石*300,美金*1000万 + * */ +async function caifutequan() { + let w = { + key: "caifutequan", + patch: {$exists: false}, + del_time: {$exists: false} + }; + let users = (await G.mongodb.collection("payLogNew").find(w).toArray()).filter( + // 过滤没有结束时间 或者 有结束时间 但是没有过期的 + (pay) => pay.values?.length > 0 && (!pay.values.slice(-1)[0].eTime || pay.values.slice(-1)[0].eTime > G.time) + ); + + let uid2Prize: { [uid: string]: { a: string, t: string, n: number }[] } = {}; + users.forEach(user => { + let uid = user.uid; + + if (!uid2Prize[uid]) uid2Prize[uid] = []; + uid2Prize[uid].push({"a": "attr", "t": "rmbmoney", "n": 300}) + uid2Prize[uid].push({"a": "attr", "t": "jinbi", "n": 10000000}) + }); + + let title = "资产特权优化"; + let content = "这是您的补偿,请查收!"; + let lngTitle = { + "ja": "資産特権仕様改善", + "zh-TW": "資産特權改善", + "ko": "자산 특권 시스템 개선", + "en": "Asset Benefit optimization", + }; + let lngContent = { + "en": "Please find attached a few items as a compensation for the wait during our adjustments.", + "ja": "仕様改善に伴う補填を発送させていただきました。ご確認ください。", + "ko": "투자 시스템 개선으로 인한 보상을 보내드립니다.", + "zh-TW": "這是您的補償內容,煩請查收!" + }; + for (const [uid, sendPrize] of Object.entries(uid2Prize)) { + // 发放邮件 + await addEmail({ + uid: uid, + type: "system", + title: title, + content: content, + prize: sendPrize, + lngTitle: lngTitle, + lngContent: lngContent, + }); + await G.mongodb.collection("payLogNew").updateMany( + Object.assign({uid: uid}, w), {$set: {patch: 1}} + ) + + console.log(`玩家${uid}资产特权奖励补发完成...`); + } +} + +/** + "jiubatequan" + 标题:抽奖特权优化 + ja:ガチャ特権仕様改善 + zh-TW:抽獎特權改善 + ko:모집 특권 시스템 개선 + en: Gacha Benefit optimization + + 內文:这是您的补偿,请查收! + ja:仕様改善に伴う補填を発送させていただきました。ご確認ください。 + zh-TW:這是您的補償內容,煩請查收! + ko:투자 시스템 개선으로 인한 보상을 보내드립니다. + en: Please find attached a few items as a compensation for the wait during our adjustments. + + 线上玩家脚本 + 1、特权内容:已购买特权的玩家,特权效果更新,不重置时间 + 2、已购买抽奖特权的玩家,脚本补发:钻石*680,招募卡*10 + * */ +async function jiubatequan() { + let w = { + key: "jiubatequan", + patch: {$exists: false}, + del_time: {$exists: false} + }; + let users = (await G.mongodb.collection("payLogNew").find(w).toArray()).filter( + // 过滤没有结束时间 或者 有结束时间 但是没有过期的 + (pay) => pay.values?.length > 0 && (!pay.values.slice(-1)[0].eTime || pay.values.slice(-1)[0].eTime > G.time) + ); + + let uid2Prize: { [uid: string]: { a: string, t: string, n: number }[] } = {}; + users.forEach(user => { + let uid = user.uid; + + if (!uid2Prize[uid]) uid2Prize[uid] = []; + uid2Prize[uid].push({"a": "item", "t": "4", "n": 10}); + uid2Prize[uid].push({"a": "attr", "t": "rmbmoney", "n": 680}); + }); + + let title = "抽奖特权优化"; + let content = "这是您的补偿,请查收!"; + let lngTitle = { + "ja": "ガチャ特権仕様改善", + "zh-TW": "抽獎特權改善", + "ko": "모집 특권 시스템 개선", + "en": "Gacha Benefit optimization", + }; + let lngContent = { + "en": "Please find attached a few items as a compensation for the wait during our adjustments.", + "ja": "仕様改善に伴う補填を発送させていただきました。ご確認ください。", + "ko": "투자 시스템 개선으로 인한 보상을 보내드립니다.", + "zh-TW": "這是您的補償內容,煩請查收!" + }; + for (const [uid, sendPrize] of Object.entries(uid2Prize)) { + // 发放邮件 + await addEmail({ + uid: uid, + type: "system", + title: title, + content: content, + prize: sendPrize, + lngTitle: lngTitle, + lngContent: lngContent, + }); + await G.mongodb.collection("payLogNew").updateMany( + Object.assign({uid: uid}, w), {$set: {patch: 1}} + ) + + console.log(`玩家${uid}抽奖特权奖励补发完成...`); + } +} + +/** + 不需要给玩家发送邮件 + + 线上玩家脚本 + 刷新所有玩家各档位VIP礼包到未购买状态 + **/ +async function resetVipLiBao() { + await G.mongodb.cPlayerInfo("chongzhi").updateMany( + {type: 'chongzhi'}, {$set: {giftBy: {}}} + ) +} + + +/** + 人才计划调整 + 1、线上已有该活动的玩家,保留次数进度;达到新加档位可领取的奖励则直接领取 + **/ +async function rcjhReSet() { + const hdid = [100, 101]; + const task = { + '2001': { + 'prize': [{'a': 'item', 't': '4', 'n': 5}, {'a': 'item', 't': '626', 'n': 10}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 50, + 'cond': [], + 'stype': 118 + }, + '2002': { + 'prize': [{'a': 'item', 't': '4', 'n': 5}, {'a': 'item', 't': '626', 'n': 10}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 100, + 'cond': [], + 'stype': 118 + }, + '2003': { + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '626', 'n': 20}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 200, + 'cond': [], + 'stype': 118 + }, + '2004': { + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '600', 'n': 20}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 250, + 'cond': [], + 'stype': 118 + }, + '2005': { + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '600', 'n': 20}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 300, + 'cond': [], + 'stype': 118 + }, + '2006': { + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '619', 'n': 1}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 400, + 'cond': [], + 'stype': 118 + }, + '2007': { + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '619', 'n': 1}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 500, + 'cond': [], + 'stype': 118 + } + }; + // 中间插入了2004 所以之前的任务id一次往后顺延 + const change = {2004: 2005, 2005: 2006, 2006: 2007}; + // 刷新活动配置 + await G.mongodb.collection("hdinfo").updateOne({hdid: {$in: hdid}}, { + "$set": {'data.tasklist.2': task} + }) + + let datas: yangchengmubiao[] = []; + // 刷新玩家领取记录 + datas = datas.concat(await G.mongodb.cEvent(`yangchengmubiao${hdid[0]}`).find( + {type: `yangchengmubiao${hdid[0]}`} + ).toArray()); + datas = datas.concat(await G.mongodb.cEvent(`yangchengmubiao${hdid[1]}`).find( + {type: `yangchengmubiao${hdid[1]}`} + ).toArray()); + for (let i = 0; i < datas.length; i++) { + let data = datas[i]; + let finished = data.finishid["2"].map((task) => { + return change[task] ? change[task] : task + }); + let maxtaskval = Math.max(...Object.values(data.taskval)); + let taskval = Object.assign(Object.keys(task).map((taskid) => { + return {[taskid]: maxtaskval} + })); + await G.mongodb.collection("event").updateOne( + {uid: data.uid, type: data.type}, {$set: {taskval: taskval, "finishid.2": finished}} + ) + console.log(`修复玩家${data.uid}人才计划数据完成...`); + } +} + + +/** + * 标题:等级基金优化 + * ja:レベル投資仕様改善 + * zh-TW:等級基金改善 + * ko:레벨 투자 시스템 개선 + * en: Level Investment optimization + + * 內文: + * 这是您的补偿,请查收! + * ja:仕様改善に伴う補填を発送させていただきました。ご確認ください。 + * zh-TW:這是您的補償內容,煩請查收! + * ko:투자 시스템 개선으로 인한 보상을 보내드립니다. + * en: Please find attached a few items as a compensation for the wait during our adjustments. + + * 线上玩家脚本 + * 1、已购买等级基金的玩家且未领取完成的玩家,剩余奖励邮件一次性补发; + * 2、未购买的玩家活动刷新到新版本; + * 3、刷新等级基金到未购买状态; + */ +async function dengjiJiJinReSet() { + let w = {key: "dengjijijin", del_time: {$exists: false}} + // 激活了的玩家 + let _payList = (await G.mongodb.collection("payLogNew").find(w).toArray()).filter( + // 过滤没有结束时间 或者 有结束时间 但是没有过期的 + (pay) => pay.values?.length > 0 && (!pay.values.slice(-1)[0].eTime || pay.values.slice(-1)[0].eTime > G.time) + ); + + const prizeList = [ + { + "type": "dengjijijin", + "total": 20, + "pt": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 300 + } + ], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 1700 + } + ] + }, + { + "type": "dengjijijin", + "total": 25, + "pt": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 300 + } + ], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 1700 + } + ] + }, + { + "type": "dengjijijin", + "total": 30, + "pt": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 300 + } + ], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 1700 + } + ] + }, + + { + "type": "dengjijijin", + "total": 35, + "pt": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 300 + } + ], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 1700 + } + ] + }, + { + "type": "dengjijijin", + "total": 40, + "pt": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 300 + } + ], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 1700 + } + ] + }, + { + "type": "dengjijijin", + "total": 45, + "pt": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 300 + } + ], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 1700 + } + ] + }, + + { + "type": "dengjijijin", + "total": 50, + "pt": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 300 + } + ], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 1700 + } + ] + }, + { + "type": "dengjijijin", + "total": 55, + "pt": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 300 + } + ], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 1700 + } + ] + } + ]; + let _users = await G.mongodb.cEvent("dengjijijin").find( + {"uid": {"$in": _payList.map(pay => pay.uid)}, type: 'dengjijijin'} + ).toArray() + + let uid2Prize: { [uid: string]: { a: string, t: string, n: number }[] } = {}; + _users.forEach((user) => { + let uid = user.uid; + let idx2Type2Bool = user.rec; + if (!uid2Prize[uid]) uid2Prize[uid] = []; + + // 没领的全发 + prizeList.forEach((con, idx) => { + // 普通奖励没领 + if (!idx2Type2Bool[idx]?.pt) { + uid2Prize[uid].push(...con.pt) + } + // 高级奖励没领 + if (!idx2Type2Bool[idx]?.tq) { + uid2Prize[uid].push(...con.tq) + } + }); + }) + + let title = "等级基金优化"; + let content = "这是您的补偿,请查收!"; + let lngTitle = { + "ja": "レベル投資仕様改善", + "zh-TW": "等級基金改善", + "ko": "레벨 투자 시스템 개선", + "en": "Level Investment optimization", + }; + let lngContent = { + "en": "Please find attached a few items as a compensation for the wait during our adjustments.", + "ja": "仕様改善に伴う補填を発送させていただきました。ご確認ください。", + "ko": "투자 시스템 개선으로 인한 보상을 보내드립니다.", + "zh-TW": "這是您的補償內容,煩請查收!" + }; + for (const [uid, sendPrize] of Object.entries(uid2Prize)) { + // 发放邮件 + await addEmail({ + uid: uid, + type: "system", + title: title, + content: content, + prize: sendPrize, + lngTitle: lngTitle, + lngContent: lngContent, + }); + await G.mongodb.collection("payLogNew").updateMany( + Object.assign({uid: uid}, w), {$set: {patch: 1, del_time: G.time}} + ) + // 基金数据清除 + await G.mongodb.collection("event").updateMany( + {type: "dengjijijin", uid: uid}, {"$set": {uid: `${uid}_patch_del`}} + ); + console.log(`玩家${uid}等级基金奖补发完成...`); + } +} + + +/** + * 标题:关卡基金优化 + * ja:ステージ投資仕様改善 + * zh-TW:關卡基金改善 + * ko:스테이지 투자 시스템 개선 + * en: Stage Investment optimization + * + * 內文:这是您的补偿,请查收! + * ja:仕様改善に伴う補填を発送させていただきました。ご確認ください。 + * zh-TW:這是您的補償內容,煩請查收! + * ko:투자 시스템 개선으로 인한 보상을 보내드립니다. + * en: Please find attached a few items as a compensation for the wait during our adjustments. + + * 线上玩家脚本 + * 1、已购买关卡基金的玩家且未领取完成的玩家,剩余奖励邮件一次性补发; + * 2、未购买的玩家活动刷新到新版本; + * 3、刷新关卡基金到未购买状态; + * */ +async function guanqiaJiJinReSet() { + let w = {key: "guanqiajijin"}; + // 激活了的玩家 + let _payList = (await G.mongodb.collection("payLogNew").find(w).toArray()).filter( + // 过滤没有结束时间 或者 有结束时间 但是没有过期的 + (pay) => pay.values?.length > 0 && (!pay.values.slice(-1)[0].eTime || pay.values.slice(-1)[0].eTime > G.time) + ); + + const prizeList = [ + { + "type": "guanqiajijin", + "total": 30, + "pt": [], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 2000 + } + ], + "des": "guanqiajijin_des_1" + }, + { + "type": "guanqiajijin", + "total": 50, + "pt": [], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 2000 + } + ], + "des": "guanqiajijin_des_2" + }, + { + "type": "guanqiajijin", + "total": 70, + "pt": [], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 2000 + } + ], + "des": "guanqiajijin_des_3" + }, + { + "type": "guanqiajijin", + "total": 90, + "pt": [], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 2000 + } + ], + "des": "guanqiajijin_des_4" + }, + { + "type": "guanqiajijin", + "total": 110, + "pt": [], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 2000 + } + ], + "des": "guanqiajijin_des_5" + }, + { + "type": "guanqiajijin", + "total": 150, + "pt": [], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 2000 + } + ], + "des": "guanqiajijin_des_6" + }, + { + "type": "guanqiajijin", + "total": 180, + "pt": [], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 2000 + } + ], + "des": "guanqiajijin_des_7" + }, + { + "type": "guanqiajijin", + "total": 250, + "pt": [], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 2000 + } + ], + "des": "guanqiajijin_des_8" + } + ]; + + // 没激活不处理 + let _users = await G.mongodb.cEvent("guanqiajijin").find( + { + "uid": {"$in": _payList.map(pay => pay.uid)}, + "type": 'guanqiajijin' + }, + {projection: {_id: 0}} + ).toArray(); + + let uid2Prize: { [uid: string]: { a: string, t: string, n: number }[] } = {}; + _users.forEach(user => { + let uid = user.uid; + let idx2Type2Bool = user.rec; + if (!uid2Prize[uid]) uid2Prize[uid] = []; + + // 没领的全发 + prizeList.forEach((con, idx) => { + // 普通奖励没领 + if (!idx2Type2Bool[idx]?.pt) { + uid2Prize[uid].push(...con.pt) + } + // 高级奖励没领 + if (!idx2Type2Bool[idx]?.tq) { + uid2Prize[uid].push(...con.tq) + } + }); + }) + + let title = "关卡基金优化"; + let content = "这是您的补偿,请查收!"; + let lngTitle = { + "ja": "ステージ投資仕様改善", + "zh-TW": "關卡基金改善", + "ko": "스테이지 투자 시스템 개선", + "en": "Stage Investment optimization", + }; + let lngContent = { + "en": "Please find attached a few items as a compensation for the wait during our adjustments.", + "ja": "仕様改善に伴う補填を発送させていただきました。ご確認ください。", + "ko": "투자 시스템 개선으로 인한 보상을 보내드립니다.", + "zh-TW": "這是您的補償內容,煩請查收!" + }; + for (const [uid, sendPrize] of Object.entries(uid2Prize)) { + // 发放邮件 + await addEmail({ + uid: uid, + type: "system", + title: title, + content: content, + prize: sendPrize, + lngTitle: lngTitle, + lngContent: lngContent, + }); + await G.mongodb.collection("payLogNew").updateMany( + Object.assign({uid: uid}, w), {$set: {patch: 1, del_time: G.time}} + ) + // 基金数据清除 + await G.mongodb.collection("event").updateMany( + {type: "guanqiajijin", uid: uid}, {"$set": {uid: `${uid}_patch_del`}} + ); + console.log(`玩家${uid}关卡基金奖补发完成...`); + } +} + + +/** + * 标题:特别通行证优化 + * ja:特別通行証仕様改善 + * zh-TW:特別通行證改善 + * ko:특별 통행증 시스템 개선 + * en: Special Permit optimization + + * 內文:这是您的补偿,请查收! + * ja:仕様改善に伴う補填を発送させていただきました。ご確認ください。 + * zh-TW:這是您的補償內容,煩請查收! + * ko:투자 시스템 개선으로 인한 보상을 보내드립니다. + * en: Please find attached a few items as a compensation for the wait during our adjustments. + + * 线上玩家脚本 + * 1、已购买通行证基金的玩家且未领取完成的玩家,剩余奖励邮件一次性补发; + * 2、未购买的玩家活动刷新到新版本; + * 3、刷新通行证基金到未购买状态; + * */ +async function dayjiJiJinReSet() { + let w = {key: "dayjijin"}; + + // 激活了的玩家 + let _payList = (await G.mongodb.collection("payLogNew").find(w).toArray()).filter( + // 过滤没有结束时间 或者 有结束时间 但是没有过期的 + (pay) => pay.values?.length > 0 && (!pay.values.slice(-1)[0].eTime || pay.values.slice(-1)[0].eTime > G.time) + ); + + const prizeList = [ + { + "type": "dayjijin", + "total": 5, + "pt": [ + { + "a": "item", + "t": "23", + "n": 20000 + } + ], + "tq": [ + { + "a": "item", + "t": "4", + "n": 5 + } + ] + }, + { + "type": "dayjijin", + "total": 15, + "pt": [ + { + "a": "item", + "t": "2", + "n": 200 + } + ], + "tq": [ + { + "a": "item", + "t": "2", + "n": 2000 + } + ] + }, + { + "type": "dayjijin", + "total": 30, + "pt": [ + { + "a": "item", + "t": "23", + "n": 20000 + } + ], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 888 + } + ] + }, + { + "type": "dayjijin", + "total": 45, + "pt": [ + { + "a": "item", + "t": "2", + "n": 200 + } + ], + "tq": [ + { + "a": "item", + "t": "615", + "n": 1 + } + ] + }, + { + "type": "dayjijin", + "total": 60, + "pt": [ + { + "a": "item", + "t": "23", + "n": 20000 + } + ], + "tq": [ + { + "a": "item", + "t": "4", + "n": 5 + } + ] + }, + { + "type": "dayjijin", + "total": 75, + "pt": [ + { + "a": "item", + "t": "2", + "n": 300 + } + ], + "tq": [ + { + "a": "item", + "t": "2", + "n": 2000 + } + ] + }, + { + "type": "dayjijin", + "total": 90, + "pt": [ + { + "a": "item", + "t": "23", + "n": 20000 + } + ], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 888 + } + ] + }, + { + "type": "dayjijin", + "total": 105, + "pt": [ + { + "a": "item", + "t": "2", + "n": 300 + } + ], + "tq": [ + { + "a": "item", + "t": "615", + "n": 1 + } + ] + }, + { + "type": "dayjijin", + "total": 120, + "pt": [ + { + "a": "item", + "t": "23", + "n": 20000 + } + ], + "tq": [ + { + "a": "item", + "t": "4", + "n": 5 + } + ] + }, + { + "type": "dayjijin", + "total": 135, + "pt": [ + { + "a": "item", + "t": "2", + "n": 400 + } + ], + "tq": [ + { + "a": "item", + "t": "2", + "n": 2000 + } + ] + }, + { + "type": "dayjijin", + "total": 150, + "pt": [ + { + "a": "item", + "t": "23", + "n": 20000 + } + ], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 888 + } + ] + }, + { + "type": "dayjijin", + "total": 165, + "pt": [ + { + "a": "item", + "t": "2", + "n": 400 + } + ], + "tq": [ + { + "a": "item", + "t": "615", + "n": 1 + } + ] + }, + { + "type": "dayjijin", + "total": 180, + "pt": [ + { + "a": "item", + "t": "23", + "n": 20000 + } + ], + "tq": [ + { + "a": "item", + "t": "4", + "n": 5 + } + ] + }, + { + "type": "dayjijin", + "total": 200, + "pt": [ + { + "a": "item", + "t": "2", + "n": 500 + } + ], + "tq": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 1888 + } + ] + } + ]; + // 没激活不处理 + let _users = await G.mongodb.cEvent("dayjijin").find( + {uid: {$in: _payList.map(pay => pay.uid)}, type: "dayjijin"} + ).toArray(); + + let uid2Prize: { [uid: string]: { a: string, t: string, n: number }[] } = {}; + _users.forEach(user => { + let uid = user.uid; + let idx2Type2Bool = user.rec; + if (!uid2Prize[uid]) uid2Prize[uid] = []; + + // 没领的全发 + prizeList.forEach((con, idx) => { + // 普通奖励没领 + if (!idx2Type2Bool[idx]?.pt) { + uid2Prize[uid].push(...con.pt) + } + // 高级奖励没领 + if (!idx2Type2Bool[idx]?.tq) { + uid2Prize[uid].push(...con.tq) + } + }); + }) + + let title = "特别通行证优化"; + let content = "这是您的补偿,请查收!"; + let lngTitle = { + "ja": "特別通行証仕様改善", + "zh-TW": "特別通行證改善", + "ko": "특별 통행증 시스템 개선", + "en": "Special Permit optimization", + }; + let lngContent = { + "en": "Please find attached a few items as a compensation for the wait during our adjustments.", + "ja": "仕様改善に伴う補填を発送させていただきました。ご確認ください。", + "ko": "투자 시스템 개선으로 인한 보상을 보내드립니다.", + "zh-TW": "這是您的補償內容,煩請查收!" + }; + for (const [uid, sendPrize] of Object.entries(uid2Prize)) { + // 发放邮件 + await addEmail({ + uid: uid, + type: "system", + title: title, + content: content, + prize: sendPrize, + lngTitle: lngTitle, + lngContent: lngContent, + }); + await G.mongodb.collection("payLogNew").updateMany( + Object.assign({uid: uid}, w), {$set: {patch: 1, del_time: G.time}} + ) + // 基金数据清除 + await G.mongodb.collection("event").updateMany( + {type: "dayjijin", uid: uid}, {"$set": {uid: `${uid}_patch_del`}} + ); + + console.log(`玩家${uid}通行证基金奖补发完成...`); + } +} + +/** + * 标题:特价基金优化 + * ja:特価投資仕様改善 + * zh-TW:特價基金改善 + * ko:특가 투자 시스템 개선 + * en: Value Investment optimization + + * 內文:这是您的补偿,请查收! + * ja:仕様改善に伴う補填を発送させていただきました。ご確認ください。 + * zh-TW:這是您的補償內容,煩請查收! + * ko:투자 시스템 개선으로 인한 보상을 보내드립니다. + * en: Please find attached a few items as a compensation for the wait during our adjustments. + + * 线上玩家脚本 + * 1、已购买特价基金128的玩家且未领取完成的玩家,剩余奖励邮件一次性补发; + * 2、未购买的玩家活动刷新到新版本; + * 3、刷新月基金到未购买状态; + * */ +async function yue128JiJinReSet() { + let w = {key: "128jijin"}; + // 激活了的玩家 + let _payList = (await G.mongodb.collection("payLogNew").find(w).toArray()).filter( + // 过滤没有结束时间 或者 有结束时间 但是没有过期的 + (pay) => pay.values?.length > 0 && (!pay.values.slice(-1)[0].eTime || pay.values.slice(-1)[0].eTime > G.time) + ); + + // 没激活不处理 + let _users = await G.mongodb.cEvent(`${128}jijin`).find( + { + "uid": {"$in": _payList.map(pay => pay.uid)}, + "type": `${128}jijin` + } + ).toArray(); + + const prizeList = [ + {a: 'item', t: '4', n: 10}, + {a: 'attr', t: 'rmbmoney', n: 300}, + {a: 'attr', t: 'rmbmoney', n: 300}, + {a: 'item', t: '9', n: 2000}, + {a: 'attr', t: 'rmbmoney', n: 300}, + {a: 'attr', t: 'rmbmoney', n: 300}, + {a: 'item', t: '609', n: 1}, + {a: 'item', t: '4', n: 10}, + {a: 'attr', t: 'rmbmoney', n: 500}, + {a: 'attr', t: 'rmbmoney', n: 300}, + {a: 'item', t: '18', n: 300}, + {a: 'attr', t: 'rmbmoney', n: 300}, + {a: 'attr', t: 'rmbmoney', n: 300}, + {a: 'item', t: '6', n: 20}, + {a: 'attr', t: 'rmbmoney', n: 300}, + {a: 'attr', t: 'rmbmoney', n: 300}, + {a: 'item', t: '9', n: 3000}, + {a: 'attr', t: 'rmbmoney', n: 300}, + {a: 'attr', t: 'rmbmoney', n: 300}, + {a: 'item', t: '4', n: 10}, + {a: 'attr', t: 'rmbmoney', n: 500}, + {a: 'attr', t: 'rmbmoney', n: 300}, + {a: 'item', t: '20', n: 200}, + {a: 'attr', t: 'rmbmoney', n: 300}, + {a: 'attr', t: 'rmbmoney', n: 300}, + {a: 'item', t: '9', n: 3000}, + {a: 'attr', t: 'rmbmoney', n: 300}, + {a: 'attr', t: 'rmbmoney', n: 300}, + {a: 'attr', t: 'rmbmoney', n: 1000}, + {a: 'item', t: '628', n: 1}, + ]; + let uid2Prize: { [uid: string]: { a: string, t: string, n: number }[] } = {}; + + _users.forEach(user => { + let uid = user.uid; + let gotarr = user.rec || []; + if (!uid2Prize[uid]) uid2Prize[uid] = []; + + // 没领的全发 + prizeList.forEach((onePrize, idx) => { + // 领过了 + if (gotarr.includes(idx)) { + return + } + uid2Prize[uid].push(onePrize) + }); + }) + + let title = "特价基金优化"; + let content = "这是您的补偿,请查收!"; + let lngTitle = { + "ja": "特価投資仕様改善", + "zh-TW": "特價基金改善", + "ko": "특가 투자 시스템 개선", + "en": "Value Investment optimization", + }; + let lngContent = { + "en": "Please find attached a few items as a compensation for the wait during our adjustments.", + "ja": "仕様改善に伴う補填を発送させていただきました。ご確認ください。", + "ko": "투자 시스템 개선으로 인한 보상을 보내드립니다.", + "zh-TW": "這是您的補償內容,煩請查收!" + }; + for (const [uid, sendPrize] of Object.entries(uid2Prize)) { + // 发放邮件 + await addEmail({ + uid: uid, + type: "system", + title: title, + content: content, + prize: sendPrize, + lngTitle: lngTitle, + lngContent: lngContent, + }); + + await G.mongodb.collection("payLogNew").updateMany( + Object.assign({uid: uid}, w), {$set: {patch: 1, del_time: G.time}} + ) + // 基金数据清除 + await G.mongodb.cEvent(`${128}jijin`).updateMany( + {uid: uid, type: `${128}jijin`}, {"$set": {uid: `${uid}_patch_del`}} + ); + + console.log(`玩家${uid}月度128基金奖补发完成...`); + } +} + +/** + * 标题:特别基金优化 + * ja:特別投資仕様改善 + * zh-TW:特別基金改善 + * ko:특별 투자 시스템 개선 + * en: Special Investment optimization + + * 內文:这是您的补偿,请查收! + * ja:仕様改善に伴う補填を発送させていただきました。ご確認ください。 + * zh-TW:這是您的補償內容,煩請查收! + * ko:투자 시스템 개선으로 인한 보상을 보내드립니다. + * en: Please find attached a few items as a compensation for the wait during our adjustments. + + * 线上玩家脚本 + * 1、已购买特别基金328的玩家且未领取完成的玩家,剩余奖励邮件一次性补发; + * 2、未购买的玩家活动刷新到新版本; + * 3、刷新月基金到未购买状态; + * */ +async function yue328JiJinReSet() { + let w = {key: "328jijin"}; + // 激活了的玩家 + let _payList = (await G.mongodb.collection("payLogNew").find(w).toArray()).filter( + // 过滤没有结束时间 或者 有结束时间 但是没有过期的 + (pay) => pay.values?.length > 0 && (!pay.values.slice(-1)[0].eTime || pay.values.slice(-1)[0].eTime > G.time) + ); + + // 没激活不处理 + let _users = await G.mongodb.cEvent(`${328}jijin`).find( + { + "uid": {"$in": _payList.map(pay => pay.uid)}, "type": `${328}jijin` + } + ).toArray(); + + const prizeList = [ + {a: 'item', t: '4', n: 30}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'item', t: '10', n: 300}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'item', t: '628', n: 1}, + {a: 'item', t: '4', n: 20}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'item', t: '628', n: 1}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'item', t: '628', n: 1}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'item', t: '628', n: 1}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'item', t: '4', n: 20}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'item', t: '10', n: 400}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'item', t: '10', n: 400}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'attr', t: 'rmbmoney', n: 800}, + {a: 'attr', t: 'rmbmoney', n: 1500}, + {a: 'item', t: '617', n: 1}, + ]; + let uid2Prize: { [uid: string]: { a: string, t: string, n: number }[] } = {}; + + _users.forEach(user => { + let uid = user.uid; + let gotarr = user.rec || []; + if (!uid2Prize[uid]) uid2Prize[uid] = []; + + // 没领的全发 + prizeList.forEach((onePrize, idx) => { + // 领过了 + if (gotarr.includes(idx)) { + return + } + uid2Prize[uid].push(onePrize) + }); + }) + + let title = "特别基金优化"; + let content = "这是您的补偿,请查收!"; + let lngTitle = { + "ja": "特別投資仕様改善", + "zh-TW": "特別基金改善", + "ko": "특별 투자 시스템 개선", + "en": "Special Investment optimization", + }; + let lngContent = { + "en": "Please find attached a few items as a compensation for the wait during our adjustments.", + "ja": "仕様改善に伴う補填を発送させていただきました。ご確認ください。", + "ko": "투자 시스템 개선으로 인한 보상을 보내드립니다.", + "zh-TW": "這是您的補償內容,煩請查收!" + }; + for (const [uid, sendPrize] of Object.entries(uid2Prize)) { + // 发放邮件 + await addEmail({ + uid: uid, + type: "system", + title: title, + content: content, + prize: sendPrize, + lngTitle: lngTitle, + lngContent: lngContent, + }); + + await G.mongodb.collection("payLogNew").updateMany( + Object.assign({uid: uid}, w), {$set: {patch: 1, del_time: G.time}} + ) + // 基金数据清除 + await G.mongodb.cEvent(`${328}jijin`).updateMany( + {uid: uid, type: `${328}jijin`}, {"$set": {uid: `${uid}_patch_del`}} + ); + + console.log(`玩家${uid}月度128基金奖补发完成...`); + } +} + +async function start() { + await initMongoDB(); + + await shouChongReSet(); + await zhizunyueka(); + await chaozhiyueka(); + await zhongshenka(); + + await qingbaotequan(); + await zuozhantequan(); + await caifutequan(); + await jiubatequan(); + + await resetVipLiBao(); + + await rcjhReSet(); + + await dengjiJiJinReSet(); + await guanqiaJiJinReSet(); + + await dayjiJiJinReSet(); + + await yue128JiJinReSet(); + await yue328JiJinReSet(); +} + +ctor(); +start().then(() => { + setInterval(() => { + console.log(new Date().format("MM-dd hh:mm:ss")); + }, 1000) + console.log("逻辑执行完成...等待退出!!!"); +}); + + diff --git a/src/fix_patch/patch_20231220.ts b/src/fix_patch/patch_20231220.ts new file mode 100644 index 0000000..7f1681b --- /dev/null +++ b/src/fix_patch/patch_20231220.ts @@ -0,0 +1,43 @@ +import {ctor} from "../global"; +import {initMongoDB} from "../setMongodb"; + +async function start() { + await initMongoDB() + + let datas = await G.mongodb.collection("event").find( + {type: {$in: ["yangchengmubiao100", "yangchengmubiao101"]}} + ).toArray(); + + for (let i = 0; i < datas.length; i++) { + let add = 0; + let data = datas[i]; + if (!Array.isArray(data.taskval)) continue; + let taskval: { [taskid: string]: number } = {}; + for (let i = 0; i < data.taskval.length; i++) { + if (data.taskval[i] === null) continue; + + if (typeof data.taskval[i] == "number") { + add = data.taskval[i]; + } else { + taskval = Object.assign(taskval, data.taskval[i]); + } + } + for (let taskid in taskval) { + taskval[taskid] = (taskval[taskid] || 0) + add; + } + await G.mongodb.collection("event").updateOne( + {uid: data.uid, type: data.type}, {$set: {taskval: taskval}} + ) + console.log(`修复玩家${data.uid}人才计划数据完成...`); + } +} + +ctor(); +start().then(() => { + setInterval(() => { + console.log(new Date().format("MM-dd hh:mm:ss")); + }, 1000) + console.log("逻辑执行完成...等待退出!!!"); +}); + + diff --git a/src/path_20231221.ts b/src/fix_patch/patch_20231221.ts similarity index 95% rename from src/path_20231221.ts rename to src/fix_patch/patch_20231221.ts index 11098b7..8028e1f 100644 --- a/src/path_20231221.ts +++ b/src/fix_patch/patch_20231221.ts @@ -1,6 +1,6 @@ -import {ctor} from "./global"; -import {initMongoDB} from "./setMongodb"; -import {yangchengmubiao} from "./shared/protocols/event/yangchengmubiao/PtlOpen"; +import {ctor} from "../global"; +import {initMongoDB} from "../setMongodb"; +import {yangchengmubiao} from "../shared/protocols/event/yangchengmubiao/PtlOpen"; async function start() { await initMongoDB() diff --git a/src/fix_patch/patch_20231221_1.ts b/src/fix_patch/patch_20231221_1.ts new file mode 100644 index 0000000..1f31185 --- /dev/null +++ b/src/fix_patch/patch_20231221_1.ts @@ -0,0 +1,126 @@ +import {ctor} from "../global"; +import {initMongoDB} from "../setMongodb"; +import {yangchengmubiao} from "../shared/protocols/event/yangchengmubiao/PtlOpen"; +import {number} from "mathjs"; +import {PublicShared} from "../shared/public/public"; + +async function start() { + await initMongoDB() + + const task = { + '2001': { + 'prize': [{'a': 'item', 't': '4', 'n': 5}, {'a': 'item', 't': '626', 'n': 10}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 50, + 'cond': [], + 'stype': 118 + }, + '2002': { + 'prize': [{'a': 'item', 't': '4', 'n': 5}, {'a': 'item', 't': '626', 'n': 10}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 100, + 'cond': [], + 'stype': 118 + }, + '2003': { + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '626', 'n': 20}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 200, + 'cond': [], + 'stype': 118 + }, + '2004': { + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '600', 'n': 20}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 250, + 'cond': [], + 'stype': 118 + }, + '2005': { + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '600', 'n': 20}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 300, + 'cond': [], + 'stype': 118 + }, + '2006': { + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '619', 'n': 1}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 400, + 'cond': [], + 'stype': 118 + }, + '2007': { + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '619', 'n': 1}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 500, + 'cond': [], + 'stype': 118 + } + }; + let hdid = [100, 101]; + let openday = PublicShared.getOpenServerDay(); + let openhdlist = await G.mongodb.collection("hdinfo").find( + {hdid: {$in: hdid}, stime: {$lte: openday}, etime: {$gte: openday}} + ).toArray(); + + // 没有开启的活动 返回 + if (openhdlist.length <= 0) { + return; + } else { + hdid = openhdlist.map(hd => hd.hdid); + } + + let datas: yangchengmubiao[]; + datas = await G.mongodb.cEvent(`yangchengmubiao${hdid[0]}`).find( + {type: `yangchengmubiao${hdid[0]}`} + ).toArray(); + + for (let i = 0; i < datas.length; i++) { + let data = datas[i]; + let finishid = new Set(data.finishid["2"]); + // 查找任务未完成 但设置了领奖标识 + for (let taskid in task) { + let con = task[taskid]; + let taskval = data.taskval || {}; + if (finishid.has(number(taskid)) && (taskval[taskid] || 0) < con.pval) { + finishid.delete(number(taskid)); + } + } + // 没有删除的 + if (finishid.size == data.finishid["2"].length) { + continue + } + await G.mongodb.collection("event").updateOne( + {"uid": data.uid, "type": data.type}, {$set: {"finishid.2": [...finishid]}} + ) + console.log(`修复玩家${data.uid}人才计划${data.type}数据完成...`); + } +} + +ctor(); +start().then(() => { + let s = 0; + setInterval(() => { + s += 1; + console.log(new Date().format("MM-dd hh:mm:ss")); + if (s >= 3) process.exit(1); + }, 1000) + console.log("逻辑执行完成...等待退出!!!"); +}); + + diff --git a/src/fix_patch/patch_20231222.ts b/src/fix_patch/patch_20231222.ts new file mode 100644 index 0000000..1aba776 --- /dev/null +++ b/src/fix_patch/patch_20231222.ts @@ -0,0 +1,98 @@ +import {ctor} from "../global"; +import {_mongodb} from "../setMongodb"; +import {MongoClient} from "mongodb"; + +async function initMongoDB() { + console.log('connect mongodb ......'); + let client = await MongoClient.connect(G.config.mongodbUrl); + G.mongodb = new _mongodb(client.db(G.config.dbName || '')); + console.log('connect mongodb succ'); +} + +async function start() { + await initMongoDB() + + const task = { + '2001': { + 'prize': [{'a': 'item', 't': '4', 'n': 5}, {'a': 'item', 't': '626', 'n': 10}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 50, + 'cond': [], + 'stype': 118 + }, + '2002': { + 'prize': [{'a': 'item', 't': '4', 'n': 5}, {'a': 'item', 't': '626', 'n': 10}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 100, + 'cond': [], + 'stype': 118 + }, + '2003': { + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '626', 'n': 20}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 200, + 'cond': [], + 'stype': 118 + }, + '2004': { + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '600', 'n': 20}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 250, + 'cond': [], + 'stype': 118 + }, + '2005': { + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '600', 'n': 20}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 300, + 'cond': [], + 'stype': 118 + }, + '2006': { + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '619', 'n': 1}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 400, + 'cond': [], + 'stype': 118 + }, + '2007': { + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '619', 'n': 1}], + 'tujing': '', + 'title': 'intr_yczm_day_des_2', + 'type': 2, + 'pval': 500, + 'cond': [], + 'stype': 118 + } + }; + let hdid = [100, 101]; + await G.mongodb.collection("hdinfo").updateMany( + {hdid: {$in: hdid}}, {$set: {"data.tasklist.2": task}} + ) + console.log(`修复区服${G.config.serverId}人才计划活动数据完成...`); +} + +ctor(); +start().then(() => { + let s = 0; + setInterval(() => { + s += 1; + console.log(new Date().format("MM-dd hh:mm:ss")); + if (s >= 3) process.exit(1); + }, 1000) + console.log("逻辑执行完成...等待退出!!!"); +}); + + diff --git a/src/fix_patch/patch_email_find.ts b/src/fix_patch/patch_email_find.ts new file mode 100644 index 0000000..900687a --- /dev/null +++ b/src/fix_patch/patch_email_find.ts @@ -0,0 +1,22 @@ +import {initMongoDB} from "../setMongodb"; +import {ctor} from "../global"; + +async function start() { + await initMongoDB(); + + let emails = await G.mongodb.collection("email").find({ + title: {$regex: "wzry"} + }).toArray(); + + for (let i = 0; i < emails.length; i++) { + console.log(); + } +} + +ctor(); +start().then(() => { + setInterval(() => { + console.log(new Date().format("MM-dd hh:mm:ss")); + }, 1000) + console.log("逻辑执行完成...等待退出!!!"); +}); diff --git a/src/patch_fix_all_user_hero_shiwu.ts b/src/fix_patch/patch_fix_all_user_hero_shiwu.ts similarity index 96% rename from src/patch_fix_all_user_hero_shiwu.ts rename to src/fix_patch/patch_fix_all_user_hero_shiwu.ts index 31c8032..6bcea4d 100644 --- a/src/patch_fix_all_user_hero_shiwu.ts +++ b/src/fix_patch/patch_fix_all_user_hero_shiwu.ts @@ -1,5 +1,5 @@ -import {ctor} from './global'; -import {initMongoDB} from './setMongodb'; +import {ctor} from '../global'; +import {initMongoDB} from '../setMongodb'; async function start() { //连接mongodb diff --git a/src/patch_player_model_20231221.ts b/src/fix_patch/patch_player_model_20231221.ts similarity index 90% rename from src/patch_player_model_20231221.ts rename to src/fix_patch/patch_player_model_20231221.ts index 53c60ea..063eab9 100644 --- a/src/patch_player_model_20231221.ts +++ b/src/fix_patch/patch_player_model_20231221.ts @@ -1,5 +1,5 @@ -import {ctor} from "./global"; -import {initMongoDB} from "./setMongodb"; +import {ctor} from "../global"; +import {initMongoDB} from "../setMongodb"; async function start() { await initMongoDB() diff --git a/src/fix_patch/patch_queryEmail.ts b/src/fix_patch/patch_queryEmail.ts new file mode 100644 index 0000000..1db1128 --- /dev/null +++ b/src/fix_patch/patch_queryEmail.ts @@ -0,0 +1,47 @@ +import fs from "fs"; +import {MongoClient} from "mongodb"; + + +async function start() { + let mongodbUrl = "mongodb://blacklagoon:lffu2bD%5eGn2%5eE%2bE7@blacklagoon-mongo-secondary.pro.g123-cpp.com:3717,blacklagoon-mongo-primary.pro.g123-cpp.com:3717?replicaSet=mgset-351738825" + //连接mongodb + let client = await MongoClient.connect(mongodbUrl); + + console.log('链接成功'); + + let user2email: { [uid: string]: { [title: string]: { prize: any, get_num: number, unget_num: number } } } = {}; + for (let i = 1; i < 49; i++) { + let dbName = `blacklagoon_s${i}` + console.log(dbName) + + let mongodb = client.db(dbName); + let emails = await mongodb.collection("email").find({ + title: {$regex: "wzry"} + }).toArray(); + + for (let i = 0; i < emails.length; i++) { + let email = emails[i]; + if (!email.prizeData?.prize) continue; + if (!user2email[email.uid]) { + user2email[email.uid] = {}; + } + if (!user2email[email.uid][email.title]) { + user2email[email.uid][email.title] = { + prize: email.prizeData.prize, + get_num: 0, + unget_num: 0, + } + } + if (email.prizeData.isGet) { + user2email[email.uid][email.title].get_num += 1; + } else { + user2email[email.uid][email.title].unget_num += 1; + } + } + } + fs.writeFileSync('email.json', JSON.stringify(user2email, null, 2)) +} + +start().then(() => { + process.exit() +}); diff --git a/src/path_shop_redis2db.ts b/src/fix_patch/patch_shop_redis2db.ts similarity index 84% rename from src/path_shop_redis2db.ts rename to src/fix_patch/patch_shop_redis2db.ts index ab437f2..a3736d5 100644 --- a/src/path_shop_redis2db.ts +++ b/src/fix_patch/patch_shop_redis2db.ts @@ -1,6 +1,6 @@ -import {ctor} from './global'; -import {initMongoDB} from './setMongodb'; -import {initRedis} from './setRedis'; +import {ctor} from '../global'; +import {initMongoDB} from '../setMongodb'; +import {initRedis} from '../setRedis'; async function start() { //连接mongodb diff --git a/src/gameLog.ts b/src/gameLog.ts index 7f70f2c..65e62be 100644 --- a/src/gameLog.ts +++ b/src/gameLog.ts @@ -43,4 +43,30 @@ export async function addGameLog(uid:string, type:string, req:any, data:any){ }catch(e){ console.error('addGameLog',e); } +} + +/** + * 玩家游戏内打点 + * @param uid 玩家uid + * @param type 日志类型 + * @param data 日志内容 + */ + +export async function addGameDot(uid:string, type:string, data?:any){ + try{ + if(!logDB){ + await connGameLogDB(); + } + let log = { + uid, + type, + data + } + //事件时间 + log['cTime'] = Math.floor(Date.now()/1000); + + logDB.collection('gameDot').insertOne(log); + }catch(e){ + console.error('addGameLog',e); + } } \ No newline at end of file diff --git a/src/global.ts b/src/global.ts index 625df9f..26105d1 100644 --- a/src/global.ts +++ b/src/global.ts @@ -92,6 +92,8 @@ class _G { redis: redisJsonFun; /**ioredis连接对象 */ ioredis: Redis; + /** 跨服 ioredis 连接对象 */ + iorediscross: Redis; /**mongodb连接对象 */ mongodb: _mongodb; /**crossmongodb连接对象 */ diff --git a/src/globalListener.ts b/src/globalListener.ts index fc2c85b..6a5bec8 100644 --- a/src/globalListener.ts +++ b/src/globalListener.ts @@ -17,6 +17,8 @@ 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"; export type gEventType = { /**玩家断开连接 */ @@ -200,6 +202,8 @@ export function addListener() { { $inc: { payNum: conf.money } }, { upsert: true } ); + await PushGiftFun.buy(player.uid, payId) // 推送礼包 + await LeiChongLiBaoBuyGift(call, payId) // 累充礼包 }); G.on("FIRST_LOGIN_EVERY_DAY", (gud, lastTime, curTime) => { diff --git a/src/ioredis.ts b/src/ioredis.ts index a304d58..00d7f52 100644 --- a/src/ioredis.ts +++ b/src/ioredis.ts @@ -16,4 +16,7 @@ export async function initIORedis() { G.ioredis = new Redis(G.argv.serverType == 'cross' ? G.config.crossRedisUrl : G.config.redisUrl,{ keyPrefix: preKey, }); -} \ No newline at end of file + G.iorediscross = new Redis(G.config.crossRedisUrl,{ + keyPrefix: "cross_", + }); +} diff --git a/src/json/attr.json b/src/json/attr.json index 371283d..d9f5ad4 100644 --- a/src/json/attr.json +++ b/src/json/attr.json @@ -122,11 +122,21 @@ "shengdanBullet": { "id": "shengdanBullet", "name": "intr_attr_name_14", - "undefined": "圣诞子弹", + "undefined": "圣诞打靶币", "colour": 5, "icon": "icon_chegaipq", "sicon": "icon_chegaipq", "describe": "intr_attr_describe_14", "advancedEffects": "ani_xiangzikuang" + }, + "jingxuanbi": { + "id": "jingxuanbi", + "name": "intr_attr_name_15", + "undefined": "每日精选兑换币", + "colour": 4, + "icon": "icon_hspj", + "sicon": "icon_hspj", + "describe": "intr_attr_describe_15", + "advancedEffects": "" } } \ No newline at end of file diff --git a/src/json/dixiaheishi.json5 b/src/json/dixiaheishi.json5 index 83751f3..c8c23fd 100644 --- a/src/json/dixiaheishi.json5 +++ b/src/json/dixiaheishi.json5 @@ -33,10 +33,9 @@ }, //136礼包 '136Gift': [ - { payId: '136Gift1', prize: [] }, { prize: [{"a": "attr", "t": "rmbmoney", "n": 10},{"a": "item", "t": "12", "n": 10},{"a": "attr", "t": "jinbi", "n": 10000}] }, - { payId: '136Gift2', prize: [] }, - { payId: '136Gift3', prize: [] }, - { payId: '136Gift4', prize: [] }, + { payId: '136Gift2', prize: [], bonus: [{"a": "attr", "t": "jingxuanbi", "n": 10}] }, + { payId: '136Gift3', prize: [], bonus: [{"a": "attr", "t": "jingxuanbi", "n": 10}] }, + { payId: '136Gift4', prize: [], bonus: [{"a": "attr", "t": "jingxuanbi", "n": 10}] }, ], } \ No newline at end of file diff --git a/src/json/exchangeRate.json b/src/json/exchangeRate.json index e084734..f242dcd 100644 --- a/src/json/exchangeRate.json +++ b/src/json/exchangeRate.json @@ -122,6 +122,88 @@ "ARS": 110, "MOP": 8.99 }, + "8": { + "CNY": 8, + "JPY": 160, + "USD": 1.49, + "AUD": 2.09, + "GBP": 1.09, + "CAD": 1.99, + "TWD": 40, + "EUR": 1.29, + "CHF": 1.49, + "CZK": 31, + "DKK": 9.09, + "HKD": 12, + "HUF": 470, + "NOK": 12.49, + "NZD": 2.09, + "PLN": 5.49, + "SEK": 12.99, + "SGD": 1.89, + "THB": 46.99, + "PHP": 72.99, + "MXN": 30.99, + "ILS": 4.79, + "RUB": 107.99, + "KRW": 1710, + "VND": 33600, + "IDR": 20900, + "CLP": 1150, + "MYR": 6.09, + "BRL": 7.49, + "AED": 5.49, + "BDT": 121.99, + "PEN": 5.99, + "RON": 6.09, + "SAR": 5.49, + "INR": 106.99, + "ISK": 190, + "BGN": 2.49, + "ARS": 320, + "MOP": 11.99 + }, + "10": { + "CNY": 10, + "JPY": 200, + "USD": 1.79, + "AUD": 2.69, + "GBP": 1.49, + "CAD": 2.39, + "TWD": 50, + "EUR": 1.59, + "CHF": 1.79, + "CZK": 38, + "DKK": 11.49, + "HKD": 14, + "HUF": 580, + "NOK": 15.99, + "NZD": 2.69, + "PLN": 6.99, + "SEK": 16.09, + "SGD": 2.29, + "THB": 58.99, + "PHP": 90.99, + "MXN": 38.99, + "ILS": 6.09, + "RUB": 134.99, + "KRW": 2130, + "VND": 41900, + "IDR": 26100, + "CLP": 1430, + "MYR": 7.49, + "BRL": 9.49, + "AED": 6.49, + "BDT": 152.99, + "PEN": 7.49, + "RON": 7.49, + "SAR": 6.99, + "INR": 133.99, + "ISK": 230, + "BGN": 3.09, + "ARS": 400, + "MOP": 14.99 + }, "12": { "CNY": 12, "JPY": 240, diff --git a/src/json/g123item.json b/src/json/g123item.json index 4716111..0a5e360 100644 --- a/src/json/g123item.json +++ b/src/json/g123item.json @@ -2582,6 +2582,90 @@ "rarity": 4 } }, + "item^634": { + "itemId": "item^634", + "name": "紫橙干部碎片随机箱", + "i18nKey": "intr_item_name_634", + "detailI18nKey": "intr_item_describe_634", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 5 + } + }, + "item^635": { + "itemId": "item^635", + "name": "紫橙装备碎片随机箱", + "i18nKey": "intr_item_name_635", + "detailI18nKey": "intr_item_describe_635", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 120, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 5 + } + }, + "item^636": { + "itemId": "item^636", + "name": "紫橙红干部碎片随机箱", + "i18nKey": "intr_item_name_636", + "detailI18nKey": "intr_item_describe_636", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 244, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 5 + } + }, + "item^637": { + "itemId": "item^637", + "name": "超级红色干部自选箱", + "i18nKey": "intr_item_name_637", + "detailI18nKey": "intr_item_describe_637", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 30000, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 6 + } + }, "item^5001": { "itemId": "item^5001", "name": "莱薇碎片", @@ -6845,6 +6929,489 @@ "rarity": 2 } }, + "item^50001": { + "itemId": "item^50001", + "name": "火力覆盖", + "i18nKey": "playerheadFrame_name_3", + "detailI18nKey": "intr_item_describe_50001", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50002": { + "itemId": "item^50002", + "name": "双枪", + "i18nKey": "playerheadFrame_name_4", + "detailI18nKey": "intr_item_describe_50002", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50003": { + "itemId": "item^50003", + "name": "武装炫耀", + "i18nKey": "playerheadFrame_name_6", + "detailI18nKey": "intr_item_describe_50003", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50004": { + "itemId": "item^50004", + "name": "血海", + "i18nKey": "playerheadFrame_name_7", + "detailI18nKey": "intr_item_describe_50004", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50005": { + "itemId": "item^50005", + "name": "破笼而出", + "i18nKey": "playerheadFrame_name_8", + "detailI18nKey": "intr_item_describe_50005", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50006": { + "itemId": "item^50006", + "name": "擂台", + "i18nKey": "playerheadFrame_name_9", + "detailI18nKey": "intr_item_describe_50006", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50007": { + "itemId": "item^50007", + "name": "破土而出", + "i18nKey": "playerheadFrame_name_10", + "detailI18nKey": "intr_item_describe_50007", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50008": { + "itemId": "item^50008", + "name": "赠礼", + "i18nKey": "playerheadFrame_name_11", + "detailI18nKey": "intr_item_describe_50008", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50009": { + "itemId": "item^50009", + "name": "圣诞氛围", + "i18nKey": "playerheadFrame_name_23", + "detailI18nKey": "intr_item_describe_50009", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50010": { + "itemId": "item^50010", + "name": "披星戴月", + "i18nKey": "playerheadFrame_name_24", + "detailI18nKey": "intr_item_describe_50010", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50101": { + "itemId": "item^50101", + "name": "冰天雪地", + "i18nKey": "playerChatFrame_name_6", + "detailI18nKey": "intr_item_describe_50101", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50102": { + "itemId": "item^50102", + "name": "海浪奔涌", + "i18nKey": "playerChatFrame_name_7", + "detailI18nKey": "intr_item_describe_50102", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50103": { + "itemId": "item^50103", + "name": "名扬四海", + "i18nKey": "playerheadFrame_name_15", + "detailI18nKey": "intr_item_describe_50103", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50104": { + "itemId": "item^50104", + "name": "圣诞快乐", + "i18nKey": "playerChatFrame_name_8", + "detailI18nKey": "intr_item_describe_50104", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50201": { + "itemId": "item^50201", + "name": "招贤纳士", + "i18nKey": "playerheadFrame_name_16", + "detailI18nKey": "intr_item_describe_50201", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50202": { + "itemId": "item^50202", + "name": "势如破竹", + "i18nKey": "playerheadFrame_name_17", + "detailI18nKey": "intr_item_describe_50202", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50203": { + "itemId": "item^50203", + "name": "被甲执兵", + "i18nKey": "playerheadFrame_name_18", + "detailI18nKey": "intr_item_describe_50203", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50204": { + "itemId": "item^50204", + "name": "锋芒毕露", + "i18nKey": "playerheadFrame_name_19", + "detailI18nKey": "intr_item_describe_50204", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50205": { + "itemId": "item^50205", + "name": "所向披靡", + "i18nKey": "playerheadFrame_name_20", + "detailI18nKey": "intr_item_describe_50205", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50206": { + "itemId": "item^50206", + "name": "传世藏品", + "i18nKey": "playerheadFrame_name_21", + "detailI18nKey": "intr_item_describe_50206", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50207": { + "itemId": "item^50207", + "name": "金戈铁马", + "i18nKey": "playerheadFrame_name_22", + "detailI18nKey": "intr_item_describe_50207", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "item^50301": { + "itemId": "item^50301", + "name": "圣诞庆典:男", + "i18nKey": "playerModel_name_3", + "detailI18nKey": "intr_item_describe_50301", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 5 + } + }, + "item^50302": { + "itemId": "item^50302", + "name": "圣诞庆典:女", + "i18nKey": "playerModel_name_4", + "detailI18nKey": "intr_item_describe_50302", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "item", + "typeName": "道具", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 5 + } + }, "equip^1001": { "itemId": "equip^1001", "name": "棉布头盔", @@ -10015,5 +10582,152 @@ "sellMaxCp": 500, "rarity": 3 } + }, + "attr^nexp": { + "itemId": "attr^nexp", + "name": "主角经验", + "i18nKey": "intr_attr_name_3", + "detailI18nKey": "intr_attr_describe_3", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "attr", + "typeName": "货币", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "attr^rongyu": { + "itemId": "attr^rongyu", + "name": "荣誉勋章", + "i18nKey": "intr_attr_name_4", + "detailI18nKey": "intr_attr_describe_4", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "attr", + "typeName": "货币", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } + }, + "attr^payExp": { + "itemId": "attr^payExp", + "name": "VIP经验", + "i18nKey": "intr_attr_name_5", + "detailI18nKey": "intr_attr_describe_5", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "attr", + "typeName": "货币", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 5 + } + }, + "attr^guijinshu": { + "itemId": "attr^guijinshu", + "name": "贵金属", + "i18nKey": "intr_attr_name_6", + "detailI18nKey": "intr_attr_describe_6", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "attr", + "typeName": "货币", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 3 + } + }, + "attr^shengdanExp": { + "itemId": "attr^shengdanExp", + "name": "圣诞战令经验", + "i18nKey": "intr_attr_name_13", + "detailI18nKey": "intr_attr_describe_13", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "attr", + "typeName": "货币", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 5 + } + }, + "attr^shengdanBullet": { + "itemId": "attr^shengdanBullet", + "name": "圣诞打靶币", + "i18nKey": "intr_attr_name_14", + "detailI18nKey": "intr_attr_describe_14", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "attr", + "typeName": "货币", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 5 + } + }, + "attr^jingxuanbi": { + "itemId": "attr^jingxuanbi", + "name": "每日精选兑换币", + "i18nKey": "intr_attr_name_15", + "detailI18nKey": "intr_attr_describe_15", + "iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png", + "value": 0, + "typeId": "attr", + "typeName": "货币", + "isStoreSupported": true, + "isAiSupported": true, + "attributes": { + "storeDisplayPrice": null, + "storeCategory": "", + "setQuantity": 1, + "purchaseLimit": 0, + "sellMinCp": 100, + "sellMaxCp": 500, + "rarity": 4 + } } } \ No newline at end of file diff --git a/src/json/huodong.json5 b/src/json/huodong.json5 index e66b88a..5caa64d 100644 --- a/src/json/huodong.json5 +++ b/src/json/huodong.json5 @@ -3978,7 +3978,7 @@ "hdid" : 11000, // 唯一活动id 消费竞赛 "htype" : 11, // 后端唯一识别标识 "stype" : 1100, // 前端唯一识别标识(看前端需要是否修改) - "ttype" : 0, // 0 按照开服时间计算,1 玩家注册时间计算 4 屏蔽此活动 + "ttype" : 4, // 0 按照开服时间计算,1 玩家注册时间计算 4 屏蔽此活动 "stime" : 0, // 活动开始天数 "rtime" : 30, // 活动显示结束天数 "etime" : 30, // 活动实际结束 @@ -3988,27 +3988,31 @@ "data" : { //活动文本描述 intr: "xfjstips_1", - intr: "xfjstips_2", - //排名 + intr2: "xfjstips_2", + //奖励邮件标题 + mailTitle: "intr_xfjs_mailTitle", + //奖励邮件内容 + mailDes: "intr_xfjs_mailDes", + //排名 rank: [ { id: '1', name: 'xfjstips_3', - rank:[1], + rank:[1,1], need: [{'a': 'attr', 't': 'rmbmoney', 'n': 20000}], prize: [{'a': 'item', 't': '13', 'n': 600}] }, { id: '2', name: 'xfjstips_4', - rank:[2], + rank:[2,2], need: [{'a': 'attr', 't': 'rmbmoney', 'n': 18000}], prize: [{'a': 'item', 't': '13', 'n': 600}] }, { id: '3', name: 'xfjstips_5', - rank:[3], + rank:[3,3], need: [{'a': 'attr', 't': 'rmbmoney', 'n': 16000}], prize: [{'a': 'item', 't': '13', 'n': 600}] }, @@ -4025,6 +4029,13 @@ rank:[11,30], need: [{'a': 'attr', 't': 'rmbmoney', 'n': 12000}], prize: [{'a': 'item', 't': '13', 'n': 600}] + }, + { + id: '6', + name: 'xfjstips_8', + rank:[31,9999], + need: [{'a': 'attr', 't': 'rmbmoney', 'n': 12000}], + prize: [{'a': 'item', 't': '13', 'n': 600}] } ] } @@ -4033,7 +4044,7 @@ "hdid" : 12000, // 唯一活动id 累计购买礼包 "htype" : 12, // 后端唯一识别标识 "stype" : 1200, // 前端唯一识别标识(看前端需要是否修改) - "ttype" : 0, // 0 按照开服时间计算,1 玩家注册时间计算 4 屏蔽此活动 + "ttype" : 4, // 0 按照开服时间计算,1 玩家注册时间计算 4 屏蔽此活动 "stime" : 0, // 活动开始天数 "rtime" : 30, // 活动显示结束天数 "etime" : 30, // 活动实际结束 @@ -4041,17 +4052,14 @@ "icon": "icon_ljlibao", "showtime" : "仅供参考,会复写正确值", // 自选礼包,如果存在多个活动,计费点不要设置一样;如果是一样,可能会存在付费一次,购买多次。 "data" : { - //活动文本描述 - intr: "ljlibaotips_1", - intr: "ljlibaotips_2", //礼包 gift: [ { id: '1', - name: 'ljlibaotips_3', - need:[], + need:[], free: false, payId: 'ljlibao_1', + //返利比 scale: 200, buynum: 1, prize:[ @@ -4064,7 +4072,6 @@ }, { id: '2', - name: 'ljlibaotips_4', need:[], free: false, payId: 'ljlibao_2', @@ -4080,7 +4087,6 @@ }, { id: '3', - name: 'ljlibaotips_5', need:[], free: false, payId: 'ljlibao_3', @@ -4096,7 +4102,6 @@ }, { id: '4', - name: 'ljlibaotips_6', need:[], free: false, payId: 'ljlibao_4', @@ -4117,7 +4122,6 @@ }, { id: '5', - name: 'ljlibaotips_7', need:[], free: false, payId: 'ljlibao_5', @@ -4138,7 +4142,6 @@ }, { id: '6', - name: 'ljlibaotips_8', need:[], free: false, payId: 'ljlibao_6', @@ -4159,7 +4162,6 @@ }, { id: '7', - name: 'ljlibaotips_9', need:[], free: false, payId: 'ljlibao_7', @@ -4179,7 +4181,11 @@ ] }, ], + //买X次可以领大奖 + payRewardNum: 5, //自选框掉落池 + //配几组就显示有几个格子 + //配置的是可选的道具 dlz: [ { "1": {"a": "item", "t":"600", "n": 20}, @@ -4224,5 +4230,58 @@ } ] } + }, + { + "hdid" : 13000, // 唯一活动id 充值分红包 + "htype" : 13, // 后端唯一识别标识 + "stype" : 1300, // 前端唯一识别标识(看前端需要是否修改) + "ttype" : 4, // 0 按照开服时间计算,1 玩家注册时间计算 4 屏蔽此活动 + "stime" : 0, // 活动开始天数 + "rtime" : 30, // 活动显示结束天数 + "etime" : 30, // 活动实际结束 + "name": "fenhongbao", + "icon": "icon_fenhongbao", + "showtime" : "仅供参考,会复写正确值", // 自选礼包,如果存在多个活动,计费点不要设置一样;如果是一样,可能会存在付费一次,购买多次。 + "data" : { + //活动文本描述 + intr: "zuanshihongbao_5", + //分红包所需最低钻石数 + price: 1000, + reset: 0, + //奖池总数量 + totalmoney: 100000, + groupConf: { + //档位 + base: { + loglimit:2000, + arr:[ + { + //权重 + "weight": 50, + //获得范围 + "numrange": [1000,1500] + }, + { + //权重 + "weight": 30, + //获得范围 + "numrange": [1500,2000] + }, + { + //权重 + "weight": 15, + //获得范围 + "numrange": [2000,3000] + }, + { + //权重 + "weight": 5, + //获得范围 + "numrange": [3000,8000] + } + ] + } + } + } } ] \ No newline at end of file diff --git a/src/json/openCond.json b/src/json/openCond.json index ef4f726..06d9d8c 100644 --- a/src/json/openCond.json +++ b/src/json/openCond.json @@ -1365,5 +1365,18 @@ "display": { "lv": 15 } + }, + "leigoulibao": { + "name": "leigoulibao", + "undefined": "累购礼包", + "and": { + "lv": 15 + }, + "or": {}, + "time": 0, + "tips": "openCond_tips_96", + "display": { + "lv": 15 + } } } \ No newline at end of file diff --git a/src/json/pay.json b/src/json/pay.json index c40b1d1..367e17d 100644 --- a/src/json/pay.json +++ b/src/json/pay.json @@ -933,7 +933,7 @@ }, { "a": "hero", - "t": "4006", + "t": "4013", "n": 1 }, { @@ -975,7 +975,7 @@ { "a": "item", "t": "4", - "n": 100 + "n": 10 } ], "firstPayPrize": [], @@ -2522,32 +2522,6 @@ "fanLiBi": 200, "currency": "CNY" }, - "136Gift1": { - "id": "136Gift1", - "money": 60, - "payExp": [ - { - "a": "attr", - "t": "payExp", - "n": 600 - } - ], - "prize": [ - { - "a": "item", - "t": "14", - "n": 50 - } - ], - "firstPayPrize": [], - "name": "pay_name_136Gift2", - "undefined": "136礼包打包购买", - "time": 604800, - "buys": 0, - "needVip": 0, - "front": {}, - "currency": "CNY" - }, "136Gift2": { "id": "136Gift2", "money": 1, @@ -2568,6 +2542,11 @@ "a": "item", "t": "12", "n": 100 + }, + { + "a": "attr", + "t": "jingxuanbi", + "n": 1 } ], "firstPayPrize": [], @@ -2581,42 +2560,6 @@ }, "136Gift3": { "id": "136Gift3", - "money": 3, - "payExp": [ - { - "a": "attr", - "t": "payExp", - "n": 30 - } - ], - "prize": [ - { - "a": "attr", - "t": "rmbmoney", - "n": 60 - }, - { - "a": "item", - "t": "12", - "n": 100 - }, - { - "a": "item", - "t": "600", - "n": 1 - } - ], - "firstPayPrize": [], - "name": "pay_name_136Gift4", - "undefined": "3元礼包", - "time": 86400, - "buys": 0, - "needVip": 0, - "front": {}, - "currency": "CNY" - }, - "136Gift4": { - "id": "136Gift4", "money": 6, "payExp": [ { @@ -2640,6 +2583,52 @@ "a": "item", "t": "600", "n": 2 + }, + { + "a": "attr", + "t": "jingxuanbi", + "n": 3 + } + ], + "firstPayPrize": [], + "name": "pay_name_136Gift4", + "undefined": "3元礼包", + "time": 86400, + "buys": 0, + "needVip": 0, + "front": {}, + "currency": "CNY" + }, + "136Gift4": { + "id": "136Gift4", + "money": 12, + "payExp": [ + { + "a": "attr", + "t": "payExp", + "n": 120 + } + ], + "prize": [ + { + "a": "attr", + "t": "rmbmoney", + "n": 240 + }, + { + "a": "item", + "t": "12", + "n": 500 + }, + { + "a": "item", + "t": "600", + "n": 3 + }, + { + "a": "attr", + "t": "jingxuanbi", + "n": 8 } ], "firstPayPrize": [], @@ -2653,12 +2642,12 @@ }, "136GiftAll": { "id": "136GiftAll", - "money": 60, + "money": 18, "payExp": [ { "a": "attr", "t": "payExp", - "n": 600 + "n": 180 } ], "prize": [], @@ -2669,6 +2658,7 @@ "buys": 0, "needVip": 0, "front": {}, + "fanLiBi": 950, "currency": "CNY" }, "xianshizhaomu_gift_1": { @@ -4119,7 +4109,7 @@ "name": "pay_name_djlb_2", "undefined": "枪油补充包", "time": 86400, - "buys": 0, + "buys": 3, "needVip": 0, "front": {}, "currency": "CNY" @@ -4145,7 +4135,7 @@ "name": "pay_name_djlb_1", "undefined": "能量饮料补充包", "time": 86400, - "buys": 0, + "buys": 2, "needVip": 0, "front": {}, "currency": "CNY" @@ -4171,7 +4161,7 @@ "name": "pay_name_djlb_12", "undefined": "弹壳补充包", "time": 86400, - "buys": 0, + "buys": 3, "needVip": 0, "front": {}, "currency": "CNY" @@ -4197,7 +4187,7 @@ "name": "pay_name_djlb_18", "undefined": "装备蓝图补充包", "time": 86400, - "buys": 0, + "buys": 3, "needVip": 0, "front": {}, "currency": "CNY" @@ -4217,7 +4207,7 @@ "name": "pay_name_mingwang_2", "undefined": "名望礼包_68元", "time": 86400, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -4237,7 +4227,7 @@ "name": "pay_name_mingwang_3", "undefined": "名望礼包_648元", "time": 86400, - "buys": 0, + "buys": 2, "needVip": 0, "front": {}, "currency": "CNY" @@ -4257,7 +4247,7 @@ "name": "pay_name_mingwang_4", "undefined": "名望礼包_128元", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -4433,7 +4423,7 @@ "name": "pay_name_guanqialibao_1", "undefined": "关卡礼包_6", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -4469,7 +4459,7 @@ "name": "pay_name_guanqialibao_2", "undefined": "关卡礼包_30", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -4505,7 +4495,7 @@ "name": "pay_name_guanqialibao_3", "undefined": "关卡礼包_68", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -4541,7 +4531,7 @@ "name": "pay_name_guanqialibao_4", "undefined": "关卡礼包_68", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -4582,7 +4572,7 @@ "name": "pay_name_daojulibao_1", "undefined": "专属润滑剂不足_30", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -4623,7 +4613,7 @@ "name": "pay_name_daojulibao_2", "undefined": "专属润滑剂不足_68", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -4664,7 +4654,7 @@ "name": "pay_name_daojulibao_3", "undefined": "专属润滑剂不足_128", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -4705,7 +4695,7 @@ "name": "pay_name_daojulibao_4", "undefined": "配件零件不足_30", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -4746,7 +4736,7 @@ "name": "pay_name_daojulibao_5", "undefined": "配件零件不足_68", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -4787,7 +4777,7 @@ "name": "pay_name_daojulibao_6", "undefined": "配件零件不足_128", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -4828,7 +4818,7 @@ "name": "pay_name_daojulibao_7", "undefined": "装备蓝图不足_30", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -4869,7 +4859,7 @@ "name": "pay_name_daojulibao_8", "undefined": "装备蓝图不足_68", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -4910,7 +4900,7 @@ "name": "pay_name_daojulibao_9", "undefined": "装备蓝图不足_128", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -4951,7 +4941,7 @@ "name": "pay_name_daojulibao_10", "undefined": "调校合金不足_30", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -4992,7 +4982,7 @@ "name": "pay_name_daojulibao_11", "undefined": "调校合金不足_68", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -5033,7 +5023,7 @@ "name": "pay_name_daojulibao_12", "undefined": "调校合金不足_128", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -5064,7 +5054,7 @@ "name": "pay_name_zhanbailibao_1", "undefined": "战败礼包_68", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -5095,7 +5085,7 @@ "name": "pay_name_zhanbailibao_2", "undefined": "战败礼包_68", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -5126,7 +5116,7 @@ "name": "pay_name_zhanbailibao_3", "undefined": "战败礼包_68", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -5157,7 +5147,7 @@ "name": "pay_name_choukalibao_1", "undefined": "抽卡礼包_68", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -5188,7 +5178,7 @@ "name": "pay_name_choukalibao_2", "undefined": "抽卡礼包_68", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -5219,7 +5209,7 @@ "name": "pay_name_choukalibao_3", "undefined": "抽卡礼包_68", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -5239,7 +5229,7 @@ "name": "pay_name_shouchong_1", "undefined": "首充礼包_6", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -5259,7 +5249,7 @@ "name": "pay_name_shouchong_2", "undefined": "首充礼包_30", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" @@ -5279,7 +5269,7 @@ "name": "pay_name_shouchong_3", "undefined": "首充礼包_98", "time": -1, - "buys": 0, + "buys": 1, "needVip": 0, "front": {}, "currency": "CNY" diff --git a/src/json/shop.json b/src/json/shop.json index 9893e4e..4e0b020 100644 --- a/src/json/shop.json +++ b/src/json/shop.json @@ -511,7 +511,13 @@ "freeRefreshInterval": 0, "freeRefreshNum": 0, "shopItems": [ - 10001 + 10001, + 10002, + 10003, + 10004, + 10005, + 10006, + 10007 ], "showItem": [ { diff --git a/src/json/shopItem.json b/src/json/shopItem.json index 46da62c..42ead51 100644 --- a/src/json/shopItem.json +++ b/src/json/shopItem.json @@ -6273,17 +6273,179 @@ { "id": 10001, "a": "item", - "t": 4, - "n": 10, + "t": 617, + "n": 1, + "p": 1, + "colour": 6, + "buyNum": -1, + "openDay": 1, + "buyNeed": [ + { + "a": "attr", + "t": "jingxuanbi", + "n": 150 + } + ], + "sale": 10, + "needVip": 0, + "needZCCG": 0, + "lv": [ + 1, + 9999 + ], + "vipAddbuyNum": [] + } + ], + "10002": [ + { + "id": 10002, + "a": "item", + "t": 627, + "n": 1, + "p": 1, + "colour": 5, + "buyNum": -1, + "openDay": 1, + "buyNeed": [ + { + "a": "attr", + "t": "jingxuanbi", + "n": 60 + } + ], + "sale": 10, + "needVip": 0, + "needZCCG": 0, + "lv": [ + 1, + 9999 + ], + "vipAddbuyNum": [] + } + ], + "10003": [ + { + "id": 10003, + "a": "item", + "t": 605, + "n": 1, + "p": 1, + "colour": 5, + "buyNum": -1, + "openDay": 1, + "buyNeed": [ + { + "a": "attr", + "t": "jingxuanbi", + "n": 18 + } + ], + "sale": 10, + "needVip": 0, + "needZCCG": 0, + "lv": [ + 1, + 9999 + ], + "vipAddbuyNum": [] + } + ], + "10004": [ + { + "id": 10004, + "a": "item", + "t": 24, + "n": 2, + "p": 1, + "colour": 5, + "buyNum": -1, + "openDay": 1, + "buyNeed": [ + { + "a": "attr", + "t": "jingxuanbi", + "n": 6 + } + ], + "sale": 10, + "needVip": 0, + "needZCCG": 0, + "lv": [ + 1, + 9999 + ], + "vipAddbuyNum": [] + } + ], + "10005": [ + { + "id": 10005, + "a": "item", + "t": 12, + "n": 200, "p": 1, "colour": 4, "buyNum": -1, "openDay": 1, "buyNeed": [ { - "a": "item", - "t": "15", - "n": 2800 + "a": "attr", + "t": "jingxuanbi", + "n": 6 + } + ], + "sale": 10, + "needVip": 0, + "needZCCG": 0, + "lv": [ + 1, + 9999 + ], + "vipAddbuyNum": [] + } + ], + "10006": [ + { + "id": 10006, + "a": "attr", + "t": "jinbi", + "n": 1000000, + "p": 1, + "colour": 3, + "buyNum": -1, + "openDay": 1, + "buyNeed": [ + { + "a": "attr", + "t": "jingxuanbi", + "n": 3 + } + ], + "sale": 10, + "needVip": 0, + "needZCCG": 0, + "lv": [ + 1, + 9999 + ], + "vipAddbuyNum": [] + } + ], + "10007": [ + { + "id": 10007, + "a": "item", + "t": 1, + "n": 500000, + "p": 1, + "colour": 3, + "buyNum": -1, + "openDay": 1, + "buyNeed": [ + { + "a": "attr", + "t": "jingxuanbi", + "n": 5 } ], "sale": 10, diff --git a/src/json/shopcom.json b/src/json/shopcom.json index b5157f4..8dfb51c 100644 --- a/src/json/shopcom.json +++ b/src/json/shopcom.json @@ -203,7 +203,7 @@ "id": 11, "shopId": 13, "shopType": 12, - "title": "wsw_wz_dhsd", + "title": "wsw_wz_mrjxdh", "undefined": "兑换商店", "openCond": "shop_13", "des": "intr_shop_des_13", @@ -211,7 +211,7 @@ "cost": [ { "a": "attr", - "t": "rmbmoney", + "t": "jingxuanbi", "n": 1 } ] diff --git a/src/json/tuisonglibao.json b/src/json/tuisonglibao.json index e46aeef..cdc0822 100644 --- a/src/json/tuisonglibao.json +++ b/src/json/tuisonglibao.json @@ -8,11 +8,12 @@ ], "payId": [ "guanqialibao_1", - "guanqialibao_3" + "guanqialibao_2" ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "2": { "id": 2, @@ -23,11 +24,12 @@ ], "payId": [ "guanqialibao_1", - "guanqialibao_3" + "guanqialibao_2" ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "3": { "id": 3, @@ -43,7 +45,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "4": { "id": 4, @@ -59,7 +62,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "5": { "id": 5, @@ -75,7 +79,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "6": { "id": 6, @@ -91,7 +96,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "7": { "id": 7, @@ -107,7 +113,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "8": { "id": 8, @@ -123,7 +130,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "9": { "id": 9, @@ -139,7 +147,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "10": { "id": 10, @@ -155,7 +164,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "11": { "id": 11, @@ -171,7 +181,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "12": { "id": 12, @@ -187,7 +198,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "13": { "id": 13, @@ -203,7 +215,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "14": { "id": 14, @@ -219,7 +232,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "15": { "id": 15, @@ -235,7 +249,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "16": { "id": 16, @@ -251,7 +266,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "17": { "id": 17, @@ -267,7 +283,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "18": { "id": 18, @@ -283,7 +300,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "gkts" }, "101": { "id": 101, @@ -302,7 +320,8 @@ ], "time": 3600, "displayCD": 86400, - "scale": 3000 + "scale": 3000, + "icon": "sclb" }, "102": { "id": 102, @@ -321,7 +340,8 @@ ], "time": 3600, "displayCD": 86400, - "scale": 3000 + "scale": 3000, + "icon": "sclb" }, "103": { "id": 103, @@ -340,7 +360,8 @@ ], "time": 3600, "displayCD": 86400, - "scale": 3000 + "scale": 3000, + "icon": "sclb" }, "104": { "id": 104, @@ -359,7 +380,8 @@ ], "time": 3600, "displayCD": 86400, - "scale": 3000 + "scale": 3000, + "icon": "sclb" }, "401": { "id": 401, @@ -373,7 +395,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "djlb" }, "402": { "id": 402, @@ -387,7 +410,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "djlb" }, "403": { "id": 403, @@ -402,7 +426,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "djlb" }, "404": { "id": 404, @@ -417,7 +442,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "djlb" }, "405": { "id": 405, @@ -432,7 +458,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "djlb" }, "406": { "id": 406, @@ -447,7 +474,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "djlb" }, "407": { "id": 407, @@ -462,7 +490,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "djlb" }, "408": { "id": 408, @@ -477,7 +506,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "djlb" }, "409": { "id": 409, @@ -492,7 +522,8 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "djlb" }, "410": { "id": 410, @@ -507,12 +538,45 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "djlb" }, "411": { "id": 411, "type": 5, "typeName": "tuisonglibao_name_1", + "num": [ + 76 + ], + "payId": [ + "lv76_1", + "lv76_2" + ], + "time": 3600, + "displayCD": 3600, + "scale": 3000, + "icon": "djlb" + }, + "412": { + "id": 412, + "type": 5, + "typeName": "tuisonglibao_name_1", + "num": [ + 79 + ], + "payId": [ + "lv79_1", + "lv79_2" + ], + "time": 3600, + "displayCD": 3600, + "scale": 3000, + "icon": "djlb" + }, + "413": { + "id": 413, + "type": 5, + "typeName": "tuisonglibao_name_1", "num": [ 82 ], @@ -522,6 +586,7 @@ ], "time": 3600, "displayCD": 3600, - "scale": 3000 + "scale": 3000, + "icon": "djlb" } } \ No newline at end of file diff --git a/src/jsonType.ts b/src/jsonType.ts index e822019..aacb4a8 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/lng.ts b/src/lng.ts index 90c1903..f0c9344 100644 --- a/src/lng.ts +++ b/src/lng.ts @@ -351,7 +351,7 @@ class Lng { huoqupaihang: "huoqupaihang"; wucigonghui: "wucigonghui"; nameyicunzai: "nameyicunzai"; - + ljlibaotips_8:"ljlibaotips_8"; "11111" = "globalThis.lng.chat_1" // return call.error('', { code: -3, message: globalThis.lng.chat_2 }); diff --git a/src/module/collection_event.ts b/src/module/collection_event.ts index 6681c58..6e47a03 100644 --- a/src/module/collection_event.ts +++ b/src/module/collection_event.ts @@ -21,6 +21,8 @@ import {ResOpen as ResOpenZhoulibao} from '../shared/protocols/event/zhoulibao/P import {ResOpen as ResOpenZixuanlibao} from '../shared/protocols/event/zixuanlibao/PtlOpen'; import {ResOpen as ResOpenKaifujingsai} from '../shared/protocols/kaifujingsai/PtlOpen'; import {ResOpen as ResOpenZhoumolibao} from '../shared/protocols/event/zhoumolibao/PtlOpen'; +import {ResOpen as ResOpenPobinglibao} from '../shared/protocols/event/pobinglibao/PtlOpen'; +import {ResOpen as ResOpenLeiChongLiBao} from '../shared/protocols/event/leichonglibao/PtlOpen'; export type eventType = { shouchong: { @@ -50,7 +52,11 @@ export type eventType = { qirichongzhi: Omit; jierihuodong: Omit & { refreshTime: number; }; kaifujingsai: ResOpenKaifujingsai; - zhoumolibao: ResOpenZhoumolibao & { refreshTime: number; } + zhoumolibao: ResOpenZhoumolibao & { refreshTime: number; }; + pobinglibao: ResOpenPobinglibao + payForDiamond: { + [time: number]: number + } } & { [k: `${number}jijin`]: ResOpenYuedujijin; [k: `yangchengmubiao${number}`]: yangchengmubiao; @@ -60,6 +66,7 @@ export type eventType = { [k: `zixuanlibao${number}`]: ResOpenZixuanlibao; [k: `leijichongzhi${number}`]: Omit; [k: `qiridenglu${number}`]: Pick; + [k: `leichonglibao${number}`]: ResOpenLeiChongLiBao & { opentime: number }; }; export type CollectionEvent = { 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..c2388b5 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(call.uid) + } + return result } /** diff --git a/src/public/player.ts b/src/public/player.ts index df3e641..b8f5bf5 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; } } @@ -198,6 +201,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) { @@ -216,9 +229,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}); @@ -299,7 +312,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([ @@ -311,13 +328,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); @@ -327,7 +344,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 + }) } } } @@ -353,7 +375,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(); @@ -400,7 +422,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}) } } @@ -428,7 +450,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] @@ -483,7 +505,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}) } } @@ -514,7 +536,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(); @@ -546,7 +568,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}) } } @@ -568,7 +590,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; @@ -609,7 +631,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..0e50409 --- /dev/null +++ b/src/public/pushgift.ts @@ -0,0 +1,179 @@ +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.LvGift && 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]; + // 更新礼包 + await 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", conf.id); + } + + static async buy(uid: string, payId: string) { + // 购买礼包 + let gift; + for (let gift_id in G.gc.tuisonglibao) { + let temp = G.gc.tuisonglibao[gift_id]; + if (temp.payId.includes(payId)) { + gift = temp; + break + } + } + if (!gift) return; + let index = gift.payId.indexOf(payId); + let info = await G.mongodb.collection("pushgift").findOne({ + uid: uid, id: gift.id.toString() + }) + if (info.passTime >= G.time) { + await G.mongodb.collection("pushgift").updateOne({ + uid: uid, id: gift.id.toString() + }, {$inc: {[`buy.${index}`]: 1}}) + // 推送客户端消息 + G.server.sendMsgByUid(uid, "msg_s2c/PushGiftChange", gift.id); + } + } +} \ No newline at end of file diff --git a/src/public/scheduler/scheduler.ts b/src/public/scheduler/scheduler.ts index a738ed2..a8b93a7 100644 --- a/src/public/scheduler/scheduler.ts +++ b/src/public/scheduler/scheduler.ts @@ -37,7 +37,8 @@ export type schedulerType = | 'hbzb_zbs_clear' | 'hbzb_zbs_group' | 'wzry_zuanshi16to8' - | "cross_email_pull"; + | "cross_email_pull" + | "xiaofeijingsai_local_ctor"; export class SchedulerManage { static logTime = false; @@ -102,7 +103,7 @@ export abstract class Scheduler { } - init(){ + init() { Scheduler.schedulers.push(this); this.read().then(_ => { this.log(`state: 准备完毕 预计下次执行时间:${new Date(this.startTime * 1000).format("YYYY-MM-DD hh:mm:ss")}`); diff --git a/src/public/scheduler/scheduler_xiaofeijingsai.ts b/src/public/scheduler/scheduler_xiaofeijingsai.ts new file mode 100644 index 0000000..5901064 --- /dev/null +++ b/src/public/scheduler/scheduler_xiaofeijingsai.ts @@ -0,0 +1,69 @@ +import {Scheduler, schedulerType} from './scheduler'; +import {PublicShared} from "../../shared/public/public"; +import {Wjjl} from "../../module/collection_wjjl"; +import {ZhanLingTasks} from "../zhanling"; +import {setGud} from '../gud'; +import {HuoDongFun} from "../huodongfun"; +import {EmailFun} from "../email"; +import {sortRankList} from "../../api_s2c/event/xiaofeijingsai/ApiOpen"; + +/** + * 消费竞赛发奖定时器 + * 每天0点5分检测活动结束 + */ +export class Scheduler_xfjs_Local_Ctor extends Scheduler { + id: schedulerType = 'xiaofeijingsai_local_ctor'; + time = 300; + name = '消费竞赛发奖定时器'; + type: 'day' | 'week' = 'day'; + + // todo 测试 + // get nextTime() { + // return G.time + 30; + // } + + async read() { + await this.ctorStartTime(); + this.isReady = false; + } + + async start() { + let _hd = (await G.mongodb.collection('hdinfo').find({ + htype: 11, + ttype: 0, + etime: {$lt: G.time, $gt: 99999999}, + $or: [{isSendPrize: {$exists: false}}, {isSendPrize: false}], + }).sort({etime: -1}).limit(1).toArray())[0] + + if (!_hd) return + + let limit = _hd.data?.rank?.slice(-1)?.[0]?.rank?.slice(-1)?.[0] || 100 + let rmbuse = await G.mongodb.collection('rmbuse').aggregate([ + {$match: {isAdd: false, cTime: {$gte: _hd.stime, $lte: _hd.etime}}}, + {$group: {_id: "$uid", total: {$sum: "$change"}}}, + {$sort: {total: 1}}, + {$limit: limit} + ]).toArray() + + let list: any = rmbuse.map(i => ({...i, total: R.negate(i.total)})) + + let ranklist = sortRankList(_hd.data.rank, list) + + R.forEach(i => { + let users = R.slice(i.rank[0] - 1, i.rank[1])(ranklist) + users.map(v => { + if (v._id == 'system') return + EmailFun.addEmail({ + uid: v._id, + type: 'system', + title: _hd.data.mailTitle, + content: _hd.data.mailDes, + prize: i.prize, + contentInsertArr: [v.rank + 1] + }); + }) + })(_hd.data.rank) + + await G.mongodb.collection('hdinfo').findOneAndUpdate({hdid: _hd.hdid}, {$set: {isSendPrize: true}}) + } +} diff --git a/src/queryEmail.ts b/src/queryEmail.ts deleted file mode 100644 index 2a6c5c8..0000000 --- a/src/queryEmail.ts +++ /dev/null @@ -1,35 +0,0 @@ -import {MongoClient} from "mongodb"; -import * as ramda from 'ramda' -import fs from "fs"; - -let R = ramda - -async function start() { - //连接mongodb - let client = await MongoClient.connect('mongodbUrl'); - - console.log('链接成功') - - let a: any = {} - - for (let i = 1; i < 20; i++) { - let dbName = `blacklagoon_s${i}` - console.log(dbName) - let mongodb = client.db(dbName); - a[dbName] = {}; - (await mongodb.collection('email').find({type: 'gm', uid: 'system'}).toArray()).map(i => { - a[dbName][i.title] = R.compose(R.map(i => ({[i[0]]: i.length})), R.values, R.filter(i => i.length > 1), R.groupBy(i => i))(i.prizelist) - console.log(a[dbName][i.title]) - }) - console.log(dbName, '查询完成') - } - - fs.writeFileSync('tab.json', JSON.stringify(a, null, 2)) -} - -//定义全局变量 -// ctor(); -//启动服务 -start().then(() => { - process.exit() -}); diff --git a/src/setMongodb.ts b/src/setMongodb.ts index fe89db9..ec7356a 100644 --- a/src/setMongodb.ts +++ b/src/setMongodb.ts @@ -505,7 +505,7 @@ export async function setDbIndexes() { index.key, option ); - console.log('创建索引成功', coll, index); + // console.log('创建索引成功', coll, index); } catch (error) { if (error.codeName == 'IndexKeySpecsConflict') { //当相同索引存在,但是配置(如:unique expireAfterSeconds)不同时,会收到这个报错 @@ -519,7 +519,7 @@ export async function setDbIndexes() { index.key, option ); - console.log('创建索引成功', coll, index); + // console.log('创建索引成功', coll, index); } catch (error) { console.log('创建索引失败==>', coll, index, error.message); } diff --git a/src/setStartAfther.ts b/src/setStartAfther.ts index 52648c7..2497190 100644 --- a/src/setStartAfther.ts +++ b/src/setStartAfther.ts @@ -27,6 +27,7 @@ import { clusterRunOnce } from './clusterUtils'; import { addListener } from './globalListener'; import { SchedulerManage } from './public/scheduler/scheduler'; import {CrossEmailPull} from "./public/scheduler/scheduler_cross_email_pull"; +import {Scheduler_xfjs_Local_Ctor} from "./public/scheduler/scheduler_xiaofeijingsai"; export async function startAfter() { //事件监听和定时器初始化 @@ -70,6 +71,7 @@ export async function startAfter() { new Scheduler_hbzb_zbs_local_prize().init(); new Scheduler_hbzb_zbs_local_ready().init(); new SchedulerKbzzAutoApply().init(); + new Scheduler_xfjs_Local_Ctor().init(); new SchedulerSlzdClean().init(); new SchedulerSlzdPrize().init(); diff --git a/src/setWs.ts b/src/setWs.ts index 3a97c54..f5af54c 100644 --- a/src/setWs.ts +++ b/src/setWs.ts @@ -98,6 +98,15 @@ function setWs(server: WsServer) { //执行 API 接口实现之前 server.flows.preApiCallFlow.push(async call => { + // 临时停服维护方案 + // let lng = { + // "zh-TW": "停服維護中,請等待!", + // "ko": "서버 점검 중, 잠시만 기다려 주세요.", + // "ja": "サーバーメンテナンス中、しばらくお待ちください。", + // "en": "Server under maintenance. Please wait.", + // } + // call.error("", {code: -1, message: lng[call.req.lng] || lng["ja"]}) + // return null; //是否短时间内重复请求某个api // let timeIntervalLimit = call.service.conf?.timeIntervalLimit == undefined ? 500 : call.service.conf?.timeIntervalLimit; diff --git a/src/shared/protocols/event/christmas/huodong.json b/src/shared/protocols/event/christmas/huodong.json deleted file mode 100644 index cea9f66..0000000 --- a/src/shared/protocols/event/christmas/huodong.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "hdid" : 91029302193, - "htype" : 8, - "stype" : 800, - "ttype" : 0, - "stime" : 1702396800, - "rtime" : 1703088000, - "etime" : 1703088000, - "name" : "christmas", - "icon" : "icon_xfdj", - "showtime" : "根据玩家注册时间,游戏返回时复写", - "data" : { - "task" : { - "1": { - "pval" : 1, - "stype" : "", - "cond": [], - "prize" : [ - { - "a" : "item", - "t" : "1", - "n" : 500000 - } - ], - "des" : "intr_cszl_des_1" - }, - "2": { - "pval" : 1, - "stype" : "101", - "cond": [], - "prize" : [ - { - "a" : "item", - "t" : "1", - "n" : 500000 - } - ], - "des" : "intr_cszl_des_1" - }, - "3": { - "pval" : 2, - "stype" : "101", - "cond": [], - "prize" : [ - { - "a" : "item", - "t" : "1", - "n" : 500000 - } - ], - "des" : "intr_cszl_des_1" - } - }, - "gameneed": [{"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": { - "payid": "", - "buynum": 2, - "basep": [{"a": "attr", "t":"rmbmoney", "n": 1}], - "des" : "intr_cszl_des_1", - "dlz": [ - { - "1": {"a": "attr", "t":"rmbmoney", "n": 1}, - "2": {"a": "attr", "t":"rmbmoney", "n": 2}, - "3": {"a": "attr", "t":"rmbmoney", "n": 3} - }, - { - "1": {"a": "attr", "t":"rmbmoney", "n": 1}, - "2": {"a": "attr", "t":"rmbmoney", "n": 2}, - "3": {"a": "attr", "t":"rmbmoney", "n": 3} - } - ] - }, - "2": { - "payid": "ycmb_1_2", - "buynum": 2, - "basep": [{"a": "attr", "t":"rmbmoney", "n": 2}], - "des" : "intr_cszl_des_2", - "dlz": [ - { - "1": {"a": "attr", "t":"rmbmoney", "n": 1}, - "2": {"a": "attr", "t":"rmbmoney", "n": 2}, - "3": {"a": "attr", "t":"rmbmoney", "n": 3} - }, - { - "1": {"a": "attr", "t":"rmbmoney", "n": 1}, - "2": {"a": "attr", "t":"rmbmoney", "n": 2}, - "3": {"a": "attr", "t":"rmbmoney", "n": 3} - } - ] - } - }, - "qiandao": [ - [{"a": "attr", "t":"jinbi", "n": 1}], - [{"a": "attr", "t":"jinbi", "n": 1}], - [{"a": "attr", "t":"jinbi", "n": 1}], - [{"a": "attr", "t":"jinbi", "n": 1}], - [{"a": "attr", "t":"jinbi", "n": 1}], - [{"a": "attr", "t":"jinbi", "n": 1}], - [{"a": "attr", "t":"jinbi", "n": 1}] - ] - - - } -} \ No newline at end of file diff --git a/src/shared/protocols/event/leichonglibao/PtlOpen.ts b/src/shared/protocols/event/leichonglibao/PtlOpen.ts new file mode 100644 index 0000000..dda43a2 --- /dev/null +++ b/src/shared/protocols/event/leichonglibao/PtlOpen.ts @@ -0,0 +1,8 @@ +export type ReqOpen = { + hdid: number +} + +export type ResOpen = { + sc: boolean // 自选奖励领取标识 + buy: string[] // 特价礼包购买记录 +} \ No newline at end of file diff --git a/src/shared/protocols/event/leichonglibao/PtlReceive.ts b/src/shared/protocols/event/leichonglibao/PtlReceive.ts new file mode 100644 index 0000000..f4519e0 --- /dev/null +++ b/src/shared/protocols/event/leichonglibao/PtlReceive.ts @@ -0,0 +1,10 @@ +import {prizeType} from "../../type"; + +export interface ReqReceive { + hdid: number + select: string[] +} + +export interface ResReceive { + prize: prizeType[] +} diff --git a/src/shared/protocols/event/payForDiamond/PtlCanReceive.ts b/src/shared/protocols/event/payForDiamond/PtlCanReceive.ts new file mode 100644 index 0000000..99ec132 --- /dev/null +++ b/src/shared/protocols/event/payForDiamond/PtlCanReceive.ts @@ -0,0 +1,12 @@ +export type ReqCanReceive = { + activityId?: number; +}; + +export type ResCanReceive = { + payNum: number; + remaining?: number; + result: boolean; + price: number; + showOffList: any[]; + gotAmount: number; +}; \ No newline at end of file diff --git a/src/shared/protocols/event/payForDiamond/PtlReceive.ts b/src/shared/protocols/event/payForDiamond/PtlReceive.ts new file mode 100644 index 0000000..cbcda79 --- /dev/null +++ b/src/shared/protocols/event/payForDiamond/PtlReceive.ts @@ -0,0 +1,9 @@ +export type ReqReceive = { + activityId: number; +}; + +export type ResReceive = { + amount: number, + timesRemaining?: number; + showOff?: boolean; +}; diff --git a/src/shared/protocols/event/pobinglibao/PtlOpen.ts b/src/shared/protocols/event/pobinglibao/PtlOpen.ts new file mode 100644 index 0000000..f7c775b --- /dev/null +++ b/src/shared/protocols/event/pobinglibao/PtlOpen.ts @@ -0,0 +1,16 @@ + +/** + * 破冰礼包 + */ +export type ReqOpen = { + +}; + +export type ResOpen = { + record:{ + [k: string]: any; + } + buyLog:{ + [k: string]: any; + } +}; \ No newline at end of file diff --git a/src/shared/protocols/event/pobinglibao/PtlReceive.ts b/src/shared/protocols/event/pobinglibao/PtlReceive.ts new file mode 100644 index 0000000..bb057a3 --- /dev/null +++ b/src/shared/protocols/event/pobinglibao/PtlReceive.ts @@ -0,0 +1,11 @@ +/** + * 破冰礼包领奖 + */ +export interface ReqReceive { + id: string + recId: string +} + +export interface ResReceive { + +} diff --git a/src/shared/protocols/event/xiaofeijingsai/PtlOpen.ts b/src/shared/protocols/event/xiaofeijingsai/PtlOpen.ts new file mode 100644 index 0000000..150e12a --- /dev/null +++ b/src/shared/protocols/event/xiaofeijingsai/PtlOpen.ts @@ -0,0 +1,18 @@ +/** + * 消费竞赛 + */ +export type ReqOpen = { + limit?: number +}; + +export type ResOpen = { + list: data[] + myData: data +}; + +type data = { + _id: string, + total: number, + rank: number, + player: any +} \ No newline at end of file diff --git a/src/shared/protocols/hongdian/PtlGet.ts b/src/shared/protocols/hongdian/PtlGet.ts index e09f771..67ceb0d 100644 --- a/src/shared/protocols/hongdian/PtlGet.ts +++ b/src/shared/protocols/hongdian/PtlGet.ts @@ -51,9 +51,10 @@ export type hongdianKey = | 'heishiMrjx' | 'weixiuchang' | 'kaifujingsai' - | 'zhoumolibao'; - - + | 'zhoumolibao' + | 'pobinglibao' + | 'payForDiamond' + | 'leichonglibao'; export type hongdianVal = { show?: boolean; // 看功能需要 diff --git a/src/shared/protocols/msg_s2c/MsgPushGiftChange.ts b/src/shared/protocols/msg_s2c/MsgPushGiftChange.ts new file mode 100644 index 0000000..ccd1837 --- /dev/null +++ b/src/shared/protocols/msg_s2c/MsgPushGiftChange.ts @@ -0,0 +1 @@ +export type MsgPushGiftChange = number; diff --git a/src/shared/protocols/pushgift/PtlItemNoEnough.ts b/src/shared/protocols/pushgift/PtlItemNoEnough.ts new file mode 100644 index 0000000..9b7625e --- /dev/null +++ b/src/shared/protocols/pushgift/PtlItemNoEnough.ts @@ -0,0 +1,5 @@ +export type ReqItemNoEnough = { + need: { a: string, t: string } +} + +export type ResItemNoEnough = {} 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 bba26ab..87f18c5 100644 --- a/src/shared/protocols/serviceProto.ts +++ b/src/shared/protocols/serviceProto.ts @@ -64,55 +64,62 @@ import { ReqOpen as ReqOpen_13, ResOpen as ResOpen_13 } from './event/kaifukuang import { ReqShopBuy, ResShopBuy } from './event/kaifukuanghuan/PtlShopBuy'; import { ReqTaskBox, ResTaskBox } from './event/kaifukuanghuan/PtlTaskBox'; import { ReqTaskPrize, ResTaskPrize } from './event/kaifukuanghuan/PtlTaskPrize'; -import { ReqOpen as ReqOpen_14, ResOpen as ResOpen_14 } from './event/leijichongzhi/PtlOpen'; +import { ReqOpen as ReqOpen_14, ResOpen as ResOpen_14 } from './event/leichonglibao/PtlOpen'; +import { ReqReceive as ReqReceive_2, ResReceive as ResReceive_2 } from './event/leichonglibao/PtlReceive'; +import { ReqOpen as ReqOpen_15, ResOpen as ResOpen_15 } from './event/leijichongzhi/PtlOpen'; import { ReqRec as ReqRec_5, ResRec as ResRec_5 } from './event/leijichongzhi/PtlRec'; import { ReqLottery, ResLottery } from './event/niudanji/PtlLottery'; -import { ReqOpen as ReqOpen_15, ResOpen as ResOpen_15 } from './event/niudanji/PtlOpen'; -import { ReqOpen as ReqOpen_16, ResOpen as ResOpen_16 } from './event/qirichongzhi/PtlOpen'; +import { ReqOpen as ReqOpen_16, ResOpen as ResOpen_16 } from './event/niudanji/PtlOpen'; +import { ReqCanReceive, ResCanReceive } from './event/payForDiamond/PtlCanReceive'; +import { ReqReceive as ReqReceive_3, ResReceive as ResReceive_3 } from './event/payForDiamond/PtlReceive'; +import { ReqOpen as ReqOpen_17, ResOpen as ResOpen_17 } from './event/pobinglibao/PtlOpen'; +import { ReqReceive as ReqReceive_4, ResReceive as ResReceive_4 } from './event/pobinglibao/PtlReceive'; +import { ReqOpen as ReqOpen_18, ResOpen as ResOpen_18 } from './event/qirichongzhi/PtlOpen'; import { ReqRec as ReqRec_6, ResRec as ResRec_6 } from './event/qirichongzhi/PtlRec'; -import { ReqOpen as ReqOpen_17, ResOpen as ResOpen_17 } from './event/qiridenglu/PtlOpen'; +import { ReqOpen as ReqOpen_19, ResOpen as ResOpen_19 } from './event/qiridenglu/PtlOpen'; import { ReqRecPrize as ReqRecPrize_1, ResRecPrize as ResRecPrize_1 } from './event/qiridenglu/PtlRecPrize'; -import { ReqOpen as ReqOpen_18, ResOpen as ResOpen_18 } from './event/shiwuleichong/PtlOpen'; -import { ReqOpen as ReqOpen_19, ResOpen as ResOpen_19 } from './event/shouchong/PtlOpen'; -import { ReqReceive as ReqReceive_2, ResReceive as ResReceive_2 } from './event/shouchong/PtlReceive'; +import { ReqOpen as ReqOpen_20, ResOpen as ResOpen_20 } from './event/shiwuleichong/PtlOpen'; +import { ReqOpen as ReqOpen_21, ResOpen as ResOpen_21 } from './event/shouchong/PtlOpen'; +import { ReqReceive as ReqReceive_5, ResReceive as ResReceive_5 } from './event/shouchong/PtlReceive'; import { ReqBuy as ReqBuy_1, ResBuy as ResBuy_1 } from './event/xianshizhaomu/PtlBuy'; import { ReqDuihuan, ResDuihuan } from './event/xianshizhaomu/PtlDuihuan'; import { ReqLottery as ReqLottery_1, ResLottery as ResLottery_1 } from './event/xianshizhaomu/PtlLottery'; -import { ReqOpen as ReqOpen_20, ResOpen as ResOpen_20 } from './event/xianshizhaomu/PtlOpen'; +import { ReqOpen as ReqOpen_22, ResOpen as ResOpen_22 } from './event/xianshizhaomu/PtlOpen'; import { ReqRec as ReqRec_7, ResRec as ResRec_7 } from './event/xianshizhaomu/PtlRec'; -import { ReqOpen as ReqOpen_21, ResOpen as ResOpen_21 } from './event/xinshoulibao/PtlOpen'; +import { ReqOpen as ReqOpen_23, ResOpen as ResOpen_23 } from './event/xiaofeijingsai/PtlOpen'; +import { ReqOpen as ReqOpen_24, ResOpen as ResOpen_24 } from './event/xinshoulibao/PtlOpen'; import { ReqBuy as ReqBuy_2, ResBuy as ResBuy_2 } from './event/yangchengmubiao/PtlBuy'; -import { ReqOpen as ReqOpen_22, ResOpen as ResOpen_22 } from './event/yangchengmubiao/PtlOpen'; +import { ReqOpen as ReqOpen_25, ResOpen as ResOpen_25 } from './event/yangchengmubiao/PtlOpen'; import { ReqRec as ReqRec_8, ResRec as ResRec_8 } from './event/yangchengmubiao/PtlRec'; -import { ReqOpen as ReqOpen_23, ResOpen as ResOpen_23 } from './event/yibaichou/PtlOpen'; +import { ReqOpen as ReqOpen_26, ResOpen as ResOpen_26 } from './event/yibaichou/PtlOpen'; import { ReqRec as ReqRec_9, ResRec as ResRec_9 } from './event/yibaichou/PtlRec'; import { ReqRecAll, ResRecAll } from './event/yibaichou/PtlRecAll'; -import { ReqOpen as ReqOpen_24, ResOpen as ResOpen_24 } from './event/yuedujijin/PtlOpen'; +import { ReqOpen as ReqOpen_27, ResOpen as ResOpen_27 } from './event/yuedujijin/PtlOpen'; import { ReqRec as ReqRec_10, ResRec as ResRec_10 } from './event/yuedujijin/PtlRec'; import { ReqBuyLv, ResBuyLv } from './event/zhanling/PtlBuyLv'; -import { ReqOpen as ReqOpen_25, ResOpen as ResOpen_25 } from './event/zhanling/PtlOpen'; +import { ReqOpen as ReqOpen_28, ResOpen as ResOpen_28 } from './event/zhanling/PtlOpen'; import { ReqRecPrize as ReqRecPrize_2, ResRecPrize as ResRecPrize_2 } from './event/zhanling/PtlRecPrize'; import { ReqRecTask, ResRecTask } from './event/zhanling/PtlRecTask'; -import { ReqOpen as ReqOpen_26, ResOpen as ResOpen_26 } from './event/zhoulibao/PtlOpen'; -import { ReqOpen as ReqOpen_27, ResOpen as ResOpen_27 } from './event/zhoumolibao/PtlOpen'; -import { ReqReceive as ReqReceive_3, ResReceive as ResReceive_3 } from './event/zhoumolibao/PtlReceive'; +import { ReqOpen as ReqOpen_29, ResOpen as ResOpen_29 } from './event/zhoulibao/PtlOpen'; +import { ReqOpen as ReqOpen_30, ResOpen as ResOpen_30 } from './event/zhoumolibao/PtlOpen'; +import { ReqReceive as ReqReceive_6, ResReceive as ResReceive_6 } from './event/zhoumolibao/PtlReceive'; import { ReqBuy as ReqBuy_3, ResBuy as ResBuy_3 } from './event/zixuanlibao/PtlBuy'; -import { ReqOpen as ReqOpen_28, ResOpen as ResOpen_28 } from './event/zixuanlibao/PtlOpen'; +import { ReqOpen as ReqOpen_31, ResOpen as ResOpen_31 } from './event/zixuanlibao/PtlOpen'; import { ReqhdGetList, ReshdGetList } from './eventlist/PtlhdGetList'; import { ReqApply, ResApply } from './friend/PtlApply'; import { ReqDel, ResDel } from './friend/PtlDel'; import { ReqGift, ResGift } from './friend/PtlGift'; import { ReqList, ResList } from './friend/PtlList'; -import { ReqOpen as ReqOpen_29, ResOpen as ResOpen_29 } from './friend/PtlOpen'; +import { ReqOpen as ReqOpen_32, ResOpen as ResOpen_32 } from './friend/PtlOpen'; import { ReqRespond, ResRespond } from './friend/PtlRespond'; import { ReqRmBlackList, ResRmBlackList } from './friend/PtlRmBlackList'; import { ReqSearch, ResSearch } from './friend/PtlSearch'; import { ReqChallenge, ResChallenge } from './ganbutexun/PtlChallenge'; -import { ReqOpen as ReqOpen_30, ResOpen as ResOpen_30 } from './ganbutexun/PtlOpen'; +import { ReqOpen as ReqOpen_33, ResOpen as ResOpen_33 } from './ganbutexun/PtlOpen'; import { ReqFast, ResFast } from './ganhai/PtlFast'; import { ReqFight as ReqFight_1, ResFight as ResFight_1 } from './ganhai/PtlFight'; import { ReqLog, ResLog } from './ganhai/PtlLog'; -import { ReqOpen as ReqOpen_31, ResOpen as ResOpen_31 } from './ganhai/PtlOpen'; +import { ReqOpen as ReqOpen_34, ResOpen as ResOpen_34 } from './ganhai/PtlOpen'; import { ReqRefresh, ResRefresh } from './ganhai/PtlRefresh'; import { ReqRefreshShip, ResRefreshShip } from './ganhai/PtlRefreshShip'; import { ReqSelect as ReqSelect_1, ResSelect as ResSelect_1 } from './ganhai/PtlSelect'; @@ -134,19 +141,19 @@ import { ReqJx, ResJx } from './gonghui/PtlJx'; import { ReqJxOpen, ResJxOpen } from './gonghui/PtlJxOpen'; import { ReqList as ReqList_1, ResList as ResList_1 } from './gonghui/PtlList'; import { ReqManage, ResManage } from './gonghui/PtlManage'; -import { ReqOpen as ReqOpen_32, ResOpen as ResOpen_32 } from './gonghui/PtlOpen'; +import { ReqOpen as ReqOpen_35, ResOpen as ResOpen_35 } from './gonghui/PtlOpen'; import { ReqTanHe, ResTanHe } from './gonghui/PtlTanHe'; import { ReqTaskOpen, ResTaskOpen } from './gonghui/PtlTaskOpen'; import { ReqTaskReceive, ResTaskReceive } from './gonghui/PtlTaskReceive'; import { ReqUpWz, ResUpWz } from './gonghui/PtlUpWz'; import { ReqLottery as ReqLottery_2, ResLottery as ResLottery_2 } from './gonghuibaozang/PtlLottery'; -import { ReqOpen as ReqOpen_33, ResOpen as ResOpen_33 } from './gonghuibaozang/PtlOpen'; +import { ReqOpen as ReqOpen_36, ResOpen as ResOpen_36 } from './gonghuibaozang/PtlOpen'; import { ReqBuy as ReqBuy_4, ResBuy as ResBuy_4 } from './gonglukuangbiao/PtlBuy'; import { ReqFight as ReqFight_2, ResFight as ResFight_2 } from './gonglukuangbiao/PtlFight'; -import { ReqOpen as ReqOpen_34, ResOpen as ResOpen_34 } from './gonglukuangbiao/PtlOpen'; +import { ReqOpen as ReqOpen_37, ResOpen as ResOpen_37 } from './gonglukuangbiao/PtlOpen'; import { ReqRefresh as ReqRefresh_1, ResRefresh as ResRefresh_1 } from './gonglukuangbiao/PtlRefresh'; import { ReqActive, ResActive } from './gongyu/mingdao/PtlActive'; -import { ReqOpen as ReqOpen_35, ResOpen as ResOpen_35 } from './gongyu/mingdao/PtlOpen'; +import { ReqOpen as ReqOpen_38, ResOpen as ResOpen_38 } from './gongyu/mingdao/PtlOpen'; import { ReqRecPrize as ReqRecPrize_3, ResRecPrize as ResRecPrize_3 } from './gongyu/mingdao/PtlRecPrize'; import { ReqRepair, ResRepair } from './gongyu/mingdao/PtlRepair'; import { ReqReset as ReqReset_1, ResReset as ResReset_1 } from './gongyu/xunlianjihua/PtlReset'; @@ -155,14 +162,14 @@ import { ReqSetSkill, ResSetSkill } from './gongyu/zuozhanjihua/PtlSetSkill'; import { ReqBuyNum as ReqBuyNum_1, ResBuyNum as ResBuyNum_1 } from './hbzb/jfs/PtlBuyNum'; import { ReqFight as ReqFight_3, ResFight as ResFight_3 } from './hbzb/jfs/PtlFight'; import { ReqGetLog as ReqGetLog_1, ResGetLog as ResGetLog_1 } from './hbzb/jfs/PtlGetLog'; -import { ReqOpen as ReqOpen_36, ResOpen as ResOpen_36 } from './hbzb/jfs/PtlOpen'; +import { ReqOpen as ReqOpen_39, ResOpen as ResOpen_39 } from './hbzb/jfs/PtlOpen'; import { ReqRec as ReqRec_11, ResRec as ResRec_11 } from './hbzb/jfs/PtlRec'; import { ReqRefresh as ReqRefresh_2, ResRefresh as ResRefresh_2 } from './hbzb/jfs/PtlRefresh'; import { ReqGetStatus, ResGetStatus } from './hbzb/PtlGetStatus'; import { ReqBuyNum as ReqBuyNum_2, ResBuyNum as ResBuyNum_2 } from './hbzb/zbs/PtlBuyNum'; import { ReqFight as ReqFight_4, ResFight as ResFight_4 } from './hbzb/zbs/PtlFight'; import { ReqGetLog as ReqGetLog_2, ResGetLog as ResGetLog_2 } from './hbzb/zbs/PtlGetLog'; -import { ReqOpen as ReqOpen_37, ResOpen as ResOpen_37 } from './hbzb/zbs/PtlOpen'; +import { ReqOpen as ReqOpen_40, ResOpen as ResOpen_40 } from './hbzb/zbs/PtlOpen'; import { ReqRefresh as ReqRefresh_3, ResRefresh as ResRefresh_3 } from './hbzb/zbs/PtlRefresh'; import { ReqAwake, ResAwake } from './hero/PtlAwake'; import { ReqChangePos, ResChangePos } from './hero/PtlChangePos'; @@ -178,40 +185,40 @@ import { ReqGet as ReqGet_2, ResGet as ResGet_2 } from './hongdian/PtlGet'; import { ReqGetList as ReqGetList_4, ResGetList as ResGetList_4 } from './item/PtlGetList'; import { ReqUse, ResUse } from './item/PtlUse'; import { ReqLottery as ReqLottery_3, ResLottery as ResLottery_3 } from './jiaotang/PtlLottery'; -import { ReqOpen as ReqOpen_38, ResOpen as ResOpen_38 } from './jiaotang/PtlOpen'; +import { ReqOpen as ReqOpen_41, ResOpen as ResOpen_41 } from './jiaotang/PtlOpen'; import { ReqLottery as ReqLottery_4, ResLottery as ResLottery_4 } from './jiuba/PtlLottery'; -import { ReqOpen as ReqOpen_39, ResOpen as ResOpen_39 } from './jiuba/PtlOpen'; +import { ReqOpen as ReqOpen_42, ResOpen as ResOpen_42 } from './jiuba/PtlOpen'; import { ReqBuyFightNum, ResBuyFightNum } from './jjc/PtlBuyFightNum'; import { ReqFight as ReqFight_5, ResFight as ResFight_5 } from './jjc/PtlFight'; import { ReqFightLog, ResFightLog } from './jjc/PtlFightLog'; -import { ReqOpen as ReqOpen_40, ResOpen as ResOpen_40 } from './jjc/PtlOpen'; -import { ReqReceive as ReqReceive_4, ResReceive as ResReceive_4 } from './jjc/PtlReceive'; +import { ReqOpen as ReqOpen_43, ResOpen as ResOpen_43 } from './jjc/PtlOpen'; +import { ReqReceive as ReqReceive_7, ResReceive as ResReceive_7 } from './jjc/PtlReceive'; import { ReqRefresh as ReqRefresh_4, ResRefresh as ResRefresh_4 } from './jjc/PtlRefresh'; -import { ReqOpen as ReqOpen_41, ResOpen as ResOpen_41 } from './kaifujingsai/PtlOpen'; -import { ReqReceive as ReqReceive_5, ResReceive as ResReceive_5 } from './kaifujingsai/PtlReceive'; +import { ReqOpen as ReqOpen_44, ResOpen as ResOpen_44 } from './kaifujingsai/PtlOpen'; +import { ReqReceive as ReqReceive_8, ResReceive as ResReceive_8 } from './kaifujingsai/PtlReceive'; import { ReqApply as ReqApply_2, ResApply as ResApply_2 } from './kbzz/PtlApply'; import { ReqAutoApply, ResAutoApply } from './kbzz/PtlAutoApply'; import { ReqBuyNum as ReqBuyNum_3, ResBuyNum as ResBuyNum_3 } from './kbzz/PtlBuyNum'; import { ReqFight as ReqFight_6, ResFight as ResFight_6 } from './kbzz/PtlFight'; import { ReqFightLog as ReqFightLog_1, ResFightLog as ResFightLog_1 } from './kbzz/PtlFightLog'; import { ReqGroupState, ResGroupState } from './kbzz/PtlGroupState'; -import { ReqOpen as ReqOpen_42, ResOpen as ResOpen_42 } from './kbzz/PtlOpen'; +import { ReqOpen as ReqOpen_45, ResOpen as ResOpen_45 } from './kbzz/PtlOpen'; import { ReqRecPrize as ReqRecPrize_4, ResRecPrize as ResRecPrize_4 } from './kbzz/PtlRecPrize'; import { ReqRefresh as ReqRefresh_5, ResRefresh as ResRefresh_5 } from './kbzz/PtlRefresh'; import { ReqAddPkNum, ResAddPkNum } from './kuangdong/PtlAddPkNum'; import { ReqGetPrize, ResGetPrize } from './kuangdong/PtlGetPrize'; import { ReqKdInfo, ResKdInfo } from './kuangdong/PtlKdInfo'; import { ReqLog as ReqLog_1, ResLog as ResLog_1 } from './kuangdong/PtlLog'; -import { ReqOpen as ReqOpen_43, ResOpen as ResOpen_43 } from './kuangdong/PtlOpen'; +import { ReqOpen as ReqOpen_46, ResOpen as ResOpen_46 } from './kuangdong/PtlOpen'; import { ReqYanShi, ResYanShi } from './kuangdong/PtlYanShi'; import { ReqZhanLing, ResZhanLing } from './kuangdong/PtlZhanLing'; -import { ReqOpen as ReqOpen_44, ResOpen as ResOpen_44 } from './lingzhulaixi/PtlOpen'; +import { ReqOpen as ReqOpen_47, ResOpen as ResOpen_47 } from './lingzhulaixi/PtlOpen'; import { ReqPkBoss, ResPkBoss } from './lingzhulaixi/PtlPkBoss'; import { ReqPkRank, ResPkRank } from './lingzhulaixi/PtlPkRank'; import { ReqSaoDang, ResSaoDang } from './lingzhulaixi/PtlSaoDang'; import { ReqBuy as ReqBuy_5, ResBuy as ResBuy_5 } from './meirishilian/PtlBuy'; import { ReqFight as ReqFight_7, ResFight as ResFight_7 } from './meirishilian/PtlFight'; -import { ReqOpen as ReqOpen_45, ResOpen as ResOpen_45 } from './meirishilian/PtlOpen'; +import { ReqOpen as ReqOpen_48, ResOpen as ResOpen_48 } from './meirishilian/PtlOpen'; import { MsgBindUid } from './msg_c2s/MsgBindUid'; import { MsgPay } from './msg_c2s/MsgPay'; import { MsgSync } from './msg_c2s/MsgSync'; @@ -236,13 +243,14 @@ 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'; import { MsgXianshilibao } from './msg_s2c/MsgXianshilibao'; import { ReqFight as ReqFight_8, ResFight as ResFight_8 } from './pata/PtlFight'; import { ReqGetPrize as ReqGetPrize_1, ResGetPrize as ResGetPrize_1 } from './pata/PtlGetPrize'; -import { ReqOpen as ReqOpen_46, ResOpen as ResOpen_46 } from './pata/PtlOpen'; +import { ReqOpen as ReqOpen_49, ResOpen as ResOpen_49 } from './pata/PtlOpen'; import { ReqSaoDang as ReqSaoDang_1, ResSaoDang as ResSaoDang_1 } from './pata/PtlSaoDang'; import { ReqGetList as ReqGetList_5, ResGetList as ResGetList_5 } from './pay/PtlGetList'; import { ReqGetList as ReqGetList_6, ResGetList as ResGetList_6 } from './peijian/PtlGetList'; @@ -258,14 +266,16 @@ import { ReqUnLock, ResUnLock } from './peijian/PtlUnLock'; import { ReqWear as ReqWear_1, ResWear as ResWear_1 } from './peijian/PtlWear'; import { ReqDeal, ResDeal } from './peijiancangku/PtlDeal'; import { ReqJump, ResJump } from './peijiancangku/PtlJump'; -import { ReqOpen as ReqOpen_47, ResOpen as ResOpen_47 } from './peijiancangku/PtlOpen'; +import { ReqOpen as ReqOpen_50, ResOpen as ResOpen_50 } from './peijiancangku/PtlOpen'; import { ReqBingo, ResBingo } from './PtlBingo'; import { ReqFightTest, ResFightTest } from './PtlFightTest'; import { ReqSyncBtn, ResSyncBtn } from './PtlSyncBtn'; import { ReqTest, ResTest } from './PtlTest'; +import { ReqItemNoEnough, ResItemNoEnough } from './pushgift/PtlItemNoEnough'; +import { ReqOpen as ReqOpen_51, ResOpen as ResOpen_51 } 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_52, ResOpen as ResOpen_52 } from './qjzzd/PtlOpen'; +import { ReqOpen as ReqOpen_53, ResOpen as ResOpen_53 } 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'; @@ -273,20 +283,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_54, ResOpen as ResOpen_54 } from './shootGame/PtlOpen'; import { ReqRec as ReqRec_13, ResRec as ResRec_13 } 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_55, ResOpen as ResOpen_55 } 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_56, ResOpen as ResOpen_56 } 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_57, ResOpen as ResOpen_57 } from './slzd/PtlOpen'; import { ReqOpenFort, ResOpenFort } from './slzd/PtlOpenFort'; import { ReqRec as ReqRec_14, ResRec as ResRec_14 } from './slzd/PtlRec'; import { ReqRefresh as ReqRefresh_7, ResRefresh as ResRefresh_7 } from './slzd/PtlRefresh'; @@ -295,14 +305,15 @@ 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 { ReqReceive as ReqReceive_6, ResReceive as ResReceive_6 } from './tanxian/PtlReceive'; +import { ReqOpen as ReqOpen_58, ResOpen as ResOpen_58 } from './tanxian/PtlOpen'; +import { ReqReceive as ReqReceive_9, ResReceive as ResReceive_9 } 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_59, ResOpen as ResOpen_59 } from './task/PtlOpen'; import { ReqCDKEY, ResCDKEY } from './user/PtlCDKEY'; import { ReqChangeInfo, ResChangeInfo } from './user/PtlChangeInfo'; import { ReqChangeName, ResChangeName } from './user/PtlChangeName'; +import { ReqDot, ResDot } from './user/PtlDot'; import { ReqFight as ReqFight_12, ResFight as ResFight_12 } from './user/PtlFight'; import { ReqGetInfo, ResGetInfo } from './user/PtlGetInfo'; import { ReqInfoOpen, ResInfoOpen } from './user/PtlInfoOpen'; @@ -315,7 +326,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_60, ResOpen as ResOpen_60 } from './weixiuchang/PtlOpen'; import { ReqUpLv, ResUpLv } from './weixiuchang/PtlUpLv'; import { ReqUpStar, ResUpStar } from './weixiuchang/PtlUpStar'; import { ReqAutoBaoMing, ResAutoBaoMing } from './wzry/PtlAutoBaoMing'; @@ -326,7 +337,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_61, ResOpen as ResOpen_61 } from './wzry/PtlOpen'; import { ReqUpdateFight, ResUpdateFight } from './wzry/PtlUpdateFight'; import { ReqWzzd, ResWzzd } from './wzry/PtlWzzd'; import { ReqZuanShiOpen, ResZuanShiOpen } from './wzry/PtlZuanShiOpen'; @@ -334,8 +345,8 @@ 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 { ReqReceive as ReqReceive_7, ResReceive as ResReceive_7 } from './xstask/PtlReceive'; +import { ReqOpen as ReqOpen_62, ResOpen as ResOpen_62 } from './xstask/PtlOpen'; +import { ReqReceive as ReqReceive_10, ResReceive as ResReceive_10 } from './xstask/PtlReceive'; import { ReqRefresh as ReqRefresh_8, ResRefresh as ResRefresh_8 } from './xstask/PtlRefresh'; import { ReqHandle, ResHandle } from './yongbingzhuzhan/PtlHandle'; import { ReqChangePos as ReqChangePos_1, ResChangePos as ResChangePos_1 } from './zhanqianbushu/PtlChangePos'; @@ -604,10 +615,18 @@ export interface ServiceType { req: ReqTaskPrize, res: ResTaskPrize }, - "event/leijichongzhi/Open": { + "event/leichonglibao/Open": { req: ReqOpen_14, res: ResOpen_14 }, + "event/leichonglibao/Receive": { + req: ReqReceive_2, + res: ResReceive_2 + }, + "event/leijichongzhi/Open": { + req: ReqOpen_15, + res: ResOpen_15 + }, "event/leijichongzhi/Rec": { req: ReqRec_5, res: ResRec_5 @@ -617,36 +636,52 @@ export interface ServiceType { res: ResLottery }, "event/niudanji/Open": { - req: ReqOpen_15, - res: ResOpen_15 - }, - "event/qirichongzhi/Open": { req: ReqOpen_16, res: ResOpen_16 }, + "event/payForDiamond/CanReceive": { + req: ReqCanReceive, + res: ResCanReceive + }, + "event/payForDiamond/Receive": { + req: ReqReceive_3, + res: ResReceive_3 + }, + "event/pobinglibao/Open": { + req: ReqOpen_17, + res: ResOpen_17 + }, + "event/pobinglibao/Receive": { + req: ReqReceive_4, + res: ResReceive_4 + }, + "event/qirichongzhi/Open": { + req: ReqOpen_18, + res: ResOpen_18 + }, "event/qirichongzhi/Rec": { req: ReqRec_6, res: ResRec_6 }, "event/qiridenglu/Open": { - req: ReqOpen_17, - res: ResOpen_17 + req: ReqOpen_19, + res: ResOpen_19 }, "event/qiridenglu/RecPrize": { req: ReqRecPrize_1, res: ResRecPrize_1 }, "event/shiwuleichong/Open": { - req: ReqOpen_18, - res: ResOpen_18 + req: ReqOpen_20, + res: ResOpen_20 }, "event/shouchong/Open": { - req: ReqOpen_19, - res: ResOpen_19 + req: ReqOpen_21, + res: ResOpen_21 }, "event/shouchong/Receive": { - req: ReqReceive_2, - res: ResReceive_2 + req: ReqReceive_5, + res: ResReceive_5 }, "event/xianshizhaomu/Buy": { req: ReqBuy_1, @@ -661,32 +696,36 @@ export interface ServiceType { res: ResLottery_1 }, "event/xianshizhaomu/Open": { - req: ReqOpen_20, - res: ResOpen_20 + req: ReqOpen_22, + res: ResOpen_22 }, "event/xianshizhaomu/Rec": { req: ReqRec_7, res: ResRec_7 }, + "event/xiaofeijingsai/Open": { + req: ReqOpen_23, + res: ResOpen_23 + }, "event/xinshoulibao/Open": { - req: ReqOpen_21, - res: ResOpen_21 + req: ReqOpen_24, + res: ResOpen_24 }, "event/yangchengmubiao/Buy": { req: ReqBuy_2, res: ResBuy_2 }, "event/yangchengmubiao/Open": { - req: ReqOpen_22, - res: ResOpen_22 + req: ReqOpen_25, + res: ResOpen_25 }, "event/yangchengmubiao/Rec": { req: ReqRec_8, res: ResRec_8 }, "event/yibaichou/Open": { - req: ReqOpen_23, - res: ResOpen_23 + req: ReqOpen_26, + res: ResOpen_26 }, "event/yibaichou/Rec": { req: ReqRec_9, @@ -697,8 +736,8 @@ export interface ServiceType { res: ResRecAll }, "event/yuedujijin/Open": { - req: ReqOpen_24, - res: ResOpen_24 + req: ReqOpen_27, + res: ResOpen_27 }, "event/yuedujijin/Rec": { req: ReqRec_10, @@ -709,8 +748,8 @@ export interface ServiceType { res: ResBuyLv }, "event/zhanling/Open": { - req: ReqOpen_25, - res: ResOpen_25 + req: ReqOpen_28, + res: ResOpen_28 }, "event/zhanling/RecPrize": { req: ReqRecPrize_2, @@ -721,24 +760,24 @@ export interface ServiceType { res: ResRecTask }, "event/zhoulibao/Open": { - req: ReqOpen_26, - res: ResOpen_26 + req: ReqOpen_29, + res: ResOpen_29 }, "event/zhoumolibao/Open": { - req: ReqOpen_27, - res: ResOpen_27 + req: ReqOpen_30, + res: ResOpen_30 }, "event/zhoumolibao/Receive": { - req: ReqReceive_3, - res: ResReceive_3 + req: ReqReceive_6, + res: ResReceive_6 }, "event/zixuanlibao/Buy": { req: ReqBuy_3, res: ResBuy_3 }, "event/zixuanlibao/Open": { - req: ReqOpen_28, - res: ResOpen_28 + req: ReqOpen_31, + res: ResOpen_31 }, "eventlist/hdGetList": { req: ReqhdGetList, @@ -761,8 +800,8 @@ export interface ServiceType { res: ResList }, "friend/Open": { - req: ReqOpen_29, - res: ResOpen_29 + req: ReqOpen_32, + res: ResOpen_32 }, "friend/Respond": { req: ReqRespond, @@ -781,8 +820,8 @@ export interface ServiceType { res: ResChallenge }, "ganbutexun/Open": { - req: ReqOpen_30, - res: ResOpen_30 + req: ReqOpen_33, + res: ResOpen_33 }, "ganhai/Fast": { req: ReqFast, @@ -797,8 +836,8 @@ export interface ServiceType { res: ResLog }, "ganhai/Open": { - req: ReqOpen_31, - res: ResOpen_31 + req: ReqOpen_34, + res: ResOpen_34 }, "ganhai/Refresh": { req: ReqRefresh, @@ -885,8 +924,8 @@ export interface ServiceType { res: ResManage }, "gonghui/Open": { - req: ReqOpen_32, - res: ResOpen_32 + req: ReqOpen_35, + res: ResOpen_35 }, "gonghui/TanHe": { req: ReqTanHe, @@ -909,8 +948,8 @@ export interface ServiceType { res: ResLottery_2 }, "gonghuibaozang/Open": { - req: ReqOpen_33, - res: ResOpen_33 + req: ReqOpen_36, + res: ResOpen_36 }, "gonglukuangbiao/Buy": { req: ReqBuy_4, @@ -921,8 +960,8 @@ export interface ServiceType { res: ResFight_2 }, "gonglukuangbiao/Open": { - req: ReqOpen_34, - res: ResOpen_34 + req: ReqOpen_37, + res: ResOpen_37 }, "gonglukuangbiao/Refresh": { req: ReqRefresh_1, @@ -933,8 +972,8 @@ export interface ServiceType { res: ResActive }, "gongyu/mingdao/Open": { - req: ReqOpen_35, - res: ResOpen_35 + req: ReqOpen_38, + res: ResOpen_38 }, "gongyu/mingdao/RecPrize": { req: ReqRecPrize_3, @@ -969,8 +1008,8 @@ export interface ServiceType { res: ResGetLog_1 }, "hbzb/jfs/Open": { - req: ReqOpen_36, - res: ResOpen_36 + req: ReqOpen_39, + res: ResOpen_39 }, "hbzb/jfs/Rec": { req: ReqRec_11, @@ -997,8 +1036,8 @@ export interface ServiceType { res: ResGetLog_2 }, "hbzb/zbs/Open": { - req: ReqOpen_37, - res: ResOpen_37 + req: ReqOpen_40, + res: ResOpen_40 }, "hbzb/zbs/Refresh": { req: ReqRefresh_3, @@ -1061,16 +1100,16 @@ export interface ServiceType { res: ResLottery_3 }, "jiaotang/Open": { - req: ReqOpen_38, - res: ResOpen_38 + req: ReqOpen_41, + res: ResOpen_41 }, "jiuba/Lottery": { req: ReqLottery_4, res: ResLottery_4 }, "jiuba/Open": { - req: ReqOpen_39, - res: ResOpen_39 + req: ReqOpen_42, + res: ResOpen_42 }, "jjc/BuyFightNum": { req: ReqBuyFightNum, @@ -1085,24 +1124,24 @@ export interface ServiceType { res: ResFightLog }, "jjc/Open": { - req: ReqOpen_40, - res: ResOpen_40 + req: ReqOpen_43, + res: ResOpen_43 }, "jjc/Receive": { - req: ReqReceive_4, - res: ResReceive_4 + req: ReqReceive_7, + res: ResReceive_7 }, "jjc/Refresh": { req: ReqRefresh_4, res: ResRefresh_4 }, "kaifujingsai/Open": { - req: ReqOpen_41, - res: ResOpen_41 + req: ReqOpen_44, + res: ResOpen_44 }, "kaifujingsai/Receive": { - req: ReqReceive_5, - res: ResReceive_5 + req: ReqReceive_8, + res: ResReceive_8 }, "kbzz/Apply": { req: ReqApply_2, @@ -1129,8 +1168,8 @@ export interface ServiceType { res: ResGroupState }, "kbzz/Open": { - req: ReqOpen_42, - res: ResOpen_42 + req: ReqOpen_45, + res: ResOpen_45 }, "kbzz/RecPrize": { req: ReqRecPrize_4, @@ -1157,8 +1196,8 @@ export interface ServiceType { res: ResLog_1 }, "kuangdong/Open": { - req: ReqOpen_43, - res: ResOpen_43 + req: ReqOpen_46, + res: ResOpen_46 }, "kuangdong/YanShi": { req: ReqYanShi, @@ -1169,8 +1208,8 @@ export interface ServiceType { res: ResZhanLing }, "lingzhulaixi/Open": { - req: ReqOpen_44, - res: ResOpen_44 + req: ReqOpen_47, + res: ResOpen_47 }, "lingzhulaixi/PkBoss": { req: ReqPkBoss, @@ -1193,8 +1232,8 @@ export interface ServiceType { res: ResFight_7 }, "meirishilian/Open": { - req: ReqOpen_45, - res: ResOpen_45 + req: ReqOpen_48, + res: ResOpen_48 }, "pata/Fight": { req: ReqFight_8, @@ -1205,8 +1244,8 @@ export interface ServiceType { res: ResGetPrize_1 }, "pata/Open": { - req: ReqOpen_46, - res: ResOpen_46 + req: ReqOpen_49, + res: ResOpen_49 }, "pata/SaoDang": { req: ReqSaoDang_1, @@ -1269,8 +1308,8 @@ export interface ServiceType { res: ResJump }, "peijiancangku/Open": { - req: ReqOpen_47, - res: ResOpen_47 + req: ReqOpen_50, + res: ResOpen_50 }, "Bingo": { req: ReqBingo, @@ -1288,17 +1327,25 @@ export interface ServiceType { req: ReqTest, res: ResTest }, + "pushgift/ItemNoEnough": { + req: ReqItemNoEnough, + res: ResItemNoEnough + }, + "pushgift/Open": { + req: ReqOpen_51, + res: ResOpen_51 + }, "qjzzd/Fight": { req: ReqFight_9, res: ResFight_9 }, "qjzzd/Open": { - req: ReqOpen_48, - res: ResOpen_48 + req: ReqOpen_52, + res: ResOpen_52 }, "rank/Open": { - req: ReqOpen_49, - res: ResOpen_49 + req: ReqOpen_53, + res: ResOpen_53 }, "shiwu/Concise": { req: ReqConcise, @@ -1329,8 +1376,8 @@ export interface ServiceType { res: ResWear_2 }, "shootGame/Open": { - req: ReqOpen_50, - res: ResOpen_50 + req: ReqOpen_54, + res: ResOpen_54 }, "shootGame/Rec": { req: ReqRec_13, @@ -1341,8 +1388,8 @@ export interface ServiceType { res: ResBuy_6 }, "shop/Open": { - req: ReqOpen_51, - res: ResOpen_51 + req: ReqOpen_55, + res: ResOpen_55 }, "shop/Refresh": { req: ReqRefresh_6, @@ -1357,8 +1404,8 @@ export interface ServiceType { res: ResGetPrize_2 }, "sign/Open": { - req: ReqOpen_52, - res: ResOpen_52 + req: ReqOpen_56, + res: ResOpen_56 }, "slzd/Aim": { req: ReqAim, @@ -1381,8 +1428,8 @@ export interface ServiceType { res: ResMyRank }, "slzd/Open": { - req: ReqOpen_53, - res: ResOpen_53 + req: ReqOpen_57, + res: ResOpen_57 }, "slzd/OpenFort": { req: ReqOpenFort, @@ -1417,12 +1464,12 @@ export interface ServiceType { res: ResGuaJi }, "tanxian/Open": { - req: ReqOpen_54, - res: ResOpen_54 + req: ReqOpen_58, + res: ResOpen_58 }, "tanxian/Receive": { - req: ReqReceive_6, - res: ResReceive_6 + req: ReqReceive_9, + res: ResReceive_9 }, "task/AllFinsh": { req: ReqAllFinsh, @@ -1433,8 +1480,8 @@ export interface ServiceType { res: ResFinsh }, "task/Open": { - req: ReqOpen_55, - res: ResOpen_55 + req: ReqOpen_59, + res: ResOpen_59 }, "user/CDKEY": { req: ReqCDKEY, @@ -1448,6 +1495,10 @@ export interface ServiceType { req: ReqChangeName, res: ResChangeName }, + "user/Dot": { + req: ReqDot, + res: ResDot + }, "user/Fight": { req: ReqFight_12, res: ResFight_12 @@ -1497,8 +1548,8 @@ export interface ServiceType { res: ResExchange }, "weixiuchang/Open": { - req: ReqOpen_56, - res: ResOpen_56 + req: ReqOpen_60, + res: ResOpen_60 }, "weixiuchang/UpLv": { req: ReqUpLv, @@ -1541,8 +1592,8 @@ export interface ServiceType { res: ResJingCaiOpen }, "wzry/Open": { - req: ReqOpen_57, - res: ResOpen_57 + req: ReqOpen_61, + res: ResOpen_61 }, "wzry/UpdateFight": { req: ReqUpdateFight, @@ -1573,12 +1624,12 @@ export interface ServiceType { res: ResOnekeyReceive }, "xstask/Open": { - req: ReqOpen_58, - res: ResOpen_58 + req: ReqOpen_62, + res: ResOpen_62 }, "xstask/Receive": { - req: ReqReceive_7, - res: ResReceive_7 + req: ReqReceive_10, + res: ResReceive_10 }, "xstask/Refresh": { req: ReqRefresh_8, @@ -1626,6 +1677,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, @@ -1962,121 +2014,156 @@ export const serviceProto: ServiceProto = { }, { "id": 65, - "name": "event/leijichongzhi/Open", + "name": "event/leichonglibao/Open", "type": "api" }, { "id": 66, - "name": "event/leijichongzhi/Rec", + "name": "event/leichonglibao/Receive", "type": "api" }, { "id": 67, - "name": "event/niudanji/Lottery", + "name": "event/leijichongzhi/Open", "type": "api" }, { "id": 68, - "name": "event/niudanji/Open", + "name": "event/leijichongzhi/Rec", "type": "api" }, { "id": 69, - "name": "event/qirichongzhi/Open", + "name": "event/niudanji/Lottery", "type": "api" }, { "id": 70, - "name": "event/qirichongzhi/Rec", + "name": "event/niudanji/Open", "type": "api" }, { "id": 71, - "name": "event/qiridenglu/Open", + "name": "event/payForDiamond/CanReceive", "type": "api" }, { "id": 72, - "name": "event/qiridenglu/RecPrize", + "name": "event/payForDiamond/Receive", "type": "api" }, { "id": 73, - "name": "event/shiwuleichong/Open", + "name": "event/pobinglibao/Open", "type": "api" }, { "id": 74, - "name": "event/shouchong/Open", + "name": "event/pobinglibao/Receive", "type": "api" }, { "id": 75, - "name": "event/shouchong/Receive", + "name": "event/qirichongzhi/Open", "type": "api" }, { "id": 76, - "name": "event/xianshizhaomu/Buy", + "name": "event/qirichongzhi/Rec", "type": "api" }, { "id": 77, - "name": "event/xianshizhaomu/Duihuan", + "name": "event/qiridenglu/Open", "type": "api" }, { "id": 78, - "name": "event/xianshizhaomu/Lottery", + "name": "event/qiridenglu/RecPrize", "type": "api" }, { "id": 79, - "name": "event/xianshizhaomu/Open", + "name": "event/shiwuleichong/Open", "type": "api" }, { "id": 80, - "name": "event/xianshizhaomu/Rec", + "name": "event/shouchong/Open", "type": "api" }, { "id": 81, - "name": "event/xinshoulibao/Open", + "name": "event/shouchong/Receive", "type": "api" }, { "id": 82, - "name": "event/yangchengmubiao/Buy", + "name": "event/xianshizhaomu/Buy", "type": "api" }, { "id": 83, - "name": "event/yangchengmubiao/Open", + "name": "event/xianshizhaomu/Duihuan", "type": "api" }, { "id": 84, - "name": "event/yangchengmubiao/Rec", + "name": "event/xianshizhaomu/Lottery", "type": "api" }, { "id": 85, - "name": "event/yibaichou/Open", + "name": "event/xianshizhaomu/Open", "type": "api" }, { "id": 86, - "name": "event/yibaichou/Rec", + "name": "event/xianshizhaomu/Rec", "type": "api" }, { "id": 87, - "name": "event/yibaichou/RecAll", + "name": "event/xiaofeijingsai/Open", "type": "api" }, { "id": 88, + "name": "event/xinshoulibao/Open", + "type": "api" + }, + { + "id": 89, + "name": "event/yangchengmubiao/Buy", + "type": "api" + }, + { + "id": 90, + "name": "event/yangchengmubiao/Open", + "type": "api" + }, + { + "id": 91, + "name": "event/yangchengmubiao/Rec", + "type": "api" + }, + { + "id": 92, + "name": "event/yibaichou/Open", + "type": "api" + }, + { + "id": 93, + "name": "event/yibaichou/Rec", + "type": "api" + }, + { + "id": 94, + "name": "event/yibaichou/RecAll", + "type": "api" + }, + { + "id": 95, "name": "event/yuedujijin/Open", "type": "api", "conf": { @@ -2084,157 +2171,157 @@ export const serviceProto: ServiceProto = { } }, { - "id": 89, + "id": 96, "name": "event/yuedujijin/Rec", "type": "api" }, { - "id": 90, + "id": 97, "name": "event/zhanling/BuyLv", "type": "api" }, { - "id": 91, + "id": 98, "name": "event/zhanling/Open", "type": "api" }, { - "id": 92, + "id": 99, "name": "event/zhanling/RecPrize", "type": "api" }, { - "id": 93, + "id": 100, "name": "event/zhanling/RecTask", "type": "api" }, { - "id": 94, + "id": 101, "name": "event/zhoulibao/Open", "type": "api" }, { - "id": 95, + "id": 102, "name": "event/zhoumolibao/Open", "type": "api" }, { - "id": 96, + "id": 103, "name": "event/zhoumolibao/Receive", "type": "api" }, { - "id": 97, + "id": 104, "name": "event/zixuanlibao/Buy", "type": "api" }, { - "id": 98, + "id": 105, "name": "event/zixuanlibao/Open", "type": "api" }, { - "id": 99, + "id": 106, "name": "eventlist/hdGetList", "type": "api" }, { - "id": 100, + "id": 107, "name": "friend/Apply", "type": "api" }, { - "id": 101, + "id": 108, "name": "friend/Del", "type": "api" }, { - "id": 102, + "id": 109, "name": "friend/Gift", "type": "api" }, { - "id": 103, + "id": 110, "name": "friend/List", "type": "api" }, { - "id": 104, + "id": 111, "name": "friend/Open", "type": "api" }, { - "id": 105, + "id": 112, "name": "friend/Respond", "type": "api" }, { - "id": 106, + "id": 113, "name": "friend/RmBlackList", "type": "api" }, { - "id": 107, + "id": 114, "name": "friend/Search", "type": "api" }, { - "id": 108, + "id": 115, "name": "ganbutexun/Challenge", "type": "api" }, { - "id": 109, + "id": 116, "name": "ganbutexun/Open", "type": "api" }, { - "id": 110, + "id": 117, "name": "ganhai/Fast", "type": "api" }, { - "id": 111, + "id": 118, "name": "ganhai/Fight", "type": "api" }, { - "id": 112, + "id": 119, "name": "ganhai/Log", "type": "api" }, { - "id": 113, + "id": 120, "name": "ganhai/Open", "type": "api" }, { - "id": 114, + "id": 121, "name": "ganhai/Refresh", "type": "api" }, { - "id": 115, + "id": 122, "name": "ganhai/RefreshShip", "type": "api" }, { - "id": 116, + "id": 123, "name": "ganhai/Select", "type": "api" }, { - "id": 117, + "id": 124, "name": "gmapi/Gift", "type": "api" }, { - "id": 118, + "id": 125, "name": "gmapi/Post", "type": "api" }, { - "id": 119, + "id": 126, "name": "gonghui/Apply", "type": "api", "conf": { @@ -2244,7 +2331,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 120, + "id": 127, "name": "gonghui/ApplyAll", "type": "api", "conf": { @@ -2254,7 +2341,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 121, + "id": 128, "name": "gonghui/ApplyList", "type": "api", "conf": { @@ -2264,7 +2351,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 122, + "id": 129, "name": "gonghui/Change", "type": "api", "conf": { @@ -2274,12 +2361,12 @@ export const serviceProto: ServiceProto = { } }, { - "id": 123, + "id": 130, "name": "gonghui/Create", "type": "api" }, { - "id": 124, + "id": 131, "name": "gonghui/Dissolve", "type": "api", "conf": { @@ -2289,7 +2376,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 125, + "id": 132, "name": "gonghui/Exit", "type": "api", "conf": { @@ -2299,12 +2386,12 @@ export const serviceProto: ServiceProto = { } }, { - "id": 126, + "id": 133, "name": "gonghui/FbBuyNum", "type": "api" }, { - "id": 127, + "id": 134, "name": "gonghui/FbFight", "type": "api", "conf": { @@ -2314,7 +2401,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 128, + "id": 135, "name": "gonghui/FbOpen", "type": "api", "conf": { @@ -2324,17 +2411,17 @@ export const serviceProto: ServiceProto = { } }, { - "id": 129, + "id": 136, "name": "gonghui/GetList", "type": "api" }, { - "id": 130, + "id": 137, "name": "gonghui/Join", "type": "api" }, { - "id": 131, + "id": 138, "name": "gonghui/Jx", "type": "api", "conf": { @@ -2344,7 +2431,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 132, + "id": 139, "name": "gonghui/JxOpen", "type": "api", "conf": { @@ -2354,7 +2441,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 133, + "id": 140, "name": "gonghui/List", "type": "api", "conf": { @@ -2364,7 +2451,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 134, + "id": 141, "name": "gonghui/Manage", "type": "api", "conf": { @@ -2374,7 +2461,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 135, + "id": 142, "name": "gonghui/Open", "type": "api", "conf": { @@ -2384,7 +2471,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 136, + "id": 143, "name": "gonghui/TanHe", "type": "api", "conf": { @@ -2394,7 +2481,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 137, + "id": 144, "name": "gonghui/TaskOpen", "type": "api", "conf": { @@ -2404,7 +2491,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 138, + "id": 145, "name": "gonghui/TaskReceive", "type": "api", "conf": { @@ -2414,7 +2501,7 @@ export const serviceProto: ServiceProto = { } }, { - "id": 139, + "id": 146, "name": "gonghui/UpWz", "type": "api", "conf": { @@ -2424,137 +2511,137 @@ export const serviceProto: ServiceProto = { } }, { - "id": 140, + "id": 147, "name": "gonghuibaozang/Lottery", "type": "api" }, { - "id": 141, + "id": 148, "name": "gonghuibaozang/Open", "type": "api" }, { - "id": 142, + "id": 149, "name": "gonglukuangbiao/Buy", "type": "api" }, { - "id": 143, + "id": 150, "name": "gonglukuangbiao/Fight", "type": "api" }, { - "id": 144, + "id": 151, "name": "gonglukuangbiao/Open", "type": "api" }, { - "id": 145, + "id": 152, "name": "gonglukuangbiao/Refresh", "type": "api" }, { - "id": 146, + "id": 153, "name": "gongyu/mingdao/Active", "type": "api" }, { - "id": 147, + "id": 154, "name": "gongyu/mingdao/Open", "type": "api" }, { - "id": 148, + "id": 155, "name": "gongyu/mingdao/RecPrize", "type": "api" }, { - "id": 149, + "id": 156, "name": "gongyu/mingdao/Repair", "type": "api" }, { - "id": 150, + "id": 157, "name": "gongyu/xunlianjihua/Reset", "type": "api" }, { - "id": 151, + "id": 158, "name": "gongyu/xunlianjihua/UpSkill", "type": "api" }, { - "id": 152, + "id": 159, "name": "gongyu/zuozhanjihua/SetSkill", "type": "api" }, { - "id": 153, + "id": 160, "name": "hbzb/jfs/BuyNum", "type": "api" }, { - "id": 154, + "id": 161, "name": "hbzb/jfs/Fight", "type": "api" }, { - "id": 155, + "id": 162, "name": "hbzb/jfs/GetLog", "type": "api" }, { - "id": 156, + "id": 163, "name": "hbzb/jfs/Open", "type": "api" }, { - "id": 157, + "id": 164, "name": "hbzb/jfs/Rec", "type": "api" }, { - "id": 158, + "id": 165, "name": "hbzb/jfs/Refresh", "type": "api" }, { - "id": 159, + "id": 166, "name": "hbzb/GetStatus", "type": "api" }, { - "id": 160, + "id": 167, "name": "hbzb/zbs/BuyNum", "type": "api" }, { - "id": 161, + "id": 168, "name": "hbzb/zbs/Fight", "type": "api" }, { - "id": 162, + "id": 169, "name": "hbzb/zbs/GetLog", "type": "api" }, { - "id": 163, + "id": 170, "name": "hbzb/zbs/Open", "type": "api" }, { - "id": 164, + "id": 171, "name": "hbzb/zbs/Refresh", "type": "api" }, { - "id": 165, + "id": 172, "name": "hero/Awake", "type": "api" }, { - "id": 166, + "id": 173, "name": "hero/ChangePos", "type": "api", "conf": { @@ -2562,17 +2649,17 @@ export const serviceProto: ServiceProto = { } }, { - "id": 167, + "id": 174, "name": "hero/GetList", "type": "api" }, { - "id": 168, + "id": 175, "name": "hero/JinJie", "type": "api" }, { - "id": 169, + "id": 176, "name": "hero/LvUp", "type": "api", "conf": { @@ -2580,32 +2667,32 @@ export const serviceProto: ServiceProto = { } }, { - "id": 170, + "id": 177, "name": "hero/Potency", "type": "api" }, { - "id": 171, + "id": 178, "name": "hero/Rec", "type": "api" }, { - "id": 172, + "id": 179, "name": "hero/Reset", "type": "api" }, { - "id": 173, + "id": 180, "name": "hero/Talent", "type": "api" }, { - "id": 174, + "id": 181, "name": "hero/WeaponUp", "type": "api" }, { - "id": 175, + "id": 182, "name": "hongdian/Get", "type": "api", "conf": { @@ -2613,117 +2700,117 @@ export const serviceProto: ServiceProto = { } }, { - "id": 176, + "id": 183, "name": "item/GetList", "type": "api" }, { - "id": 177, + "id": 184, "name": "item/Use", "type": "api" }, { - "id": 178, + "id": 185, "name": "jiaotang/Lottery", "type": "api" }, { - "id": 179, + "id": 186, "name": "jiaotang/Open", "type": "api" }, { - "id": 180, + "id": 187, "name": "jiuba/Lottery", "type": "api" }, { - "id": 181, + "id": 188, "name": "jiuba/Open", "type": "api" }, { - "id": 182, + "id": 189, "name": "jjc/BuyFightNum", "type": "api" }, { - "id": 183, + "id": 190, "name": "jjc/Fight", "type": "api" }, { - "id": 184, + "id": 191, "name": "jjc/FightLog", "type": "api" }, { - "id": 185, + "id": 192, "name": "jjc/Open", "type": "api" }, { - "id": 186, + "id": 193, "name": "jjc/Receive", "type": "api" }, { - "id": 187, + "id": 194, "name": "jjc/Refresh", "type": "api" }, { - "id": 188, + "id": 195, "name": "kaifujingsai/Open", "type": "api" }, { - "id": 189, + "id": 196, "name": "kaifujingsai/Receive", "type": "api" }, { - "id": 190, + "id": 197, "name": "kbzz/Apply", "type": "api" }, { - "id": 191, + "id": 198, "name": "kbzz/AutoApply", "type": "api" }, { - "id": 192, + "id": 199, "name": "kbzz/BuyNum", "type": "api" }, { - "id": 193, + "id": 200, "name": "kbzz/Fight", "type": "api" }, { - "id": 194, + "id": 201, "name": "kbzz/FightLog", "type": "api" }, { - "id": 195, + "id": 202, "name": "kbzz/GroupState", "type": "api" }, { - "id": 196, + "id": 203, "name": "kbzz/Open", "type": "api" }, { - "id": 197, + "id": 204, "name": "kbzz/RecPrize", "type": "api" }, { - "id": 198, + "id": 205, "name": "kbzz/Refresh", "type": "api", "conf": { @@ -2731,282 +2818,287 @@ export const serviceProto: ServiceProto = { } }, { - "id": 199, + "id": 206, "name": "kuangdong/AddPkNum", "type": "api" }, { - "id": 200, + "id": 207, "name": "kuangdong/GetPrize", "type": "api" }, { - "id": 201, + "id": 208, "name": "kuangdong/KdInfo", "type": "api" }, { - "id": 202, + "id": 209, "name": "kuangdong/Log", "type": "api" }, { - "id": 203, + "id": 210, "name": "kuangdong/Open", "type": "api" }, { - "id": 204, + "id": 211, "name": "kuangdong/YanShi", "type": "api" }, { - "id": 205, + "id": 212, "name": "kuangdong/ZhanLing", "type": "api" }, { - "id": 206, + "id": 213, "name": "lingzhulaixi/Open", "type": "api" }, { - "id": 207, + "id": 214, "name": "lingzhulaixi/PkBoss", "type": "api" }, { - "id": 208, + "id": 215, "name": "lingzhulaixi/PkRank", "type": "api" }, { - "id": 209, + "id": 216, "name": "lingzhulaixi/SaoDang", "type": "api" }, { - "id": 210, + "id": 217, "name": "meirishilian/Buy", "type": "api" }, { - "id": 211, + "id": 218, "name": "meirishilian/Fight", "type": "api" }, { - "id": 212, + "id": 219, "name": "meirishilian/Open", "type": "api" }, { - "id": 213, + "id": 220, "name": "msg_c2s/BindUid", "type": "msg" }, { - "id": 214, + "id": 221, "name": "msg_c2s/Pay", "type": "msg" }, { - "id": 215, + "id": 222, "name": "msg_c2s/Sync", "type": "msg" }, { - "id": 216, + "id": 223, "name": "msg_s2c/Chat", "type": "msg" }, { - "id": 217, + "id": 224, "name": "msg_s2c/ChatHelp", "type": "msg" }, { - "id": 218, + "id": 225, "name": "msg_s2c/Collection", "type": "msg" }, { - "id": 219, + "id": 226, "name": "msg_s2c/Email", "type": "msg" }, { - "id": 220, + "id": 227, "name": "msg_s2c/EmailDel", "type": "msg" }, { - "id": 221, + "id": 228, "name": "msg_s2c/EquipChange", "type": "msg" }, { - "id": 222, + "id": 229, "name": "msg_s2c/Friend", "type": "msg" }, { - "id": 223, + "id": 230, "name": "msg_s2c/GhChange", "type": "msg" }, { - "id": 224, + "id": 231, "name": "msg_s2c/GongHuiBaoZang", "type": "msg" }, { - "id": 225, + "id": 232, "name": "msg_s2c/HeroChange", "type": "msg" }, { - "id": 226, + "id": 233, "name": "msg_s2c/HongDianChange", "type": "msg" }, { - "id": 227, + "id": 234, "name": "msg_s2c/ItemChange", "type": "msg" }, { - "id": 228, + "id": 235, "name": "msg_s2c/LoginQueue", "type": "msg" }, { - "id": 229, + "id": 236, "name": "msg_s2c/LshdChange", "type": "msg" }, { - "id": 230, + "id": 237, "name": "msg_s2c/NewDay", "type": "msg" }, { - "id": 231, + "id": 238, "name": "msg_s2c/OtherLogin", "type": "msg" }, { - "id": 232, + "id": 239, "name": "msg_s2c/PayChange", "type": "msg" }, { - "id": 233, + "id": 240, "name": "msg_s2c/PayResult", "type": "msg" }, { - "id": 234, + "id": 241, "name": "msg_s2c/PeijianChange", "type": "msg" }, { - "id": 235, + "id": 242, "name": "msg_s2c/PlayerChange", "type": "msg" }, { - "id": 236, + "id": 243, "name": "msg_s2c/Private", "type": "msg" }, { - "id": 237, + "id": 244, + "name": "msg_s2c/PushGiftChange", + "type": "msg" + }, + { + "id": 245, "name": "msg_s2c/SendGift", "type": "msg" }, { - "id": 238, + "id": 246, "name": "msg_s2c/ShiwuChange", "type": "msg" }, { - "id": 239, + "id": 247, "name": "msg_s2c/TaskChange", "type": "msg" }, { - "id": 240, + "id": 248, "name": "msg_s2c/Xianshilibao", "type": "msg" }, { - "id": 241, + "id": 249, "name": "pata/Fight", "type": "api" }, { - "id": 242, + "id": 250, "name": "pata/GetPrize", "type": "api" }, { - "id": 243, + "id": 251, "name": "pata/Open", "type": "api" }, { - "id": 244, + "id": 252, "name": "pata/SaoDang", "type": "api" }, { - "id": 245, + "id": 253, "name": "pay/GetList", "type": "api" }, { - "id": 246, + "id": 254, "name": "peijian/GetList", "type": "api" }, { - "id": 247, + "id": 255, "name": "peijian/JingLian", "type": "api" }, { - "id": 248, + "id": 256, "name": "peijian/JinJie", "type": "api" }, { - "id": 249, + "id": 257, "name": "peijian/LvUp", "type": "api" }, { - "id": 250, + "id": 258, "name": "peijian/OneKeyLvUp", "type": "api" }, { - "id": 251, + "id": 259, "name": "peijian/OneKeyWear", "type": "api" }, { - "id": 252, + "id": 260, "name": "peijian/Reset", "type": "api" }, { - "id": 253, + "id": 261, "name": "peijian/Rm", "type": "api" }, { - "id": 254, + "id": 262, "name": "peijian/TakeOff", "type": "api", "conf": { @@ -3014,32 +3106,32 @@ export const serviceProto: ServiceProto = { } }, { - "id": 255, + "id": 263, "name": "peijian/UnLock", "type": "api" }, { - "id": 256, + "id": 264, "name": "peijian/Wear", "type": "api" }, { - "id": 257, + "id": 265, "name": "peijiancangku/Deal", "type": "api" }, { - "id": 258, + "id": 266, "name": "peijiancangku/Jump", "type": "api" }, { - "id": 259, + "id": 267, "name": "peijiancangku/Open", "type": "api" }, { - "id": 260, + "id": 268, "name": "Bingo", "type": "api", "conf": { @@ -3047,137 +3139,147 @@ export const serviceProto: ServiceProto = { } }, { - "id": 261, + "id": 269, "name": "FightTest", "type": "api" }, { - "id": 262, + "id": 270, "name": "SyncBtn", "type": "api" }, { - "id": 263, + "id": 271, "name": "Test", "type": "api" }, - { - "id": 264, - "name": "qjzzd/Fight", - "type": "api" - }, - { - "id": 265, - "name": "qjzzd/Open", - "type": "api" - }, - { - "id": 266, - "name": "rank/Open", - "type": "api" - }, - { - "id": 267, - "name": "shiwu/Concise", - "type": "api" - }, - { - "id": 268, - "name": "shiwu/Extract", - "type": "api" - }, - { - "id": 269, - "name": "shiwu/GetList", - "type": "api" - }, - { - "id": 270, - "name": "shiwu/LvUp", - "type": "api" - }, - { - "id": 271, - "name": "shiwu/Recast", - "type": "api" - }, { "id": 272, - "name": "shiwu/TakeOff", + "name": "pushgift/ItemNoEnough", "type": "api" }, { "id": 273, - "name": "shiwu/Wear", + "name": "pushgift/Open", "type": "api" }, { "id": 274, - "name": "shootGame/Open", + "name": "qjzzd/Fight", "type": "api" }, { "id": 275, - "name": "shootGame/Rec", + "name": "qjzzd/Open", "type": "api" }, { "id": 276, - "name": "shop/Buy", + "name": "rank/Open", "type": "api" }, { "id": 277, - "name": "shop/Open", + "name": "shiwu/Concise", "type": "api" }, { "id": 278, - "name": "shop/Refresh", + "name": "shiwu/Extract", "type": "api" }, { "id": 279, - "name": "sign/GetBoxPrize", + "name": "shiwu/GetList", "type": "api" }, { "id": 280, - "name": "sign/GetPrize", + "name": "shiwu/LvUp", "type": "api" }, { "id": 281, - "name": "sign/Open", + "name": "shiwu/Recast", "type": "api" }, { "id": 282, - "name": "slzd/Aim", + "name": "shiwu/TakeOff", "type": "api" }, { "id": 283, - "name": "slzd/BuyNum", + "name": "shiwu/Wear", "type": "api" }, { "id": 284, - "name": "slzd/Fight", + "name": "shootGame/Open", "type": "api" }, { "id": 285, - "name": "slzd/FightLog", + "name": "shootGame/Rec", "type": "api" }, { "id": 286, - "name": "slzd/MyRank", + "name": "shop/Buy", "type": "api" }, { "id": 287, + "name": "shop/Open", + "type": "api" + }, + { + "id": 288, + "name": "shop/Refresh", + "type": "api" + }, + { + "id": 289, + "name": "sign/GetBoxPrize", + "type": "api" + }, + { + "id": 290, + "name": "sign/GetPrize", + "type": "api" + }, + { + "id": 291, + "name": "sign/Open", + "type": "api" + }, + { + "id": 292, + "name": "slzd/Aim", + "type": "api" + }, + { + "id": 293, + "name": "slzd/BuyNum", + "type": "api" + }, + { + "id": 294, + "name": "slzd/Fight", + "type": "api" + }, + { + "id": 295, + "name": "slzd/FightLog", + "type": "api" + }, + { + "id": 296, + "name": "slzd/MyRank", + "type": "api" + }, + { + "id": 297, "name": "slzd/Open", "type": "api", "conf": { @@ -3187,77 +3289,77 @@ export const serviceProto: ServiceProto = { } }, { - "id": 288, + "id": 298, "name": "slzd/OpenFort", "type": "api" }, { - "id": 289, + "id": 299, "name": "slzd/Rec", "type": "api" }, { - "id": 290, + "id": 300, "name": "slzd/Refresh", "type": "api" }, { - "id": 291, + "id": 301, "name": "slzd/Slot", "type": "api" }, { - "id": 292, + "id": 302, "name": "tanxian/Event", "type": "api" }, { - "id": 293, + "id": 303, "name": "tanxian/FastGuaJi", "type": "api" }, { - "id": 294, + "id": 304, "name": "tanxian/Fight", "type": "api" }, { - "id": 295, + "id": 305, "name": "tanxian/GuaJi", "type": "api" }, { - "id": 296, + "id": 306, "name": "tanxian/Open", "type": "api" }, { - "id": 297, + "id": 307, "name": "tanxian/Receive", "type": "api" }, { - "id": 298, + "id": 308, "name": "task/AllFinsh", "type": "api" }, { - "id": 299, + "id": 309, "name": "task/Finsh", "type": "api" }, { - "id": 300, + "id": 310, "name": "task/Open", "type": "api" }, { - "id": 301, + "id": 311, "name": "user/CDKEY", "type": "api" }, { - "id": 302, + "id": 312, "name": "user/ChangeInfo", "type": "api", "conf": { @@ -3265,197 +3367,202 @@ export const serviceProto: ServiceProto = { } }, { - "id": 303, + "id": 313, "name": "user/ChangeName", "type": "api" }, - { - "id": 304, - "name": "user/Fight", - "type": "api" - }, - { - "id": 305, - "name": "user/GetInfo", - "type": "api" - }, - { - "id": 306, - "name": "user/InfoOpen", - "type": "api" - }, - { - "id": 307, - "name": "user/Login", - "type": "api" - }, - { - "id": 308, - "name": "user/Ping", - "type": "api" - }, - { - "id": 309, - "name": "user/Renown", - "type": "api" - }, - { - "id": 310, - "name": "user/RenownBuy", - "type": "api" - }, - { - "id": 311, - "name": "user/RenownGetPrize", - "type": "api" - }, - { - "id": 312, - "name": "user/RenownOpen", - "type": "api" - }, - { - "id": 313, - "name": "user/Tujian", - "type": "api" - }, { "id": 314, - "name": "weixiuchang/Decompose", + "name": "user/Dot", "type": "api" }, { "id": 315, - "name": "weixiuchang/Exchange", + "name": "user/Fight", "type": "api" }, { "id": 316, - "name": "weixiuchang/Open", + "name": "user/GetInfo", "type": "api" }, { "id": 317, - "name": "weixiuchang/UpLv", + "name": "user/InfoOpen", "type": "api" }, { "id": 318, - "name": "weixiuchang/UpStar", + "name": "user/Login", "type": "api" }, { "id": 319, - "name": "wzry/AutoBaoMing", + "name": "user/Ping", "type": "api" }, { "id": 320, - "name": "wzry/BaoMing", + "name": "user/Renown", "type": "api" }, { "id": 321, - "name": "wzry/catFightLog", + "name": "user/RenownBuy", "type": "api" }, { "id": 322, - "name": "wzry/CatGroup", + "name": "user/RenownGetPrize", "type": "api" }, { "id": 323, - "name": "wzry/DldFight", + "name": "user/RenownOpen", "type": "api" }, { "id": 324, - "name": "wzry/DldRefre", + "name": "user/Tujian", "type": "api" }, { "id": 325, - "name": "wzry/JingCai", + "name": "weixiuchang/Decompose", "type": "api" }, { "id": 326, - "name": "wzry/JingCaiOpen", + "name": "weixiuchang/Exchange", "type": "api" }, { "id": 327, - "name": "wzry/Open", + "name": "weixiuchang/Open", "type": "api" }, { "id": 328, - "name": "wzry/UpdateFight", + "name": "weixiuchang/UpLv", "type": "api" }, { "id": 329, - "name": "wzry/Wzzd", + "name": "weixiuchang/UpStar", "type": "api" }, { "id": 330, - "name": "wzry/ZuanShiOpen", + "name": "wzry/AutoBaoMing", "type": "api" }, { "id": 331, - "name": "xstask/AllGet", + "name": "wzry/BaoMing", "type": "api" }, { "id": 332, - "name": "xstask/Get", + "name": "wzry/catFightLog", "type": "api" }, { "id": 333, - "name": "xstask/LvUp", + "name": "wzry/CatGroup", "type": "api" }, { "id": 334, - "name": "xstask/OnekeyReceive", + "name": "wzry/DldFight", "type": "api" }, { "id": 335, - "name": "xstask/Open", + "name": "wzry/DldRefre", "type": "api" }, { "id": 336, - "name": "xstask/Receive", + "name": "wzry/JingCai", "type": "api" }, { "id": 337, - "name": "xstask/Refresh", + "name": "wzry/JingCaiOpen", "type": "api" }, { "id": 338, - "name": "yongbingzhuzhan/Handle", + "name": "wzry/Open", "type": "api" }, { "id": 339, - "name": "zhanqianbushu/ChangePos", + "name": "wzry/UpdateFight", "type": "api" }, { "id": 340, - "name": "zhanqianbushu/Select", + "name": "wzry/Wzzd", "type": "api" }, { "id": 341, + "name": "wzry/ZuanShiOpen", + "type": "api" + }, + { + "id": 342, + "name": "xstask/AllGet", + "type": "api" + }, + { + "id": 343, + "name": "xstask/Get", + "type": "api" + }, + { + "id": 344, + "name": "xstask/LvUp", + "type": "api" + }, + { + "id": 345, + "name": "xstask/OnekeyReceive", + "type": "api" + }, + { + "id": 346, + "name": "xstask/Open", + "type": "api" + }, + { + "id": 347, + "name": "xstask/Receive", + "type": "api" + }, + { + "id": 348, + "name": "xstask/Refresh", + "type": "api" + }, + { + "id": 349, + "name": "yongbingzhuzhan/Handle", + "type": "api" + }, + { + "id": 350, + "name": "zhanqianbushu/ChangePos", + "type": "api" + }, + { + "id": 351, + "name": "zhanqianbushu/Select", + "type": "api" + }, + { + "id": 352, "name": "zhanqianbushu/Up", "type": "api" } @@ -9978,6 +10085,78 @@ export const serviceProto: ServiceProto = { } ] }, + "event/leichonglibao/PtlOpen/ReqOpen": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "hdid", + "type": { + "type": "Number" + } + } + ] + }, + "event/leichonglibao/PtlOpen/ResOpen": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "sc", + "type": { + "type": "Boolean" + } + }, + { + "id": 1, + "name": "buy", + "type": { + "type": "Array", + "elementType": { + "type": "String" + } + } + } + ] + }, + "event/leichonglibao/PtlReceive/ReqReceive": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "hdid", + "type": { + "type": "Number" + } + }, + { + "id": 1, + "name": "select", + "type": { + "type": "Array", + "elementType": { + "type": "String" + } + } + } + ] + }, + "event/leichonglibao/PtlReceive/ResReceive": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "prize", + "type": { + "type": "Array", + "elementType": { + "type": "Reference", + "target": "type/prizeType" + } + } + } + ] + }, "event/leijichongzhi/PtlOpen/ReqOpen": { "type": "Interface", "properties": [ @@ -10131,6 +10310,166 @@ export const serviceProto: ServiceProto = { } ] }, + "event/payForDiamond/PtlCanReceive/ReqCanReceive": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "activityId", + "type": { + "type": "Number" + }, + "optional": true + } + ] + }, + "event/payForDiamond/PtlCanReceive/ResCanReceive": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "payNum", + "type": { + "type": "Number" + } + }, + { + "id": 1, + "name": "remaining", + "type": { + "type": "Number" + }, + "optional": true + }, + { + "id": 2, + "name": "result", + "type": { + "type": "Boolean" + } + }, + { + "id": 3, + "name": "price", + "type": { + "type": "Number" + } + }, + { + "id": 4, + "name": "showOffList", + "type": { + "type": "Array", + "elementType": { + "type": "Any" + } + } + }, + { + "id": 5, + "name": "gotAmount", + "type": { + "type": "Number" + } + } + ] + }, + "event/payForDiamond/PtlReceive/ReqReceive": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "activityId", + "type": { + "type": "Number" + } + } + ] + }, + "event/payForDiamond/PtlReceive/ResReceive": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "amount", + "type": { + "type": "Number" + } + }, + { + "id": 1, + "name": "timesRemaining", + "type": { + "type": "Number" + }, + "optional": true + }, + { + "id": 2, + "name": "showOff", + "type": { + "type": "Boolean" + }, + "optional": true + } + ] + }, + "event/pobinglibao/PtlOpen/ReqOpen": { + "type": "Interface" + }, + "event/pobinglibao/PtlOpen/ResOpen": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "record", + "type": { + "type": "Interface", + "indexSignature": { + "keyType": "String", + "type": { + "type": "Any" + } + } + } + }, + { + "id": 1, + "name": "buyLog", + "type": { + "type": "Interface", + "indexSignature": { + "keyType": "String", + "type": { + "type": "Any" + } + } + } + } + ] + }, + "event/pobinglibao/PtlReceive/ReqReceive": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "id", + "type": { + "type": "String" + } + }, + { + "id": 1, + "name": "recId", + "type": { + "type": "String" + } + } + ] + }, + "event/pobinglibao/PtlReceive/ResReceive": { + "type": "Interface" + }, "event/qirichongzhi/PtlOpen/ReqOpen": { "type": "Interface" }, @@ -10569,6 +10908,76 @@ export const serviceProto: ServiceProto = { } ] }, + "event/xiaofeijingsai/PtlOpen/ReqOpen": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "limit", + "type": { + "type": "Number" + }, + "optional": true + } + ] + }, + "event/xiaofeijingsai/PtlOpen/ResOpen": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "list", + "type": { + "type": "Array", + "elementType": { + "type": "Reference", + "target": "event/xiaofeijingsai/PtlOpen/data" + } + } + }, + { + "id": 1, + "name": "myData", + "type": { + "type": "Reference", + "target": "event/xiaofeijingsai/PtlOpen/data" + } + } + ] + }, + "event/xiaofeijingsai/PtlOpen/data": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "_id", + "type": { + "type": "String" + } + }, + { + "id": 1, + "name": "total", + "type": { + "type": "Number" + } + }, + { + "id": 2, + "name": "rank", + "type": { + "type": "Number" + } + }, + { + "id": 3, + "name": "player", + "type": { + "type": "Any" + } + } + ] + }, "event/xinshoulibao/PtlOpen/ReqOpen": { "type": "Interface" }, @@ -14901,6 +15310,27 @@ export const serviceProto: ServiceProto = { "type": "Literal", "literal": "zhoumolibao" } + }, + { + "id": 37, + "type": { + "type": "Literal", + "literal": "pobinglibao" + } + }, + { + "id": 38, + "type": { + "type": "Literal", + "literal": "payForDiamond" + } + }, + { + "id": 39, + "type": { + "type": "Literal", + "literal": "leichonglibao" + } } ] }, @@ -17934,6 +18364,9 @@ export const serviceProto: ServiceProto = { } } }, + "msg_s2c/MsgPushGiftChange/MsgPushGiftChange": { + "type": "Number" + }, "msg_s2c/MsgSendGift/MsgSendGift": { "type": "Interface", "indexSignature": { @@ -19015,6 +19448,112 @@ export const serviceProto: ServiceProto = { "PtlTest/ResTest": { "type": "Any" }, + "pushgift/PtlItemNoEnough/ReqItemNoEnough": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "need", + "type": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "a", + "type": { + "type": "String" + } + }, + { + "id": 1, + "name": "t", + "type": { + "type": "String" + } + } + ] + } + } + ] + }, + "pushgift/PtlItemNoEnough/ResItemNoEnough": { + "type": "Interface" + }, + "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" }, @@ -20918,6 +21457,29 @@ export const serviceProto: ServiceProto = { "user/PtlChangeName/ResChangeName": { "type": "Interface" }, + "user/PtlDot/ReqDot": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "type", + "type": { + "type": "String" + } + }, + { + "id": 1, + "name": "data", + "type": { + "type": "Any" + }, + "optional": true + } + ] + }, + "user/PtlDot/ResDot": { + "type": "Interface" + }, "user/PtlFight/ReqFight": { "type": "Interface", "properties": [ diff --git a/src/shared/protocols/user/PtlDot.ts b/src/shared/protocols/user/PtlDot.ts new file mode 100644 index 0000000..d81ccd0 --- /dev/null +++ b/src/shared/protocols/user/PtlDot.ts @@ -0,0 +1,8 @@ +export interface ReqDot { + type: string, + data?: any +} + +export interface ResDot { + +}