fix:
1:头像框脚本 2:添加监控数据
This commit is contained in:
parent
fc1e2c9e1f
commit
a2e3fc1aa9
68
src/fix_patch/patch_20240112-1.ts
Normal file
68
src/fix_patch/patch_20240112-1.ts
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
import { ReqEmail } from "../monopoly/protocols/PtlEmail";
|
||||||
|
import { patchInit } from "../patch";
|
||||||
|
import { MsgEmail } from "../shared/protocols/msg_s2c/MsgEmail";
|
||||||
|
import { PublicShared } from "../shared/public/public";
|
||||||
|
|
||||||
|
|
||||||
|
class Path {
|
||||||
|
async fun1(a: any) {
|
||||||
|
let uids = [
|
||||||
|
"4_6571ab682b3f80154e724f2a",
|
||||||
|
"16_6575e1625685671e63fe001f",
|
||||||
|
"13_6574ad08e7cc32b4bd1334e8",
|
||||||
|
"13_65749bc319cab1affec349fb",
|
||||||
|
];
|
||||||
|
|
||||||
|
// 删除玩家背包中的头像框
|
||||||
|
let items = await G.mongodb.collection("item").find({ uid: { $nin: uids }, itemId: { $in: ["47", "48"] } }).toArray();
|
||||||
|
for (let item of items) {
|
||||||
|
console.log(`删除玩家${item.uid}的头像框道具${item.itemId}`);
|
||||||
|
await G.mongodb.collection("item").updateOne({ _id: item._id }, { $set: { uid: `patch_del_${item.uid}` } });
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除玩家存在的头像框
|
||||||
|
let users = await G.mongodb.collection("user").find({
|
||||||
|
uid: { $nin: uids }, $or: [
|
||||||
|
{ ["headFrame.id"]: "8" },
|
||||||
|
{ ["headFrame.id"]: "14" },
|
||||||
|
{ ["headFrames.8"]: { $exists: true } },
|
||||||
|
{ ["headFrames.14"]: { $exists: true } },
|
||||||
|
]
|
||||||
|
}).toArray();
|
||||||
|
for (let user of users) {
|
||||||
|
let change = { $set: {}, $unset: {} };
|
||||||
|
if (user.headFrame?.id == "8" || user.headFrame?.id == "14") {
|
||||||
|
change.$set = { headFrame: { id: "1", time: -1 } };
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user.headFrames["8"] != undefined) {
|
||||||
|
change.$unset["headFrames.8"] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user.headFrames["14"] != undefined) {
|
||||||
|
change.$unset["headFrames.14"] = 1;
|
||||||
|
}
|
||||||
|
if (Object.keys(change.$set).length > 0 || Object.keys(change.$unset).length > 0) {
|
||||||
|
console.log(`处理玩家${user.uid}数据:${JSON.stringify(change)}`);
|
||||||
|
await G.mongodb.collection("user").updateOne({ _id: user._id }, change);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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();
|
@ -11,14 +11,29 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key":"got_rmbmoney",
|
"key":"got_rmbmoney",
|
||||||
"limit":50000,
|
"limit":100000,
|
||||||
"tips":"钻石获取达到5万"
|
"tips":"钻石获取达到10万"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key":"use_attr_rmbmoney",
|
"key":"use_attr_rmbmoney",
|
||||||
"limit":100000,
|
"limit":100000,
|
||||||
"tips":"钻石消耗达到10万"
|
"tips":"钻石消耗达到10万"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"key":"got_huangqijinbi",
|
||||||
|
"limit":5000,
|
||||||
|
"tips":"单日获取黄旗金币达到5000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key":"got_huangqiduihuan",
|
||||||
|
"limit":10000,
|
||||||
|
"tips":"单日获取黄旗兑换达到10000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "event/huangqijiuguan/ZhaoMu",
|
||||||
|
"limit": 1000,
|
||||||
|
"tips": "单日获取黄旗招募超过1000抽"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"key":"tanxian/FastGuaJi",
|
"key":"tanxian/FastGuaJi",
|
||||||
"limit":30,
|
"limit":30,
|
||||||
|
Loading…
Reference in New Issue
Block a user