diff --git a/src/api_cross/wzry/ApiRank.ts b/src/api_cross/wzry/ApiRank.ts index 79c9d3c..767fdc8 100644 --- a/src/api_cross/wzry/ApiRank.ts +++ b/src/api_cross/wzry/ApiRank.ts @@ -1,39 +1,32 @@ -import { ApiCall } from "tsrpc"; -import { ReqRank, ResRank } from "../../cross/protocols/wzry/PtlRank"; -import { ChatFun } from "../../public/chat"; -import { EmailFun } from "../../public/email"; -import { FightFun } from "../../public/fight"; -import { Rank } from '../../public/rank/rank'; -import { SchedulerWzryDlDstart, wzrygroup } from "../../public/scheduler/scheduler_wzry"; -import { WangZheRongYaofun } from "../../public/wzry"; -import { PublicShared } from "../../shared/public/public"; -import { player } from "../../shared/protocols/user/type"; -import { rankInfo } from "../../shared/protocols/type"; -import { FindOptions } from "mongodb"; +import {ApiCall} from "tsrpc"; +import {ReqRank, ResRank} from "../../cross/protocols/wzry/PtlRank"; +import {player} from "../../shared/protocols/user/type"; +import {FindOptions} from "mongodb"; -export async function getRankList(limit?: number, projection?:any){ - let option : FindOptions = { - sort : { - 'data.valArr': -1 +export async function getRankList(limit?: number, projection?: any) { + let option: FindOptions = { + sort: { + 'data.valArr': -1, + 'data.player.power': -1 } } - if(limit!=null){ + if (limit != null) { option.limit = limit; } - if(projection!=null){ + if (projection != null) { option.projection = projection; } - let listArr = await G.mongodb.collection('rankList').find({ type: 'wzryCross' },option).toArray(); + let listArr = await G.mongodb.collection('rankList').find({type: 'wzryCross'}, option).toArray(); let list = listArr.map(l => l.data); return list; } export async function getPlayerRank(uid: string) { - let _r = await getRankList(50,{ - "data.player.uid":1, - "data.valArr":1, + let _r = await getRankList(50, { + "data.player.uid": 1, + "data.valArr": 1, }); if (!Object.keys(_r).length) { return -1 @@ -42,14 +35,14 @@ export async function getPlayerRank(uid: string) { return myrank; } -export async function getWzryRankList(uid: string, gud: player){ +export async function getWzryRankList(uid: string, gud: player) { let list = await getRankList(50); return { rankList: list, myRank: { rank: list.findIndex(li => li.player.uid == uid) + 1 || -1, player: gud, - valArr: [(await G.mongodb.collection('wzry_fight').findOne({ uid: uid }))?.jifen || 0] + valArr: [(await G.mongodb.collection('wzry_fight').findOne({uid: uid}))?.jifen || 0] } }; } diff --git a/src/api_s2c/event/huobanzhaomu/ApiOpen.ts b/src/api_s2c/event/huobanzhaomu/ApiOpen.ts index 860e426..2960c08 100644 --- a/src/api_s2c/event/huobanzhaomu/ApiOpen.ts +++ b/src/api_s2c/event/huobanzhaomu/ApiOpen.ts @@ -1,14 +1,25 @@ -import { ApiCall } from "tsrpc"; -import { ReqOpen, ResOpen } from "../../../shared/protocols/event/huobanzhaomu/PtlOpen"; +import {ApiCall} from "tsrpc"; +import {ReqOpen, ResOpen} from "../../../shared/protocols/event/huobanzhaomu/PtlOpen"; +import {PayFun} from "../../../public/pay"; +import {payLog} from "../../../shared/protocols/pay/PtlGetList"; export default async function (call: ApiCall) { - let db = await G.mongodb.cEvent('huobanzhaomu').findOne({ uid: call.uid, type: 'huobanzhaomu' }); + let db = await G.mongodb.cEvent('huobanzhaomu').findOne({uid: call.uid, type: 'huobanzhaomu'}); - call.succ({ - finish: Object.fromEntries(G.gc.huobanzhaomu.map((conf, i) => { - return [i, conf.gudKey ? call.conn.gud[conf.gudKey] >= conf.total : db?.rec?.length >= G.gc.huobanzhaomu.length - 1]; - })), - rec: db?.rec || [] - }); + let logs: payLog[]; + let finish: { [k: number]: boolean } = {}; + for (let i = 0; i < G.gc.huobanzhaomu.length; i++) { + let conf = G.gc.huobanzhaomu[i]; + if (conf.gudKey == "zhizunyueka") { + if (!logs) { + logs = await PayFun.getPayLog(call.uid, "zhizunyueka"); + } + finish[i] = !(logs.length <= 0 || logs.slice(-1)[0].eTime < G.time); + } else { + finish[i] = call.conn.gud[conf.gudKey] >= conf.total; + } + } + + call.succ({finish: finish, rec: db?.rec || []}); } \ No newline at end of file diff --git a/src/api_s2c/event/huobanzhaomu/ApiRec.ts b/src/api_s2c/event/huobanzhaomu/ApiRec.ts index 3b8cd45..b272463 100644 --- a/src/api_s2c/event/huobanzhaomu/ApiRec.ts +++ b/src/api_s2c/event/huobanzhaomu/ApiRec.ts @@ -1,27 +1,38 @@ -import { ApiCall } from "tsrpc"; -import { PlayerFun } from '../../../public/player'; -import { ReqRec, ResRec } from "../../../shared/protocols/event/huobanzhaomu/PtlRec"; -import { HongDianChange } from "../../hongdian/fun"; +import {ApiCall} from "tsrpc"; +import {PlayerFun} from '../../../public/player'; +import {ReqRec, ResRec} from "../../../shared/protocols/event/huobanzhaomu/PtlRec"; +import {HongDianChange} from "../../hongdian/fun"; +import {PayFun} from "../../../public/pay"; export default async function (call: ApiCall) { let conf = G.gc.huobanzhaomu[call.req.index]; - if (!conf) return call.error('', { code: -1 }); - if (conf.gudKey && call.conn.gud[conf.gudKey] < conf.total) return call.error('', { code: -2 }); + if (!conf) return call.error('', {code: -1}); + if (conf.gudKey && call.conn.gud[conf.gudKey] < conf.total) return call.error('', {code: -2}); - let db = await G.mongodb.cEvent('huobanzhaomu').findOne({ uid: call.uid, type: 'huobanzhaomu' }); - if (db?.rec.includes(call.req.index)) return call.error('', { code: -3 }); - if (!conf.gudKey && (db?.rec?.length || 0) < G.gc.huobanzhaomu.length - 1) return call.error('', { code: -4 }); + let db = await G.mongodb.cEvent('huobanzhaomu').findOne({uid: call.uid, type: 'huobanzhaomu'}); + if (db?.rec.includes(call.req.index)) return call.error('', {code: -3}); + + if (conf.gudKey == "zhizunyueka") { + let logs = await PayFun.getPayLog(call.uid, "zhizunyueka"); + if (!logs || logs.slice(-1)[0].eTime < G.time) { + return call.error('', {code: -4}); + } + } else { + if (!conf.gudKey && (db?.rec?.length || 0) < G.gc.huobanzhaomu.length - 1) { + return call.error('', {code: -4}); + } + } await PlayerFun.sendPrize(call, conf.prize); if (db?.rec?.length + 1 >= G.gc.huobanzhaomu.length) { - G.mongodb.collection('syncBtns').updateOne({ uid: call.uid }, { $set: { 'huobanzhaomu.active': false } }, { upsert: true }); + G.mongodb.collection('syncBtns').updateOne({uid: call.uid}, {$set: {'huobanzhaomu.active': false}}, {upsert: true}); } G.mongodb.cEvent('huobanzhaomu').updateOne( - { uid: call.uid, type: 'huobanzhaomu' }, - { $push: { rec: call.req.index } }, - { upsert: true } + {uid: call.uid, type: 'huobanzhaomu'}, + {$push: {rec: call.req.index}}, + {upsert: true} ); HongDianChange.sendChangeKey(call.uid, ['huobanzhaomuhd']) diff --git a/src/api_s2c/event/shouchong/ApiOpen.ts b/src/api_s2c/event/shouchong/ApiOpen.ts index 010d12f..4f6fb4b 100644 --- a/src/api_s2c/event/shouchong/ApiOpen.ts +++ b/src/api_s2c/event/shouchong/ApiOpen.ts @@ -1,11 +1,14 @@ import { ApiCall } from "tsrpc"; import { ReqOpen, ResOpen } from "../../../shared/protocols/event/shouchong/PtlOpen"; +import {PayFun} from "../../../public/pay"; export default async function (call: ApiCall) { - let data = await G.mongodb.cEvent('shouchong').findOne({ uid: call.uid, type: 'shouchong' }); + let data = await G.mongodb.cEvent('shouchongzhigou').findOne({uid: call.uid, type: 'shouchongzhigou'}) + + let payIds = R.compose(R.map(i=>i.payid),R.values())(G.gc.shouchong) call.succ({ - payNum: call.conn.gud.payExp / 10, - receive: Object.fromEntries(Object.keys(G.gc.shouchong).map(k => [k, data?.receive?.[k] || []])) - }); + receive: data?.receive || {}, + buyLog: await PayFun.getPayLogs(call.uid, payIds) + }) } \ No newline at end of file diff --git a/src/api_s2c/event/shouchong/ApiReceive.ts b/src/api_s2c/event/shouchong/ApiReceive.ts index 6e29d12..e5debb9 100644 --- a/src/api_s2c/event/shouchong/ApiReceive.ts +++ b/src/api_s2c/event/shouchong/ApiReceive.ts @@ -1,28 +1,31 @@ -import { ApiCall } from "tsrpc"; -import { PlayerFun } from '../../../public/player'; -import { ReqReceive, ResReceive } from "../../../shared/protocols/event/shouchong/PtlReceive"; -import { PublicShared } from '../../../shared/public/public'; -import { HongDianChange } from "../../hongdian/fun"; +import {ApiCall} from "tsrpc"; +import {PlayerFun} from '../../../public/player'; +import {ReqReceive, ResReceive} from "../../../shared/protocols/event/shouchong/PtlReceive"; +import {PublicShared} from '../../../shared/public/public'; +import {HongDianChange} from "../../hongdian/fun"; +import {PayFun} from "../../../public/pay"; export default async function (call: ApiCall) { let conf = G.gc.shouchong[call.req.k]; - if (!conf) return call.error(globalThis.lng.pata_getprize_1); - let data = await G.mongodb.cEvent('shouchong').findOne({ uid: call.uid, type: 'shouchong' }); + let payLog = await PayFun.getPayLog(call.uid, conf.payid) + if (!payLog) return call.errorCode(-1) + + let data = await G.mongodb.cEvent('shouchongzhigou').findOne({ uid: call.uid, type: 'shouchongzhigou' }); let recArr = data?.receive?.[call.req.k] || []; - if (call.conn.gud.payExp < conf.paynum) return call.error(globalThis.lng.event_kfkh_9); + // if (call.conn.gud.payExp < conf.paynum) return call.error(globalThis.lng.event_kfkh_9); if (recArr.length >= conf.prize.length) return call.error(globalThis.lng.event_kfkh_3); if (recArr.slice(-1)[0] && PublicShared.getToDayZeroTime() < recArr.slice(-1)[0]) return call.error(globalThis.lng.event_kfkh_10); await PlayerFun.sendPrize(call, conf.prize[recArr.length]); - await G.mongodb.cEvent('shouchong').updateOne( - { uid: call.uid, type: 'shouchong' }, + await G.mongodb.cEvent('shouchongzhigou').updateOne( + { uid: call.uid, type: 'shouchongzhigou' }, { $push: G.mongodb.createTreeObj({ key: 'receive', k: call.req.k, val: G.time }) }, { upsert: true } ); @@ -40,17 +43,16 @@ export default async function (call: ApiCall) { } export async function getShouChongRedPoint(call: ApiCall) { - let res = { show: false }; - let data = await G.mongodb.cEvent('shouchong').findOne({ uid: call.uid, type: 'shouchong' }); + // let data = await G.mongodb.cEvent('shouchong').findOne({ uid: call.uid, type: 'shouchong' }); + // + // for (let [id, conf] of Object.entries(G.gc.shouchong)) { + // let rec = data?.receive?.[id] || []; + // if (call.conn.gud.payExp / 10 < conf.paynum || rec.length >= conf.prize.length) continue; + // if (rec.length == 0 || rec.slice(-1)[0] < PublicShared.getToDayZeroTime(G.time)) { + // res = { show: true }; + // break; + // } + // } - for (let [id, conf] of Object.entries(G.gc.shouchong)) { - let rec = data?.receive?.[id] || []; - if (call.conn.gud.payExp / 10 < conf.paynum || rec.length >= conf.prize.length) continue; - if (rec.length == 0 || rec.slice(-1)[0] < PublicShared.getToDayZeroTime(G.time)) { - res = { show: true }; - break; - } - } - - return res; + return {show: false}; } \ No newline at end of file diff --git a/src/api_s2c/xstask/ApiAllGet.ts b/src/api_s2c/xstask/ApiAllGet.ts index f41ac3c..d89d696 100644 --- a/src/api_s2c/xstask/ApiAllGet.ts +++ b/src/api_s2c/xstask/ApiAllGet.ts @@ -1,15 +1,17 @@ -import { ApiCall } from "tsrpc"; -import { PlayerFun } from '../../public/player'; -import { XstaskFun } from '../../public/xstask'; -import { ReqAllGet, ResAllGet } from "../../shared/protocols/xstask/PtlAllGet"; -import { HongDianChange } from "../hongdian/fun"; -import { PublicShared } from "../../shared/public/public"; +import {ApiCall} from "tsrpc"; +import {PlayerFun} from '../../public/player'; +import {XstaskFun} from '../../public/xstask'; +import {ReqAllGet, ResAllGet} from "../../shared/protocols/xstask/PtlAllGet"; +import {HongDianChange} from "../hongdian/fun"; +import {PublicShared} from "../../shared/public/public"; +import {TeQuanFun} from "../../public/tequan"; export default async function (call: ApiCall) { const taskList = JSON.parse(JSON.stringify(await XstaskFun.getAllTask(call.uid))); let taskInfo = await XstaskFun.getInfo(call.uid); - let prizeArr:atn[] = [] - for(let task of taskList) { + let tequan = await TeQuanFun.getXsTaskNum(call); + let prizeArr: atn[] = [] + for (let task of taskList) { const taskConf = G.gc.xstask[task?.taskId]; if (!task) continue; if (task.receiveData == undefined) continue; @@ -23,12 +25,12 @@ export default async function (call: ApiCall) { // } continue } - let change: Parameters[1] = { $inc: {} }; + let change: Parameters[1] = {$inc: {}}; change.$inc[`finishNum.${taskConf.colour}`] = 1; // 比对派遣时间,如果小于当日0点,则更新新任务,否则该变领取状态为true - if(task.receiveData.time < PublicShared.getToDayZeroTime()) { + if (task.receiveData.time < PublicShared.getToDayZeroTime()) { // 更新任务 - let newTask = XstaskFun.randomTasks(taskInfo?.lv, 1) + let newTask = XstaskFun.randomTasks(taskInfo?.lv, 1) XstaskFun.updateTask(call.uid, task._id, newTask[0].taskId) } else { // 更新领取状态 @@ -38,6 +40,14 @@ export default async function (call: ApiCall) { XstaskFun.changeInfo(call.uid, change); await PlayerFun.sendPrize(call, taskConf.prize); HongDianChange.sendChangeKey(call.uid, ['xstaskhd', 'huodonghd']); + + if (!tequan) { + prizeArr.push(...taskConf.prize) + } else { + for (let i = 0; i < 3; i++) { + prizeArr.push(...taskConf.prize) + } + } prizeArr.push(...taskConf.prize) } call.succ({ diff --git a/src/api_s2c/xstask/ApiGet.ts b/src/api_s2c/xstask/ApiGet.ts index 62a5b1b..878052d 100644 --- a/src/api_s2c/xstask/ApiGet.ts +++ b/src/api_s2c/xstask/ApiGet.ts @@ -1,9 +1,10 @@ -import { ApiCall } from "tsrpc"; -import { PlayerFun } from '../../public/player'; -import { XstaskFun } from '../../public/xstask'; -import { ReqGet, ResGet } from "../../shared/protocols/xstask/PtlGet"; -import { HongDianChange } from "../hongdian/fun"; -import { PublicShared } from '../../shared/public/public'; +import {ApiCall} from "tsrpc"; +import {PlayerFun} from '../../public/player'; +import {XstaskFun} from '../../public/xstask'; +import {ReqGet, ResGet} from "../../shared/protocols/xstask/PtlGet"; +import {HongDianChange} from "../hongdian/fun"; +import {PublicShared} from '../../shared/public/public'; +import {TeQuanFun} from "../../public/tequan"; export default async function (call: ApiCall) { @@ -23,24 +24,32 @@ export default async function (call: ApiCall) { } } - let change: Parameters[1] = { $inc: {} }; + let change: Parameters[1] = {$inc: {}}; change.$inc[`finishNum.${taskConf.colour}`] = 1; // 比对派遣时间,如果小于当日0点,则更新新任务,否则该变领取状态为true - if(task.receiveData.time < PublicShared.getToDayZeroTime()) { + if (task.receiveData.time < PublicShared.getToDayZeroTime()) { // 更新任务 - let newTask = XstaskFun.randomTasks(taskInfo?.lv, 1) + let newTask = XstaskFun.randomTasks(taskInfo?.lv, 1) XstaskFun.updateTask(call.uid, call.req._id, newTask[0].taskId) } else { // 更新领取状态 XstaskFun.finishTask(call.uid, call.req._id) } // XstaskFun.delTask(call.uid, call.req._id); + let send_prize = []; XstaskFun.changeInfo(call.uid, change); - await PlayerFun.sendPrize(call, taskConf.prize); + if (!await TeQuanFun.getXsTaskNum(call)) { + send_prize = taskConf.prize; + } else { + for (let i = 0; i < 3; i++) { + send_prize = send_prize.concat(taskConf.prize) + } + } + await PlayerFun.sendPrize(call, send_prize); HongDianChange.sendChangeKey(call.uid, ['xstaskhd', 'huodonghd']); call.succ({ taskList: await XstaskFun.getAllTask(call.uid), - prize: taskConf.prize + prize: send_prize }); } \ No newline at end of file diff --git a/src/api_s2c/xstask/ApiOpen.ts b/src/api_s2c/xstask/ApiOpen.ts index 4261a4c..3a65a5d 100644 --- a/src/api_s2c/xstask/ApiOpen.ts +++ b/src/api_s2c/xstask/ApiOpen.ts @@ -36,7 +36,7 @@ export default async function (call: ApiCall) { XstaskFun.delTasks(call.uid, delTask.map(task => task._id)); } - needAddTask += await TeQuanFun.getXsTaskNum(call); + // needAddTask += await TeQuanFun.getXsTaskNum(call); needAddTask && await XstaskFun.addTasks(call.uid, XstaskFun.randomTasks(taskInfo?.lv || changeInfo.lv, needAddTask)); let { _id, uid, type, ...info } = taskInfo || changeInfo as typeof taskInfo; diff --git a/src/json/attr.json b/src/json/attr.json index 3d3120f..371283d 100644 --- a/src/json/attr.json +++ b/src/json/attr.json @@ -114,8 +114,8 @@ "name": "intr_attr_name_13", "undefined": "圣诞战令经验", "colour": 5, - "icon": "icon_shengdanExp", - "sicon": "icon_shengdanExp", + "icon": "icon_sdhd_item_1", + "sicon": "icon_sdhd_item_1", "describe": "intr_attr_describe_13", "advancedEffects": "ani_xiangzikuang" }, @@ -124,8 +124,8 @@ "name": "intr_attr_name_14", "undefined": "圣诞子弹", "colour": 5, - "icon": "icon_zuanshi", - "sicon": "icon_zuanshi", + "icon": "icon_chegaipq", + "sicon": "icon_chegaipq", "describe": "intr_attr_describe_14", "advancedEffects": "ani_xiangzikuang" } diff --git a/src/json/chongzhi.json5 b/src/json/chongzhi.json5 index 4237868..f0bf2fc 100644 --- a/src/json/chongzhi.json5 +++ b/src/json/chongzhi.json5 @@ -85,7 +85,7 @@ }, '5': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 4280 }], prize: [{"a":"attr","t":"jinbi","n":2000000},{"a":"equip","t":"2008","n":1},{"a":"item","t":"12","n":500},{"a":"item","t":"26","n":5},{"a":"item","t":"24","n":3}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 4280 }], prize: [{"a":"attr","t":"jinbi","n":2000000},{"a":"item","t":"607","n":20},{"a":"item","t":"12","n":500},{"a":"item","t":"26","n":5},{"a":"item","t":"24","n":3}] }, "tip": "intr_viplibao_title_5", "tq": { '1': { tip: ['intr_viplibao_intr_16'], isnew: true}, @@ -103,7 +103,7 @@ }, '6': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 5880 }], prize: [{"a":"attr","t":"jinbi","n":2500000},{"a":"equip","t":"2006","n":1},{"a":"item","t":"30","n":10},{"a":"item","t":"2","n":500},{"a":"item","t":"25","n":5},{"a":"item","t":"24","n":5}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 5880 }], prize: [{"a":"attr","t":"jinbi","n":2500000},{"a":"item","t":"607","n":20},{"a":"item","t":"30","n":10},{"a":"item","t":"2","n":500},{"a":"item","t":"25","n":5},{"a":"item","t":"24","n":5}] }, "tip": "intr_viplibao_title_6", "tq": { '1': { tip: ['intr_viplibao_intr_1', 6], isnew: true}, @@ -119,7 +119,7 @@ }, '7': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 8280 }], prize: [{"a":"attr","t":"jinbi","n":3000000},{"a":"equip","t":"4008","n":1},{"a":"item","t":"6","n":10},{"a":"item","t":"18","n":100},{"a":"item","t":"26","n":5},{"a":"item","t":"24","n":5}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 8280 }], prize: [{"a":"attr","t":"jinbi","n":3000000},{"a":"item","t":"607","n":20},{"a":"item","t":"6","n":10},{"a":"item","t":"18","n":100},{"a":"item","t":"26","n":5},{"a":"item","t":"24","n":5}] }, "tip": "intr_viplibao_title_7", "tq": { '1': { tip: ['intr_viplibao_intr_1', 7], isnew: true}, @@ -135,7 +135,7 @@ }, '8': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 11280 }], prize: [{"a":"attr","t":"jinbi","n":4000000},{"a":"equip","t":"3009","n":1},{"a":"item","t":"6","n":20},{"a":"item","t":"20","n":50},{"a":"item","t":"9","n":500},{"a":"item","t":"24","n":7}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 11280 }], prize: [{"a":"attr","t":"jinbi","n":4000000},{"a":"item","t":"617","n":1},{"a":"item","t":"6","n":20},{"a":"item","t":"20","n":50},{"a":"item","t":"9","n":500},{"a":"item","t":"24","n":7}] }, "tip": "intr_viplibao_title_8", "tq": { '1': { tip: ['intr_viplibao_intr_9', 2], isnew: true}, @@ -153,7 +153,7 @@ }, '9': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 15880 }], prize: [{"a":"attr","t":"jinbi","n":5000000},{"a":"equip","t":"2009","n":1},{"a":"item","t":"18","n":150},{"a":"item","t":"10","n":80},{"a":"item","t":"24","n":7}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 15880 }], prize: [{"a":"attr","t":"jinbi","n":5000000},{"a":"item","t":"617","n":1},{"a":"item","t":"18","n":150},{"a":"item","t":"10","n":80},{"a":"item","t":"24","n":7}] }, "tip": "intr_viplibao_title_9", "tq": { '1': { tip: ['intr_viplibao_intr_1', 9], isnew: true}, @@ -169,7 +169,7 @@ }, '10': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 21280 }], prize: [{"a":"attr","t":"jinbi","n":10000000},{"a":"equip","t":"1009","n":1},{"a":"item","t":"20","n":80},{"a":"item","t":"9","n":500},{"a":"item","t":"24","n":8}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 21280 }], prize: [{"a":"attr","t":"jinbi","n":10000000},{"a":"item","t":"617","n":1},{"a":"item","t":"20","n":80},{"a":"item","t":"9","n":500},{"a":"item","t":"24","n":8}] }, "tip": "intr_viplibao_title_10", "tq": { '1': { tip: ['intr_viplibao_intr_1', 10], isnew: true}, @@ -185,7 +185,7 @@ }, '11': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 28880 }], prize: [{"a":"attr","t":"jinbi","n":15000000},{"a":"item","t":"609","n":1},{"a":"item","t":"18","n":200},{"a":"item","t":"24","n":10},{"a":"item","t":"10","n":80}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 28880 }], prize: [{"a":"attr","t":"jinbi","n":15000000},{"a":"item","t":"617","n":1},{"a":"item","t":"18","n":200},{"a":"item","t":"24","n":10},{"a":"item","t":"10","n":80}] }, "tip": "intr_viplibao_title_11", "tq": { '1': { tip: ['intr_viplibao_intr_9', 4], isnew: true}, @@ -202,7 +202,7 @@ }, '12': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 36880 }], prize: [{"a":"attr","t":"jinbi","n":20000000},{"a":"item","t":"609","n":1},{"a":"item","t":"20","n":100},{"a":"item","t":"9","n":1000},{"a":"item","t":"10","n":80}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 36880 }], prize: [{"a":"attr","t":"jinbi","n":20000000},{"a":"item","t":"617","n":1},{"a":"item","t":"20","n":100},{"a":"item","t":"9","n":1000},{"a":"item","t":"10","n":80}] }, "tip": "intr_viplibao_title_12", "tq": { '1': { tip: ['intr_viplibao_intr_1', 12], isnew: true}, @@ -219,7 +219,7 @@ }, '13': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 48880 }], prize: [{"a":"attr","t":"jinbi","n":25000000},{"a":"item","t":"609","n":1},{"a":"item","t":"619","n":1},{"a":"item","t":"18","n":500},{"a":"item","t":"606","n":2},{"a":"item","t":"10","n":80}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 48880 }], prize: [{"a":"attr","t":"jinbi","n":25000000},{"a":"item","t":"20","n":100},{"a":"item","t":"619","n":1},{"a":"item","t":"18","n":500},{"a":"item","t":"606","n":2},{"a":"item","t":"10","n":80}] }, "tip": "intr_viplibao_title_13", "tq": { '1': { tip: ['intr_viplibao_intr_18', 1], isnew: true}, diff --git a/src/json/guideConfig.json b/src/json/guideConfig.json index 0b83bad..2f94f67 100644 --- a/src/json/guideConfig.json +++ b/src/json/guideConfig.json @@ -835,6 +835,7 @@ "Type": "finger", "path": "Canvas/draw/uiRoot/uiView_mainMenu/mainMenu/btnLayout/gb", "undefined": "点干部", + "initiative": 1, "location": 2 }, "80": { @@ -844,6 +845,7 @@ "Type": "finger", "path": "Canvas/draw/uiRoot/uiView_heroInfo/heroInfo/img_bg/btnScrollView/view/content/leftBtn/btn_sj", "undefined": "点升级页签", + "initiative": 1, "location": 2 }, "81": { @@ -853,6 +855,7 @@ "Type": "finger", "path": "Canvas/draw/uiRoot/uiView_heroInfo/heroInfo/img_bg/panel_down/panel_rdown/panel_sj/btn_shengji", "undefined": "点升级按钮", + "initiative": 1, "location": 1 }, "82": { diff --git a/src/json/huobanzhaomu.json5 b/src/json/huobanzhaomu.json5 index bc40ef1..b2e5176 100644 --- a/src/json/huobanzhaomu.json5 +++ b/src/json/huobanzhaomu.json5 @@ -7,11 +7,11 @@ { total: 2, gudKey: 'loginDays', - prize: [{a: 'hero', t: '4004', n: 1}] + prize: [{a: 'hero', t: '4005', n: 1}] }, { total: 1, - gudKey: 'payExp', + gudKey: 'zhizunyueka', prize: [{a: 'item', t: '4', n: 10}] }, { diff --git a/src/json/huodong.json5 b/src/json/huodong.json5 index 2fc7624..48ff890 100644 --- a/src/json/huodong.json5 +++ b/src/json/huodong.json5 @@ -2456,7 +2456,7 @@ 'stype': 118 }, '2003': { - 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '626', 'n': 20}], + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '600', 'n': 20}], 'tujing': '', 'title': 'intr_yczm_day_des_2', 'type': 2, @@ -2604,7 +2604,7 @@ 'stype': 118 }, '2003': { - 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '626', 'n': 20}], + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '600', 'n': 20}], 'tujing': '', 'title': 'intr_yczm_day_des_2', 'type': 2, @@ -3849,10 +3849,27 @@ free: false, payId: 'czlb_1', buyNum: 1, - prize:{"1":[{'a': 'item', 't': '13', 'n': 600}], - "2":[{'a': 'item', 't': '13', 'n': 600}], - "3":[{'a': 'item', 't': '13', 'n': 600}] - } + prize: [ + { + "a": "item", + "t": "13", + "n": 600 + } + ], + "recPrize1": [ + { + "a": "item", + "t": "13", + "n": 600 + } + ], + "recPrize2": [ + { + "a": "item", + "t": "13", + "n": 600 + } + ] }, { id: '2', @@ -3861,10 +3878,27 @@ free: false, payId: 'czlb_2', buyNum: 1, - prize: {"1":[{'a': 'item', 't': '13', 'n': 600}], - "2":[{'a': 'item', 't': '13', 'n': 600}], - "3":[{'a': 'item', 't': '13', 'n': 600}] - } + prize: [ + { + "a": "item", + "t": "13", + "n": 600 + } + ], + "recPrize1": [ + { + "a": "item", + "t": "13", + "n": 600 + } + ], + "recPrize2": [ + { + "a": "item", + "t": "13", + "n": 600 + } + ] }, { id: '3', @@ -3873,10 +3907,82 @@ free: false, payId: 'czlb_3', buyNum: 1, - prize: {"1":[{'a': 'item', 't': '13', 'n': 600}], - "2":[{'a': 'item', 't': '13', 'n': 600}], - "3":[{'a': 'item', 't': '13', 'n': 600}] - } + prize: [ + { + "a": "item", + "t": "13", + "n": 600 + } + ], + "recPrize1": [ + { + "a": "item", + "t": "13", + "n": 600 + } + ], + "recPrize2": [ + { + "a": "item", + "t": "13", + "n": 600 + } + ] + } + ] + } + }, + { + "hdid" : 11000, // 唯一活动id 消费竞赛 + "htype" : 11, // 后端唯一识别标识 + "stype" : 1100, // 前端唯一识别标识(看前端需要是否修改) + "ttype" : 0, // 0 按照开服时间计算,1 玩家注册时间计算 4 屏蔽此活动 + "stime" : 0, // 活动开始天数 + "rtime" : 30, // 活动显示结束天数 + "etime" : 30, // 活动实际结束 + "name": "xfjs", + "icon": "icon_xfjs", + "showtime" : "仅供参考,会复写正确值", // 自选礼包,如果存在多个活动,计费点不要设置一样;如果是一样,可能会存在付费一次,购买多次。 + "data" : { + //活动文本描述 + intr: "xfjstips_1", + intr: "xfjstips_2", + //排名 + rank: [ + { + id: '1', + name: 'xfjstips_3', + rank:[1], + need: [{'a': 'attr', 't': 'rmbmoney', 'n': 20000}], + prize: [{'a': 'item', 't': '13', 'n': 600}] + }, + { + id: '2', + name: 'xfjstips_4', + rank:[2], + need: [{'a': 'attr', 't': 'rmbmoney', 'n': 18000}], + prize: [{'a': 'item', 't': '13', 'n': 600}] + }, + { + id: '3', + name: 'xfjstips_5', + rank:[3], + need: [{'a': 'attr', 't': 'rmbmoney', 'n': 16000}], + prize: [{'a': 'item', 't': '13', 'n': 600}] + }, + { + id: '4', + name: 'xfjstips_6', + rank:[4,10], + need: [{'a': 'attr', 't': 'rmbmoney', 'n': 14000}], + prize: [{'a': 'item', 't': '13', 'n': 600}] + }, + { + id: '5', + name: 'xfjstips_7', + rank:[11,30], + need: [{'a': 'attr', 't': 'rmbmoney', 'n': 12000}], + prize: [{'a': 'item', 't': '13', 'n': 600}] } ] } diff --git a/src/json/pay.json b/src/json/pay.json index 21d98f2..d293892 100644 --- a/src/json/pay.json +++ b/src/json/pay.json @@ -922,7 +922,7 @@ { "a": "attr", "t": "payExp", - "n": 10 + "n": 5 } ], "prize": [ @@ -933,7 +933,7 @@ }, { "a": "hero", - "t": "4013", + "t": "4006", "n": 1 }, { @@ -4208,33 +4208,7 @@ "n": 60 } ], - "prize": [ - { - "a": "hero", - "t": "4002", - "n": 1 - }, - { - "a": "attr", - "t": "rmbmoney", - "n": 120 - }, - { - "a": "item", - "t": "12", - "n": 500 - }, - { - "a": "item", - "t": "1", - "n": 50000 - }, - { - "a": "attr", - "t": "jinbi", - "n": 100000 - } - ], + "prize": [], "firstPayPrize": [], "name": "pay_name_shouchong_1", "undefined": "首充礼包_6", @@ -4254,33 +4228,7 @@ "n": 300 } ], - "prize": [ - { - "a": "hero", - "t": "5001", - "n": 1 - }, - { - "a": "attr", - "t": "rmbmoney", - "n": 600 - }, - { - "a": "item", - "t": "12", - "n": 1500 - }, - { - "a": "item", - "t": "1", - "n": 300000 - }, - { - "a": "attr", - "t": "jinbi", - "n": 300000 - } - ], + "prize": [], "firstPayPrize": [], "name": "pay_name_shouchong_2", "undefined": "首充礼包_30", @@ -4300,33 +4248,7 @@ "n": 980 } ], - "prize": [ - { - "a": "hero", - "t": "5001", - "n": 1 - }, - { - "a": "equip", - "t": "1009", - "n": 1 - }, - { - "a": "equip", - "t": "2009", - "n": 1 - }, - { - "a": "equip", - "t": "3009", - "n": 1 - }, - { - "a": "equip", - "t": "4009", - "n": 1 - } - ], + "prize": [], "firstPayPrize": [], "name": "pay_name_shouchong_3", "undefined": "首充礼包_98", @@ -4385,7 +4307,7 @@ "prize": [ { "a": "item", - "t": "607", + "t": "626", "n": 20 }, { diff --git a/src/json/payEmail.json5 b/src/json/payEmail.json5 index 6ebe0fc..293a634 100644 --- a/src/json/payEmail.json5 +++ b/src/json/payEmail.json5 @@ -4,7 +4,7 @@ day: 1, title: 'title_email_caifutequan_day1', content: 'intr_email_caifutequan_day1', - prize: [{ a: 'attr', t: 'rmbmoney', n: 200 }] + prize: [{ a: 'attr', t: 'rmbmoney', n: 300 },{ a: 'attr', t: 'jinbi', n: 1000000 }] } ], jiubatequan: [ diff --git a/src/json/shouchong.json b/src/json/shouchong.json index 915846b..1af0532 100644 --- a/src/json/shouchong.json +++ b/src/json/shouchong.json @@ -3,18 +3,30 @@ "paynum": 6, "payid":"shouchong_1", "cartoon": { - "hero": 5001 + "hero": 4013 }, "prize": [ [ { "a": "hero", - "t": "5001", + "t": "4013", "n": 1 }, { "a": "attr", - "t": "jinbi", + "t": "rmbmoney", + "n": 120 + } + ], + [ + { + "a": "item", + "t": "4", + "n": 10 + }, + { + "a": "item", + "t": "1", "n": 100000 } ], @@ -22,24 +34,12 @@ { "a": "item", "t": "12", - "n": 200 + "n": 100 }, { "a": "attr", "t": "jinbi", - "n": 200000 - } - ], - [ - { - "a": "item", - "t": "12", - "n": 200 - }, - { - "a": "attr", - "t": "jinbi", - "n": 300000 + "n": 100000 } ] ] @@ -51,6 +51,18 @@ "img": 5001 }, "prize": [ + [ + { + "a": "hero", + "t": "5001", + "n": 1 + }, + { + "a": "attr", + "t": "rmbmoney", + "n": 600 + } + ], [ { "a": "equip", @@ -63,18 +75,6 @@ "n": 1 } ], - [ - { - "a": "equip", - "t": "3009", - "n": 1 - }, - { - "a": "item", - "t": "2", - "n": 1000 - } - ], [ { "a": "equip", @@ -82,9 +82,9 @@ "n": 1 }, { - "a": "item", - "t": "2", - "n": 1000 + "a": "equip", + "t": "3009", + "n": 1 } ] ] @@ -93,43 +93,43 @@ "paynum": 98, "payid":"shouchong_3", "cartoon": { - "hero": 5002 + "hero": 5001 }, "prize": [ [ { "a": "hero", - "t": "5002", + "t": "5001", "n": 1 }, + { + "a": "attr", + "t": "rmbmoney", + "n": 1960 + } + ], + [ + { + "a": "item", + "t": "12", + "n": 3000 + }, + { + "a": "item", + "t": "1", + "n": 3000000 + } + ], + [ { "a": "item", "t": "4", - "n": 10 - } - ], - [ - { - "a": "equip", - "t": "1010", - "n": 1 + "n": 50 }, { - "a": "item", - "t": "2", - "n": 2000 - } - ], - [ - { - "a": "equip", - "t": "3010", - "n": 1 - }, - { - "a": "item", - "t": "2", - "n": 2000 + "a": "attr", + "t": "jinbi", + "n": 5000000 } ] ] diff --git a/src/json/task.json b/src/json/task.json index c597cec..a9fb41f 100644 --- a/src/json/task.json +++ b/src/json/task.json @@ -1118,7 +1118,7 @@ { "a": "item", "t": "12", - "n": 20 + "n": 100 }, { "a": "attr", @@ -1334,7 +1334,7 @@ { "a": "item", "t": "12", - "n": 50 + "n": 200 }, { "a": "item", @@ -1410,7 +1410,7 @@ { "a": "item", "t": "12", - "n": 50 + "n": 600 }, { "a": "item", @@ -1562,7 +1562,7 @@ { "a": "item", "t": "12", - "n": 200 + "n": 400 }, { "a": "item", diff --git a/src/json/yibaichou.json5 b/src/json/yibaichou.json5 index f80c3c3..27de9d3 100644 --- a/src/json/yibaichou.json5 +++ b/src/json/yibaichou.json5 @@ -11,11 +11,11 @@ }, { total: 1200, - prize: [{a: 'item', t: '4007', n: 20}] + prize: [{a: 'attr', t: 'rmbmoney', n: 400}] }, { total: 1800, - prize: [{a: 'attr', t: 'rmbmoney', n: 200}] + prize: [{a: 'attr', t: 'rmbmoney', n: 600}] }, { total: 2400, diff --git a/src/module/collection_event.ts b/src/module/collection_event.ts index d481b9b..d8339fe 100644 --- a/src/module/collection_event.ts +++ b/src/module/collection_event.ts @@ -27,6 +27,9 @@ export type eventType = { shouchong: { receive: k_v; }; + shouchongzhigou: { + receive: k_v; + }; kaifukuanghuan: Omit; dayjijin: Omit; dengjijijin: Omit; diff --git a/src/public/tequan.ts b/src/public/tequan.ts index 078097f..7482b71 100644 --- a/src/public/tequan.ts +++ b/src/public/tequan.ts @@ -15,6 +15,6 @@ export class TeQuanFun { return await this.getIsAcTive(call, 'qingbaotequan') ? 1 : 0; } static async getTxFreeNum(call: ApiCall) { - return await this.getIsAcTive(call, 'zuozhantequan') ? 2 : 0; + return await this.getIsAcTive(call, 'zuozhantequan') ? 5 : 0; } } \ No newline at end of file diff --git a/src/setMongodb.ts b/src/setMongodb.ts index a3df1cc..fe89db9 100644 --- a/src/setMongodb.ts +++ b/src/setMongodb.ts @@ -640,25 +640,25 @@ export class _mongodb { } } -//@ts-ignore -FindCursor.prototype._toArray = FindCursor.prototype.toArray; -//@ts-ignore -FindCursor.prototype.toArray = async function(){ - let rss = await this._toArray(); - - //如果返回的数据超过50条 - if(rss.length>50){ - addGameLog("system","findCount",null,{ - collection: this.namespace.collection, - db:this.namespace.db, - count:rss.length - }) - console.log("system,findCount",{ - collection: this.namespace.collection, - db:this.namespace.db, - count:rss.length - }) - console.trace(); - } - return rss; -} \ No newline at end of file +// //@ts-ignore +// FindCursor.prototype._toArray = FindCursor.prototype.toArray; +// //@ts-ignore +// FindCursor.prototype.toArray = async function(){ +// let rss = await this._toArray(); +// +// //如果返回的数据超过50条 +// if(rss.length>50){ +// addGameLog("system","findCount",null,{ +// collection: this.namespace.collection, +// db:this.namespace.db, +// count:rss.length +// }) +// console.log("system,findCount",{ +// collection: this.namespace.collection, +// db:this.namespace.db, +// count:rss.length +// }) +// console.trace(); +// } +// return rss; +// } \ No newline at end of file diff --git a/src/shared/protocols/event/shouchong/PtlOpen.ts b/src/shared/protocols/event/shouchong/PtlOpen.ts index cad5f93..d839863 100644 --- a/src/shared/protocols/event/shouchong/PtlOpen.ts +++ b/src/shared/protocols/event/shouchong/PtlOpen.ts @@ -8,8 +8,10 @@ export type ReqOpen = { }; export type ResOpen = { - payNum: number; receive: { [k: string]: number[]; }; + buyLog:{ + [k: string]: any; + } }; \ No newline at end of file diff --git a/src/shared/protocols/serviceProto.ts b/src/shared/protocols/serviceProto.ts index 5c4141b..c60ab37 100644 --- a/src/shared/protocols/serviceProto.ts +++ b/src/shared/protocols/serviceProto.ts @@ -10262,13 +10262,6 @@ export const serviceProto: ServiceProto = { "properties": [ { "id": 0, - "name": "payNum", - "type": { - "type": "Number" - } - }, - { - "id": 1, "name": "receive", "type": { "type": "Interface", @@ -10282,6 +10275,19 @@ export const serviceProto: ServiceProto = { } } } + }, + { + "id": 1, + "name": "buyLog", + "type": { + "type": "Interface", + "indexSignature": { + "keyType": "String", + "type": { + "type": "Any" + } + } + } } ] },