Merge branch 'bugfix' into dev

This commit is contained in:
xichaoyin 2024-01-04 20:32:50 +08:00
commit 3a383d6f54
2 changed files with 687 additions and 0 deletions

View File

@ -656,6 +656,14 @@ export class HuoDongHongDianFun {
if (_mydata?.rec.includes(index)) continue; // 已领取
if (element.gudKey && call.conn.gud[element.gudKey] < element.total) continue; // 未达成
if (!element.gudKey && (_mydata?.rec?.length || 0) < _con.length - 1) continue; // 大奖资格不够
if (element.gudKey == "zhizunyueka") {
let logs = await PayFun.getPayLog(call.uid, "zhizunyueka");
if (!logs || logs.slice(-1)[0].eTime < G.time) {
continue
}
}
_res.show = true;
break;
}

View File

@ -0,0 +1,679 @@
import {patchInit} from "../patch";
// import {addGameLog, connGameLogDB} from "../gameLog";
import {MongoClient} from "mongodb";
class Path {
async fun1(a: any) {
hdlist.map(i => {
// @ts-ignore
G.mongodb.collection('hdinfo').updateOne({hdid: i.hdid}, {$set: i}, {upsert: true})
})
}
async run() {
await this.fun1(1);
}
}
async function main() {
await patchInit()
let patch = new Path();
await patch.run();
console.log("逻辑执行完成,等待退出");
setTimeout(function () {
console.log('结束程序');
process.exit();
}, 3000);
}
main();
let hdlist = [
{
"hdid": 102, // 唯一活动id 人才计划
"htype": 1, // 后端唯一识别标识1养成目标
"stype": 101, // 前端唯一识别标识(看前端需要是否修改)
"ttype": 0, // 0 按照开服时间计算1 玩家注册时间计算 4 屏蔽此活动
"stime": 28, // 活动开始天数
"rtime": 35, // 活动显示结束天数
"etime": 35, // 活动实际结束
"name": "intr_ychd_title_3",
"icon": "dfry_rcjh",
"showtime": "仅供参考,会复写正确值",
"data": {
//轮数抽卡 mfmid 168318
//活动文本描述 0-每日登录 1-每日任务 2-活动任务 3-一次性任务 4-活动商店
intr2: 'intr_yczm_tips_3',
intr4: 'intr_yczm_tips_4',
//活动名称
name: 'intr_ychd_title_3',
//活动icon
icon: 'icon_ydlb',
//页签名称 0-每日登录 1-每日任务 2-活动任务 3-一次性任务 4-活动商店
tab2: 'intr_ychd_tab_name_4',
tab4: 'intr_ychd_tab_name_5',
//界面跳转 0-每日登录 1-每日任务 2-活动任务 3-一次性任务 4-活动商店
'2': '9',
//礼包
gift: [
{
index: 0,
need: [{'a': 'attr', t: 'rmbmoney', 'n': 0}],
free: true,
payId: '',
buyNum: 1,
prize: [{'a': 'item', 't': '4', 'n': 5}]
},
{
index: 1,
need: [],
free: false,
payId: 'ycmb_2_1',
buyNum: 1,
prize: [{'a': 'attr', 't': 'rmbmoney', 'n': 300}, {
'a': 'attr',
't': 'rmbmoney',
'n': 300
}, {'a': 'item', 't': '4', 'n': 5}, {'a': 'item', 't': '4', 'n': 5}]
},
{
index: 2,
need: [],
free: false,
payId: 'ycmb_2_2',
buyNum: 1,
prize: [{'a': 'attr', 't': 'rmbmoney', 'n': 680}, {
'a': 'attr',
't': 'rmbmoney',
'n': 680
}, {'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '4', 'n': 10}]
},
{
index: 3,
need: [],
free: false,
payId: 'ycmb_2_3',
buyNum: 1,
prize: [{'a': 'attr', 't': 'rmbmoney', 'n': 1280}, {
'a': 'attr',
't': 'rmbmoney',
'n': 1280
}, {'a': 'item', 't': '4', 'n': 25}, {'a': 'item', 't': '4', 'n': 25}]
},
{
index: 4,
need: [],
free: false,
payId: 'ycmb_2_4',
buyNum: 3,
prize: [{'a': 'attr', 't': 'rmbmoney', 'n': 3280}, {
'a': 'attr',
't': 'rmbmoney',
'n': 3280
}, {'a': 'item', 't': '4', 'n': 50}, {'a': 'item', 't': '4', 'n': 50}]
},
{
index: 4,
need: [],
free: false,
payId: 'ycmb_2_5',
buyNum: 10,
prize: [{'a': 'attr', 't': 'rmbmoney', 'n': 6480}, {
'a': 'attr',
't': 'rmbmoney',
'n': 6480
}, {'a': 'item', 't': '4', 'n': 100}, {'a': 'item', 't': '4', 'n': 100}]
}
],
//任务相关 type 1 每日任务(每天刷新) 2 活动任务(轮数) 3 每日登录 4-一次性任务 任务hdid一定要唯一
maxlun: [[2], 5],
tasklist: {
'2': {
'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': '600', '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
}
}
}
}
},
{
"hdid": 103, // 唯一活动id 人才计划
"htype": 1, // 后端唯一识别标识1养成目标
"stype": 101, // 前端唯一识别标识(看前端需要是否修改)
"ttype": 0, // 0 按照开服时间计算1 玩家注册时间计算 4 屏蔽此活动
"stime": 42, // 活动开始天数
"rtime": 49, // 活动显示结束天数
"etime": 49, // 活动实际结束
"name": "intr_ychd_title_3",
"icon": "dfry_rcjh",
"showtime": "仅供参考,会复写正确值",
"data": {
//轮数抽卡 mfmid 168318
//活动文本描述 0-每日登录 1-每日任务 2-活动任务 3-一次性任务 4-活动商店
intr2: 'intr_yczm_tips_3',
intr4: 'intr_yczm_tips_4',
//活动名称
name: 'intr_ychd_title_3',
//活动icon
icon: 'icon_ydlb',
//页签名称 0-每日登录 1-每日任务 2-活动任务 3-一次性任务 4-活动商店
tab2: 'intr_ychd_tab_name_4',
tab4: 'intr_ychd_tab_name_5',
//界面跳转 0-每日登录 1-每日任务 2-活动任务 3-一次性任务 4-活动商店
'2': '9',
//礼包
gift: [
{
index: 0,
need: [{'a': 'attr', t: 'rmbmoney', 'n': 0}],
free: true,
payId: '',
buyNum: 1,
prize: [{'a': 'item', 't': '4', 'n': 5}]
},
{
index: 1,
need: [],
free: false,
payId: 'ycmb_2_1',
buyNum: 1,
prize: [{'a': 'attr', 't': 'rmbmoney', 'n': 300}, {
'a': 'attr',
't': 'rmbmoney',
'n': 300
}, {'a': 'item', 't': '4', 'n': 5}, {'a': 'item', 't': '4', 'n': 5}]
},
{
index: 2,
need: [],
free: false,
payId: 'ycmb_2_2',
buyNum: 1,
prize: [{'a': 'attr', 't': 'rmbmoney', 'n': 680}, {
'a': 'attr',
't': 'rmbmoney',
'n': 680
}, {'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '4', 'n': 10}]
},
{
index: 3,
need: [],
free: false,
payId: 'ycmb_2_3',
buyNum: 1,
prize: [{'a': 'attr', 't': 'rmbmoney', 'n': 1280}, {
'a': 'attr',
't': 'rmbmoney',
'n': 1280
}, {'a': 'item', 't': '4', 'n': 25}, {'a': 'item', 't': '4', 'n': 25}]
},
{
index: 4,
need: [],
free: false,
payId: 'ycmb_2_4',
buyNum: 3,
prize: [{'a': 'attr', 't': 'rmbmoney', 'n': 3280}, {
'a': 'attr',
't': 'rmbmoney',
'n': 3280
}, {'a': 'item', 't': '4', 'n': 50}, {'a': 'item', 't': '4', 'n': 50}]
},
{
index: 4,
need: [],
free: false,
payId: 'ycmb_2_5',
buyNum: 10,
prize: [{'a': 'attr', 't': 'rmbmoney', 'n': 6480}, {
'a': 'attr',
't': 'rmbmoney',
'n': 6480
}, {'a': 'item', 't': '4', 'n': 100}, {'a': 'item', 't': '4', 'n': 100}]
}
],
//任务相关 type 1 每日任务(每天刷新) 2 活动任务(轮数) 3 每日登录 4-一次性任务 任务hdid一定要唯一
maxlun: [[2], 5],
tasklist: {
'2': {
'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': '600', '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
}
}
}
}
},
{
"hdid": 2002, // 唯一活动id 掉落兑换活动
"htype": 2, // 后端唯一识别标识
"stype": 200, // 前端唯一识别标识(看前端需要是否修改)
"ttype": 1, // 0 按照开服时间计算1 玩家注册时间计算 4 屏蔽此活动
"stime": 35, // 活动开始天数
"rtime": 42, // 活动显示结束天数
"etime": 42, // 活动实际结束
"name": "diaoluoduihuan",
"icon": "icon_ywtx",
"showtime": "仅供参考,会复写正确值",
"data": {
//对应mfm 14701
diaoluo: [
//掉落的物品
{
a: 'item',
t: '50',
n: 4,
p: 10,
s: 3600
}
],
tiaozhuan: 3,
event: {
itemId: '50',
duihuan: [
{need: [{a: 'item', t: '50', n: 6000}], prize: [{a: 'item', t: '610', n: 1}], num: 2},
{
need: [{a: 'item', t: '50', n: 3500}],
prize: [{a: 'item', t: '600', n: 80}, {a: 'item', t: '12', n: 20000}],
num: 4
},
{
need: [{a: 'item', t: '50', n: 1200}],
prize: [{a: 'item', t: '600', n: 20}, {a: 'item', t: '609', n: 1}, {a: 'item', t: '4', n: 20}],
num: 1
},
{
need: [{a: 'item', t: '50', n: 1500}],
prize: [{a: 'item', t: '611', n: 1}, {a: 'item', t: '624', n: 50}],
num: 1
},
{need: [{a: 'item', t: '50', n: 350}], prize: [{a: 'item', t: '607', n: 20}], num: 1},
{need: [{a: 'item', t: '50', n: 350}], prize: [{a: 'item', t: '600', n: 5}], num: 1},
{need: [{a: 'item', t: '50', n: 100}], prize: [{a: 'item', t: '4', n: 1}], num: 99},
{need: [{a: 'item', t: '50', n: 10}], prize: [{a: 'item', t: '12', n: 25}], num: 99},
{need: [{a: 'item', t: '50', n: 2}], prize: [{a: 'item', t: '2', n: 10}], num: 99},
],
shop: [
{
need: [{a: 'attr', t: 'rmbmoney', n: 0}],
prize: [{a: 'attr', t: 'rmbmoney', n: 500}],
num: 1,
free: true
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 800}],
prize: [{a: 'item', t: '4', n: 5}, {a: 'item', t: '2', n: 1000}],
num: 1,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 2250}],
prize: [{a: 'item', t: '4', n: 10}, {a: 'item', t: '12', n: 2000}],
num: 1,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 3000}],
prize: [{a: 'item', t: '12', n: 6000}],
num: 1,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 3000}],
prize: [{a: 'item', t: '2', n: 12000}],
num: 3,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 3000}],
prize: [{a: 'item', t: '9', n: 6000}],
num: 3,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 3000}],
prize: [{a: 'item', t: '10', n: 300}],
num: 3,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 3000}],
prize: [{a: 'item', t: '612', n: 20}],
num: 3,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 20000}],
prize: [{a: 'item', t: '607', n: 40}, {a: 'item', t: '600', n: 40}],
num: 4,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 3000}],
prize: [{a: 'item', t: '624', n: 20}],
num: 3,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 3000}],
prize: [{a: 'item', t: '629', n: 20}],
num: 3,
free: false
},
],
gift: [
{
payId: '',
num: 1,
prize: [{a: 'item', t: '50', n: 20}, {a: 'attr', t: 'rmbmoney', n: 200}],
free: true
},
{
payId: 'duihuan_1_1',
prize: [{a: 'item', t: '50', n: 50}, {a: 'attr', t: 'rmbmoney', n: 600}],
free: false
},
{
payId: 'duihuan_1_2',
prize: [{a: 'item', t: '50', n: 100}, {a: 'attr', t: 'rmbmoney', n: 1360}],
free: false
},
{
payId: 'duihuan_1_3',
prize: [{a: 'item', t: '50', n: 200}, {a: 'attr', t: 'rmbmoney', n: 2560}],
free: false
},
{
payId: 'duihuan_1_4',
prize: [{a: 'item', t: '50', n: 600}, {a: 'attr', t: 'rmbmoney', n: 6560}],
free: false
},
{
payId: 'duihuan_1_5',
prize: [{a: 'item', t: '50', n: 1200}, {a: 'attr', t: 'rmbmoney', n: 12960}],
free: false
},
]
}
}
},
{
"hdid": 2003, // 唯一活动id 掉落兑换活动
"htype": 2, // 后端唯一识别标识
"stype": 200, // 前端唯一识别标识(看前端需要是否修改)
"ttype": 1, // 0 按照开服时间计算1 玩家注册时间计算 4 屏蔽此活动
"stime": 49, // 活动开始天数
"rtime": 56, // 活动显示结束天数
"etime": 56, // 活动实际结束
"name": "diaoluoduihuan",
"icon": "icon_ywtx",
"showtime": "仅供参考,会复写正确值",
"data": {
//对应mfm 14701
diaoluo: [
//掉落的物品
{
a: 'item',
t: '50',
n: 4,
p: 10,
s: 3600
}
],
tiaozhuan: 3,
event: {
itemId: '50',
duihuan: [
{need: [{a: 'item', t: '50', n: 6000}], prize: [{a: 'item', t: '610', n: 1}], num: 2},
{
need: [{a: 'item', t: '50', n: 3500}],
prize: [{a: 'item', t: '600', n: 80}, {a: 'item', t: '12', n: 20000}],
num: 4
},
{
need: [{a: 'item', t: '50', n: 1200}],
prize: [{a: 'item', t: '600', n: 20}, {a: 'item', t: '609', n: 1}, {a: 'item', t: '4', n: 20}],
num: 1
},
{
need: [{a: 'item', t: '50', n: 1500}],
prize: [{a: 'item', t: '611', n: 1}, {a: 'item', t: '624', n: 50}],
num: 1
},
{need: [{a: 'item', t: '50', n: 350}], prize: [{a: 'item', t: '607', n: 20}], num: 1},
{need: [{a: 'item', t: '50', n: 350}], prize: [{a: 'item', t: '600', n: 5}], num: 1},
{need: [{a: 'item', t: '50', n: 100}], prize: [{a: 'item', t: '4', n: 1}], num: 99},
{need: [{a: 'item', t: '50', n: 10}], prize: [{a: 'item', t: '12', n: 25}], num: 99},
{need: [{a: 'item', t: '50', n: 2}], prize: [{a: 'item', t: '2', n: 10}], num: 99},
],
shop: [
{
need: [{a: 'attr', t: 'rmbmoney', n: 0}],
prize: [{a: 'attr', t: 'rmbmoney', n: 500}],
num: 1,
free: true
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 800}],
prize: [{a: 'item', t: '4', n: 5}, {a: 'item', t: '2', n: 1000}],
num: 1,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 2250}],
prize: [{a: 'item', t: '4', n: 10}, {a: 'item', t: '12', n: 2000}],
num: 1,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 3000}],
prize: [{a: 'item', t: '12', n: 6000}],
num: 1,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 3000}],
prize: [{a: 'item', t: '2', n: 12000}],
num: 3,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 3000}],
prize: [{a: 'item', t: '9', n: 6000}],
num: 3,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 3000}],
prize: [{a: 'item', t: '10', n: 300}],
num: 3,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 3000}],
prize: [{a: 'item', t: '612', n: 20}],
num: 3,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 20000}],
prize: [{a: 'item', t: '607', n: 40}, {a: 'item', t: '600', n: 40}],
num: 4,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 3000}],
prize: [{a: 'item', t: '624', n: 20}],
num: 3,
free: false
},
{
need: [{a: 'attr', t: 'rmbmoney', n: 3000}],
prize: [{a: 'item', t: '629', n: 20}],
num: 3,
free: false
},
],
gift: [
{
payId: '',
num: 1,
prize: [{a: 'item', t: '50', n: 20}, {a: 'attr', t: 'rmbmoney', n: 200}],
free: true
},
{
payId: 'duihuan_1_1',
prize: [{a: 'item', t: '50', n: 50}, {a: 'attr', t: 'rmbmoney', n: 600}],
free: false
},
{
payId: 'duihuan_1_2',
prize: [{a: 'item', t: '50', n: 100}, {a: 'attr', t: 'rmbmoney', n: 1360}],
free: false
},
{
payId: 'duihuan_1_3',
prize: [{a: 'item', t: '50', n: 200}, {a: 'attr', t: 'rmbmoney', n: 2560}],
free: false
},
{
payId: 'duihuan_1_4',
prize: [{a: 'item', t: '50', n: 600}, {a: 'attr', t: 'rmbmoney', n: 6560}],
free: false
},
{
payId: 'duihuan_1_5',
prize: [{a: 'item', t: '50', n: 1200}, {a: 'attr', t: 'rmbmoney', n: 12960}],
free: false
},
]
}
}
},
]